2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.71 for GNU M4 1.4.19.
5 # Report bugs to <bug-m4@gnu.org>.
8 # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
12 # This configure script is free software; the Free Software Foundation
13 # gives unlimited permission to copy, distribute and modify it.
14 ## -------------------- ##
15 ## M4sh Initialization. ##
16 ## -------------------- ##
18 # Be more Bourne compatible
19 DUALCASE=1; export DUALCASE # for MKS sh
21 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
25 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
30 case `(set -o) 2>/dev/null` in #(
40 # Reset variables that may have inherited troublesome values from
43 # IFS needs to be set, to space, tab, and newline, in precisely that order.
44 # (If _AS_PATH_WALK were called with IFS unset, it would have the
45 # side effect of setting IFS to empty, thus disabling word splitting.)
46 # Quoting is to prevent editors from complaining about space-tab.
56 # Ensure predictable behavior from utilities with locale-dependent output.
62 # We cannot yet rely on "unset" to work, but we need these variables
63 # to be unset--not just set to an empty or harmless value--now, to
64 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
65 # also avoids known problems related to "unset" and subshell syntax
66 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
67 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
68 do eval test \${$as_var+y} \
69 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
72 # Ensure that fds 0, 1, and 2 are open.
73 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
74 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
75 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
77 # The user is always right.
78 if ${PATH_SEPARATOR+false} :; then
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
87 # Find who we are. Look in the path if we contain no directory separator.
90 *[\\/]* ) as_myself=$0 ;;
91 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
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 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
117 # Use a proper internal environment variable to ensure we don't fall
118 # into an infinite loop, continuously re-executing ourselves.
119 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
120 _as_can_reexec=no; export _as_can_reexec;
121 # We cannot yet assume a decent shell, so we have to provide a
122 # neutralization value for shells without unset; and this also
123 # works around shells that cannot unset nonexistent variables.
124 # Preserve -v and -x to the replacement shell.
127 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
129 *v*x* | *x*v* ) as_opts=-vx ;;
134 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
135 # Admittedly, this is quite paranoid, since all the known shells bail
136 # out after a failed `exec'.
137 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
140 # We don't want this to propagate to other subprocesses.
141 { _as_can_reexec=; unset _as_can_reexec;}
142 if test "x$CONFIG_SHELL" = x; then
143 as_bourne_compatible="as_nop=:
144 if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
148 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149 # is contrary to our usage. Disable this feature.
150 alias -g '\${1+\"\$@\"}'='\"\$@\"'
153 case \`(set -o) 2>/dev/null\` in #(
161 as_required="as_fn_return () { (exit \$1); }
162 as_fn_success () { as_fn_return 0; }
163 as_fn_failure () { as_fn_return 1; }
164 as_fn_ret_success () { return 0; }
165 as_fn_ret_failure () { return 1; }
168 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
169 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
172 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
176 exitcode=1; echo positional parameters were not saved.
178 test x\$exitcode = x0 || exit 1
179 blah=\$(echo \$(echo blah))
180 test x\"\$blah\" = xblah || exit 1
182 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186 test \$(( 1 + 1 )) = 2 || exit 1"
187 if (eval "$as_required") 2>/dev/null
193 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
199 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
205 *) as_dir=$as_dir/ ;;
210 for as_base in sh bash ksh sh5; do
211 # Try only shells that exist, to save several forks.
212 as_shell=$as_dir$as_base
213 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
214 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
216 CONFIG_SHELL=$as_shell as_have_required=yes
217 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
231 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
234 CONFIG_SHELL=$SHELL as_have_required=yes
239 if test "x$CONFIG_SHELL" != x
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 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
262 if test x$as_have_required = xno
264 printf "%s\n" "$0: This script requires a shell more modern than all"
265 printf "%s\n" "$0: the shells that I found on your system."
266 if test ${ZSH_VERSION+y} ; then
267 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
270 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-m4@gnu.org
271 $0: about your system, including any error possibly output
272 $0: before this message. Then install a modern shell, or
273 $0: manually run the script under such a shell if you do
280 SHELL=${CONFIG_SHELL-/bin/sh}
282 # Unset more variables known to interfere with behavior of common tools.
283 CLICOLOR_FORCE= GREP_OPTIONS=
284 unset CLICOLOR_FORCE GREP_OPTIONS
286 ## --------------------- ##
287 ## M4sh Shell Functions. ##
288 ## --------------------- ##
291 # Portably unset VAR.
294 { eval $1=; unset $1;}
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
318 # Do nothing but, unlike ":", preserve the value of $?.
327 # Create "$as_dir" as a directory, including parents if necessary.
332 -*) as_dir=./$as_dir;;
334 test -d "$as_dir" || eval $as_mkdir_p || {
338 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
341 as_dirs="'$as_qdir' $as_dirs"
342 as_dir=`$as_dirname -- "$as_dir" ||
343 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
344 X"$as_dir" : 'X\(//\)[^/]' \| \
345 X"$as_dir" : 'X\(//\)$' \| \
346 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
347 printf "%s\n" X"$as_dir" |
348 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
365 test -d "$as_dir" && break
367 test -z "$as_dirs" || eval "mkdir $as_dirs"
368 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
373 # as_fn_executable_p FILE
374 # -----------------------
375 # Test if FILE is an executable regular file.
376 as_fn_executable_p ()
378 test -f "$1" && test -x "$1"
379 } # as_fn_executable_p
380 # as_fn_append VAR VALUE
381 # ----------------------
382 # Append the text in VALUE to the end of the definition contained in VAR. Take
383 # advantage of any shell optimizations that allow amortized linear growth over
384 # repeated appends, instead of the typical quadratic growth present in naive
386 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
388 eval 'as_fn_append ()
401 # Perform arithmetic evaluation on the ARGs, and store the result in the
402 # global $as_val. Take advantage of shells that can avoid forks. The arguments
403 # must be portable across $(()) and expr.
404 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
413 as_val=`expr "$@" || test $? -eq 1`
419 # Do nothing but, unlike ":", preserve the value of $?.
426 # as_fn_error STATUS ERROR [LINENO LOG_FD]
427 # ----------------------------------------
428 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
429 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
430 # script with STATUS, using 1 if that was 0.
433 as_status=$1; test $as_status -eq 0 && as_status=1
435 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
436 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
438 printf "%s\n" "$as_me: error: $2" >&2
439 as_fn_exit $as_status
442 if expr a : '\(a\)' >/dev/null 2>&1 &&
443 test "X`expr 00001 : '.*\(...\)'`" = X001; then
449 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
455 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
461 as_me=`$as_basename -- "$0" ||
462 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
463 X"$0" : 'X\(//\)$' \| \
464 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
465 printf "%s\n" X/"$0" |
466 sed '/^.*\/\([^/][^/]*\)\/*$/{
480 # Avoid depending upon Character Ranges.
481 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
482 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
483 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
484 as_cr_digits='0123456789'
485 as_cr_alnum=$as_cr_Letters$as_cr_digits
488 as_lineno_1=$LINENO as_lineno_1a=$LINENO
489 as_lineno_2=$LINENO as_lineno_2a=$LINENO
490 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
491 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
492 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
504 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
508 chmod +x "$as_me.lineno" ||
509 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
511 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
512 # already done that, so ensure we don't try to do so again and fall
513 # in an infinite loop. This has already happened in practice.
514 _as_can_reexec=no; export _as_can_reexec
515 # Don't try to exec as it changes $[0], causing all sort of problems
516 # (the dirname of $[0] is not the place where we might find the
517 # original and so on. Autoconf is especially sensitive to this).
519 # Exit status is that of the last command.
524 # Determine whether it's possible to make 'echo' print without a newline.
525 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
526 # for compatibility with existing Makefiles.
527 ECHO_C= ECHO_N= ECHO_T=
528 case `echo -n x` in #(((((
530 case `echo 'xy\c'` in
531 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
533 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
540 # For backward compatibility with old third-party macros, we provide
541 # the shell variables $as_echo and $as_echo_n. New code should use
542 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
543 as_echo='printf %s\n'
544 as_echo_n='printf %s'
547 rm -f conf$$ conf$$.exe conf$$.file
548 if test -d conf$$.dir; then
549 rm -f conf$$.dir/conf$$.file
552 mkdir conf$$.dir 2>/dev/null
554 if (echo >conf$$.file) 2>/dev/null; then
555 if ln -s conf$$.file conf$$ 2>/dev/null; then
557 # ... but there are two gotchas:
558 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
559 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
560 # In both cases, we have to default to `cp -pR'.
561 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
563 elif ln conf$$.file conf$$ 2>/dev/null; then
571 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
572 rmdir conf$$.dir 2>/dev/null
574 if mkdir -p . 2>/dev/null; then
575 as_mkdir_p='mkdir -p "$as_dir"'
577 test -d ./-p && rmdir ./-p
582 as_executable_p=as_fn_executable_p
584 # Sed expression to map a string onto a valid CPP name.
585 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
587 # Sed expression to map a string onto a valid variable name.
588 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
591 test -n "$DJDIR" || exec 7<&0 </dev/null
595 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
596 # so uname gets run too.
597 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
602 ac_default_prefix=/usr/local
604 ac_config_libobj_dir=.
611 # Identity of this package.
612 PACKAGE_NAME='GNU M4'
614 PACKAGE_VERSION='1.4.19'
615 PACKAGE_STRING='GNU M4 1.4.19'
616 PACKAGE_BUGREPORT='bug-m4@gnu.org'
617 PACKAGE_URL='https://www.gnu.org/software/m4/'
619 ac_unique_file="src/m4.h"
620 # Factoring default headers for most tests.
621 ac_includes_default="\
632 #ifdef HAVE_INTTYPES_H
633 # include <inttypes.h>
638 #ifdef HAVE_STRINGS_H
639 # include <strings.h>
641 #ifdef HAVE_SYS_TYPES_H
642 # include <sys/types.h>
644 #ifdef HAVE_SYS_STAT_H
645 # include <sys/stat.h>
652 gl_use_threads_default=
653 gl_use_winpthreads_default=
655 gl_getopt_required=POSIX
657 ac_subst_vars='M4tests_LTLIBOBJS
668 XGETTEXT_EXTRA_OPTIONS
676 GETTEXT_MACRO_VERSION
685 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
687 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
693 GL_M4_GNULIB_PTHREAD_MUTEX_TIMEDLOCK
694 GL_M4_GNULIB_PTHREAD_SPIN
695 GL_M4_GNULIB_PTHREAD_TSS
696 GL_M4_GNULIB_PTHREAD_COND
697 GL_M4_GNULIB_PTHREAD_RWLOCK
698 GL_M4_GNULIB_PTHREAD_MUTEX
699 GL_M4_GNULIB_PTHREAD_ONCE
700 GL_M4_GNULIB_PTHREAD_THREAD
703 NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H
705 REPLACE_PTHREAD_SPIN_DESTROY
706 REPLACE_PTHREAD_SPIN_UNLOCK
707 REPLACE_PTHREAD_SPIN_TRYLOCK
708 REPLACE_PTHREAD_SPIN_LOCK
709 REPLACE_PTHREAD_SPIN_INIT
710 REPLACE_PTHREAD_KEY_DELETE
711 REPLACE_PTHREAD_GETSPECIFIC
712 REPLACE_PTHREAD_SETSPECIFIC
713 REPLACE_PTHREAD_KEY_CREATE
714 REPLACE_PTHREAD_COND_DESTROY
715 REPLACE_PTHREAD_COND_BROADCAST
716 REPLACE_PTHREAD_COND_SIGNAL
717 REPLACE_PTHREAD_COND_TIMEDWAIT
718 REPLACE_PTHREAD_COND_WAIT
719 REPLACE_PTHREAD_CONDATTR_DESTROY
720 REPLACE_PTHREAD_CONDATTR_INIT
721 REPLACE_PTHREAD_COND_INIT
722 REPLACE_PTHREAD_RWLOCK_DESTROY
723 REPLACE_PTHREAD_RWLOCK_UNLOCK
724 REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK
725 REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK
726 REPLACE_PTHREAD_RWLOCK_TRYWRLOCK
727 REPLACE_PTHREAD_RWLOCK_TRYRDLOCK
728 REPLACE_PTHREAD_RWLOCK_WRLOCK
729 REPLACE_PTHREAD_RWLOCK_RDLOCK
730 REPLACE_PTHREAD_RWLOCKATTR_DESTROY
731 REPLACE_PTHREAD_RWLOCKATTR_INIT
732 REPLACE_PTHREAD_RWLOCK_INIT
733 REPLACE_PTHREAD_MUTEX_DESTROY
734 REPLACE_PTHREAD_MUTEX_UNLOCK
735 REPLACE_PTHREAD_MUTEX_TIMEDLOCK
736 REPLACE_PTHREAD_MUTEX_TRYLOCK
737 REPLACE_PTHREAD_MUTEX_LOCK
738 REPLACE_PTHREAD_MUTEXATTR_DESTROY
739 REPLACE_PTHREAD_MUTEXATTR_SETROBUST
740 REPLACE_PTHREAD_MUTEXATTR_GETROBUST
741 REPLACE_PTHREAD_MUTEXATTR_SETTYPE
742 REPLACE_PTHREAD_MUTEXATTR_GETTYPE
743 REPLACE_PTHREAD_MUTEXATTR_INIT
744 REPLACE_PTHREAD_MUTEX_INIT
748 REPLACE_PTHREAD_DETACH
749 REPLACE_PTHREAD_EQUAL
751 REPLACE_PTHREAD_ATTR_DESTROY
752 REPLACE_PTHREAD_ATTR_SETDETACHSTATE
753 REPLACE_PTHREAD_ATTR_GETDETACHSTATE
754 REPLACE_PTHREAD_ATTR_INIT
755 REPLACE_PTHREAD_CREATE
756 HAVE_PTHREAD_SPIN_DESTROY
757 HAVE_PTHREAD_SPIN_UNLOCK
758 HAVE_PTHREAD_SPIN_TRYLOCK
759 HAVE_PTHREAD_SPIN_LOCK
760 HAVE_PTHREAD_SPIN_INIT
761 HAVE_PTHREAD_KEY_DELETE
762 HAVE_PTHREAD_GETSPECIFIC
763 HAVE_PTHREAD_SETSPECIFIC
764 HAVE_PTHREAD_KEY_CREATE
765 HAVE_PTHREAD_COND_DESTROY
766 HAVE_PTHREAD_COND_BROADCAST
767 HAVE_PTHREAD_COND_SIGNAL
768 HAVE_PTHREAD_COND_TIMEDWAIT
769 HAVE_PTHREAD_COND_WAIT
770 HAVE_PTHREAD_CONDATTR_DESTROY
771 HAVE_PTHREAD_CONDATTR_INIT
772 HAVE_PTHREAD_COND_INIT
773 HAVE_PTHREAD_RWLOCK_DESTROY
774 HAVE_PTHREAD_RWLOCK_UNLOCK
775 HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
776 HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK
777 HAVE_PTHREAD_RWLOCK_TRYWRLOCK
778 HAVE_PTHREAD_RWLOCK_TRYRDLOCK
779 HAVE_PTHREAD_RWLOCK_WRLOCK
780 HAVE_PTHREAD_RWLOCK_RDLOCK
781 HAVE_PTHREAD_RWLOCKATTR_DESTROY
782 HAVE_PTHREAD_RWLOCKATTR_INIT
783 HAVE_PTHREAD_RWLOCK_INIT
784 HAVE_PTHREAD_MUTEX_DESTROY
785 HAVE_PTHREAD_MUTEX_UNLOCK
786 HAVE_PTHREAD_MUTEX_TIMEDLOCK
787 HAVE_PTHREAD_MUTEX_TRYLOCK
788 HAVE_PTHREAD_MUTEX_LOCK
789 HAVE_PTHREAD_MUTEXATTR_DESTROY
790 HAVE_PTHREAD_MUTEXATTR_SETROBUST
791 HAVE_PTHREAD_MUTEXATTR_GETROBUST
792 HAVE_PTHREAD_MUTEXATTR_SETTYPE
793 HAVE_PTHREAD_MUTEXATTR_GETTYPE
794 HAVE_PTHREAD_MUTEXATTR_INIT
795 HAVE_PTHREAD_MUTEX_INIT
802 HAVE_PTHREAD_ATTR_DESTROY
803 HAVE_PTHREAD_ATTR_SETDETACHSTATE
804 HAVE_PTHREAD_ATTR_GETDETACHSTATE
805 HAVE_PTHREAD_ATTR_INIT
807 HAVE_PTHREAD_PROCESS_SHARED
808 HAVE_PTHREAD_MUTEX_ROBUST
809 HAVE_PTHREAD_MUTEX_RECURSIVE
810 HAVE_PTHREAD_CREATE_DETACHED
811 HAVE_PTHREAD_SPINLOCK_T
813 GL_GENERATE_NETINET_IN_H_FALSE
814 GL_GENERATE_NETINET_IN_H_TRUE
817 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
823 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
830 GL_M4_GNULIB_GETTIMEOFDAY
831 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
833 REPLACE_STRUCT_TIMEVAL
839 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
844 GL_M4_GNULIB_INET_PTON
845 GL_M4_GNULIB_INET_NTOP
846 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
854 GL_M4_GNULIB_SHUTDOWN
855 GL_M4_GNULIB_SETSOCKOPT
857 GL_M4_GNULIB_RECVFROM
861 GL_M4_GNULIB_GETSOCKOPT
862 GL_M4_GNULIB_GETSOCKNAME
863 GL_M4_GNULIB_GETPEERNAME
870 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
874 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
875 HAVE_STRUCT_SOCKADDR_STORAGE
877 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
880 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
881 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
882 LIBUNISTRING_UNIWIDTH_H
883 LIBUNISTRING_UNITYPES_H
884 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE
885 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE
886 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE
887 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE
888 LIBUNISTRING_UNISTR_H
890 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
892 GL_M4_GNULIB_MDA_TZSET
896 GL_M4_GNULIB_TIMESPEC_GET
898 GL_M4_GNULIB_STRPTIME
899 GL_M4_GNULIB_STRFTIME
900 GL_M4_GNULIB_NANOSLEEP
901 GL_M4_GNULIB_LOCALTIME
904 TIME_H_DEFINES_TIME_UTC
905 UNISTD_H_DEFINES_STRUCT_TIMESPEC
906 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
907 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
908 TIME_H_DEFINES_STRUCT_TIMESPEC
909 NEXT_AS_FIRST_DIRECTIVE_TIME_H
926 HAVE_DECL_LOCALTIME_R
928 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
931 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
933 NEXT_AS_FIRST_DIRECTIVE_STRING_H
935 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
937 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
940 GL_GENERATE_STDBOOL_H_FALSE
941 GL_GENERATE_STDBOOL_H_TRUE
943 GL_GENERATE_STDARG_H_FALSE
944 GL_GENERATE_STDARG_H_TRUE
946 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
948 GL_GENERATE_STDALIGN_H_FALSE
949 GL_GENERATE_STDALIGN_H_TRUE
952 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
954 GL_GENERATE_SIGSEGV_H_FALSE
955 GL_GENERATE_SIGSEGV_H_TRUE
962 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
965 GL_M4_GNULIB_SCHED_YIELD
966 HAVE_STRUCT_SCHED_PARAM
968 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
972 GL_M4_GNULIB_SIGACTION
973 GL_M4_GNULIB_SIGPROCMASK
974 GL_M4_GNULIB_SIGNAL_H_SIGPIPE
976 GL_M4_GNULIB_PTHREAD_SIGMASK
978 REPLACE_PTHREAD_SIGMASK
980 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
981 HAVE_STRUCT_SIGACTION_SA_SIGACTION
987 HAVE_POSIX_SIGNALBLOCKING
988 GL_M4_GNULIB_POSIX_SPAWNATTR_DESTROY
989 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSIGMASK
990 GL_M4_GNULIB_POSIX_SPAWNATTR_GETSIGMASK
991 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
992 GL_M4_GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
993 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
994 GL_M4_GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
995 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
996 GL_M4_GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
997 GL_M4_GNULIB_POSIX_SPAWNATTR_SETPGROUP
998 GL_M4_GNULIB_POSIX_SPAWNATTR_GETPGROUP
999 GL_M4_GNULIB_POSIX_SPAWNATTR_SETFLAGS
1000 GL_M4_GNULIB_POSIX_SPAWNATTR_GETFLAGS
1001 GL_M4_GNULIB_POSIX_SPAWNATTR_INIT
1002 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
1003 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
1004 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
1005 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
1006 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
1007 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
1008 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
1009 GL_M4_GNULIB_POSIX_SPAWNP
1010 GL_M4_GNULIB_POSIX_SPAWN
1012 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
1013 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
1014 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
1015 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
1016 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
1018 HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
1019 HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
1020 HAVE_POSIX_SPAWN_FILE_ACTIONS_T
1021 HAVE_POSIX_SPAWNATTR_T
1024 GL_M4_GNULIB_MDA_STRDUP
1025 GL_M4_GNULIB_MDA_MEMCCPY
1026 GL_M4_GNULIB_STRVERSCMP
1027 GL_M4_GNULIB_STRSIGNAL
1028 GL_M4_GNULIB_SIGDESCR_NP
1029 GL_M4_GNULIB_SIGABBREV_NP
1030 GL_M4_GNULIB_STRERRORNAME_NP
1031 GL_M4_GNULIB_STRERROR_R
1032 GL_M4_GNULIB_STRERROR
1033 GL_M4_GNULIB_MBSTOK_R
1036 GL_M4_GNULIB_MBSPBRK
1037 GL_M4_GNULIB_MBSCSPN
1038 GL_M4_GNULIB_MBSCASESTR
1039 GL_M4_GNULIB_MBSPCASECMP
1040 GL_M4_GNULIB_MBSNCASECMP
1041 GL_M4_GNULIB_MBSCASECMP
1043 GL_M4_GNULIB_MBSRCHR
1045 GL_M4_GNULIB_MBSNLEN
1047 GL_M4_GNULIB_STRTOK_R
1048 GL_M4_GNULIB_STRCASESTR
1051 GL_M4_GNULIB_STRPBRK
1052 GL_M4_GNULIB_STRNLEN
1053 GL_M4_GNULIB_STRNDUP
1054 GL_M4_GNULIB_STRNCAT
1056 GL_M4_GNULIB_STRCHRNUL
1057 GL_M4_GNULIB_STPNCPY
1059 GL_M4_GNULIB_RAWMEMCHR
1060 GL_M4_GNULIB_MEMRCHR
1061 GL_M4_GNULIB_MEMPCPY
1066 GL_M4_GNULIB_EXPLICIT_BZERO
1069 REPLACE_STRERRORNAME_NP
1088 HAVE_STRERRORNAME_NP
1089 HAVE_DECL_STRERROR_R
1111 NEXT_AS_FIRST_DIRECTIVE_MATH_H
1120 GL_M4_GNULIB_LOCALENAME
1121 GL_M4_GNULIB_DUPLOCALE
1122 GL_M4_GNULIB_SETLOCALE_NULL
1123 GL_M4_GNULIB_SETLOCALE
1124 GL_M4_GNULIB_LOCALECONV
1125 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1128 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1130 GL_GENERATE_STDDEF_H_FALSE
1131 GL_GENERATE_STDDEF_H_TRUE
1136 LOCALENAME_ENHANCE_LOCALE_FUNCS
1137 REPLACE_STRUCT_LCONV
1146 LOCALCHARSET_TESTS_ENVIRONMENT
1147 GL_M4_GNULIB_NL_LANGINFO
1148 HAVE_LANGINFO_YESEXPR
1150 HAVE_LANGINFO_ALTMON
1151 HAVE_LANGINFO_T_FMT_AMPM
1152 HAVE_LANGINFO_CODESET
1154 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1161 GL_M4_GNULIB_TOWCTRANS
1162 GL_M4_GNULIB_WCTRANS
1163 GL_M4_GNULIB_ISWCTYPE
1165 GL_M4_GNULIB_ISWXDIGIT
1166 GL_M4_GNULIB_ISWDIGIT
1167 GL_M4_GNULIB_ISWBLANK
1171 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
1182 GL_M4_GNULIB_STRTOUMAX
1183 GL_M4_GNULIB_STRTOIMAX
1184 GL_M4_GNULIB_IMAXDIV
1185 GL_M4_GNULIB_IMAXABS
1186 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1188 UINT64_MAX_EQ_ULONG_MAX
1189 UINT32_MAX_LT_UINTMAX_MAX
1191 INT64_MAX_EQ_LONG_MAX
1192 INT32_MAX_LT_INTMAX_MAX
1200 GL_GENERATE_STDINT_H_FALSE
1201 GL_GENERATE_STDINT_H_TRUE
1213 HAVE_SIGNED_SIG_ATOMIC_T
1216 BITSIZEOF_SIG_ATOMIC_T
1219 APPLE_UNIVERSAL_BUILD
1221 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1226 GNULIBHEADERS_OVERRIDE_WINT_T
1227 GL_GENERATE_LIMITS_H_FALSE
1228 GL_GENERATE_LIMITS_H_TRUE
1230 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1232 NEXT_AS_FIRST_DIRECTIVE_ICONV_H
1235 GL_GENERATE_ICONV_H_FALSE
1236 GL_GENERATE_ICONV_H_TRUE
1253 GL_M4_GNULIB_GETRANDOM
1257 GNULIB_GL_M4_UNISTD_H_GETOPT
1262 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1264 GL_M4_GNULIB_MDA_UMASK
1265 GL_M4_GNULIB_MDA_MKDIR
1266 GL_M4_GNULIB_MDA_CHMOD
1267 GL_M4_GNULIB_OVERRIDES_STRUCT_STAT
1268 GL_M4_GNULIB_UTIMENSAT
1270 GL_M4_GNULIB_MKNODAT
1272 GL_M4_GNULIB_MKFIFOAT
1274 GL_M4_GNULIB_MKDIRAT
1278 GL_M4_GNULIB_GETUMASK
1279 GL_M4_GNULIB_FUTIMENS
1280 GL_M4_GNULIB_FSTATAT
1282 GL_M4_GNULIB_FCHMODAT
1283 WINDOWS_64_BIT_ST_SIZE
1284 WINDOWS_STAT_TIMESPEC
1285 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1312 WINDOWS_64_BIT_OFF_T
1313 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1315 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1333 GL_M4_GNULIB_SIGNBIT
1340 GL_M4_GNULIB_REMAINDERL
1341 GL_M4_GNULIB_REMAINDERF
1342 GL_M4_GNULIB_REMAINDER
1369 GL_M4_GNULIB_ISFINITE
1401 GL_M4_GNULIB_COPYSIGNL
1402 GL_M4_GNULIB_COPYSIGNF
1403 GL_M4_GNULIB_COPYSIGN
1426 REPLACE_SIGNBIT_USING_BUILTINS
1506 HAVE_DECL_REMAINDERL
1593 GL_GENERATE_FLOAT_H_FALSE
1594 GL_GENERATE_FLOAT_H_TRUE
1596 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1598 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1600 GL_M4_GNULIB_MDA_OPEN
1601 GL_M4_GNULIB_MDA_CREAT
1604 GL_M4_GNULIB_NONBLOCKING
1613 GL_M4_GNULIB_MDA_TEMPNAM
1614 GL_M4_GNULIB_MDA_PUTW
1615 GL_M4_GNULIB_MDA_GETW
1616 GL_M4_GNULIB_MDA_FILENO
1617 GL_M4_GNULIB_MDA_FDOPEN
1618 GL_M4_GNULIB_MDA_FCLOSEALL
1619 GL_M4_GNULIB_VSPRINTF_POSIX
1620 GL_M4_GNULIB_VSNPRINTF
1621 GL_M4_GNULIB_VPRINTF_POSIX
1622 GL_M4_GNULIB_VPRINTF
1623 GL_M4_GNULIB_VFPRINTF_POSIX
1624 GL_M4_GNULIB_VFPRINTF
1625 GL_M4_GNULIB_VDPRINTF
1627 GL_M4_GNULIB_VFSCANF
1628 GL_M4_GNULIB_VASPRINTF
1629 GL_M4_GNULIB_TMPFILE
1630 GL_M4_GNULIB_STDIO_H_SIGPIPE
1631 GL_M4_GNULIB_STDIO_H_NONBLOCKING
1632 GL_M4_GNULIB_SPRINTF_POSIX
1633 GL_M4_GNULIB_SNPRINTF
1635 GL_M4_GNULIB_RENAMEAT
1639 GL_M4_GNULIB_PUTCHAR
1641 GL_M4_GNULIB_PRINTF_POSIX
1646 GL_M4_GNULIB_OBSTACK_PRINTF_POSIX
1647 GL_M4_GNULIB_OBSTACK_PRINTF
1648 GL_M4_GNULIB_GETLINE
1649 GL_M4_GNULIB_GETDELIM
1650 GL_M4_GNULIB_GETCHAR
1658 GL_M4_GNULIB_FREOPEN
1663 GL_M4_GNULIB_FPRINTF_POSIX
1664 GL_M4_GNULIB_FPRINTF
1671 GL_M4_GNULIB_DPRINTF
1679 REPLACE_STDIO_WRITE_FUNCS
1680 REPLACE_STDIO_READ_FUNCS
1689 REPLACE_OBSTACK_PRINTF
1714 HAVE_DECL_OBSTACK_PRINTF
1727 GL_GENERATE_ERRNO_H_FALSE
1728 GL_GENERATE_ERRNO_H_TRUE
1730 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1733 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1736 PRAGMA_SYSTEM_HEADER
1737 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1741 GL_M4_GNULIB_ALPHASORT
1742 GL_M4_GNULIB_SCANDIR
1743 GL_M4_GNULIB_FDOPENDIR
1745 GL_M4_GNULIB_CLOSEDIR
1746 GL_M4_GNULIB_REWINDDIR
1747 GL_M4_GNULIB_READDIR
1748 GL_M4_GNULIB_OPENDIR
1764 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1765 SYS_IOCTL_H_HAVE_WINSOCK2_H
1766 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1768 GL_M4_GNULIB_MDA_PUTENV
1769 GL_M4_GNULIB_MDA_MKTEMP
1770 GL_M4_GNULIB_MDA_GCVT
1771 GL_M4_GNULIB_MDA_FCVT
1772 GL_M4_GNULIB_MDA_ECVT
1774 GL_M4_GNULIB_UNSETENV
1775 GL_M4_GNULIB_UNLOCKPT
1776 GL_M4_GNULIB_SYSTEM_POSIX
1777 GL_M4_GNULIB_STRTOULL
1778 GL_M4_GNULIB_STRTOUL
1779 GL_M4_GNULIB_STRTOLL
1780 GL_M4_GNULIB_STRTOLD
1784 GL_M4_GNULIB_SECURE_GETENV
1785 GL_M4_GNULIB_RPMATCH
1786 GL_M4_GNULIB_REALPATH
1787 GL_M4_GNULIB_REALLOC_POSIX
1788 GL_M4_GNULIB_REALLOCARRAY
1789 GL_M4_GNULIB_RANDOM_R
1791 GL_M4_GNULIB_QSORT_R
1793 GL_M4_GNULIB_PTSNAME_R
1794 GL_M4_GNULIB_PTSNAME
1795 GL_M4_GNULIB_POSIX_OPENPT
1796 GL_M4_GNULIB_POSIX_MEMALIGN
1797 GL_M4_GNULIB_MKSTEMPS
1798 GL_M4_GNULIB_MKSTEMP
1799 GL_M4_GNULIB_MKOSTEMPS
1800 GL_M4_GNULIB_MKOSTEMP
1801 GL_M4_GNULIB_MKDTEMP
1803 GL_M4_GNULIB_MALLOC_POSIX
1804 GL_M4_GNULIB_GRANTPT
1805 GL_M4_GNULIB_GETSUBOPT
1806 GL_M4_GNULIB_GETLOADAVG
1807 GL_M4_GNULIB_FREE_POSIX
1808 GL_M4_GNULIB_CANONICALIZE_FILE_NAME
1809 GL_M4_GNULIB_CALLOC_POSIX
1811 GL_M4_GNULIB_ALIGNED_ALLOC
1824 REPLACE_REALLOCARRAY
1832 REPLACE_POSIX_MEMALIGN
1838 REPLACE_CANONICALIZE_FILE_NAME
1840 REPLACE_ALIGNED_ALLOC
1844 HAVE_STRUCT_RANDOM_DATA
1877 HAVE_DECL_GETLOADAVG
1881 HAVE_CANONICALIZE_FILE_NAME
1887 GL_M4_GNULIB_MDA_WCSDUP
1888 GL_M4_GNULIB_WCSFTIME
1889 GL_M4_GNULIB_WCSWIDTH
1892 GL_M4_GNULIB_WCSPBRK
1894 GL_M4_GNULIB_WCSCSPN
1895 GL_M4_GNULIB_WCSRCHR
1898 GL_M4_GNULIB_WCSXFRM
1899 GL_M4_GNULIB_WCSCOLL
1900 GL_M4_GNULIB_WCSNCASECMP
1901 GL_M4_GNULIB_WCSCASECMP
1902 GL_M4_GNULIB_WCSNCMP
1904 GL_M4_GNULIB_WCSNCAT
1906 GL_M4_GNULIB_WCPNCPY
1907 GL_M4_GNULIB_WCSNCPY
1910 GL_M4_GNULIB_WCSNLEN
1912 GL_M4_GNULIB_WMEMSET
1913 GL_M4_GNULIB_WMEMPCPY
1914 GL_M4_GNULIB_WMEMMOVE
1915 GL_M4_GNULIB_WMEMCPY
1916 GL_M4_GNULIB_WMEMCMP
1917 GL_M4_GNULIB_WMEMCHR
1918 GL_M4_GNULIB_WCWIDTH
1919 GL_M4_GNULIB_WCSNRTOMBS
1920 GL_M4_GNULIB_WCSRTOMBS
1921 GL_M4_GNULIB_WCRTOMB
1922 GL_M4_GNULIB_MBSNRTOWCS
1923 GL_M4_GNULIB_MBSRTOWCS
1925 GL_M4_GNULIB_MBRTOWC
1926 GL_M4_GNULIB_MBSINIT
1988 GL_GENERATE_ALLOCA_H_FALSE
1989 GL_GENERATE_ALLOCA_H_TRUE
1992 GL_M4_GNULIB_MDA_WRITE
1993 GL_M4_GNULIB_MDA_UNLINK
1994 GL_M4_GNULIB_MDA_SWAB
1995 GL_M4_GNULIB_MDA_RMDIR
1996 GL_M4_GNULIB_MDA_READ
1997 GL_M4_GNULIB_MDA_LSEEK
1998 GL_M4_GNULIB_MDA_ISATTY
1999 GL_M4_GNULIB_MDA_GETPID
2000 GL_M4_GNULIB_MDA_GETCWD
2001 GL_M4_GNULIB_MDA_EXECVPE
2002 GL_M4_GNULIB_MDA_EXECVP
2003 GL_M4_GNULIB_MDA_EXECVE
2004 GL_M4_GNULIB_MDA_EXECV
2005 GL_M4_GNULIB_MDA_EXECLP
2006 GL_M4_GNULIB_MDA_EXECLE
2007 GL_M4_GNULIB_MDA_EXECL
2008 GL_M4_GNULIB_MDA_DUP2
2009 GL_M4_GNULIB_MDA_DUP
2010 GL_M4_GNULIB_MDA_CLOSE
2011 GL_M4_GNULIB_MDA_CHDIR
2012 GL_M4_GNULIB_MDA_ACCESS
2015 GL_M4_GNULIB_UNLINKAT
2017 GL_M4_GNULIB_UNISTD_H_SIGPIPE
2018 GL_M4_GNULIB_UNISTD_H_NONBLOCKING
2019 GL_M4_GNULIB_TTYNAME_R
2020 GL_M4_GNULIB_TRUNCATE
2021 GL_M4_GNULIB_SYMLINKAT
2022 GL_M4_GNULIB_SYMLINK
2024 GL_M4_GNULIB_SETHOSTNAME
2026 GL_M4_GNULIB_READLINKAT
2027 GL_M4_GNULIB_READLINK
2038 GL_M4_GNULIB_GROUP_MEMBER
2039 GL_M4_GNULIB_GETUSERSHELL
2040 GL_M4_GNULIB_GETPASS
2041 GL_M4_GNULIB_GETPAGESIZE
2042 GL_M4_GNULIB_GETOPT_POSIX
2043 GL_M4_GNULIB_GETLOGIN_R
2044 GL_M4_GNULIB_GETLOGIN
2045 GL_M4_GNULIB_GETHOSTNAME
2046 GL_M4_GNULIB_GETGROUPS
2047 GL_M4_GNULIB_GETENTROPY
2048 GL_M4_GNULIB_GETDTABLESIZE
2049 GL_M4_GNULIB_GETDOMAINNAME
2051 GL_M4_GNULIB_FTRUNCATE
2053 GL_M4_GNULIB_FDATASYNC
2054 GL_M4_GNULIB_FCHOWNAT
2056 GL_M4_GNULIB_FACCESSAT
2057 GL_M4_GNULIB_EXECVPE
2064 GL_M4_GNULIB_EUIDACCESS
2065 GL_M4_GNULIB_ENVIRON
2069 GL_M4_GNULIB_COPY_FILE_RANGE
2074 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
2075 UNISTD_H_HAVE_WINSOCK2_H
2076 UNISTD_H_HAVE_SYS_RANDOM_H
2101 REPLACE_GETDTABLESIZE
2102 REPLACE_GETDOMAINNAME
2123 HAVE_DECL_SETHOSTNAME
2124 HAVE_DECL_GETUSERSHELL
2125 HAVE_DECL_GETPAGESIZE
2126 HAVE_DECL_GETLOGIN_R
2128 HAVE_DECL_GETDOMAINNAME
2165 HAVE_COPY_FILE_RANGE
2167 GL_COND_LIBTOOL_FALSE
2168 GL_COND_LIBTOOL_TRUE
2171 am__fastdepCXX_FALSE
2211 AM_DEFAULT_VERBOSITY
2222 INSTALL_STRIP_PROGRAM
2265 program_transform_name
2279 enable_option_checking
2281 enable_dependency_tracking
2286 enable_cross_guesses
2290 with_libiconv_prefix
2293 with_libsigsegv_prefix
2295 with_packager_version
2296 with_packager_bug_reports
2303 ac_precious_vars='build_alias
2316 # Initialize some variables set by options.
2318 ac_init_version=false
2319 ac_unrecognized_opts=
2320 ac_unrecognized_sep=
2321 # The variables have the same names as the options, with
2322 # dashes changed to underlines.
2323 cache_file=/dev/null
2330 program_transform_name=s,x,x,
2338 # Installation directory options.
2339 # These are left unexpanded so users can "make install exec_prefix=/foo"
2340 # and all the variables that are supposed to be based on exec_prefix
2341 # by default will actually change.
2342 # Use braces instead of parens because sh, perl, etc. also accept them.
2343 # (The list follows the same order as the GNU Coding Standards.)
2344 bindir='${exec_prefix}/bin'
2345 sbindir='${exec_prefix}/sbin'
2346 libexecdir='${exec_prefix}/libexec'
2347 datarootdir='${prefix}/share'
2348 datadir='${datarootdir}'
2349 sysconfdir='${prefix}/etc'
2350 sharedstatedir='${prefix}/com'
2351 localstatedir='${prefix}/var'
2352 runstatedir='${localstatedir}/run'
2353 includedir='${prefix}/include'
2354 oldincludedir='/usr/include'
2355 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2356 infodir='${datarootdir}/info'
2361 libdir='${exec_prefix}/lib'
2362 localedir='${datarootdir}/locale'
2363 mandir='${datarootdir}/man'
2369 # If the previous option needs an argument, assign it.
2370 if test -n "$ac_prev"; then
2371 eval $ac_prev=\$ac_option
2377 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2382 case $ac_dashdash$ac_option in
2386 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2388 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2389 bindir=$ac_optarg ;;
2391 -build | --build | --buil | --bui | --bu)
2392 ac_prev=build_alias ;;
2393 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2394 build_alias=$ac_optarg ;;
2396 -cache-file | --cache-file | --cache-fil | --cache-fi \
2397 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2398 ac_prev=cache_file ;;
2399 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2400 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2401 cache_file=$ac_optarg ;;
2403 --config-cache | -C)
2404 cache_file=config.cache ;;
2406 -datadir | --datadir | --datadi | --datad)
2408 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2409 datadir=$ac_optarg ;;
2411 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2412 | --dataroo | --dataro | --datar)
2413 ac_prev=datarootdir ;;
2414 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2415 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2416 datarootdir=$ac_optarg ;;
2418 -disable-* | --disable-*)
2419 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2420 # Reject names that are not valid shell variable names.
2421 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2422 as_fn_error $? "invalid feature name: \`$ac_useropt'"
2423 ac_useropt_orig=$ac_useropt
2424 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2425 case $ac_user_opts in
2427 "enable_$ac_useropt"
2429 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2430 ac_unrecognized_sep=', ';;
2432 eval enable_$ac_useropt=no ;;
2434 -docdir | --docdir | --docdi | --doc | --do)
2436 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2437 docdir=$ac_optarg ;;
2439 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2441 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2442 dvidir=$ac_optarg ;;
2444 -enable-* | --enable-*)
2445 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2446 # Reject names that are not valid shell variable names.
2447 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2448 as_fn_error $? "invalid feature name: \`$ac_useropt'"
2449 ac_useropt_orig=$ac_useropt
2450 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2451 case $ac_user_opts in
2453 "enable_$ac_useropt"
2455 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2456 ac_unrecognized_sep=', ';;
2458 eval enable_$ac_useropt=\$ac_optarg ;;
2460 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2461 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2462 | --exec | --exe | --ex)
2463 ac_prev=exec_prefix ;;
2464 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2465 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2466 | --exec=* | --exe=* | --ex=*)
2467 exec_prefix=$ac_optarg ;;
2469 -gas | --gas | --ga | --g)
2470 # Obsolete; use --with-gas.
2473 -help | --help | --hel | --he | -h)
2474 ac_init_help=long ;;
2475 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2476 ac_init_help=recursive ;;
2477 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2478 ac_init_help=short ;;
2480 -host | --host | --hos | --ho)
2481 ac_prev=host_alias ;;
2482 -host=* | --host=* | --hos=* | --ho=*)
2483 host_alias=$ac_optarg ;;
2485 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2487 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2489 htmldir=$ac_optarg ;;
2491 -includedir | --includedir | --includedi | --included | --include \
2492 | --includ | --inclu | --incl | --inc)
2493 ac_prev=includedir ;;
2494 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2495 | --includ=* | --inclu=* | --incl=* | --inc=*)
2496 includedir=$ac_optarg ;;
2498 -infodir | --infodir | --infodi | --infod | --info | --inf)
2500 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2501 infodir=$ac_optarg ;;
2503 -libdir | --libdir | --libdi | --libd)
2505 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2506 libdir=$ac_optarg ;;
2508 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2509 | --libexe | --libex | --libe)
2510 ac_prev=libexecdir ;;
2511 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2512 | --libexe=* | --libex=* | --libe=*)
2513 libexecdir=$ac_optarg ;;
2515 -localedir | --localedir | --localedi | --localed | --locale)
2516 ac_prev=localedir ;;
2517 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2518 localedir=$ac_optarg ;;
2520 -localstatedir | --localstatedir | --localstatedi | --localstated \
2521 | --localstate | --localstat | --localsta | --localst | --locals)
2522 ac_prev=localstatedir ;;
2523 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2524 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2525 localstatedir=$ac_optarg ;;
2527 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2529 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2530 mandir=$ac_optarg ;;
2532 -nfp | --nfp | --nf)
2533 # Obsolete; use --without-fp.
2536 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2537 | --no-cr | --no-c | -n)
2540 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2541 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2544 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2545 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2546 | --oldin | --oldi | --old | --ol | --o)
2547 ac_prev=oldincludedir ;;
2548 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2549 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2550 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2551 oldincludedir=$ac_optarg ;;
2553 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2555 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2556 prefix=$ac_optarg ;;
2558 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2559 | --program-pre | --program-pr | --program-p)
2560 ac_prev=program_prefix ;;
2561 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2562 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2563 program_prefix=$ac_optarg ;;
2565 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2566 | --program-suf | --program-su | --program-s)
2567 ac_prev=program_suffix ;;
2568 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2569 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2570 program_suffix=$ac_optarg ;;
2572 -program-transform-name | --program-transform-name \
2573 | --program-transform-nam | --program-transform-na \
2574 | --program-transform-n | --program-transform- \
2575 | --program-transform | --program-transfor \
2576 | --program-transfo | --program-transf \
2577 | --program-trans | --program-tran \
2578 | --progr-tra | --program-tr | --program-t)
2579 ac_prev=program_transform_name ;;
2580 -program-transform-name=* | --program-transform-name=* \
2581 | --program-transform-nam=* | --program-transform-na=* \
2582 | --program-transform-n=* | --program-transform-=* \
2583 | --program-transform=* | --program-transfor=* \
2584 | --program-transfo=* | --program-transf=* \
2585 | --program-trans=* | --program-tran=* \
2586 | --progr-tra=* | --program-tr=* | --program-t=*)
2587 program_transform_name=$ac_optarg ;;
2589 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2591 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2592 pdfdir=$ac_optarg ;;
2594 -psdir | --psdir | --psdi | --psd | --ps)
2596 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2599 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2600 | -silent | --silent | --silen | --sile | --sil)
2603 -runstatedir | --runstatedir | --runstatedi | --runstated \
2604 | --runstate | --runstat | --runsta | --runst | --runs \
2605 | --run | --ru | --r)
2606 ac_prev=runstatedir ;;
2607 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2608 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2609 | --run=* | --ru=* | --r=*)
2610 runstatedir=$ac_optarg ;;
2612 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2614 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2616 sbindir=$ac_optarg ;;
2618 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2619 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2620 | --sharedst | --shareds | --shared | --share | --shar \
2622 ac_prev=sharedstatedir ;;
2623 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2624 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2625 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2627 sharedstatedir=$ac_optarg ;;
2629 -site | --site | --sit)
2631 -site=* | --site=* | --sit=*)
2634 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2636 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2637 srcdir=$ac_optarg ;;
2639 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2640 | --syscon | --sysco | --sysc | --sys | --sy)
2641 ac_prev=sysconfdir ;;
2642 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2643 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2644 sysconfdir=$ac_optarg ;;
2646 -target | --target | --targe | --targ | --tar | --ta | --t)
2647 ac_prev=target_alias ;;
2648 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2649 target_alias=$ac_optarg ;;
2651 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2654 -version | --version | --versio | --versi | --vers | -V)
2655 ac_init_version=: ;;
2658 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2659 # Reject names that are not valid shell variable names.
2660 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2661 as_fn_error $? "invalid package name: \`$ac_useropt'"
2662 ac_useropt_orig=$ac_useropt
2663 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2664 case $ac_user_opts in
2668 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2669 ac_unrecognized_sep=', ';;
2671 eval with_$ac_useropt=\$ac_optarg ;;
2673 -without-* | --without-*)
2674 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2675 # Reject names that are not valid shell variable names.
2676 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2677 as_fn_error $? "invalid package name: \`$ac_useropt'"
2678 ac_useropt_orig=$ac_useropt
2679 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2680 case $ac_user_opts in
2684 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2685 ac_unrecognized_sep=', ';;
2687 eval with_$ac_useropt=no ;;
2690 # Obsolete; use --with-x.
2693 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2694 | --x-incl | --x-inc | --x-in | --x-i)
2695 ac_prev=x_includes ;;
2696 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2697 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2698 x_includes=$ac_optarg ;;
2700 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2701 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2702 ac_prev=x_libraries ;;
2703 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2704 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2705 x_libraries=$ac_optarg ;;
2707 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2708 Try \`$0 --help' for more information"
2712 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2713 # Reject names that are not valid shell variable names.
2714 case $ac_envvar in #(
2715 '' | [0-9]* | *[!_$as_cr_alnum]* )
2716 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2718 eval $ac_envvar=\$ac_optarg
2719 export $ac_envvar ;;
2722 # FIXME: should be removed in autoconf 3.0.
2723 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2724 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2725 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2726 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2732 if test -n "$ac_prev"; then
2733 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2734 as_fn_error $? "missing argument to $ac_option"
2737 if test -n "$ac_unrecognized_opts"; then
2738 case $enable_option_checking in
2740 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2741 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2745 # Check all directory arguments for consistency.
2746 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2747 datadir sysconfdir sharedstatedir localstatedir includedir \
2748 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2749 libdir localedir mandir runstatedir
2751 eval ac_val=\$$ac_var
2752 # Remove trailing slashes.
2755 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2756 eval $ac_var=\$ac_val;;
2758 # Be sure to have absolute directory names.
2760 [\\/$]* | ?:[\\/]* ) continue;;
2761 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2763 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2766 # There might be people who depend on the old broken behavior: `$host'
2767 # used to hold the argument of --host etc.
2768 # FIXME: To remove some day.
2771 target=$target_alias
2773 # FIXME: To remove some day.
2774 if test "x$host_alias" != x; then
2775 if test "x$build_alias" = x; then
2776 cross_compiling=maybe
2777 elif test "x$build_alias" != "x$host_alias"; then
2783 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2785 test "$silent" = yes && exec 6>/dev/null
2788 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2789 ac_ls_di=`ls -di .` &&
2790 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2791 as_fn_error $? "working directory cannot be determined"
2792 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2793 as_fn_error $? "pwd does not report name of working directory"
2796 # Find the source files, if location was not specified.
2797 if test -z "$srcdir"; then
2798 ac_srcdir_defaulted=yes
2799 # Try the directory containing this script, then the parent directory.
2800 ac_confdir=`$as_dirname -- "$as_myself" ||
2801 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2802 X"$as_myself" : 'X\(//\)[^/]' \| \
2803 X"$as_myself" : 'X\(//\)$' \| \
2804 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2805 printf "%s\n" X"$as_myself" |
2806 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2824 if test ! -r "$srcdir/$ac_unique_file"; then
2828 ac_srcdir_defaulted=no
2830 if test ! -r "$srcdir/$ac_unique_file"; then
2831 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2832 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2834 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2836 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2838 # When building in place, set srcdir=.
2839 if test "$ac_abs_confdir" = "$ac_pwd"; then
2842 # Remove unnecessary trailing slashes from srcdir.
2843 # Double slashes in file names in object file debugging info
2844 # mess up M-x gdb in Emacs.
2846 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2848 for ac_var in $ac_precious_vars; do
2849 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2850 eval ac_env_${ac_var}_value=\$${ac_var}
2851 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2852 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2856 # Report the --help message.
2858 if test "$ac_init_help" = "long"; then
2859 # Omit some internal or obsolete options to make the list less imposing.
2860 # This message is too long to be a string in the A/UX 3.1 sh.
2862 \`configure' configures GNU M4 1.4.19 to adapt to many kinds of systems.
2864 Usage: $0 [OPTION]... [VAR=VALUE]...
2866 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2867 VAR=VALUE. See below for descriptions of some of the useful variables.
2869 Defaults for the options are specified in brackets.
2872 -h, --help display this help and exit
2873 --help=short display options specific to this package
2874 --help=recursive display the short help of all the included packages
2875 -V, --version display version information and exit
2876 -q, --quiet, --silent do not print \`checking ...' messages
2877 --cache-file=FILE cache test results in FILE [disabled]
2878 -C, --config-cache alias for \`--cache-file=config.cache'
2879 -n, --no-create do not create output files
2880 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2882 Installation directories:
2883 --prefix=PREFIX install architecture-independent files in PREFIX
2884 [$ac_default_prefix]
2885 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2888 By default, \`make install' will install all the files in
2889 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2890 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2891 for instance \`--prefix=\$HOME'.
2893 For better control, use the options below.
2895 Fine tuning of the installation directories:
2896 --bindir=DIR user executables [EPREFIX/bin]
2897 --sbindir=DIR system admin executables [EPREFIX/sbin]
2898 --libexecdir=DIR program executables [EPREFIX/libexec]
2899 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2900 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2901 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2902 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
2903 --libdir=DIR object code libraries [EPREFIX/lib]
2904 --includedir=DIR C header files [PREFIX/include]
2905 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2906 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2907 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2908 --infodir=DIR info documentation [DATAROOTDIR/info]
2909 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2910 --mandir=DIR man documentation [DATAROOTDIR/man]
2911 --docdir=DIR documentation root [DATAROOTDIR/doc/m4]
2912 --htmldir=DIR html documentation [DOCDIR]
2913 --dvidir=DIR dvi documentation [DOCDIR]
2914 --pdfdir=DIR pdf documentation [DOCDIR]
2915 --psdir=DIR ps documentation [DOCDIR]
2921 --program-prefix=PREFIX prepend PREFIX to installed program names
2922 --program-suffix=SUFFIX append SUFFIX to installed program names
2923 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2926 --build=BUILD configure for building on BUILD [guessed]
2927 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2931 if test -n "$ac_init_help"; then
2932 case $ac_init_help in
2933 short | recursive ) echo "Configuration of GNU M4 1.4.19:";;
2938 --disable-option-checking ignore unrecognized --enable/--with options
2939 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2940 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2941 --enable-silent-rules less verbose build output (undo: "make V=1")
2942 --disable-silent-rules verbose build output (undo: "make V=0")
2943 --enable-dependency-tracking
2944 do not reject slow dependency extractors
2945 --disable-dependency-tracking
2946 speeds up one-time build
2947 --enable-c++ also build C++ sources
2948 --disable-largefile omit support for large files
2949 --enable-threads={isoc|posix|isoc+posix|windows}
2950 specify multithreading API
2951 --disable-threads build without multithread safety
2952 --enable-gcc-warnings turn on lots of GCC warnings (for developers)
2953 --enable-cross-guesses={conservative|risky}
2954 specify policy for cross-compilation guesses
2955 --disable-assert turn off assertions
2956 --disable-rpath do not hardcode runtime library paths
2957 --enable-changeword enable -W and changeword() builtin
2958 --disable-nls do not use Native Language Support
2961 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2962 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2963 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2964 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
2965 --without-libiconv-prefix don't search for libiconv in includedir and libdir
2966 --without-included-regex
2967 don't compile regex; this is the default on systems
2968 with recent-enough versions of the GNU C Library
2969 (use with caution on other systems).
2970 --with-libsigsegv use the GNU libsigsegv library, when present,
2971 instead of the gnulib module 'sigsegv'
2972 --with-libsigsegv-prefix[=DIR] search for libsigsegv in DIR/include and DIR/lib
2973 --without-libsigsegv-prefix don't search for libsigsegv in includedir and libdir
2974 --with-packager String identifying the packager of this software
2975 --with-packager-version Packager-specific version information
2976 --with-packager-bug-reports
2977 Packager info for bug reports (URL/e-mail/...)
2978 --with-syscmd-shell shell used by syscmd [/bin/sh]
2979 --with-dmalloc use dmalloc, as in dmalloc.tar.gz from
2980 @/ftp.antaire.com:antaire/src/dmalloc.
2981 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
2982 --without-libintl-prefix don't search for libintl in includedir and libdir
2984 Some influential environment variables:
2985 CC C compiler command
2986 CFLAGS C compiler flags
2987 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2988 nonstandard directory <lib dir>
2989 LIBS libraries to pass to the linker, e.g. -l<library>
2990 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2991 you have headers in a nonstandard directory <include dir>
2993 CXX C++ compiler command
2994 CXXFLAGS C++ compiler flags
2996 Use these variables to override the choices made by `configure' or to help
2997 it to find libraries and programs with nonstandard names/locations.
2999 Report bugs to <bug-m4@gnu.org>.
3000 GNU M4 home page: <https://www.gnu.org/software/m4/>.
3001 General help using GNU software: <https://www.gnu.org/gethelp/>.
3006 if test "$ac_init_help" = "recursive"; then
3007 # If there are subdirs, report their specific --help.
3008 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
3009 test -d "$ac_dir" ||
3010 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
3015 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
3017 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
3018 # A ".." for each directory in $ac_dir_suffix.
3019 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
3020 case $ac_top_builddir_sub in
3021 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
3022 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
3025 ac_abs_top_builddir=$ac_pwd
3026 ac_abs_builddir=$ac_pwd$ac_dir_suffix
3027 # for backward compatibility:
3028 ac_top_builddir=$ac_top_build_prefix
3031 .) # We are building in place.
3033 ac_top_srcdir=$ac_top_builddir_sub
3034 ac_abs_top_srcdir=$ac_pwd ;;
3035 [\\/]* | ?:[\\/]* ) # Absolute name.
3036 ac_srcdir=$srcdir$ac_dir_suffix;
3037 ac_top_srcdir=$srcdir
3038 ac_abs_top_srcdir=$srcdir ;;
3040 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
3041 ac_top_srcdir=$ac_top_build_prefix$srcdir
3042 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
3044 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
3046 cd "$ac_dir" || { ac_status=$?; continue; }
3047 # Check for configure.gnu first; this name is used for a wrapper for
3048 # Metaconfig's "Configure" on case-insensitive file systems.
3049 if test -f "$ac_srcdir/configure.gnu"; then
3051 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
3052 elif test -f "$ac_srcdir/configure"; then
3054 $SHELL "$ac_srcdir/configure" --help=recursive
3056 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
3058 cd "$ac_pwd" || { ac_status=$?; break; }
3062 test -n "$ac_init_help" && exit $ac_status
3063 if $ac_init_version; then
3065 GNU M4 configure 1.4.19
3066 generated by GNU Autoconf 2.71
3068 Copyright (C) 2021 Free Software Foundation, Inc.
3069 This configure script is free software; the Free Software Foundation
3070 gives unlimited permission to copy, distribute and modify it.
3075 ## ------------------------ ##
3076 ## Autoconf initialization. ##
3077 ## ------------------------ ##
3079 # ac_fn_c_try_compile LINENO
3080 # --------------------------
3081 # Try to compile conftest.$ac_ext, and return whether this succeeded.
3082 ac_fn_c_try_compile ()
3084 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3085 rm -f conftest.$ac_objext conftest.beam
3086 if { { ac_try="$ac_compile"
3088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3089 *) ac_try_echo=$ac_try;;
3091 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3092 printf "%s\n" "$ac_try_echo"; } >&5
3093 (eval "$ac_compile") 2>conftest.err
3095 if test -s conftest.err; then
3096 grep -v '^ *+' conftest.err >conftest.er1
3097 cat conftest.er1 >&5
3098 mv -f conftest.er1 conftest.err
3100 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3101 test $ac_status = 0; } && {
3102 test -z "$ac_c_werror_flag" ||
3103 test ! -s conftest.err
3104 } && test -s conftest.$ac_objext
3108 printf "%s\n" "$as_me: failed program was:" >&5
3109 sed 's/^/| /' conftest.$ac_ext >&5
3113 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3114 as_fn_set_status $ac_retval
3116 } # ac_fn_c_try_compile
3118 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3119 # -------------------------------------------------------
3120 # Tests whether HEADER exists and can be compiled using the include files in
3121 # INCLUDES, setting the cache variable VAR accordingly.
3122 ac_fn_c_check_header_compile ()
3124 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3126 printf %s "checking for $2... " >&6; }
3127 if eval test \${$3+y}
3129 printf %s "(cached) " >&6
3131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3132 /* end confdefs.h. */
3136 if ac_fn_c_try_compile "$LINENO"
3142 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3146 printf "%s\n" "$ac_res" >&6; }
3147 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3149 } # ac_fn_c_check_header_compile
3151 # ac_fn_c_try_cpp LINENO
3152 # ----------------------
3153 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
3156 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3157 if { { ac_try="$ac_cpp conftest.$ac_ext"
3159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3160 *) ac_try_echo=$ac_try;;
3162 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3163 printf "%s\n" "$ac_try_echo"; } >&5
3164 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
3166 if test -s conftest.err; then
3167 grep -v '^ *+' conftest.err >conftest.er1
3168 cat conftest.er1 >&5
3169 mv -f conftest.er1 conftest.err
3171 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3172 test $ac_status = 0; } > conftest.i && {
3173 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3174 test ! -s conftest.err
3179 printf "%s\n" "$as_me: failed program was:" >&5
3180 sed 's/^/| /' conftest.$ac_ext >&5
3184 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3185 as_fn_set_status $ac_retval
3189 # ac_fn_cxx_try_compile LINENO
3190 # ----------------------------
3191 # Try to compile conftest.$ac_ext, and return whether this succeeded.
3192 ac_fn_cxx_try_compile ()
3194 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3195 rm -f conftest.$ac_objext conftest.beam
3196 if { { ac_try="$ac_compile"
3198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3199 *) ac_try_echo=$ac_try;;
3201 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3202 printf "%s\n" "$ac_try_echo"; } >&5
3203 (eval "$ac_compile") 2>conftest.err
3205 if test -s conftest.err; then
3206 grep -v '^ *+' conftest.err >conftest.er1
3207 cat conftest.er1 >&5
3208 mv -f conftest.er1 conftest.err
3210 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3211 test $ac_status = 0; } && {
3212 test -z "$ac_cxx_werror_flag" ||
3213 test ! -s conftest.err
3214 } && test -s conftest.$ac_objext
3218 printf "%s\n" "$as_me: failed program was:" >&5
3219 sed 's/^/| /' conftest.$ac_ext >&5
3223 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3224 as_fn_set_status $ac_retval
3226 } # ac_fn_cxx_try_compile
3228 # ac_fn_c_try_link LINENO
3229 # -----------------------
3230 # Try to link conftest.$ac_ext, and return whether this succeeded.
3233 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3234 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
3235 if { { ac_try="$ac_link"
3237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3238 *) ac_try_echo=$ac_try;;
3240 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3241 printf "%s\n" "$ac_try_echo"; } >&5
3242 (eval "$ac_link") 2>conftest.err
3244 if test -s conftest.err; then
3245 grep -v '^ *+' conftest.err >conftest.er1
3246 cat conftest.er1 >&5
3247 mv -f conftest.er1 conftest.err
3249 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3250 test $ac_status = 0; } && {
3251 test -z "$ac_c_werror_flag" ||
3252 test ! -s conftest.err
3253 } && test -s conftest$ac_exeext && {
3254 test "$cross_compiling" = yes ||
3255 test -x conftest$ac_exeext
3260 printf "%s\n" "$as_me: failed program was:" >&5
3261 sed 's/^/| /' conftest.$ac_ext >&5
3265 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3266 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3267 # interfere with the next link command; also delete a directory that is
3268 # left behind by Apple's compiler. We do this before executing the actions.
3269 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3270 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3271 as_fn_set_status $ac_retval
3273 } # ac_fn_c_try_link
3275 # ac_fn_c_try_run LINENO
3276 # ----------------------
3277 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
3278 # executables *can* be run.
3281 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3282 if { { ac_try="$ac_link"
3284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3285 *) ac_try_echo=$ac_try;;
3287 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3288 printf "%s\n" "$ac_try_echo"; } >&5
3289 (eval "$ac_link") 2>&5
3291 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3292 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
3293 { { case "(($ac_try" in
3294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3295 *) ac_try_echo=$ac_try;;
3297 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3298 printf "%s\n" "$ac_try_echo"; } >&5
3299 (eval "$ac_try") 2>&5
3301 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3302 test $ac_status = 0; }; }
3306 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
3307 printf "%s\n" "$as_me: failed program was:" >&5
3308 sed 's/^/| /' conftest.$ac_ext >&5
3310 ac_retval=$ac_status
3312 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3313 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3314 as_fn_set_status $ac_retval
3318 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3319 # -------------------------------------------
3320 # Tests whether TYPE exists after having included INCLUDES, setting cache
3321 # variable VAR accordingly.
3322 ac_fn_c_check_type ()
3324 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3326 printf %s "checking for $2... " >&6; }
3327 if eval test \${$3+y}
3329 printf %s "(cached) " >&6
3332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3333 /* end confdefs.h. */
3344 if ac_fn_c_try_compile "$LINENO"
3346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3347 /* end confdefs.h. */
3358 if ac_fn_c_try_compile "$LINENO"
3364 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3366 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3370 printf "%s\n" "$ac_res" >&6; }
3371 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3373 } # ac_fn_c_check_type
3375 # ac_fn_c_check_func LINENO FUNC VAR
3376 # ----------------------------------
3377 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3378 ac_fn_c_check_func ()
3380 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3382 printf %s "checking for $2... " >&6; }
3383 if eval test \${$3+y}
3385 printf %s "(cached) " >&6
3387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3388 /* end confdefs.h. */
3389 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3390 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3391 #define $2 innocuous_$2
3393 /* System header to define __stub macros and hopefully few prototypes,
3394 which can conflict with char $2 (); below. */
3399 /* Override any GCC internal prototype to avoid an error.
3400 Use char because int might match the return type of a GCC
3401 builtin and then its argument prototype would still apply. */
3406 /* The GNU C library defines this for functions which it implements
3407 to always fail with ENOSYS. Some functions are actually named
3408 something starting with __ and the normal name is an alias. */
3409 #if defined __stub_$2 || defined __stub___$2
3421 if ac_fn_c_try_link "$LINENO"
3427 rm -f core conftest.err conftest.$ac_objext conftest.beam \
3428 conftest$ac_exeext conftest.$ac_ext
3431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3432 printf "%s\n" "$ac_res" >&6; }
3433 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3435 } # ac_fn_c_check_func
3437 # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
3438 # ------------------------------------------------------------------
3439 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3440 # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
3443 ac_save_ac_compile="$ac_compile"
3444 if test -n "$ac_compile_for_check_decl"; then
3445 ac_compile="$ac_compile_for_check_decl"
3447 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3448 as_decl_name=`echo $2|sed 's/ *(.*//'`
3449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3450 printf %s "checking whether $as_decl_name is declared... " >&6; }
3451 if eval test \${$3+y}
3453 printf %s "(cached) " >&6
3455 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3456 eval ac_save_FLAGS=\$$6
3457 as_fn_append $6 " $5"
3458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3459 /* end confdefs.h. */
3464 #ifndef $as_decl_name
3466 (void) $as_decl_use;
3468 (void) $as_decl_name;
3476 if ac_fn_c_try_compile "$LINENO"
3482 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3483 eval $6=\$ac_save_FLAGS
3487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3488 printf "%s\n" "$ac_res" >&6; }
3489 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3490 ac_compile="$ac_save_ac_compile"
3492 } # ac_fn_check_decl
3494 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3495 # --------------------------------------------
3496 # Tries to find the compile-time value of EXPR in a program that includes
3497 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3499 ac_fn_c_compute_int ()
3501 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3502 if test "$cross_compiling" = yes; then
3503 # Depending upon the size, compute the lo and hi bounds.
3504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3505 /* end confdefs.h. */
3510 static int test_array [1 - 2 * !(($2) >= 0)];
3512 return test_array [0];
3518 if ac_fn_c_try_compile "$LINENO"
3522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3523 /* end confdefs.h. */
3528 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3530 return test_array [0];
3536 if ac_fn_c_try_compile "$LINENO"
3538 ac_hi=$ac_mid; break
3540 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3541 if test $ac_lo -le $ac_mid; then
3545 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3547 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3551 /* end confdefs.h. */
3556 static int test_array [1 - 2 * !(($2) < 0)];
3558 return test_array [0];
3564 if ac_fn_c_try_compile "$LINENO"
3568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3569 /* end confdefs.h. */
3574 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3576 return test_array [0];
3582 if ac_fn_c_try_compile "$LINENO"
3584 ac_lo=$ac_mid; break
3586 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3587 if test $ac_mid -le $ac_hi; then
3591 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3593 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3598 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3600 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3601 # Binary search between lo and hi bounds.
3602 while test "x$ac_lo" != "x$ac_hi"; do
3603 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3605 /* end confdefs.h. */
3610 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3612 return test_array [0];
3618 if ac_fn_c_try_compile "$LINENO"
3622 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3624 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3627 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3632 /* end confdefs.h. */
3634 static long int longval (void) { return $2; }
3635 static unsigned long int ulongval (void) { return $2; }
3642 FILE *f = fopen ("conftest.val", "w");
3647 long int i = longval ();
3650 fprintf (f, "%ld", i);
3654 unsigned long int i = ulongval ();
3657 fprintf (f, "%lu", i);
3659 /* Do not output a trailing newline, as this causes \r\n confusion
3660 on some platforms. */
3661 return ferror (f) || fclose (f) != 0;
3667 if ac_fn_c_try_run "$LINENO"
3669 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3673 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3674 conftest.$ac_objext conftest.beam conftest.$ac_ext
3678 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3679 as_fn_set_status $ac_retval
3681 } # ac_fn_c_compute_int
3683 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3684 # ----------------------------------------------------
3685 # Tries to find if the field MEMBER exists in type AGGR, after including
3686 # INCLUDES, setting cache variable VAR accordingly.
3687 ac_fn_c_check_member ()
3689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3691 printf %s "checking for $2.$3... " >&6; }
3692 if eval test \${$4+y}
3694 printf %s "(cached) " >&6
3696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3697 /* end confdefs.h. */
3709 if ac_fn_c_try_compile "$LINENO"
3713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3714 /* end confdefs.h. */
3720 if (sizeof ac_aggr.$3)
3726 if ac_fn_c_try_compile "$LINENO"
3732 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3734 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3738 printf "%s\n" "$ac_res" >&6; }
3739 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3741 } # ac_fn_c_check_member
3742 ac_configure_args_raw=
3747 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3749 as_fn_append ac_configure_args_raw " '$ac_arg'"
3752 case $ac_configure_args_raw in
3756 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
3757 ac_unsafe_a="$ac_unsafe_z#~"
3758 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3759 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3762 cat >config.log <<_ACEOF
3763 This file contains any messages produced by compilers while
3764 running configure, to aid debugging if configure makes a mistake.
3766 It was created by GNU M4 $as_me 1.4.19, which was
3767 generated by GNU Autoconf 2.71. Invocation command line was
3769 $ $0$ac_configure_args_raw
3779 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3780 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3781 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3782 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3783 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3785 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3786 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3788 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3789 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3790 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3791 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3792 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3793 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3794 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3802 case $as_dir in #(((
3805 *) as_dir=$as_dir/ ;;
3807 printf "%s\n" "PATH: $as_dir"
3823 # Keep a trace of the command line.
3824 # Strip out --no-create and --no-recursion so they do not pile up.
3825 # Strip out --silent because we don't want to record it for future runs.
3826 # Also quote any args containing shell meta-characters.
3827 # Make two passes to allow for proper duplicate-argument suppression.
3831 ac_must_keep_next=false
3837 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3838 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3839 | -silent | --silent | --silen | --sile | --sil)
3842 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3845 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3847 as_fn_append ac_configure_args1 " '$ac_arg'"
3848 if test $ac_must_keep_next = true; then
3849 ac_must_keep_next=false # Got value, back to normal.
3852 *=* | --config-cache | -C | -disable-* | --disable-* \
3853 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3854 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3855 | -with-* | --with-* | -without-* | --without-* | --x)
3856 case "$ac_configure_args0 " in
3857 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3860 -* ) ac_must_keep_next=true ;;
3863 as_fn_append ac_configure_args " '$ac_arg'"
3868 { ac_configure_args0=; unset ac_configure_args0;}
3869 { ac_configure_args1=; unset ac_configure_args1;}
3871 # When interrupted or exit'd, cleanup temporary files, and complete
3872 # config.log. We remove comments because anyway the quotes in there
3873 # would cause problems or look ugly.
3874 # WARNING: Use '\'' to represent an apostrophe within the trap.
3875 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3876 trap 'exit_status=$?
3879 # Save into config.log some information that might help in debugging.
3883 printf "%s\n" "## ---------------- ##
3884 ## Cache variables. ##
3885 ## ---------------- ##"
3887 # The following way of writing the cache mishandles newlines in values,
3889 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3890 eval ac_val=\$$ac_var
3894 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3895 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3898 _ | IFS | as_nl) ;; #(
3899 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3900 *) { eval $ac_var=; unset $ac_var;} ;;
3905 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3906 *${as_nl}ac_space=\ *)
3908 "s/'\''/'\''\\\\'\'''\''/g;
3909 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3912 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3919 printf "%s\n" "## ----------------- ##
3920 ## Output variables. ##
3921 ## ----------------- ##"
3923 for ac_var in $ac_subst_vars
3925 eval ac_val=\$$ac_var
3927 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3929 printf "%s\n" "$ac_var='\''$ac_val'\''"
3933 if test -n "$ac_subst_files"; then
3934 printf "%s\n" "## ------------------- ##
3935 ## File substitutions. ##
3936 ## ------------------- ##"
3938 for ac_var in $ac_subst_files
3940 eval ac_val=\$$ac_var
3942 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3944 printf "%s\n" "$ac_var='\''$ac_val'\''"
3949 if test -s confdefs.h; then
3950 printf "%s\n" "## ----------- ##
3957 test "$ac_signal" != 0 &&
3958 printf "%s\n" "$as_me: caught signal $ac_signal"
3959 printf "%s\n" "$as_me: exit $exit_status"
3961 rm -f core *.core core.conftest.* &&
3962 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3965 for ac_signal in 1 2 13 15; do
3966 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3970 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3971 rm -f -r conftest* confdefs.h
3973 printf "%s\n" "/* confdefs.h */" > confdefs.h
3975 # Predefined preprocessor variables.
3977 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3979 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3981 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3983 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3985 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3987 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3990 # Let the site file select an alternate cache file if it wants to.
3991 # Prefer an explicitly selected file to automatically selected ones.
3992 if test -n "$CONFIG_SITE"; then
3993 ac_site_files="$CONFIG_SITE"
3994 elif test "x$prefix" != xNONE; then
3995 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
3997 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
4000 for ac_site_file in $ac_site_files
4002 case $ac_site_file in #(
4006 ac_site_file=./$ac_site_file ;;
4008 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
4009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
4010 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
4011 sed 's/^/| /' "$ac_site_file" >&5
4013 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4014 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4015 as_fn_error $? "failed to load site script $ac_site_file
4016 See \`config.log' for more details" "$LINENO" 5; }
4020 if test -r "$cache_file"; then
4021 # Some versions of bash will fail to source /dev/null (special files
4022 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
4023 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
4024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
4025 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
4027 [\\/]* | ?:[\\/]* ) . "$cache_file";;
4028 *) . "./$cache_file";;
4032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
4033 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
4037 # Test code for whether the C compiler supports C89 (global declarations)
4038 ac_c_conftest_c89_globals='
4039 /* Does the compiler advertise C89 conformance?
4040 Do not test the value of __STDC__, because some compilers set it to 0
4041 while being otherwise adequately conformant. */
4042 #if !defined __STDC__
4043 # error "Compiler does not advertise C89 conformance"
4049 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
4050 struct buf { int x; };
4051 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
4052 static char *e (p, i)
4058 static char *f (char * (*g) (char **, int), char **p, ...)
4063 s = g (p, va_arg (v,int));
4068 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4069 function prototypes and stuff, but not \xHH hex character constants.
4070 These do not provoke an error unfortunately, instead are silently treated
4071 as an "x". The following induces an error, until -std is added to get
4072 proper ANSI mode. Curiously \x00 != x always comes out true, for an
4073 array size at least. It is necessary to write \x00 == 0 to get something
4074 that is true only with -std. */
4075 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
4077 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4078 inside strings and character constants. */
4079 #define FOO(x) '\''x'\''
4080 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
4082 int test (int i, double x);
4083 struct s1 {int (*f) (int a);};
4084 struct s2 {int (*f) (double a);};
4085 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
4088 # Test code for whether the C compiler supports C89 (body of main).
4089 ac_c_conftest_c89_main='
4090 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
4093 # Test code for whether the C compiler supports C99 (global declarations)
4094 ac_c_conftest_c99_globals='
4095 // Does the compiler advertise C99 conformance?
4096 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
4097 # error "Compiler does not advertise C99 conformance"
4100 #include <stdbool.h>
4101 extern int puts (const char *);
4102 extern int printf (const char *, ...);
4103 extern int dprintf (int, const char *, ...);
4104 extern void *malloc (size_t);
4106 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4107 // dprintf is used instead of fprintf to avoid needing to declare
4109 #define debug(...) dprintf (2, __VA_ARGS__)
4110 #define showlist(...) puts (#__VA_ARGS__)
4111 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4113 test_varargs_macros (void)
4118 debug ("X = %d\n", x);
4119 showlist (The first, second, and third items.);
4120 report (x>y, "x is %d but y is %d", x, y);
4123 // Check long long types.
4124 #define BIG64 18446744073709551615ull
4125 #define BIG32 4294967295ul
4126 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4128 #error "your preprocessor is broken"
4132 #error "your preprocessor is broken"
4134 static long long int bignum = -9223372036854775807LL;
4135 static unsigned long long int ubignum = BIG64;
4137 struct incomplete_array
4145 const wchar_t *name;
4149 typedef const char *ccp;
4152 test_restrict (ccp restrict text)
4154 // See if C++-style comments work.
4155 // Iterate through items via the restricted pointer.
4156 // Also check for declarations in for loops.
4157 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
4162 // Check varargs and va_copy.
4164 test_varargs (const char *format, ...)
4167 va_start (args, format);
4169 va_copy (args_copy, args);
4171 const char *str = "";
4179 case '\''s'\'': // string
4180 str = va_arg (args_copy, const char *);
4182 case '\''d'\'': // int
4183 number = va_arg (args_copy, int);
4185 case '\''f'\'': // float
4186 fnumber = va_arg (args_copy, double);
4195 return *str && number && fnumber;
4199 # Test code for whether the C compiler supports C99 (body of main).
4200 ac_c_conftest_c99_main='
4202 _Bool success = false;
4203 success |= (argc != 0);
4206 if (test_restrict ("String literal") == 0)
4208 char *restrict newvar = "Another string";
4211 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
4212 test_varargs_macros ();
4214 // Check flexible array members.
4215 struct incomplete_array *ia =
4216 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4218 for (int i = 0; i < ia->datasize; ++i)
4219 ia->data[i] = i * 1.234;
4221 // Check named initializers.
4222 struct named_init ni = {
4224 .name = L"Test wide string",
4225 .average = 543.34343,
4230 int dynamic_array[ni.number];
4231 dynamic_array[0] = argv[0][0];
4232 dynamic_array[ni.number - 1] = 543;
4234 // work around unused variable warnings
4235 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
4236 || dynamic_array[ni.number - 1] != 543);
4239 # Test code for whether the C compiler supports C11 (global declarations)
4240 ac_c_conftest_c11_globals='
4241 // Does the compiler advertise C11 conformance?
4242 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
4243 # error "Compiler does not advertise C11 conformance"
4247 char _Alignas (double) aligned_as_double;
4248 char _Alignas (0) no_special_alignment;
4249 extern char aligned_as_int;
4250 char _Alignas (0) _Alignas (int) aligned_as_int;
4255 int_alignment = _Alignof (int),
4256 int_array_alignment = _Alignof (int[100]),
4257 char_alignment = _Alignof (char)
4259 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4262 int _Noreturn does_not_return (void) { for (;;) continue; }
4264 // Check _Static_assert.
4265 struct test_static_assert
4268 _Static_assert (sizeof (int) <= sizeof (long int),
4269 "_Static_assert does not work in struct");
4273 // Check UTF-8 literals.
4274 #define u8 syntax error!
4275 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4277 // Check duplicate typedefs.
4278 typedef long *long_ptr;
4279 typedef long int *long_ptr;
4280 typedef long_ptr long_ptr;
4282 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4286 struct { int i; int j; };
4287 struct { int k; long int l; } w;
4293 # Test code for whether the C compiler supports C11 (body of main).
4294 ac_c_conftest_c11_main='
4295 _Static_assert ((offsetof (struct anonymous, i)
4296 == offsetof (struct anonymous, w.k)),
4297 "Anonymous union alignment botch");
4303 # Test code for whether the C compiler supports C11 (complete).
4304 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
4305 ${ac_c_conftest_c99_globals}
4306 ${ac_c_conftest_c11_globals}
4309 main (int argc, char **argv)
4312 ${ac_c_conftest_c89_main}
4313 ${ac_c_conftest_c99_main}
4314 ${ac_c_conftest_c11_main}
4319 # Test code for whether the C compiler supports C99 (complete).
4320 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
4321 ${ac_c_conftest_c99_globals}
4324 main (int argc, char **argv)
4327 ${ac_c_conftest_c89_main}
4328 ${ac_c_conftest_c99_main}
4333 # Test code for whether the C compiler supports C89 (complete).
4334 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
4337 main (int argc, char **argv)
4340 ${ac_c_conftest_c89_main}
4345 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
4346 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
4347 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
4348 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
4349 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
4350 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
4351 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
4352 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
4353 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
4354 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
4355 as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
4356 gl_use_threads_default=no
4357 as_fn_append ac_header_c_list " pthread.h pthread_h HAVE_PTHREAD_H"
4358 as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
4359 as_fn_append ac_func_c_list " canonicalize_file_name HAVE_CANONICALIZE_FILE_NAME"
4360 as_fn_append ac_func_c_list " faccessat HAVE_FACCESSAT"
4361 as_fn_append ac_func_c_list " realpath HAVE_REALPATH"
4362 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
4363 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
4364 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
4365 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
4366 as_fn_append ac_func_c_list " fchdir HAVE_FCHDIR"
4367 as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H"
4368 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
4369 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
4370 as_fn_append ac_func_c_list " fdopendir HAVE_FDOPENDIR"
4371 as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
4372 as_fn_append ac_header_c_list " stdio_ext.h stdio_ext_h HAVE_STDIO_EXT_H"
4373 as_fn_append ac_func_c_list " fpurge HAVE_FPURGE"
4374 as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE"
4375 as_fn_append ac_func_c_list " __freadahead HAVE___FREADAHEAD"
4376 as_fn_append ac_func_c_list " __freading HAVE___FREADING"
4377 as_fn_append ac_func_c_list " fstatat HAVE_FSTATAT"
4378 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
4379 gl_getopt_required=GNU
4380 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
4381 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
4382 as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
4383 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
4384 as_fn_append ac_func_c_list " getrandom HAVE_GETRANDOM"
4385 as_fn_append ac_header_c_list " threads.h threads_h HAVE_THREADS_H"
4386 as_fn_append ac_header_c_list " iconv.h iconv_h HAVE_ICONV_H"
4387 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
4388 as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
4389 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
4390 as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
4391 as_fn_append ac_func_c_list " iswblank HAVE_ISWBLANK"
4392 as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
4393 as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
4394 as_fn_append ac_func_c_list " uselocale HAVE_USELOCALE"
4395 as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE"
4396 as_fn_append ac_func_c_list " duplocale HAVE_DUPLOCALE"
4397 as_fn_append ac_func_c_list " freelocale HAVE_FREELOCALE"
4398 as_fn_append ac_header_c_list " math.h math_h HAVE_MATH_H"
4399 as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
4400 as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
4401 as_fn_append ac_func_c_list " mbslen HAVE_MBSLEN"
4402 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
4403 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
4404 as_fn_append ac_func_c_list " mkstemp HAVE_MKSTEMP"
4405 as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
4406 as_fn_append ac_func_c_list " openat HAVE_OPENAT"
4407 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
4408 as_fn_append ac_func_c_list " pipe2 HAVE_PIPE2"
4409 as_fn_append ac_func_c_list " posix_spawn_file_actions_addchdir_np HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP"
4410 as_fn_append ac_func_c_list " posix_spawn_file_actions_addchdir HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR"
4412 as_fn_append ac_func_c_list " readlink HAVE_READLINK"
4413 as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
4414 as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
4415 as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
4416 as_fn_append ac_func_c_list " link HAVE_LINK"
4417 as_fn_append ac_func_c_list " secure_getenv HAVE_SECURE_GETENV"
4418 as_fn_append ac_func_c_list " getuid HAVE_GETUID"
4419 as_fn_append ac_func_c_list " geteuid HAVE_GETEUID"
4420 as_fn_append ac_func_c_list " getgid HAVE_GETGID"
4421 as_fn_append ac_func_c_list " getegid HAVE_GETEGID"
4422 as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
4423 as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
4424 as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
4425 as_fn_append ac_func_c_list " setrlimit HAVE_SETRLIMIT"
4426 as_fn_append ac_func_c_list " getrlimit HAVE_GETRLIMIT"
4427 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
4428 as_fn_append ac_header_c_list " spawn.h spawn_h HAVE_SPAWN_H"
4429 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
4430 as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
4431 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
4432 as_fn_append ac_func_c_list " strndup HAVE_STRNDUP"
4433 as_fn_append ac_header_c_list " sys/random.h sys_random_h HAVE_SYS_RANDOM_H"
4434 as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
4435 as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
4436 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
4437 as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
4438 as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH"
4439 as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
4440 as_fn_append ac_header_c_list " semaphore.h semaphore_h HAVE_SEMAPHORE_H"
4441 as_fn_append ac_func_c_list " explicit_bzero HAVE_EXPLICIT_BZERO"
4442 as_fn_append ac_func_c_list " memset_s HAVE_MEMSET_S"
4443 as_fn_append ac_func_c_list " ftruncate HAVE_FTRUNCATE"
4444 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
4445 as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
4446 as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
4447 as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
4448 as_fn_append ac_func_c_list " pthread_sigmask HAVE_PTHREAD_SIGMASK"
4449 as_fn_append ac_func_c_list " setenv HAVE_SETENV"
4450 as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
4451 as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
4452 as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
4453 as_fn_append ac_func_c_list " shutdown HAVE_SHUTDOWN"
4454 as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
4455 as_fn_append ac_func_c_list " mquery HAVE_MQUERY"
4456 as_fn_append ac_func_c_list " pstat_getprocvm HAVE_PSTAT_GETPROCVM"
4457 as_fn_append ac_func_c_list " wctob HAVE_WCTOB"
4458 gt_needs="$gt_needs need-formatstring-macros"
4460 # Auxiliary files required by this configure script.
4461 ac_aux_files="config.rpath config.guess config.sub compile missing install-sh"
4463 # Locations in which to look for auxiliary files.
4464 ac_aux_dir_candidates="${srcdir}/build-aux"
4466 # Search for a directory containing all of the required auxiliary files,
4467 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
4468 # If we don't find one directory that contains all the files we need,
4469 # we report the set of missing files from the *first* directory in
4470 # $ac_aux_dir_candidates and give up.
4471 ac_missing_aux_files=""
4472 ac_first_candidate=:
4473 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
4474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4476 for as_dir in $ac_aux_dir_candidates
4479 case $as_dir in #(((
4482 *) as_dir=$as_dir/ ;;
4486 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
4487 ac_aux_dir_found=yes
4489 for ac_aux in $ac_aux_files
4491 # As a special case, if "install-sh" is required, that requirement
4492 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
4493 # and $ac_install_sh is set appropriately for whichever one is found.
4494 if test x"$ac_aux" = x"install-sh"
4496 if test -f "${as_dir}install-sh"; then
4497 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
4498 ac_install_sh="${as_dir}install-sh -c"
4499 elif test -f "${as_dir}install.sh"; then
4500 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
4501 ac_install_sh="${as_dir}install.sh -c"
4502 elif test -f "${as_dir}shtool"; then
4503 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
4504 ac_install_sh="${as_dir}shtool install -c"
4507 if $ac_first_candidate; then
4508 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
4514 if test -f "${as_dir}${ac_aux}"; then
4515 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
4518 if $ac_first_candidate; then
4519 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
4526 if test "$ac_aux_dir_found" = yes; then
4527 ac_aux_dir="$as_dir"
4530 ac_first_candidate=false
4539 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
4543 # These three variables are undocumented and unsupported,
4544 # and are intended to be withdrawn in a future Autoconf release.
4545 # They can cause serious problems if a builder's source tree is in a directory
4546 # whose full name contains unusual characters.
4547 if test -f "${ac_aux_dir}config.guess"; then
4548 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
4550 if test -f "${ac_aux_dir}config.sub"; then
4551 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
4553 if test -f "$ac_aux_dir/configure"; then
4554 ac_configure="$SHELL ${ac_aux_dir}configure"
4557 # Check that the precious variables saved in the cache have kept the same
4559 ac_cache_corrupted=false
4560 for ac_var in $ac_precious_vars; do
4561 eval ac_old_set=\$ac_cv_env_${ac_var}_set
4562 eval ac_new_set=\$ac_env_${ac_var}_set
4563 eval ac_old_val=\$ac_cv_env_${ac_var}_value
4564 eval ac_new_val=\$ac_env_${ac_var}_value
4565 case $ac_old_set,$ac_new_set in
4567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
4568 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
4569 ac_cache_corrupted=: ;;
4571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
4572 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
4573 ac_cache_corrupted=: ;;
4576 if test "x$ac_old_val" != "x$ac_new_val"; then
4577 # differences in whitespace do not lead to failure.
4578 ac_old_val_w=`echo x $ac_old_val`
4579 ac_new_val_w=`echo x $ac_new_val`
4580 if test "$ac_old_val_w" != "$ac_new_val_w"; then
4581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
4582 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
4583 ac_cache_corrupted=:
4585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
4586 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
4587 eval $ac_var=\$ac_old_val
4589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
4590 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
4591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
4592 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
4595 # Pass precious variables to config.status.
4596 if test "$ac_new_set" = set; then
4598 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
4599 *) ac_arg=$ac_var=$ac_new_val ;;
4601 case " $ac_configure_args " in
4602 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
4603 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
4607 if $ac_cache_corrupted; then
4608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4609 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
4611 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
4612 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
4613 and start over" "$LINENO" 5
4615 ## -------------------- ##
4616 ## Main body of script. ##
4617 ## -------------------- ##
4620 ac_cpp='$CPP $CPPFLAGS'
4621 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4622 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4623 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4628 am__api_version='1.16'
4632 # Find a good install program. We prefer a C program (faster),
4633 # so one script is as good as another. But avoid the broken or
4634 # incompatible versions:
4635 # SysV /etc/install, /usr/sbin/install
4636 # SunOS /usr/etc/install
4637 # IRIX /sbin/install
4639 # AmigaOS /C/install, which installs bootblocks on floppy discs
4640 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4641 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4642 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4643 # OS/2's system install, which has a completely different semantic
4644 # ./install, which can be erroneously created by make from ./install.sh.
4645 # Reject install programs that cannot install multiple files.
4646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4647 printf %s "checking for a BSD-compatible install... " >&6; }
4648 if test -z "$INSTALL"; then
4649 if test ${ac_cv_path_install+y}
4651 printf %s "(cached) " >&6
4653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4657 case $as_dir in #(((
4660 *) as_dir=$as_dir/ ;;
4662 # Account for fact that we put trailing slashes in our PATH walk.
4665 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4666 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4669 # OSF1 and SCO ODT 3.0 have their own names for install.
4670 # Don't use installbsd from OSF since it installs stuff as root
4672 for ac_prog in ginstall scoinst install; do
4673 for ac_exec_ext in '' $ac_executable_extensions; do
4674 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
4675 if test $ac_prog = install &&
4676 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4677 # AIX install. It has an incompatible calling convention.
4679 elif test $ac_prog = install &&
4680 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4681 # program-specific install script used by HP pwplus--don't use.
4684 rm -rf conftest.one conftest.two conftest.dir
4685 echo one > conftest.one
4686 echo two > conftest.two
4688 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
4689 test -s conftest.one && test -s conftest.two &&
4690 test -s conftest.dir/conftest.one &&
4691 test -s conftest.dir/conftest.two
4693 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
4706 rm -rf conftest.one conftest.two conftest.dir
4709 if test ${ac_cv_path_install+y}; then
4710 INSTALL=$ac_cv_path_install
4712 # As a last resort, use the slow shell script. Don't cache a
4713 # value for INSTALL within a source directory, because that will
4714 # break other packages using the cache if that directory is
4715 # removed, or if the value is a relative name.
4716 INSTALL=$ac_install_sh
4719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4720 printf "%s\n" "$INSTALL" >&6; }
4722 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4723 # It thinks the first close brace ends the variable substitution.
4724 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4726 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4728 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
4731 printf %s "checking whether build environment is sane... " >&6; }
4732 # Reject unsafe characters in $srcdir or the absolute working directory
4733 # name. Accept space and tab only in the latter.
4737 *[\\\"\#\$\&\'\`$am_lf]*)
4738 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4741 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
4742 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4745 # Do 'set' in a subshell so we don't clobber the current shell's
4746 # arguments. Must try -L first in case configure is actually a
4747 # symlink; some systems play weird games with the mod time of symlinks
4748 # (eg FreeBSD returns the mod time of the symlink's containing
4752 for am_try in 1 2; do
4753 echo "timestamp, slept: $am_has_slept" > conftest.file
4754 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4755 if test "$*" = "X"; then
4757 set X `ls -t "$srcdir/configure" conftest.file`
4759 if test "$*" != "X $srcdir/configure conftest.file" \
4760 && test "$*" != "X conftest.file $srcdir/configure"; then
4762 # If neither matched, then we have a broken ls. This can happen
4763 # if, for instance, CONFIG_SHELL is bash and it inherits a
4764 # broken ls alias from the environment. This has actually
4765 # happened. Such a system could not be considered "sane".
4766 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
4767 alias in your environment" "$LINENO" 5
4769 if test "$2" = conftest.file || test $am_try -eq 2; then
4776 test "$2" = conftest.file
4782 as_fn_error $? "newly created file is older than distributed files!
4783 Check your system clock" "$LINENO" 5
4785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4786 printf "%s\n" "yes" >&6; }
4787 # If we didn't sleep, we still need to ensure time stamps of config.status and
4788 # generated files are strictly newer.
4790 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4797 test "$program_prefix" != NONE &&
4798 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4799 # Use a double $ so make ignores it.
4800 test "$program_suffix" != NONE &&
4801 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4802 # Double any \ or $.
4803 # By default was `s,x,x', remove it if useless.
4804 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4805 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
4808 # Expand $ac_aux_dir to an absolute path.
4809 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4812 if test x"${MISSING+set}" != xset; then
4813 MISSING="\${SHELL} '$am_aux_dir/missing'"
4815 # Use eval to expand $SHELL
4816 if eval "$MISSING --is-lightweight"; then
4817 am_missing_run="$MISSING "
4820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4821 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4824 if test x"${install_sh+set}" != xset; then
4827 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4829 install_sh="\${SHELL} $am_aux_dir/install-sh"
4833 # Installed binaries are usually stripped using 'strip' when the user
4834 # run "make install-strip". However 'strip' might not be the right
4835 # tool to use in cross-compilation environments, therefore Automake
4836 # will honor the 'STRIP' environment variable to overrule this program.
4837 if test "$cross_compiling" != no; then
4838 if test -n "$ac_tool_prefix"; then
4839 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4840 set dummy ${ac_tool_prefix}strip; ac_word=$2
4841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4842 printf %s "checking for $ac_word... " >&6; }
4843 if test ${ac_cv_prog_STRIP+y}
4845 printf %s "(cached) " >&6
4847 if test -n "$STRIP"; then
4848 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4854 case $as_dir in #(((
4857 *) as_dir=$as_dir/ ;;
4859 for ac_exec_ext in '' $ac_executable_extensions; do
4860 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4861 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4862 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4871 STRIP=$ac_cv_prog_STRIP
4872 if test -n "$STRIP"; then
4873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4874 printf "%s\n" "$STRIP" >&6; }
4876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4877 printf "%s\n" "no" >&6; }
4882 if test -z "$ac_cv_prog_STRIP"; then
4884 # Extract the first word of "strip", so it can be a program name with args.
4885 set dummy strip; ac_word=$2
4886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4887 printf %s "checking for $ac_word... " >&6; }
4888 if test ${ac_cv_prog_ac_ct_STRIP+y}
4890 printf %s "(cached) " >&6
4892 if test -n "$ac_ct_STRIP"; then
4893 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4899 case $as_dir in #(((
4902 *) as_dir=$as_dir/ ;;
4904 for ac_exec_ext in '' $ac_executable_extensions; do
4905 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4906 ac_cv_prog_ac_ct_STRIP="strip"
4907 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4916 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4917 if test -n "$ac_ct_STRIP"; then
4918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4919 printf "%s\n" "$ac_ct_STRIP" >&6; }
4921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4922 printf "%s\n" "no" >&6; }
4925 if test "x$ac_ct_STRIP" = x; then
4928 case $cross_compiling:$ac_tool_warned in
4930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4931 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4932 ac_tool_warned=yes ;;
4937 STRIP="$ac_cv_prog_STRIP"
4941 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
4945 printf %s "checking for a race-free mkdir -p... " >&6; }
4946 if test -z "$MKDIR_P"; then
4947 if test ${ac_cv_path_mkdir+y}
4949 printf %s "(cached) " >&6
4951 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4952 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4955 case $as_dir in #(((
4958 *) as_dir=$as_dir/ ;;
4960 for ac_prog in mkdir gmkdir; do
4961 for ac_exec_ext in '' $ac_executable_extensions; do
4962 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
4963 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
4964 'mkdir ('*'coreutils) '* | \
4966 'mkdir (fileutils) '4.1*)
4967 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
4977 test -d ./--version && rmdir ./--version
4978 if test ${ac_cv_path_mkdir+y}; then
4979 MKDIR_P="$ac_cv_path_mkdir -p"
4981 # As a last resort, use the slow shell script. Don't cache a
4982 # value for MKDIR_P within a source directory, because that will
4983 # break other packages using the cache if that directory is
4984 # removed, or if the value is a relative name.
4985 MKDIR_P="$ac_install_sh -d"
4988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4989 printf "%s\n" "$MKDIR_P" >&6; }
4991 for ac_prog in gawk mawk nawk awk
4993 # Extract the first word of "$ac_prog", so it can be a program name with args.
4994 set dummy $ac_prog; ac_word=$2
4995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996 printf %s "checking for $ac_word... " >&6; }
4997 if test ${ac_cv_prog_AWK+y}
4999 printf %s "(cached) " >&6
5001 if test -n "$AWK"; then
5002 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5008 case $as_dir in #(((
5011 *) as_dir=$as_dir/ ;;
5013 for ac_exec_ext in '' $ac_executable_extensions; do
5014 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5015 ac_cv_prog_AWK="$ac_prog"
5016 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5026 if test -n "$AWK"; then
5027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5028 printf "%s\n" "$AWK" >&6; }
5030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5031 printf "%s\n" "no" >&6; }
5035 test -n "$AWK" && break
5038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5039 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5041 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5042 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
5044 printf %s "(cached) " >&6
5046 cat >conftest.make <<\_ACEOF
5049 @echo '@@@%%%=$(MAKE)=@@@%%%'
5051 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
5052 case `${MAKE-make} -f conftest.make 2>/dev/null` in
5054 eval ac_cv_prog_make_${ac_make}_set=yes;;
5056 eval ac_cv_prog_make_${ac_make}_set=no;;
5060 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5062 printf "%s\n" "yes" >&6; }
5065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5066 printf "%s\n" "no" >&6; }
5067 SET_MAKE="MAKE=${MAKE-make}"
5070 rm -rf .tst 2>/dev/null
5071 mkdir .tst 2>/dev/null
5072 if test -d .tst; then
5077 rmdir .tst 2>/dev/null
5079 # Check whether --enable-silent-rules was given.
5080 if test ${enable_silent_rules+y}
5082 enableval=$enable_silent_rules;
5085 case $enable_silent_rules in # (((
5086 yes) AM_DEFAULT_VERBOSITY=0;;
5087 no) AM_DEFAULT_VERBOSITY=1;;
5088 *) AM_DEFAULT_VERBOSITY=1;;
5090 am_make=${MAKE-make}
5091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
5092 printf %s "checking whether $am_make supports nested variables... " >&6; }
5093 if test ${am_cv_make_support_nested_variables+y}
5095 printf %s "(cached) " >&6
5097 if printf "%s\n" 'TRUE=$(BAR$(V))
5103 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
5104 am_cv_make_support_nested_variables=yes
5106 am_cv_make_support_nested_variables=no
5109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
5110 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
5111 if test $am_cv_make_support_nested_variables = yes; then
5113 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
5115 AM_V=$AM_DEFAULT_VERBOSITY
5116 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
5120 if test "`cd $srcdir && pwd`" != "`pwd`"; then
5121 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
5122 # is not polluted with repeated "-I."
5123 am__isrc=' -I$(srcdir)'
5124 # test to see if srcdir already configured
5125 if test -f $srcdir/config.status; then
5126 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
5130 # test whether we have cygpath
5131 if test -z "$CYGPATH_W"; then
5132 if (cygpath --version) >/dev/null 2>/dev/null; then
5133 CYGPATH_W='cygpath -w'
5140 # Define the identity of the package.
5145 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
5148 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
5150 # Some tools Automake needs.
5152 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
5155 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
5158 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
5161 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
5164 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
5166 # For better backward compatibility. To be removed once Automake 1.9.x
5167 # dies out for good. For more background, see:
5168 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
5169 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
5170 mkdir_p='$(MKDIR_P)'
5172 # We need awk for the "check" target (and possibly the TAP driver). The
5173 # system "awk" is bad on some platforms.
5174 # Always define AMTAR for backward compatibility. Yes, it's still used
5175 # in the wild :-( We should find a proper way to deprecate it ...
5179 # We'll loop over all known methods to create a tar archive until one works.
5180 _am_tools='gnutar pax cpio none'
5182 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
5189 # POSIX will say in a future version that running "rm -f" with no argument
5190 # is OK; and we want to be able to make that assumption in our Makefile
5191 # recipes. So use an aggressive probe to check that the usage we want is
5192 # actually supported "in the wild" to an acceptable degree.
5193 # See automake bug#10828.
5194 # To make any issue more visible, cause the running configure to be aborted
5195 # by default if the 'rm' program in use doesn't match our expectations; the
5196 # user can still override this though.
5197 if rm -f && rm -fr && rm -rf; then : OK; else
5201 Your 'rm' program seems unable to run without file operands specified
5202 on the command line, even when the '-f' option is present. This is contrary
5203 to the behaviour of most rm programs out there, and not conforming with
5204 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
5206 Please tell bug-automake@gnu.org about your system, including the value
5207 of your $PATH and any error possibly output before this message. This
5208 can help us improve future automake versions.
5211 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
5212 echo 'Configuration will proceed anyway, since you have set the' >&2
5213 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
5217 Aborting the configuration process, to ensure you take notice of the issue.
5219 You can download and install GNU coreutils to get an 'rm' implementation
5220 that behaves properly: <https://www.gnu.org/software/coreutils/>.
5222 If you want to complete the configuration process using your problematic
5223 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
5224 to "yes", and re-run configure.
5227 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
5231 # Check whether --enable-silent-rules was given.
5232 if test ${enable_silent_rules+y}
5234 enableval=$enable_silent_rules;
5237 case $enable_silent_rules in # (((
5238 yes) AM_DEFAULT_VERBOSITY=0;;
5239 no) AM_DEFAULT_VERBOSITY=1;;
5240 *) AM_DEFAULT_VERBOSITY=0;;
5242 am_make=${MAKE-make}
5243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
5244 printf %s "checking whether $am_make supports nested variables... " >&6; }
5245 if test ${am_cv_make_support_nested_variables+y}
5247 printf %s "(cached) " >&6
5249 if printf "%s\n" 'TRUE=$(BAR$(V))
5255 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
5256 am_cv_make_support_nested_variables=yes
5258 am_cv_make_support_nested_variables=no
5261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
5262 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
5263 if test $am_cv_make_support_nested_variables = yes; then
5265 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
5267 AM_V=$AM_DEFAULT_VERBOSITY
5268 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
5271 # make --enable-silent-rules the default.
5276 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
5289 ac_cpp='$CPP $CPPFLAGS'
5290 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5291 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5292 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5293 if test -n "$ac_tool_prefix"; then
5294 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5295 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297 printf %s "checking for $ac_word... " >&6; }
5298 if test ${ac_cv_prog_CC+y}
5300 printf %s "(cached) " >&6
5302 if test -n "$CC"; then
5303 ac_cv_prog_CC="$CC" # Let the user override the test.
5305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5309 case $as_dir in #(((
5312 *) as_dir=$as_dir/ ;;
5314 for ac_exec_ext in '' $ac_executable_extensions; do
5315 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5316 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5317 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5327 if test -n "$CC"; then
5328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5329 printf "%s\n" "$CC" >&6; }
5331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5332 printf "%s\n" "no" >&6; }
5337 if test -z "$ac_cv_prog_CC"; then
5339 # Extract the first word of "gcc", so it can be a program name with args.
5340 set dummy gcc; ac_word=$2
5341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5342 printf %s "checking for $ac_word... " >&6; }
5343 if test ${ac_cv_prog_ac_ct_CC+y}
5345 printf %s "(cached) " >&6
5347 if test -n "$ac_ct_CC"; then
5348 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5354 case $as_dir in #(((
5357 *) as_dir=$as_dir/ ;;
5359 for ac_exec_ext in '' $ac_executable_extensions; do
5360 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5361 ac_cv_prog_ac_ct_CC="gcc"
5362 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5371 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5372 if test -n "$ac_ct_CC"; then
5373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5374 printf "%s\n" "$ac_ct_CC" >&6; }
5376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5377 printf "%s\n" "no" >&6; }
5380 if test "x$ac_ct_CC" = x; then
5383 case $cross_compiling:$ac_tool_warned in
5385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5386 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5387 ac_tool_warned=yes ;;
5395 if test -z "$CC"; then
5396 if test -n "$ac_tool_prefix"; then
5397 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5398 set dummy ${ac_tool_prefix}cc; ac_word=$2
5399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5400 printf %s "checking for $ac_word... " >&6; }
5401 if test ${ac_cv_prog_CC+y}
5403 printf %s "(cached) " >&6
5405 if test -n "$CC"; then
5406 ac_cv_prog_CC="$CC" # Let the user override the test.
5408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5412 case $as_dir in #(((
5415 *) as_dir=$as_dir/ ;;
5417 for ac_exec_ext in '' $ac_executable_extensions; do
5418 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5419 ac_cv_prog_CC="${ac_tool_prefix}cc"
5420 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5430 if test -n "$CC"; then
5431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5432 printf "%s\n" "$CC" >&6; }
5434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5435 printf "%s\n" "no" >&6; }
5441 if test -z "$CC"; then
5442 # Extract the first word of "cc", so it can be a program name with args.
5443 set dummy cc; ac_word=$2
5444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5445 printf %s "checking for $ac_word... " >&6; }
5446 if test ${ac_cv_prog_CC+y}
5448 printf %s "(cached) " >&6
5450 if test -n "$CC"; then
5451 ac_cv_prog_CC="$CC" # Let the user override the test.
5454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5458 case $as_dir in #(((
5461 *) as_dir=$as_dir/ ;;
5463 for ac_exec_ext in '' $ac_executable_extensions; do
5464 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5465 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5466 ac_prog_rejected=yes
5470 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5477 if test $ac_prog_rejected = yes; then
5478 # We found a bogon in the path, so make sure we never use it.
5479 set dummy $ac_cv_prog_CC
5481 if test $# != 0; then
5482 # We chose a different compiler from the bogus one.
5483 # However, it has the same basename, so the bogon will be chosen
5484 # first if we set CC to just the basename; use the full file name.
5486 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5492 if test -n "$CC"; then
5493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5494 printf "%s\n" "$CC" >&6; }
5496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5497 printf "%s\n" "no" >&6; }
5502 if test -z "$CC"; then
5503 if test -n "$ac_tool_prefix"; then
5504 for ac_prog in cl.exe
5506 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5507 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5509 printf %s "checking for $ac_word... " >&6; }
5510 if test ${ac_cv_prog_CC+y}
5512 printf %s "(cached) " >&6
5514 if test -n "$CC"; then
5515 ac_cv_prog_CC="$CC" # Let the user override the test.
5517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5521 case $as_dir in #(((
5524 *) as_dir=$as_dir/ ;;
5526 for ac_exec_ext in '' $ac_executable_extensions; do
5527 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5528 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5529 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5539 if test -n "$CC"; then
5540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5541 printf "%s\n" "$CC" >&6; }
5543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5544 printf "%s\n" "no" >&6; }
5548 test -n "$CC" && break
5551 if test -z "$CC"; then
5553 for ac_prog in cl.exe
5555 # Extract the first word of "$ac_prog", so it can be a program name with args.
5556 set dummy $ac_prog; ac_word=$2
5557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5558 printf %s "checking for $ac_word... " >&6; }
5559 if test ${ac_cv_prog_ac_ct_CC+y}
5561 printf %s "(cached) " >&6
5563 if test -n "$ac_ct_CC"; then
5564 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5570 case $as_dir in #(((
5573 *) as_dir=$as_dir/ ;;
5575 for ac_exec_ext in '' $ac_executable_extensions; do
5576 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5577 ac_cv_prog_ac_ct_CC="$ac_prog"
5578 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5587 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5588 if test -n "$ac_ct_CC"; then
5589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5590 printf "%s\n" "$ac_ct_CC" >&6; }
5592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5593 printf "%s\n" "no" >&6; }
5597 test -n "$ac_ct_CC" && break
5600 if test "x$ac_ct_CC" = x; then
5603 case $cross_compiling:$ac_tool_warned in
5605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5606 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5607 ac_tool_warned=yes ;;
5614 if test -z "$CC"; then
5615 if test -n "$ac_tool_prefix"; then
5616 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5617 set dummy ${ac_tool_prefix}clang; ac_word=$2
5618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5619 printf %s "checking for $ac_word... " >&6; }
5620 if test ${ac_cv_prog_CC+y}
5622 printf %s "(cached) " >&6
5624 if test -n "$CC"; then
5625 ac_cv_prog_CC="$CC" # Let the user override the test.
5627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5631 case $as_dir in #(((
5634 *) as_dir=$as_dir/ ;;
5636 for ac_exec_ext in '' $ac_executable_extensions; do
5637 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5638 ac_cv_prog_CC="${ac_tool_prefix}clang"
5639 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5649 if test -n "$CC"; then
5650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5651 printf "%s\n" "$CC" >&6; }
5653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5654 printf "%s\n" "no" >&6; }
5659 if test -z "$ac_cv_prog_CC"; then
5661 # Extract the first word of "clang", so it can be a program name with args.
5662 set dummy clang; ac_word=$2
5663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5664 printf %s "checking for $ac_word... " >&6; }
5665 if test ${ac_cv_prog_ac_ct_CC+y}
5667 printf %s "(cached) " >&6
5669 if test -n "$ac_ct_CC"; then
5670 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5676 case $as_dir in #(((
5679 *) as_dir=$as_dir/ ;;
5681 for ac_exec_ext in '' $ac_executable_extensions; do
5682 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5683 ac_cv_prog_ac_ct_CC="clang"
5684 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5693 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5694 if test -n "$ac_ct_CC"; then
5695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5696 printf "%s\n" "$ac_ct_CC" >&6; }
5698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699 printf "%s\n" "no" >&6; }
5702 if test "x$ac_ct_CC" = x; then
5705 case $cross_compiling:$ac_tool_warned in
5707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5708 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5709 ac_tool_warned=yes ;;
5720 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5721 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5722 as_fn_error $? "no acceptable C compiler found in \$PATH
5723 See \`config.log' for more details" "$LINENO" 5; }
5725 # Provide some information about the compiler.
5726 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5729 for ac_option in --version -v -V -qversion -version; do
5730 { { ac_try="$ac_compiler $ac_option >&5"
5732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5733 *) ac_try_echo=$ac_try;;
5735 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5736 printf "%s\n" "$ac_try_echo"; } >&5
5737 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5739 if test -s conftest.err; then
5741 ... rest of stderr output deleted ...
5742 10q' conftest.err >conftest.er1
5743 cat conftest.er1 >&5
5745 rm -f conftest.er1 conftest.err
5746 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5747 test $ac_status = 0; }
5750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5751 /* end confdefs.h. */
5761 ac_clean_files_save=$ac_clean_files
5762 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5763 # Try to create an executable without -o first, disregard a.out.
5764 # It will help us diagnose broken compilers, and finding out an intuition
5766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5767 printf %s "checking whether the C compiler works... " >&6; }
5768 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5770 # The possible output files:
5771 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5774 for ac_file in $ac_files
5777 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5778 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5783 if { { ac_try="$ac_link_default"
5785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5786 *) ac_try_echo=$ac_try;;
5788 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5789 printf "%s\n" "$ac_try_echo"; } >&5
5790 (eval "$ac_link_default") 2>&5
5792 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5793 test $ac_status = 0; }
5795 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5796 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5797 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5798 # so that the user can short-circuit this test for compilers unknown to
5800 for ac_file in $ac_files ''
5802 test -f "$ac_file" || continue
5804 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5807 # We found the default executable, but exeext='' is most
5811 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
5813 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5815 # We set ac_cv_exeext here because the later test for it is not
5816 # safe: cross compilers may not add the suffix if given an `-o'
5817 # argument, so we may need to know it at that point already.
5818 # Even if this section looks crufty: it has the advantage of
5825 test "$ac_cv_exeext" = no && ac_cv_exeext=
5830 if test -z "$ac_file"
5832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5833 printf "%s\n" "no" >&6; }
5834 printf "%s\n" "$as_me: failed program was:" >&5
5835 sed 's/^/| /' conftest.$ac_ext >&5
5837 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5838 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5839 as_fn_error 77 "C compiler cannot create executables
5840 See \`config.log' for more details" "$LINENO" 5; }
5842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5843 printf "%s\n" "yes" >&6; }
5845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5846 printf %s "checking for C compiler default output file name... " >&6; }
5847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5848 printf "%s\n" "$ac_file" >&6; }
5849 ac_exeext=$ac_cv_exeext
5851 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5852 ac_clean_files=$ac_clean_files_save
5853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5854 printf %s "checking for suffix of executables... " >&6; }
5855 if { { ac_try="$ac_link"
5857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5858 *) ac_try_echo=$ac_try;;
5860 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5861 printf "%s\n" "$ac_try_echo"; } >&5
5862 (eval "$ac_link") 2>&5
5864 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5865 test $ac_status = 0; }
5867 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5868 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5869 # work properly (i.e., refer to `conftest.exe'), while it won't with
5871 for ac_file in conftest.exe conftest conftest.*; do
5872 test -f "$ac_file" || continue
5874 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5875 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5881 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5882 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5883 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5884 See \`config.log' for more details" "$LINENO" 5; }
5886 rm -f conftest conftest$ac_cv_exeext
5887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5888 printf "%s\n" "$ac_cv_exeext" >&6; }
5890 rm -f conftest.$ac_ext
5891 EXEEXT=$ac_cv_exeext
5893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5894 /* end confdefs.h. */
5899 FILE *f = fopen ("conftest.out", "w");
5900 return ferror (f) || fclose (f) != 0;
5906 ac_clean_files="$ac_clean_files conftest.out"
5907 # Check that the compiler produces executables we can run. If not, either
5908 # the compiler is broken, or we cross compile.
5909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5910 printf %s "checking whether we are cross compiling... " >&6; }
5911 if test "$cross_compiling" != yes; then
5912 { { ac_try="$ac_link"
5914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5915 *) ac_try_echo=$ac_try;;
5917 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5918 printf "%s\n" "$ac_try_echo"; } >&5
5919 (eval "$ac_link") 2>&5
5921 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5922 test $ac_status = 0; }
5923 if { ac_try='./conftest$ac_cv_exeext'
5924 { { case "(($ac_try" in
5925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5926 *) ac_try_echo=$ac_try;;
5928 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5929 printf "%s\n" "$ac_try_echo"; } >&5
5930 (eval "$ac_try") 2>&5
5932 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5933 test $ac_status = 0; }; }; then
5936 if test "$cross_compiling" = maybe; then
5939 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5940 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5941 as_fn_error 77 "cannot run C compiled programs.
5942 If you meant to cross compile, use \`--host'.
5943 See \`config.log' for more details" "$LINENO" 5; }
5947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5948 printf "%s\n" "$cross_compiling" >&6; }
5950 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5951 ac_clean_files=$ac_clean_files_save
5952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5953 printf %s "checking for suffix of object files... " >&6; }
5954 if test ${ac_cv_objext+y}
5956 printf %s "(cached) " >&6
5958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5959 /* end confdefs.h. */
5969 rm -f conftest.o conftest.obj
5970 if { { ac_try="$ac_compile"
5972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5973 *) ac_try_echo=$ac_try;;
5975 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5976 printf "%s\n" "$ac_try_echo"; } >&5
5977 (eval "$ac_compile") 2>&5
5979 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5980 test $ac_status = 0; }
5982 for ac_file in conftest.o conftest.obj conftest.*; do
5983 test -f "$ac_file" || continue;
5985 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5986 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5991 printf "%s\n" "$as_me: failed program was:" >&5
5992 sed 's/^/| /' conftest.$ac_ext >&5
5994 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5995 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5996 as_fn_error $? "cannot compute suffix of object files: cannot compile
5997 See \`config.log' for more details" "$LINENO" 5; }
5999 rm -f conftest.$ac_cv_objext conftest.$ac_ext
6001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
6002 printf "%s\n" "$ac_cv_objext" >&6; }
6003 OBJEXT=$ac_cv_objext
6005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
6006 printf %s "checking whether the compiler supports GNU C... " >&6; }
6007 if test ${ac_cv_c_compiler_gnu+y}
6009 printf %s "(cached) " >&6
6011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6012 /* end confdefs.h. */
6025 if ac_fn_c_try_compile "$LINENO"
6031 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6032 ac_cv_c_compiler_gnu=$ac_compiler_gnu
6035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6036 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
6037 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6039 if test $ac_compiler_gnu = yes; then
6044 ac_test_CFLAGS=${CFLAGS+y}
6045 ac_save_CFLAGS=$CFLAGS
6046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6047 printf %s "checking whether $CC accepts -g... " >&6; }
6048 if test ${ac_cv_prog_cc_g+y}
6050 printf %s "(cached) " >&6
6052 ac_save_c_werror_flag=$ac_c_werror_flag
6053 ac_c_werror_flag=yes
6056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6057 /* end confdefs.h. */
6067 if ac_fn_c_try_compile "$LINENO"
6072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6073 /* end confdefs.h. */
6083 if ac_fn_c_try_compile "$LINENO"
6087 ac_c_werror_flag=$ac_save_c_werror_flag
6089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6090 /* end confdefs.h. */
6100 if ac_fn_c_try_compile "$LINENO"
6104 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6106 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6108 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6109 ac_c_werror_flag=$ac_save_c_werror_flag
6111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6112 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
6113 if test $ac_test_CFLAGS; then
6114 CFLAGS=$ac_save_CFLAGS
6115 elif test $ac_cv_prog_cc_g = yes; then
6116 if test "$GCC" = yes; then
6122 if test "$GCC" = yes; then
6129 if test x$ac_prog_cc_stdc = xno
6131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
6132 printf %s "checking for $CC option to enable C11 features... " >&6; }
6133 if test ${ac_cv_prog_cc_c11+y}
6135 printf %s "(cached) " >&6
6137 ac_cv_prog_cc_c11=no
6139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6140 /* end confdefs.h. */
6141 $ac_c_conftest_c11_program
6143 for ac_arg in '' -std=gnu11
6145 CC="$ac_save_CC $ac_arg"
6146 if ac_fn_c_try_compile "$LINENO"
6148 ac_cv_prog_cc_c11=$ac_arg
6150 rm -f core conftest.err conftest.$ac_objext conftest.beam
6151 test "x$ac_cv_prog_cc_c11" != "xno" && break
6153 rm -f conftest.$ac_ext
6157 if test "x$ac_cv_prog_cc_c11" = xno
6159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6160 printf "%s\n" "unsupported" >&6; }
6162 if test "x$ac_cv_prog_cc_c11" = x
6164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6165 printf "%s\n" "none needed" >&6; }
6167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
6168 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
6169 CC="$CC $ac_cv_prog_cc_c11"
6171 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
6175 if test x$ac_prog_cc_stdc = xno
6177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
6178 printf %s "checking for $CC option to enable C99 features... " >&6; }
6179 if test ${ac_cv_prog_cc_c99+y}
6181 printf %s "(cached) " >&6
6183 ac_cv_prog_cc_c99=no
6185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6186 /* end confdefs.h. */
6187 $ac_c_conftest_c99_program
6189 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
6191 CC="$ac_save_CC $ac_arg"
6192 if ac_fn_c_try_compile "$LINENO"
6194 ac_cv_prog_cc_c99=$ac_arg
6196 rm -f core conftest.err conftest.$ac_objext conftest.beam
6197 test "x$ac_cv_prog_cc_c99" != "xno" && break
6199 rm -f conftest.$ac_ext
6203 if test "x$ac_cv_prog_cc_c99" = xno
6205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6206 printf "%s\n" "unsupported" >&6; }
6208 if test "x$ac_cv_prog_cc_c99" = x
6210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6211 printf "%s\n" "none needed" >&6; }
6213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6214 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
6215 CC="$CC $ac_cv_prog_cc_c99"
6217 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6221 if test x$ac_prog_cc_stdc = xno
6223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
6224 printf %s "checking for $CC option to enable C89 features... " >&6; }
6225 if test ${ac_cv_prog_cc_c89+y}
6227 printf %s "(cached) " >&6
6229 ac_cv_prog_cc_c89=no
6231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6232 /* end confdefs.h. */
6233 $ac_c_conftest_c89_program
6235 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6237 CC="$ac_save_CC $ac_arg"
6238 if ac_fn_c_try_compile "$LINENO"
6240 ac_cv_prog_cc_c89=$ac_arg
6242 rm -f core conftest.err conftest.$ac_objext conftest.beam
6243 test "x$ac_cv_prog_cc_c89" != "xno" && break
6245 rm -f conftest.$ac_ext
6249 if test "x$ac_cv_prog_cc_c89" = xno
6251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6252 printf "%s\n" "unsupported" >&6; }
6254 if test "x$ac_cv_prog_cc_c89" = x
6256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6257 printf "%s\n" "none needed" >&6; }
6259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6260 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
6261 CC="$CC $ac_cv_prog_cc_c89"
6263 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6269 ac_cpp='$CPP $CPPFLAGS'
6270 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6271 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6272 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6276 ac_cpp='$CPP $CPPFLAGS'
6277 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6278 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6279 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6281 printf %s "checking whether $CC understands -c and -o together... " >&6; }
6282 if test ${am_cv_prog_cc_c_o+y}
6284 printf %s "(cached) " >&6
6286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6287 /* end confdefs.h. */
6297 # Make sure it works both with $CC and with simple cc.
6298 # Following AC_PROG_CC_C_O, we do the test twice because some
6299 # compilers refuse to overwrite an existing .o file with -o,
6300 # though they will create one.
6301 am_cv_prog_cc_c_o=yes
6303 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6304 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6307 (exit $ac_status); } \
6308 && test -f conftest2.$ac_objext; then
6311 am_cv_prog_cc_c_o=no
6315 rm -f core conftest*
6318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6319 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
6320 if test "$am_cv_prog_cc_c_o" != yes; then
6321 # Losing compiler, so override with the script.
6322 # FIXME: It is wrong to rewrite CC.
6323 # But if we don't then we get into trouble of one sort or another.
6324 # A longer-term fix would be to have automake use am__CC in this case,
6325 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6326 CC="$am_aux_dir/compile $CC"
6329 ac_cpp='$CPP $CPPFLAGS'
6330 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6331 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6332 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
6337 printf %s "checking whether the compiler is clang... " >&6; }
6338 if test ${gl_cv_compiler_clang+y}
6340 printf %s "(cached) " >&6
6342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6343 /* end confdefs.h. */
6358 if ac_fn_c_try_compile "$LINENO"
6360 gl_cv_compiler_clang=no
6362 gl_cv_compiler_clang=yes
6364 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
6368 printf "%s\n" "$gl_cv_compiler_clang" >&6; }
6371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
6372 printf %s "checking for compiler option needed when checking for declarations... " >&6; }
6373 if test ${gl_cv_compiler_check_decl_option+y}
6375 printf %s "(cached) " >&6
6377 if test $gl_cv_compiler_clang = yes; then
6378 save_ac_compile="$ac_compile"
6379 ac_compile="$ac_compile -Werror=implicit-function-declaration"
6380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6381 /* end confdefs.h. */
6391 if ac_fn_c_try_compile "$LINENO"
6393 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
6395 gl_cv_compiler_check_decl_option=none
6397 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6398 ac_compile="$save_ac_compile"
6400 gl_cv_compiler_check_decl_option=none
6404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
6405 printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
6406 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
6407 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
6409 ac_compile_for_check_decl="$ac_compile"
6412 DEPDIR="${am__leading_dot}deps"
6414 ac_config_commands="$ac_config_commands depfiles"
6416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
6417 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
6418 cat > confinc.mk << 'END'
6420 @echo this is the am__doit target >confinc.out
6425 # BSD make does it like this.
6426 echo '.include "confinc.mk" # ignored' > confmf.BSD
6427 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
6428 echo 'include confinc.mk # ignored' > confmf.GNU
6430 for s in GNU BSD; do
6431 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
6432 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
6434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6435 (exit $ac_status); }
6436 case $?:`cat confinc.out 2>/dev/null` in #(
6437 '0:this is the am__doit target') :
6440 am__include='.include' am__quote='"' ;; #(
6442 am__include='include' am__quote='' ;;
6447 if test "$am__include" != "#"; then
6448 _am_result="yes ($s style)"
6452 rm -f confinc.* confmf.*
6453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
6454 printf "%s\n" "${_am_result}" >&6; }
6456 # Check whether --enable-dependency-tracking was given.
6457 if test ${enable_dependency_tracking+y}
6459 enableval=$enable_dependency_tracking;
6462 if test "x$enable_dependency_tracking" != xno; then
6463 am_depcomp="$ac_aux_dir/depcomp"
6467 if test "x$enable_dependency_tracking" != xno; then
6477 depcc="$CC" am_compiler_list=
6479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6480 printf %s "checking dependency style of $depcc... " >&6; }
6481 if test ${am_cv_CC_dependencies_compiler_type+y}
6483 printf %s "(cached) " >&6
6485 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6486 # We make a subdir and do the tests there. Otherwise we can end up
6487 # making bogus files that we don't know about and never remove. For
6488 # instance it was reported that on HP-UX the gcc test will end up
6489 # making a dummy file named 'D' -- because '-MD' means "put the output
6493 # Copy depcomp to subdir because otherwise we won't find it if we're
6494 # using a relative directory.
6495 cp "$am_depcomp" conftest.dir
6497 # We will build objects and dependencies in a subdirectory because
6498 # it helps to detect inapplicable dependency modes. For instance
6499 # both Tru64's cc and ICC support -MD to output dependencies as a
6500 # side effect of compilation, but ICC will put the dependencies in
6501 # the current directory while Tru64 will put them in the object
6505 am_cv_CC_dependencies_compiler_type=none
6506 if test "$am_compiler_list" = ""; then
6507 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6510 case " $depcc " in #(
6511 *\ -arch\ *\ -arch\ *) am__universal=true ;;
6514 for depmode in $am_compiler_list; do
6515 # Setup a source with many dependencies, because some compilers
6516 # like to wrap large dependency lists on column 80 (with \), and
6517 # we should not choose a depcomp mode which is confused by this.
6519 # We need to recreate these files for each test, as the compiler may
6520 # overwrite some of them when testing with obscure command lines.
6521 # This happens at least with the AIX C compiler.
6523 for i in 1 2 3 4 5 6; do
6524 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6525 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6526 # Solaris 10 /bin/sh.
6527 echo '/* dummy */' > sub/conftst$i.h
6529 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6531 # We check with '-c' and '-o' for the sake of the "dashmstdout"
6532 # mode. It turns out that the SunPro C++ compiler does not properly
6533 # handle '-M -o', and we need to detect this. Also, some Intel
6534 # versions had trouble with output in subdirs.
6535 am__obj=sub/conftest.${OBJEXT-o}
6536 am__minus_obj="-o $am__obj"
6539 # This depmode causes a compiler race in universal mode.
6540 test "$am__universal" = false || continue
6543 # After this tag, mechanisms are not by side-effect, so they'll
6544 # only be used when explicitly requested.
6545 if test "x$enable_dependency_tracking" = xyes; then
6551 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6552 # This compiler won't grok '-c -o', but also, the minuso test has
6553 # not run yet. These depmodes are late enough in the game, and
6554 # so weak that their functioning should not be impacted.
6555 am__obj=conftest.${OBJEXT-o}
6560 if depmode=$depmode \
6561 source=sub/conftest.c object=$am__obj \
6562 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6563 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6564 >/dev/null 2>conftest.err &&
6565 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6566 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6567 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6568 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6569 # icc doesn't choke on unknown options, it will just issue warnings
6570 # or remarks (even with -Werror). So we grep stderr for any message
6571 # that says an option was ignored or not supported.
6572 # When given -MP, icc 7.0 and 7.1 complain thusly:
6573 # icc: Command line warning: ignoring option '-M'; no argument required
6574 # The diagnosis changed in icc 8.0:
6575 # icc: Command line remark: option '-MP' not supported
6576 if (grep 'ignoring option' conftest.err ||
6577 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6578 am_cv_CC_dependencies_compiler_type=$depmode
6587 am_cv_CC_dependencies_compiler_type=none
6591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6592 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
6593 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6596 test "x$enable_dependency_tracking" != xno \
6597 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6599 am__fastdepCC_FALSE='#'
6601 am__fastdepCC_TRUE='#'
6602 am__fastdepCC_FALSE=
6608 ac_header= ac_cache=
6609 for ac_item in $ac_header_c_list
6611 if test $ac_cache; then
6612 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6613 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6614 printf "%s\n" "#define $ac_item 1" >> confdefs.h
6616 ac_header= ac_cache=
6617 elif test $ac_header; then
6631 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
6634 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6644 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6645 if test ${ac_cv_safe_to_define___extensions__+y}
6647 printf %s "(cached) " >&6
6649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6650 /* end confdefs.h. */
6652 # define __EXTENSIONS__ 1
6653 $ac_includes_default
6662 if ac_fn_c_try_compile "$LINENO"
6664 ac_cv_safe_to_define___extensions__=yes
6666 ac_cv_safe_to_define___extensions__=no
6668 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6671 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6674 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6675 if test ${ac_cv_should_define__xopen_source+y}
6677 printf %s "(cached) " >&6
6679 ac_cv_should_define__xopen_source=no
6680 if test $ac_cv_header_wchar_h = yes
6682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6683 /* end confdefs.h. */
6695 if ac_fn_c_try_compile "$LINENO"
6699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6700 /* end confdefs.h. */
6702 #define _XOPEN_SOURCE 500
6713 if ac_fn_c_try_compile "$LINENO"
6715 ac_cv_should_define__xopen_source=yes
6717 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6719 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6723 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6725 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6727 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6729 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6731 printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6733 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6735 printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6737 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6739 printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6741 printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6743 printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6745 printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6747 printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6749 printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6751 printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6753 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6755 if test $ac_cv_header_minix_config_h = yes
6758 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6760 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6762 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6767 if test $ac_cv_safe_to_define___extensions__ = yes
6769 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6772 if test $ac_cv_should_define__xopen_source = yes
6774 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6780 # Make sure we can run config.sub.
6781 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
6782 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
6784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6785 printf %s "checking build system type... " >&6; }
6786 if test ${ac_cv_build+y}
6788 printf %s "(cached) " >&6
6790 ac_build_alias=$build_alias
6791 test "x$ac_build_alias" = x &&
6792 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
6793 test "x$ac_build_alias" = x &&
6794 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6795 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
6796 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
6799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6800 printf "%s\n" "$ac_cv_build" >&6; }
6801 case $ac_cv_build in
6803 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6806 ac_save_IFS=$IFS; IFS='-'
6812 # Remember, the first character of IFS is used to create $*,
6813 # except with old shells:
6816 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6820 printf %s "checking host system type... " >&6; }
6821 if test ${ac_cv_host+y}
6823 printf %s "(cached) " >&6
6825 if test "x$host_alias" = x; then
6826 ac_cv_host=$ac_cv_build
6828 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
6829 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
6833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6834 printf "%s\n" "$ac_cv_host" >&6; }
6837 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6840 ac_save_IFS=$IFS; IFS='-'
6846 # Remember, the first character of IFS is used to create $*,
6847 # except with old shells:
6850 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6860 printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h
6866 ac_cpp='$CPP $CPPFLAGS'
6867 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6868 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6871 printf %s "checking how to run the C preprocessor... " >&6; }
6872 # On Suns, sometimes $CPP names a directory.
6873 if test -n "$CPP" && test -d "$CPP"; then
6876 if test -z "$CPP"; then
6877 if test ${ac_cv_prog_CPP+y}
6879 printf %s "(cached) " >&6
6881 # Double quotes because $CC needs to be expanded
6882 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
6885 for ac_c_preproc_warn_flag in '' yes
6887 # Use a header file that comes with gcc, so configuring glibc
6888 # with a fresh cross-compiler works.
6889 # On the NeXT, cc -E runs the code through the compiler's parser,
6890 # not just through cpp. "Syntax error" is here to catch this case.
6891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6892 /* end confdefs.h. */
6896 if ac_fn_c_try_cpp "$LINENO"
6900 # Broken: fails on valid input.
6903 rm -f conftest.err conftest.i conftest.$ac_ext
6905 # OK, works on sane cases. Now check whether nonexistent headers
6906 # can be detected and how.
6907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6908 /* end confdefs.h. */
6909 #include <ac_nonexistent.h>
6911 if ac_fn_c_try_cpp "$LINENO"
6913 # Broken: success on invalid input.
6916 # Passes both tests.
6920 rm -f conftest.err conftest.i conftest.$ac_ext
6923 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6924 rm -f conftest.i conftest.err conftest.$ac_ext
6938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6939 printf "%s\n" "$CPP" >&6; }
6941 for ac_c_preproc_warn_flag in '' yes
6943 # Use a header file that comes with gcc, so configuring glibc
6944 # with a fresh cross-compiler works.
6945 # On the NeXT, cc -E runs the code through the compiler's parser,
6946 # not just through cpp. "Syntax error" is here to catch this case.
6947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6948 /* end confdefs.h. */
6952 if ac_fn_c_try_cpp "$LINENO"
6956 # Broken: fails on valid input.
6959 rm -f conftest.err conftest.i conftest.$ac_ext
6961 # OK, works on sane cases. Now check whether nonexistent headers
6962 # can be detected and how.
6963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6964 /* end confdefs.h. */
6965 #include <ac_nonexistent.h>
6967 if ac_fn_c_try_cpp "$LINENO"
6969 # Broken: success on invalid input.
6972 # Passes both tests.
6976 rm -f conftest.err conftest.i conftest.$ac_ext
6979 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6980 rm -f conftest.i conftest.err conftest.$ac_ext
6985 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6986 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6987 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6988 See \`config.log' for more details" "$LINENO" 5; }
6992 ac_cpp='$CPP $CPPFLAGS'
6993 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6994 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6995 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6999 printf %s "checking for grep that handles long lines and -e... " >&6; }
7000 if test ${ac_cv_path_GREP+y}
7002 printf %s "(cached) " >&6
7004 if test -z "$GREP"; then
7005 ac_path_GREP_found=false
7006 # Loop through the user's path and test for each of PROGNAME-LIST
7007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7008 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7011 case $as_dir in #(((
7014 *) as_dir=$as_dir/ ;;
7016 for ac_prog in grep ggrep
7018 for ac_exec_ext in '' $ac_executable_extensions; do
7019 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
7020 as_fn_executable_p "$ac_path_GREP" || continue
7021 # Check for GNU ac_path_GREP and select it if it is found.
7022 # Check for GNU $ac_path_GREP
7023 case `"$ac_path_GREP" --version 2>&1` in
7025 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
7028 printf %s 0123456789 >"conftest.in"
7031 cat "conftest.in" "conftest.in" >"conftest.tmp"
7032 mv "conftest.tmp" "conftest.in"
7033 cp "conftest.in" "conftest.nl"
7034 printf "%s\n" 'GREP' >> "conftest.nl"
7035 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7036 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7037 as_fn_arith $ac_count + 1 && ac_count=$as_val
7038 if test $ac_count -gt ${ac_path_GREP_max-0}; then
7039 # Best one so far, save it but keep looking for a better one
7040 ac_cv_path_GREP="$ac_path_GREP"
7041 ac_path_GREP_max=$ac_count
7043 # 10*(2^10) chars as input seems more than enough
7044 test $ac_count -gt 10 && break
7046 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7049 $ac_path_GREP_found && break 3
7054 if test -z "$ac_cv_path_GREP"; then
7055 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7058 ac_cv_path_GREP=$GREP
7062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
7063 printf "%s\n" "$ac_cv_path_GREP" >&6; }
7064 GREP="$ac_cv_path_GREP"
7067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
7068 printf %s "checking for egrep... " >&6; }
7069 if test ${ac_cv_path_EGREP+y}
7071 printf %s "(cached) " >&6
7073 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
7074 then ac_cv_path_EGREP="$GREP -E"
7076 if test -z "$EGREP"; then
7077 ac_path_EGREP_found=false
7078 # Loop through the user's path and test for each of PROGNAME-LIST
7079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7080 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7083 case $as_dir in #(((
7086 *) as_dir=$as_dir/ ;;
7088 for ac_prog in egrep
7090 for ac_exec_ext in '' $ac_executable_extensions; do
7091 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
7092 as_fn_executable_p "$ac_path_EGREP" || continue
7093 # Check for GNU ac_path_EGREP and select it if it is found.
7094 # Check for GNU $ac_path_EGREP
7095 case `"$ac_path_EGREP" --version 2>&1` in
7097 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
7100 printf %s 0123456789 >"conftest.in"
7103 cat "conftest.in" "conftest.in" >"conftest.tmp"
7104 mv "conftest.tmp" "conftest.in"
7105 cp "conftest.in" "conftest.nl"
7106 printf "%s\n" 'EGREP' >> "conftest.nl"
7107 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7108 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7109 as_fn_arith $ac_count + 1 && ac_count=$as_val
7110 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
7111 # Best one so far, save it but keep looking for a better one
7112 ac_cv_path_EGREP="$ac_path_EGREP"
7113 ac_path_EGREP_max=$ac_count
7115 # 10*(2^10) chars as input seems more than enough
7116 test $ac_count -gt 10 && break
7118 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7121 $ac_path_EGREP_found && break 3
7126 if test -z "$ac_cv_path_EGREP"; then
7127 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7130 ac_cv_path_EGREP=$EGREP
7135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
7136 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
7137 EGREP="$ac_cv_path_EGREP"
7143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
7144 printf %s "checking for Minix Amsterdam compiler... " >&6; }
7145 if test ${gl_cv_c_amsterdam_compiler+y}
7147 printf %s "(cached) " >&6
7150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7151 /* end confdefs.h. */
7158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7159 $EGREP "Amsterdam" >/dev/null 2>&1
7161 gl_cv_c_amsterdam_compiler=yes
7163 gl_cv_c_amsterdam_compiler=no
7169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
7170 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
7172 if test $gl_cv_c_amsterdam_compiler = yes; then
7173 if test -z "$AR"; then
7176 if test -z "$ARFLAGS"; then
7183 if test -n "$ac_tool_prefix"; then
7184 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7185 set dummy ${ac_tool_prefix}ar; ac_word=$2
7186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7187 printf %s "checking for $ac_word... " >&6; }
7188 if test ${ac_cv_prog_AR+y}
7190 printf %s "(cached) " >&6
7192 if test -n "$AR"; then
7193 ac_cv_prog_AR="$AR" # Let the user override the test.
7195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7199 case $as_dir in #(((
7202 *) as_dir=$as_dir/ ;;
7204 for ac_exec_ext in '' $ac_executable_extensions; do
7205 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7206 ac_cv_prog_AR="${ac_tool_prefix}ar"
7207 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7217 if test -n "$AR"; then
7218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7219 printf "%s\n" "$AR" >&6; }
7221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7222 printf "%s\n" "no" >&6; }
7227 if test -z "$ac_cv_prog_AR"; then
7229 # Extract the first word of "ar", so it can be a program name with args.
7230 set dummy ar; ac_word=$2
7231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7232 printf %s "checking for $ac_word... " >&6; }
7233 if test ${ac_cv_prog_ac_ct_AR+y}
7235 printf %s "(cached) " >&6
7237 if test -n "$ac_ct_AR"; then
7238 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7244 case $as_dir in #(((
7247 *) as_dir=$as_dir/ ;;
7249 for ac_exec_ext in '' $ac_executable_extensions; do
7250 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7251 ac_cv_prog_ac_ct_AR="ar"
7252 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7261 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7262 if test -n "$ac_ct_AR"; then
7263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7264 printf "%s\n" "$ac_ct_AR" >&6; }
7266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7267 printf "%s\n" "no" >&6; }
7270 if test "x$ac_ct_AR" = x; then
7273 case $cross_compiling:$ac_tool_warned in
7275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7276 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7277 ac_tool_warned=yes ;;
7285 if test -z "$ARFLAGS"; then
7291 if test -z "$RANLIB"; then
7292 if test $gl_cv_c_amsterdam_compiler = yes; then
7295 if test -n "$ac_tool_prefix"; then
7296 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7297 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7299 printf %s "checking for $ac_word... " >&6; }
7300 if test ${ac_cv_prog_RANLIB+y}
7302 printf %s "(cached) " >&6
7304 if test -n "$RANLIB"; then
7305 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7311 case $as_dir in #(((
7314 *) as_dir=$as_dir/ ;;
7316 for ac_exec_ext in '' $ac_executable_extensions; do
7317 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7318 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7319 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7328 RANLIB=$ac_cv_prog_RANLIB
7329 if test -n "$RANLIB"; then
7330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7331 printf "%s\n" "$RANLIB" >&6; }
7333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7334 printf "%s\n" "no" >&6; }
7339 if test -z "$ac_cv_prog_RANLIB"; then
7340 ac_ct_RANLIB=$RANLIB
7341 # Extract the first word of "ranlib", so it can be a program name with args.
7342 set dummy ranlib; ac_word=$2
7343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7344 printf %s "checking for $ac_word... " >&6; }
7345 if test ${ac_cv_prog_ac_ct_RANLIB+y}
7347 printf %s "(cached) " >&6
7349 if test -n "$ac_ct_RANLIB"; then
7350 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7356 case $as_dir in #(((
7359 *) as_dir=$as_dir/ ;;
7361 for ac_exec_ext in '' $ac_executable_extensions; do
7362 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7363 ac_cv_prog_ac_ct_RANLIB="ranlib"
7364 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7373 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7374 if test -n "$ac_ct_RANLIB"; then
7375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7376 printf "%s\n" "$ac_ct_RANLIB" >&6; }
7378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379 printf "%s\n" "no" >&6; }
7382 if test "x$ac_ct_RANLIB" = x; then
7385 case $cross_compiling:$ac_tool_warned in
7387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7388 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7389 ac_tool_warned=yes ;;
7391 RANLIB=$ac_ct_RANLIB
7394 RANLIB="$ac_cv_prog_RANLIB"
7403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use C++" >&5
7404 printf %s "checking whether to use C++... " >&6; }
7405 # Check whether --enable-c++ was given.
7406 if test ${enable_c__+y}
7408 enableval=$enable_c__; CXX_CHOICE="$enableval"
7413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX_CHOICE" >&5
7414 printf "%s\n" "$CXX_CHOICE" >&6; }
7421 if test "$CXX_CHOICE" = no; then
7424 if test -z "$CXX"; then
7425 if test -n "$CCC"; then
7428 if test -n "$ac_tool_prefix"; then
7429 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
7431 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7432 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7434 printf %s "checking for $ac_word... " >&6; }
7435 if test ${ac_cv_prog_CXX+y}
7437 printf %s "(cached) " >&6
7439 if test -n "$CXX"; then
7440 ac_cv_prog_CXX="$CXX" # Let the user override the test.
7442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7446 case $as_dir in #(((
7449 *) as_dir=$as_dir/ ;;
7451 for ac_exec_ext in '' $ac_executable_extensions; do
7452 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7453 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
7454 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7464 if test -n "$CXX"; then
7465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
7466 printf "%s\n" "$CXX" >&6; }
7468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469 printf "%s\n" "no" >&6; }
7473 test -n "$CXX" && break
7476 if test -z "$CXX"; then
7478 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
7480 # Extract the first word of "$ac_prog", so it can be a program name with args.
7481 set dummy $ac_prog; ac_word=$2
7482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7483 printf %s "checking for $ac_word... " >&6; }
7484 if test ${ac_cv_prog_ac_ct_CXX+y}
7486 printf %s "(cached) " >&6
7488 if test -n "$ac_ct_CXX"; then
7489 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
7491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7495 case $as_dir in #(((
7498 *) as_dir=$as_dir/ ;;
7500 for ac_exec_ext in '' $ac_executable_extensions; do
7501 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7502 ac_cv_prog_ac_ct_CXX="$ac_prog"
7503 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7512 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
7513 if test -n "$ac_ct_CXX"; then
7514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
7515 printf "%s\n" "$ac_ct_CXX" >&6; }
7517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7518 printf "%s\n" "no" >&6; }
7522 test -n "$ac_ct_CXX" && break
7525 if test "x$ac_ct_CXX" = x; then
7528 case $cross_compiling:$ac_tool_warned in
7530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7531 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7532 ac_tool_warned=yes ;;
7540 if test "$CXX" != no; then
7541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
7542 printf %s "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works... " >&6; }
7544 ac_cpp='$CXXCPP $CPPFLAGS'
7545 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7546 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7547 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7551 echo 'int main () { return 0; }' > conftest.$ac_ext
7552 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7553 (eval $ac_link) 2>&5
7555 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7556 test $ac_status = 0; } && test -s conftest$ac_exeext; then
7557 gl_cv_prog_ansicxx_works=yes
7558 if (./conftest; exit) 2>/dev/null; then
7559 gl_cv_prog_ansicxx_cross=no
7561 gl_cv_prog_ansicxx_cross=yes
7564 gl_cv_prog_ansicxx_works=no
7568 ac_cpp='$CPP $CPPFLAGS'
7569 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7570 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7571 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_works" >&5
7574 printf "%s\n" "$gl_cv_prog_ansicxx_works" >&6; }
7575 if test $gl_cv_prog_ansicxx_works = no; then
7578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler supports namespaces" >&5
7579 printf %s "checking whether the C++ compiler supports namespaces... " >&6; }
7581 ac_cpp='$CXXCPP $CPPFLAGS'
7582 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7583 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7584 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7586 cat <<EOF > conftest.$ac_ext
7588 namespace test { using namespace std; }
7590 int main () { return 0; }
7592 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7593 (eval $ac_link) 2>&5
7595 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7596 test $ac_status = 0; } && test -s conftest$ac_exeext; then
7597 gl_cv_prog_ansicxx_namespaces=yes
7599 gl_cv_prog_ansicxx_namespaces=no
7603 ac_cpp='$CPP $CPPFLAGS'
7604 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7605 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7606 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_namespaces" >&5
7609 printf "%s\n" "$gl_cv_prog_ansicxx_namespaces" >&6; }
7610 if test $gl_cv_prog_ansicxx_namespaces = no; then
7618 if test "$CXX" != no; then
7627 if test "$CXX" != no; then
7629 depcc="$CXX" am_compiler_list=
7631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7632 printf %s "checking dependency style of $depcc... " >&6; }
7633 if test ${am_cv_CXX_dependencies_compiler_type+y}
7635 printf %s "(cached) " >&6
7637 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7638 # We make a subdir and do the tests there. Otherwise we can end up
7639 # making bogus files that we don't know about and never remove. For
7640 # instance it was reported that on HP-UX the gcc test will end up
7641 # making a dummy file named 'D' -- because '-MD' means "put the output
7645 # Copy depcomp to subdir because otherwise we won't find it if we're
7646 # using a relative directory.
7647 cp "$am_depcomp" conftest.dir
7649 # We will build objects and dependencies in a subdirectory because
7650 # it helps to detect inapplicable dependency modes. For instance
7651 # both Tru64's cc and ICC support -MD to output dependencies as a
7652 # side effect of compilation, but ICC will put the dependencies in
7653 # the current directory while Tru64 will put them in the object
7657 am_cv_CXX_dependencies_compiler_type=none
7658 if test "$am_compiler_list" = ""; then
7659 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7662 case " $depcc " in #(
7663 *\ -arch\ *\ -arch\ *) am__universal=true ;;
7666 for depmode in $am_compiler_list; do
7667 # Setup a source with many dependencies, because some compilers
7668 # like to wrap large dependency lists on column 80 (with \), and
7669 # we should not choose a depcomp mode which is confused by this.
7671 # We need to recreate these files for each test, as the compiler may
7672 # overwrite some of them when testing with obscure command lines.
7673 # This happens at least with the AIX C compiler.
7675 for i in 1 2 3 4 5 6; do
7676 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7677 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
7678 # Solaris 10 /bin/sh.
7679 echo '/* dummy */' > sub/conftst$i.h
7681 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7683 # We check with '-c' and '-o' for the sake of the "dashmstdout"
7684 # mode. It turns out that the SunPro C++ compiler does not properly
7685 # handle '-M -o', and we need to detect this. Also, some Intel
7686 # versions had trouble with output in subdirs.
7687 am__obj=sub/conftest.${OBJEXT-o}
7688 am__minus_obj="-o $am__obj"
7691 # This depmode causes a compiler race in universal mode.
7692 test "$am__universal" = false || continue
7695 # After this tag, mechanisms are not by side-effect, so they'll
7696 # only be used when explicitly requested.
7697 if test "x$enable_dependency_tracking" = xyes; then
7703 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
7704 # This compiler won't grok '-c -o', but also, the minuso test has
7705 # not run yet. These depmodes are late enough in the game, and
7706 # so weak that their functioning should not be impacted.
7707 am__obj=conftest.${OBJEXT-o}
7712 if depmode=$depmode \
7713 source=sub/conftest.c object=$am__obj \
7714 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7715 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
7716 >/dev/null 2>conftest.err &&
7717 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
7718 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7719 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
7720 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7721 # icc doesn't choke on unknown options, it will just issue warnings
7722 # or remarks (even with -Werror). So we grep stderr for any message
7723 # that says an option was ignored or not supported.
7724 # When given -MP, icc 7.0 and 7.1 complain thusly:
7725 # icc: Command line warning: ignoring option '-M'; no argument required
7726 # The diagnosis changed in icc 8.0:
7727 # icc: Command line remark: option '-MP' not supported
7728 if (grep 'ignoring option' conftest.err ||
7729 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7730 am_cv_CXX_dependencies_compiler_type=$depmode
7739 am_cv_CXX_dependencies_compiler_type=none
7743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
7744 printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; }
7745 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
7748 test "x$enable_dependency_tracking" != xno \
7749 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
7750 am__fastdepCXX_TRUE=
7751 am__fastdepCXX_FALSE='#'
7753 am__fastdepCXX_TRUE='#'
7754 am__fastdepCXX_FALSE=
7759 ac_cpp='$CXXCPP $CPPFLAGS'
7760 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7761 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7762 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
7765 printf %s "checking whether the compiler supports GNU C++... " >&6; }
7766 if test ${ac_cv_cxx_compiler_gnu+y}
7768 printf %s "(cached) " >&6
7770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7771 /* end confdefs.h. */
7784 if ac_fn_cxx_try_compile "$LINENO"
7790 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7791 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
7794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
7795 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
7796 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7798 if test $ac_compiler_gnu = yes; then
7803 ac_test_CXXFLAGS=${CXXFLAGS+y}
7804 ac_save_CXXFLAGS=$CXXFLAGS
7805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
7806 printf %s "checking whether $CXX accepts -g... " >&6; }
7807 if test ${ac_cv_prog_cxx_g+y}
7809 printf %s "(cached) " >&6
7811 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7812 ac_cxx_werror_flag=yes
7815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7816 /* end confdefs.h. */
7826 if ac_fn_cxx_try_compile "$LINENO"
7828 ac_cv_prog_cxx_g=yes
7831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7832 /* end confdefs.h. */
7842 if ac_fn_cxx_try_compile "$LINENO"
7846 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7849 /* end confdefs.h. */
7859 if ac_fn_cxx_try_compile "$LINENO"
7861 ac_cv_prog_cxx_g=yes
7863 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7865 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7867 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7868 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
7871 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
7872 if test $ac_test_CXXFLAGS; then
7873 CXXFLAGS=$ac_save_CXXFLAGS
7874 elif test $ac_cv_prog_cxx_g = yes; then
7875 if test "$GXX" = yes; then
7881 if test "$GXX" = yes; then
7888 ac_cpp='$CPP $CPPFLAGS'
7889 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7890 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7891 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7895 am__fastdepCXX_TRUE=
7896 am__fastdepCXX_FALSE='#'
7898 am__fastdepCXX_TRUE='#'
7899 am__fastdepCXX_FALSE=
7908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7909 printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
7910 if test ${ac_cv_sys_largefile_source+y}
7912 printf %s "(cached) " >&6
7915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7916 /* end confdefs.h. */
7917 #include <sys/types.h> /* for off_t */
7922 int (*fp) (FILE *, off_t, int) = fseeko;
7923 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
7928 if ac_fn_c_try_link "$LINENO"
7930 ac_cv_sys_largefile_source=no; break
7932 rm -f core conftest.err conftest.$ac_objext conftest.beam \
7933 conftest$ac_exeext conftest.$ac_ext
7934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7935 /* end confdefs.h. */
7936 #define _LARGEFILE_SOURCE 1
7937 #include <sys/types.h> /* for off_t */
7942 int (*fp) (FILE *, off_t, int) = fseeko;
7943 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
7948 if ac_fn_c_try_link "$LINENO"
7950 ac_cv_sys_largefile_source=1; break
7952 rm -f core conftest.err conftest.$ac_objext conftest.beam \
7953 conftest$ac_exeext conftest.$ac_ext
7954 ac_cv_sys_largefile_source=unknown
7958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
7959 printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
7960 case $ac_cv_sys_largefile_source in #(
7963 printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
7968 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7969 # in glibc 2.1.3, but that breaks too many other things.
7970 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7971 if test $ac_cv_sys_largefile_source != unknown; then
7973 printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
7980 printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
7988 # IEEE behaviour is the default on all CPUs except Alpha and SH
7989 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
7990 # and the GCC 4.1.2 manual).
7993 # On Alpha systems, a compiler option provides the behaviour.
7994 # See the ieee(3) manual page, also available at
7995 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
7996 if test -n "$GCC"; then
7997 # GCC has the option -mieee.
7998 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
7999 CPPFLAGS="$CPPFLAGS -mieee"
8001 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
8002 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
8003 CPPFLAGS="$CPPFLAGS -ieee"
8007 if test -n "$GCC"; then
8008 # GCC has the option -mieee.
8009 CPPFLAGS="$CPPFLAGS -mieee"
8014 # Check whether --enable-largefile was given.
8015 if test ${enable_largefile+y}
8017 enableval=$enable_largefile;
8020 if test "$enable_largefile" != no; then
8022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
8023 printf %s "checking for special C compiler options needed for large files... " >&6; }
8024 if test ${ac_cv_sys_largefile_CC+y}
8026 printf %s "(cached) " >&6
8028 ac_cv_sys_largefile_CC=no
8029 if test "$GCC" != yes; then
8032 # IRIX 6.2 and later do not support large files by default,
8033 # so use the C compiler's -n32 option if that helps.
8034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8035 /* end confdefs.h. */
8036 #include <sys/types.h>
8037 /* Check that off_t can represent 2**63 - 1 correctly.
8038 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8039 since some C++ compilers masquerading as C compilers
8040 incorrectly reject 9223372036854775807. */
8041 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8042 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8043 && LARGE_OFF_T % 2147483647 == 1)
8053 if ac_fn_c_try_compile "$LINENO"
8057 rm -f core conftest.err conftest.$ac_objext conftest.beam
8059 if ac_fn_c_try_compile "$LINENO"
8061 ac_cv_sys_largefile_CC=' -n32'; break
8063 rm -f core conftest.err conftest.$ac_objext conftest.beam
8067 rm -f conftest.$ac_ext
8070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
8071 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
8072 if test "$ac_cv_sys_largefile_CC" != no; then
8073 CC=$CC$ac_cv_sys_largefile_CC
8076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8077 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
8078 if test ${ac_cv_sys_file_offset_bits+y}
8080 printf %s "(cached) " >&6
8083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8084 /* end confdefs.h. */
8085 #include <sys/types.h>
8086 /* Check that off_t can represent 2**63 - 1 correctly.
8087 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8088 since some C++ compilers masquerading as C compilers
8089 incorrectly reject 9223372036854775807. */
8090 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8091 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8092 && LARGE_OFF_T % 2147483647 == 1)
8102 if ac_fn_c_try_compile "$LINENO"
8104 ac_cv_sys_file_offset_bits=no; break
8106 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8108 /* end confdefs.h. */
8109 #define _FILE_OFFSET_BITS 64
8110 #include <sys/types.h>
8111 /* Check that off_t can represent 2**63 - 1 correctly.
8112 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8113 since some C++ compilers masquerading as C compilers
8114 incorrectly reject 9223372036854775807. */
8115 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8116 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8117 && LARGE_OFF_T % 2147483647 == 1)
8127 if ac_fn_c_try_compile "$LINENO"
8129 ac_cv_sys_file_offset_bits=64; break
8131 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8132 ac_cv_sys_file_offset_bits=unknown
8136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
8137 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
8138 case $ac_cv_sys_file_offset_bits in #(
8141 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
8145 if test $ac_cv_sys_file_offset_bits = unknown; then
8146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
8147 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
8148 if test ${ac_cv_sys_large_files+y}
8150 printf %s "(cached) " >&6
8153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8154 /* end confdefs.h. */
8155 #include <sys/types.h>
8156 /* Check that off_t can represent 2**63 - 1 correctly.
8157 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8158 since some C++ compilers masquerading as C compilers
8159 incorrectly reject 9223372036854775807. */
8160 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8161 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8162 && LARGE_OFF_T % 2147483647 == 1)
8172 if ac_fn_c_try_compile "$LINENO"
8174 ac_cv_sys_large_files=no; break
8176 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8178 /* end confdefs.h. */
8179 #define _LARGE_FILES 1
8180 #include <sys/types.h>
8181 /* Check that off_t can represent 2**63 - 1 correctly.
8182 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8183 since some C++ compilers masquerading as C compilers
8184 incorrectly reject 9223372036854775807. */
8185 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8186 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8187 && LARGE_OFF_T % 2147483647 == 1)
8197 if ac_fn_c_try_compile "$LINENO"
8199 ac_cv_sys_large_files=1; break
8201 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8202 ac_cv_sys_large_files=unknown
8206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
8207 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
8208 case $ac_cv_sys_large_files in #(
8211 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
8224 # Check whether --enable-threads was given.
8225 if test ${enable_threads+y}
8227 enableval=$enable_threads; gl_use_threads=$enableval
8229 if test -n "$gl_use_threads_default"; then
8230 gl_use_threads="$gl_use_threads_default"
8233 osf*) gl_use_threads=no ;;
8236 1.[0-5].*) gl_use_threads=no ;;
8237 *) gl_use_threads=yes ;;
8241 case "$gl_use_winpthreads_default" in
8242 yes) gl_use_threads=posix ;;
8243 no) gl_use_threads=windows ;;
8244 *) gl_use_threads=yes ;;
8247 *) gl_use_threads=yes ;;
8253 if test "$gl_use_threads" = yes \
8254 || test "$gl_use_threads" = isoc \
8255 || test "$gl_use_threads" = posix \
8256 || test "$gl_use_threads" = isoc+posix; then
8257 # For using <threads.h> or <pthread.h>:
8260 if test -z "$gl_anythreadlib_early_done"; then
8263 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
8264 # groks <pthread.h>. cc also understands the flag -pthread, but
8265 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
8266 # 2. putting a flag into CPPFLAGS that has an effect on the linker
8267 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
8268 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
8269 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
8272 # Some systems optimize for single-threaded programs by default, and
8273 # need special flags to disable these optimizations. For example, the
8274 # definition of 'errno' in <errno.h>.
8276 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
8277 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
8279 gl_anythreadlib_early_done=done
8286 # Pre-early section.
8291 # Code from module absolute-header:
8292 # Code from module accept:
8293 # Code from module accept-tests:
8294 # Code from module access:
8295 # Code from module access-tests:
8296 # Code from module alignof:
8297 # Code from module alignof-tests:
8298 # Code from module alloca:
8299 # Code from module alloca-opt:
8300 # Code from module alloca-opt-tests:
8301 # Code from module announce-gen:
8302 # Code from module ansi-c++-opt:
8304 # Code from module arpa_inet:
8305 # Code from module arpa_inet-c++-tests:
8306 # Code from module arpa_inet-tests:
8307 # Code from module array-list:
8308 # Code from module array-list-tests:
8309 # Code from module array-oset:
8310 # Code from module array-oset-tests:
8311 # Code from module assert:
8312 # Code from module assure:
8313 # Code from module asyncsafe-spin:
8314 # Code from module asyncsafe-spin-tests:
8315 # Code from module at-internal:
8316 # Code from module attribute:
8317 # Code from module autobuild:
8322 if test -z "$AB_PACKAGE"; then
8323 AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
8325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5
8326 printf "%s\n" "$as_me: autobuild project... $AB_PACKAGE" >&6;}
8328 if test -z "$AB_VERSION"; then
8329 AB_VERSION=${PACKAGE_VERSION:-$VERSION}
8331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5
8332 printf "%s\n" "$as_me: autobuild revision... $AB_VERSION" >&6;}
8335 if test "$hostname"; then
8336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5
8337 printf "%s\n" "$as_me: autobuild hostname... $hostname" >&6;}
8342 date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
8343 if test "$?" != 0; then
8346 if test "$date"; then
8347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5
8348 printf "%s\n" "$as_me: autobuild timestamp... $date" >&6;}
8351 # Code from module avltree-oset:
8352 # Code from module avltree-oset-tests:
8353 # Code from module basename-lgpl:
8354 # Code from module binary-io:
8355 # Code from module binary-io-tests:
8356 # Code from module bind:
8357 # Code from module bind-tests:
8358 # Code from module bitrotate:
8359 # Code from module bitrotate-tests:
8360 # Code from module btowc:
8361 # Code from module btowc-tests:
8362 # Code from module builtin-expect:
8363 # Code from module c-ctype:
8364 # Code from module c-ctype-tests:
8365 # Code from module c-stack:
8366 # Code from module c-stack-tests:
8367 # Code from module c-strcase:
8368 # Code from module c-strcase-tests:
8369 # Code from module c-strcaseeq:
8370 # Code from module c99:
8371 # Code from module calloc-gnu:
8372 # Code from module calloc-gnu-tests:
8373 # Code from module calloc-posix:
8374 # Code from module canonicalize:
8375 # Code from module canonicalize-lgpl:
8376 # Code from module canonicalize-lgpl-tests:
8377 # Code from module canonicalize-tests:
8378 # Code from module chdir:
8379 # Code from module chdir-long:
8380 # Code from module chdir-tests:
8381 # Code from module clean-temp:
8382 # Code from module clean-temp-simple:
8383 # Code from module clock-time:
8384 # Code from module cloexec:
8385 # Code from module cloexec-tests:
8386 # Code from module close:
8387 # Code from module close-stream:
8388 # Code from module close-tests:
8389 # Code from module closedir:
8390 # Code from module closein:
8391 # Code from module closein-tests:
8392 # Code from module closeout:
8393 # Code from module concat-filename:
8394 # Code from module config-h:
8395 # Code from module configmake:
8396 # Code from module connect:
8397 # Code from module connect-tests:
8398 # Code from module creat:
8399 # Code from module creat-tests:
8400 # Code from module ctype:
8401 # Code from module ctype-c++-tests:
8402 # Code from module ctype-tests:
8403 # Code from module d-ino:
8404 # Code from module dirent:
8405 # Code from module dirent-c++-tests:
8406 # Code from module dirent-tests:
8407 # Code from module dirfd:
8408 # Code from module dirname:
8409 # Code from module dirname-lgpl:
8410 # Code from module dirname-tests:
8411 # Code from module do-release-commit-and-tag:
8412 # Code from module double-slash-root:
8413 # Code from module dup:
8414 # Code from module dup-tests:
8415 # Code from module dup2:
8416 # Code from module dup2-tests:
8417 # Code from module dynarray:
8418 # Code from module dynarray-tests:
8419 # Code from module eloop-threshold:
8420 # Code from module environ:
8421 # Code from module environ-tests:
8422 # Code from module errno:
8423 # Code from module errno-c++-tests:
8424 # Code from module errno-tests:
8425 # Code from module error:
8426 # Code from module execute:
8427 # Code from module execute-tests:
8428 # Code from module exitfail:
8429 # Code from module explicit_bzero:
8430 # Code from module explicit_bzero-tests:
8431 # Code from module extensions:
8432 # Code from module extern-inline:
8433 # Code from module fatal-signal:
8434 # Code from module fchdir:
8435 # Code from module fchdir-tests:
8436 # Code from module fclose:
8437 # Code from module fclose-tests:
8438 # Code from module fcntl:
8439 # Code from module fcntl-h:
8440 # Code from module fcntl-h-c++-tests:
8441 # Code from module fcntl-h-tests:
8442 # Code from module fcntl-tests:
8443 # Code from module fd-hook:
8444 # Code from module fd-safer-flag:
8445 # Code from module fdl-1.3:
8446 # Code from module fdopen:
8447 # Code from module fdopen-tests:
8448 # Code from module fdopendir:
8449 # Code from module fdopendir-tests:
8450 # Code from module fflush:
8452 # Code from module fflush-tests:
8453 # Code from module fgetc-tests:
8454 # Code from module file-set:
8455 # Code from module filename:
8456 # Code from module filenamecat:
8457 # Code from module filenamecat-lgpl:
8458 # Code from module filenamecat-tests:
8459 # Code from module findprog:
8460 # Code from module findprog-in:
8461 # Code from module flexmember:
8462 # Code from module float:
8463 # Code from module float-c++-tests:
8464 # Code from module float-tests:
8465 # Code from module fopen:
8466 # Code from module fopen-gnu:
8467 # Code from module fopen-gnu-tests:
8468 # Code from module fopen-safer:
8469 # Code from module fopen-safer-tests:
8470 # Code from module fopen-tests:
8471 # Code from module fpending:
8472 # Code from module fpending-tests:
8473 # Code from module fpieee:
8475 # Code from module fpucw:
8476 # Code from module fpurge:
8477 # Code from module fpurge-tests:
8478 # Code from module fputc-tests:
8479 # Code from module fread-tests:
8480 # Code from module freadahead:
8481 # Code from module freadahead-tests:
8482 # Code from module freading:
8483 # Code from module freading-tests:
8484 # Code from module free-posix:
8485 # Code from module free-posix-tests:
8486 # Code from module freopen:
8487 # Code from module freopen-tests:
8488 # Code from module frexp-nolibm:
8489 # Code from module frexp-nolibm-tests:
8490 # Code from module frexpl-nolibm:
8491 # Code from module frexpl-nolibm-tests:
8492 # Code from module fseek:
8493 # Code from module fseek-tests:
8494 # Code from module fseeko:
8496 # Code from module fseeko-tests:
8497 # Code from module fstat:
8498 # Code from module fstat-tests:
8499 # Code from module fstatat:
8500 # Code from module fstatat-tests:
8501 # Code from module ftell:
8502 # Code from module ftell-tests:
8503 # Code from module ftello:
8505 # Code from module ftello-tests:
8506 # Code from module ftruncate:
8507 # Code from module ftruncate-tests:
8508 # Code from module fwrite-tests:
8509 # Code from module gendocs:
8510 # Code from module getcwd:
8511 # Code from module getcwd-lgpl:
8512 # Code from module getcwd-lgpl-tests:
8513 # Code from module getcwd-tests:
8514 # Code from module getdtablesize:
8515 # Code from module getdtablesize-tests:
8516 # Code from module getopt-gnu:
8517 # Code from module getopt-gnu-tests:
8518 # Code from module getopt-posix:
8519 # Code from module getpagesize:
8520 # Code from module getprogname:
8521 # Code from module getprogname-tests:
8522 # Code from module getrandom:
8523 # Code from module getrandom-tests:
8524 # Code from module gettext-h:
8525 # Code from module gettimeofday:
8526 # Code from module gettimeofday-tests:
8527 # Code from module git-version-gen:
8528 # Code from module gitlog-to-changelog:
8529 # Code from module gnu-web-doc-update:
8530 # Code from module gnumakefile:
8531 # Code from module gnupload:
8532 # Code from module gperf:
8533 # Code from module gpl-3.0:
8534 # Code from module hard-locale:
8535 # Code from module hard-locale-tests:
8536 # Code from module hash:
8537 # Code from module hash-pjw:
8538 # Code from module hash-tests:
8539 # Code from module hash-triple-simple:
8540 # Code from module havelib:
8541 # Code from module host-cpu-c-abi:
8542 # Code from module iconv:
8543 # Code from module iconv-h:
8544 # Code from module iconv-h-c++-tests:
8545 # Code from module iconv-h-tests:
8546 # Code from module iconv-tests:
8547 # Code from module iconv_open:
8548 # Code from module idx:
8549 # Code from module ignore-value:
8550 # Code from module ignore-value-tests:
8551 # Code from module include_next:
8552 # Code from module inet_pton:
8553 # Code from module inet_pton-tests:
8554 # Code from module inline:
8555 # Code from module intprops:
8556 # Code from module intprops-tests:
8557 # Code from module inttostr:
8558 # Code from module inttostr-tests:
8559 # Code from module inttypes:
8560 # Code from module inttypes-c++-tests:
8561 # Code from module inttypes-incomplete:
8562 # Code from module inttypes-tests:
8563 # Code from module ioctl:
8564 # Code from module ioctl-tests:
8565 # Code from module isblank:
8566 # Code from module isblank-tests:
8567 # Code from module isnand-nolibm:
8568 # Code from module isnand-nolibm-tests:
8569 # Code from module isnanf-nolibm:
8570 # Code from module isnanf-nolibm-tests:
8571 # Code from module isnanl-nolibm:
8572 # Code from module isnanl-nolibm-tests:
8573 # Code from module iswblank:
8574 # Code from module iswblank-tests:
8575 # Code from module iswdigit:
8576 # Code from module iswdigit-tests:
8577 # Code from module iswxdigit:
8578 # Code from module iswxdigit-tests:
8579 # Code from module langinfo:
8580 # Code from module langinfo-c++-tests:
8581 # Code from module langinfo-tests:
8582 # Code from module largefile:
8584 # Code from module libc-config:
8585 # Code from module limits-h:
8586 # Code from module limits-h-c++-tests:
8587 # Code from module limits-h-tests:
8588 # Code from module link:
8589 # Code from module link-tests:
8590 # Code from module linked-list:
8591 # Code from module linked-list-tests:
8592 # Code from module linkedhash-list:
8593 # Code from module linkedhash-list-tests:
8594 # Code from module list:
8595 # Code from module listen:
8596 # Code from module listen-tests:
8597 # Code from module localcharset:
8598 # Code from module localcharset-tests:
8599 # Code from module locale:
8600 # Code from module locale-c++-tests:
8601 # Code from module locale-tests:
8602 # Code from module localeconv:
8603 # Code from module localeconv-tests:
8604 # Code from module localename:
8605 # Code from module localename-tests:
8606 # Code from module lock:
8607 # Code from module lseek:
8608 # Code from module lseek-tests:
8609 # Code from module lstat:
8610 # Code from module lstat-tests:
8611 # Code from module maintainer-makefile:
8612 # Code from module malloc-gnu:
8613 # Code from module malloc-gnu-tests:
8614 # Code from module malloc-posix:
8615 # Code from module malloca:
8616 # Code from module malloca-tests:
8617 # Code from module manywarnings:
8618 # Code from module math:
8619 # Code from module math-c++-tests:
8620 # Code from module math-tests:
8621 # Code from module mbchar:
8622 # Code from module mbiter:
8623 # Code from module mbrtowc:
8624 # Code from module mbrtowc-tests:
8625 # Code from module mbsinit:
8626 # Code from module mbsinit-tests:
8627 # Code from module mbslen:
8628 # Code from module mbsstr:
8629 # Code from module mbsstr-tests:
8630 # Code from module mbtowc:
8631 # Code from module mbuiter:
8632 # Code from module memchr:
8633 # Code from module memchr-tests:
8634 # Code from module memchr2:
8635 # Code from module memchr2-tests:
8636 # Code from module mempcpy:
8637 # Code from module memrchr:
8638 # Code from module memrchr-tests:
8639 # Code from module minmax:
8640 # Code from module mkdir:
8641 # Code from module mkdir-tests:
8642 # Code from module mkdtemp:
8643 # Code from module mkstemp:
8644 # Code from module msvc-inval:
8645 # Code from module msvc-nothrow:
8646 # Code from module multiarch:
8647 # Code from module nanosleep:
8648 # Code from module nanosleep-tests:
8649 # Code from module netinet_in:
8650 # Code from module netinet_in-tests:
8651 # Code from module nl_langinfo:
8652 # Code from module nl_langinfo-tests:
8653 # Code from module nocrash:
8654 # Code from module obstack:
8655 # Code from module open:
8656 # Code from module open-tests:
8657 # Code from module openat:
8658 # Code from module openat-die:
8659 # Code from module openat-h:
8660 # Code from module openat-tests:
8661 # Code from module opendir:
8662 # Code from module oset:
8663 # Code from module pathmax:
8664 # Code from module pathmax-tests:
8665 # Code from module perror:
8666 # Code from module perror-tests:
8667 # Code from module pipe-posix:
8668 # Code from module pipe-posix-tests:
8669 # Code from module pipe2:
8670 # Code from module pipe2-safer:
8671 # Code from module pipe2-tests:
8672 # Code from module posix_spawn:
8673 # Code from module posix_spawn-internal:
8674 # Code from module posix_spawn-tests:
8675 # Code from module posix_spawn_file_actions_addchdir:
8676 # Code from module posix_spawn_file_actions_addchdir-tests:
8677 # Code from module posix_spawn_file_actions_addclose:
8678 # Code from module posix_spawn_file_actions_addclose-tests:
8679 # Code from module posix_spawn_file_actions_adddup2:
8680 # Code from module posix_spawn_file_actions_adddup2-tests:
8681 # Code from module posix_spawn_file_actions_addopen:
8682 # Code from module posix_spawn_file_actions_addopen-tests:
8683 # Code from module posix_spawn_file_actions_destroy:
8684 # Code from module posix_spawn_file_actions_init:
8685 # Code from module posix_spawnattr_destroy:
8686 # Code from module posix_spawnattr_init:
8687 # Code from module posix_spawnattr_setflags:
8688 # Code from module posix_spawnattr_setpgroup:
8689 # Code from module posix_spawnattr_setsigmask:
8690 # Code from module posix_spawnp:
8691 # Code from module posix_spawnp-tests:
8692 # Code from module printf-frexp:
8693 # Code from module printf-frexp-tests:
8694 # Code from module printf-frexpl:
8695 # Code from module printf-frexpl-tests:
8696 # Code from module printf-safe:
8697 # Code from module progname:
8698 # Code from module propername:
8699 # Code from module pthread-h:
8702 if test -z "$gl_anythreadlib_early_done"; then
8705 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
8706 # groks <pthread.h>. cc also understands the flag -pthread, but
8707 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
8708 # 2. putting a flag into CPPFLAGS that has an effect on the linker
8709 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
8710 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
8711 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
8714 # Some systems optimize for single-threaded programs by default, and
8715 # need special flags to disable these optimizations. For example, the
8716 # definition of 'errno' in <errno.h>.
8718 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
8719 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
8721 gl_anythreadlib_early_done=done
8724 # Code from module pthread-h-c++-tests:
8725 # Code from module pthread-h-tests:
8726 # Code from module pthread-thread:
8727 # Code from module pthread-thread-tests:
8728 # Code from module pthread_sigmask:
8729 # Code from module pthread_sigmask-tests:
8730 # Code from module putenv:
8731 # Code from module quotearg:
8732 # Code from module quotearg-simple:
8733 # Code from module quotearg-simple-tests:
8734 # Code from module raise:
8735 # Code from module raise-tests:
8736 # Code from module rawmemchr:
8737 # Code from module rawmemchr-tests:
8738 # Code from module read-file:
8739 # Code from module read-file-tests:
8740 # Code from module readdir:
8741 # Code from module readlink:
8742 # Code from module readlink-tests:
8743 # Code from module realloc-gnu:
8744 # Code from module realloc-gnu-tests:
8745 # Code from module realloc-posix:
8746 # Code from module reallocarray:
8747 # Code from module reallocarray-tests:
8748 # Code from module regex:
8749 # Code from module regex-tests:
8750 # Code from module rename:
8751 # Code from module rename-tests:
8752 # Code from module rewinddir:
8753 # Code from module rmdir:
8754 # Code from module rmdir-tests:
8755 # Code from module root-uid:
8756 # Code from module same-inode:
8757 # Code from module save-cwd:
8758 # Code from module sched:
8759 # Code from module sched-tests:
8760 # Code from module sched_yield:
8761 # Code from module scratch_buffer:
8762 # Code from module scratch_buffer-tests:
8763 # Code from module secure_getenv:
8764 # Code from module select:
8765 # Code from module select-tests:
8766 # Code from module setenv:
8767 # Code from module setenv-tests:
8768 # Code from module setlocale:
8769 # Code from module setlocale-null:
8770 # Code from module setlocale-null-tests:
8771 # Code from module setlocale-tests:
8772 # Code from module setsockopt:
8773 # Code from module setsockopt-tests:
8774 # Code from module sh-filename:
8775 # Code from module sigaction:
8776 # Code from module sigaction-tests:
8777 # Code from module signal-h:
8778 # Code from module signal-h-c++-tests:
8779 # Code from module signal-h-tests:
8780 # Code from module signbit:
8781 # Code from module signbit-tests:
8782 # Code from module sigpipe:
8783 # Code from module sigpipe-tests:
8784 # Code from module sigprocmask:
8785 # Code from module sigprocmask-tests:
8786 # Code from module sigsegv:
8787 # Code from module sigsegv-tests:
8788 # Code from module size_max:
8789 # Code from module sleep:
8790 # Code from module sleep-tests:
8791 # Code from module snippet/_Noreturn:
8792 # Code from module snippet/arg-nonnull:
8793 # Code from module snippet/c++defs:
8794 # Code from module snippet/unused-parameter:
8795 # Code from module snippet/warn-on-use:
8796 # Code from module snprintf:
8797 # Code from module snprintf-tests:
8798 # Code from module socket:
8799 # Code from module socketlib:
8800 # Code from module sockets:
8801 # Code from module sockets-tests:
8802 # Code from module socklen:
8803 # Code from module sparcv8+:
8809 if test -n "$GCC"; then
8810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether SPARC v8+ instructions are supported" >&5
8811 printf %s "checking whether SPARC v8+ instructions are supported... " >&6; }
8812 if test ${gl_cv_sparc_v8plus+y}
8814 printf %s "(cached) " >&6
8816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8817 /* end confdefs.h. */
8822 asm volatile ("membar 2");
8827 if ac_fn_c_try_compile "$LINENO"
8829 gl_cv_sparc_v8plus=yes
8831 gl_cv_sparc_v8plus=no
8833 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sparc_v8plus" >&5
8837 printf "%s\n" "$gl_cv_sparc_v8plus" >&6; }
8838 if test $gl_cv_sparc_v8plus = no; then
8846 # Code from module spawn:
8847 # Code from module spawn-c++-tests:
8848 # Code from module spawn-pipe:
8849 # Code from module spawn-pipe-tests:
8850 # Code from module spawn-tests:
8851 # Code from module ssize_t:
8852 # Code from module stat:
8853 # Code from module stat-tests:
8854 # Code from module stat-time:
8855 # Code from module stat-time-tests:
8856 # Code from module std-gnu11:
8857 # Code from module stdalign:
8858 # Code from module stdalign-tests:
8859 # Code from module stdarg:
8863 # Code from module stdarg-tests:
8864 # Code from module stdbool:
8865 # Code from module stdbool-c++-tests:
8866 # Code from module stdbool-tests:
8867 # Code from module stddef:
8868 # Code from module stddef-c++-tests:
8869 # Code from module stddef-tests:
8870 # Code from module stdint:
8871 # Code from module stdint-c++-tests:
8872 # Code from module stdint-tests:
8873 # Code from module stdio:
8874 # Code from module stdio-c++-tests:
8875 # Code from module stdio-tests:
8876 # Code from module stdlib:
8877 # Code from module stdlib-c++-tests:
8878 # Code from module stdlib-safer:
8879 # Code from module stdlib-tests:
8880 # Code from module stpcpy:
8881 # Code from module strchrnul:
8882 # Code from module strchrnul-tests:
8883 # Code from module strdup-posix:
8884 # Code from module streq:
8885 # Code from module strerror:
8886 # Code from module strerror-override:
8887 # Code from module strerror-tests:
8888 # Code from module strerror_r-posix:
8889 # Code from module strerror_r-posix-tests:
8890 # Code from module striconv:
8891 # Code from module striconv-tests:
8892 # Code from module string:
8893 # Code from module string-c++-tests:
8894 # Code from module string-tests:
8895 # Code from module strndup:
8896 # Code from module strnlen:
8897 # Code from module strnlen-tests:
8898 # Code from module strnlen1:
8899 # Code from module strsignal:
8900 # Code from module strsignal-tests:
8901 # Code from module strstr:
8902 # Code from module strstr-simple:
8903 # Code from module strstr-tests:
8904 # Code from module strtod:
8905 # Code from module strtod-tests:
8906 # Code from module symlink:
8907 # Code from module symlink-tests:
8908 # Code from module sys_ioctl:
8909 # Code from module sys_ioctl-c++-tests:
8910 # Code from module sys_ioctl-tests:
8911 # Code from module sys_random:
8912 # Code from module sys_random-c++-tests:
8913 # Code from module sys_random-tests:
8914 # Code from module sys_select:
8915 # Code from module sys_select-c++-tests:
8916 # Code from module sys_select-tests:
8917 # Code from module sys_socket:
8918 # Code from module sys_socket-c++-tests:
8919 # Code from module sys_socket-tests:
8920 # Code from module sys_stat:
8921 # Code from module sys_stat-c++-tests:
8922 # Code from module sys_stat-tests:
8923 # Code from module sys_time:
8924 # Code from module sys_time-c++-tests:
8925 # Code from module sys_time-tests:
8926 # Code from module sys_types:
8927 # Code from module sys_types-c++-tests:
8928 # Code from module sys_types-tests:
8929 # Code from module sys_uio:
8930 # Code from module sys_uio-tests:
8931 # Code from module sys_wait:
8932 # Code from module sys_wait-c++-tests:
8933 # Code from module sys_wait-tests:
8934 # Code from module tempname:
8935 # Code from module test-framework-sh:
8936 # Code from module test-framework-sh-tests:
8937 # Code from module thread:
8938 # Code from module thread-optim:
8939 # Code from module thread-tests:
8940 # Code from module threadlib:
8944 # Code from module time:
8945 # Code from module time-c++-tests:
8946 # Code from module time-tests:
8947 # Code from module tls:
8948 # Code from module tmpdir:
8949 # Code from module trim:
8950 # Code from module unistd:
8951 # Code from module unistd-c++-tests:
8952 # Code from module unistd-safer:
8953 # Code from module unistd-safer-tests:
8954 # Code from module unistd-tests:
8955 # Code from module unistr/base:
8956 # Code from module unistr/u8-mbtoucr:
8957 # Code from module unistr/u8-mbtoucr-tests:
8958 # Code from module unistr/u8-uctomb:
8959 # Code from module unistr/u8-uctomb-tests:
8960 # Code from module unitypes:
8961 # Code from module uniwidth/base:
8962 # Code from module uniwidth/width:
8963 # Code from module uniwidth/width-tests:
8964 # Code from module unlocked-io:
8965 # Code from module unlocked-io-internal:
8966 # Code from module unsetenv:
8967 # Code from module unsetenv-tests:
8968 # Code from module update-copyright:
8969 # Code from module update-copyright-tests:
8970 # Code from module useless-if-before-free:
8971 # Code from module vasnprintf:
8972 # Code from module vasnprintf-tests:
8973 # Code from module vasprintf:
8974 # Code from module vasprintf-posix:
8975 # Code from module vasprintf-posix-tests:
8976 # Code from module vasprintf-tests:
8977 # Code from module vc-list-files:
8978 # Code from module vc-list-files-tests:
8979 # Code from module verify:
8980 # Code from module verify-tests:
8981 # Code from module verror:
8982 # Code from module version-etc:
8983 # Code from module version-etc-fsf:
8984 # Code from module version-etc-tests:
8985 # Code from module vma-iter:
8986 # Code from module wait-process:
8987 # Code from module waitpid:
8988 # Code from module warnings:
8989 # Code from module wchar:
8990 # Code from module wchar-c++-tests:
8991 # Code from module wchar-tests:
8992 # Code from module wcrtomb:
8993 # Code from module wcrtomb-tests:
8994 # Code from module wctob:
8995 # Code from module wctomb:
8996 # Code from module wctype-h:
8997 # Code from module wctype-h-c++-tests:
8998 # Code from module wctype-h-tests:
8999 # Code from module wcwidth:
9000 # Code from module wcwidth-tests:
9001 # Code from module windows-mutex:
9002 # Code from module windows-once:
9003 # Code from module windows-recmutex:
9004 # Code from module windows-rwlock:
9005 # Code from module windows-spawn:
9006 # Code from module windows-spin:
9007 # Code from module windows-thread:
9008 # Code from module windows-tls:
9009 # Code from module write:
9010 # Code from module write-tests:
9011 # Code from module xalloc:
9012 # Code from module xalloc-die:
9013 # Code from module xalloc-die-tests:
9014 # Code from module xalloc-oversized:
9015 # Code from module xconcat-filename:
9016 # Code from module xlist:
9017 # Code from module xmalloca:
9018 # Code from module xoset:
9019 # Code from module xprintf:
9020 # Code from module xsize:
9021 # Code from module xstriconv:
9022 # Code from module xstrndup:
9023 # Code from module xvasprintf:
9024 # Code from module xvasprintf-posix:
9025 # Code from module xvasprintf-tests:
9026 # Code from module yield:
9029 # Maintainer note - comment this line out if you plan to rerun
9030 # GNULIB_POSIXCHECK testing to see if M4 should be using more modules.
9031 # Leave it uncommented for normal releases, for faster ./configure.
9036 # M4 is single-threaded; so we can optimize gnulib code by using this:
9041 printf "%s\n" "#define GNULIB_REGEX_SINGLE_THREAD 1" >>confdefs.h
9044 printf "%s\n" "#define GNULIB_MBRTOWC_SINGLE_THREAD 1" >>confdefs.h
9047 printf "%s\n" "#define GNULIB_WCHAR_SINGLE_LOCALE 1" >>confdefs.h
9050 # Check whether --enable-gcc-warnings was given.
9051 if test ${enable_gcc_warnings+y}
9053 enableval=$enable_gcc_warnings; case $enableval in
9055 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
9057 gl_gcc_warnings=$enableval
9059 if test -f "$srcdir"/.tarball-version; then
9068 if test "$gl_gcc_warnings" = yes; then
9071 ac_cpp='$CPP $CPPFLAGS'
9072 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9073 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9074 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
9078 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
9079 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
9081 printf %s "(cached) " >&6
9084 gl_save_compiler_FLAGS="$CFLAGS"
9085 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
9086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9087 /* end confdefs.h. */
9097 if ac_fn_c_try_link "$LINENO"
9099 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
9101 gl_cv_warn_c__Werror__Wunknown_warning_option=no
9103 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9104 conftest$ac_exeext conftest.$ac_ext
9105 CFLAGS="$gl_save_compiler_FLAGS"
9108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
9109 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
9110 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
9112 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
9114 gl_unknown_warnings_are_errors=
9118 ac_cpp='$CPP $CPPFLAGS'
9119 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9120 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9121 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
9127 printf %s "checking whether C compiler handles -Werror... " >&6; }
9128 if test ${gl_cv_warn_c__Werror+y}
9130 printf %s "(cached) " >&6
9133 gl_save_compiler_FLAGS="$CFLAGS"
9134 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
9135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9136 /* end confdefs.h. */
9146 if ac_fn_c_try_link "$LINENO"
9148 gl_cv_warn_c__Werror=yes
9150 gl_cv_warn_c__Werror=no
9152 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9153 conftest$ac_exeext conftest.$ac_ext
9154 CFLAGS="$gl_save_compiler_FLAGS"
9157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
9158 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
9159 if test "x$gl_cv_warn_c__Werror" = xyes
9161 as_fn_append WERROR_CFLAGS " -Werror"
9167 # We use '#pragma GCC diagnostic push' to silence some
9168 # warnings, but older gcc doesn't support this.
9169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5
9170 printf %s "checking whether pragma GCC diagnostic push works... " >&6; }
9171 if test ${M4_cv_gcc_pragma_push_works+y}
9173 printf %s "(cached) " >&6
9177 CFLAGS='-Wunknown-pragmas -Werror'
9178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9179 /* end confdefs.h. */
9181 #pragma GCC diagnostic push
9182 #pragma GCC diagnostic pop
9192 if ac_fn_c_try_compile "$LINENO"
9194 M4_cv_gcc_pragma_push_works=yes
9196 M4_cv_gcc_pragma_push_works=no
9198 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $M4_cv_gcc_pragma_push_works" >&5
9202 printf "%s\n" "$M4_cv_gcc_pragma_push_works" >&6; }
9204 # This, $nw, is the list of warnings we disable.
9206 nw="$nw -Waggregate-return" # K&R is anachronistic
9207 nw="$nw -Wtraditional-conversion" # K&R is anachronistic
9208 nw="$nw -Wundef" # K&R is anachronistic
9209 nw="$nw -Wtraditional" # K&R is anachronistic
9210 nw="$nw -Wlong-long" # C90 is anachronistic
9211 nw="$nw -Wvla" # gettext's use of VLAs is safe
9212 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
9213 nw="$nw -Wpadded" # Our structs are not packed
9214 nw="$nw -Wconversion" # Too many warnings for now
9215 nw="$nw -Wsign-conversion" # Too many warnings for now
9216 nw="$nw -Wcast-qual" # Too many warnings for now
9217 nw="$nw -Wswitch-enum" # Too many warnings for now
9218 # gcc 4.4.6 complains enum-compare is C++ only; gcc 4.7.0 implies it in -Wall
9219 nw="$nw -Wenum-compare"
9221 # Gnulib uses '#pragma GCC diagnostic push' to silence some
9222 # warnings, but older gcc doesn't support this.
9223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5
9224 printf %s "checking whether pragma GCC diagnostic push works... " >&6; }
9225 if test ${M4_cv_gcc_pragma_push_works+y}
9227 printf %s "(cached) " >&6
9231 CFLAGS='-Wunknown-pragmas -Werror'
9232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9233 /* end confdefs.h. */
9235 #pragma GCC diagnostic push
9236 #pragma GCC diagnostic pop
9246 if ac_fn_c_try_compile "$LINENO"
9248 M4_cv_gcc_pragma_push_works=yes
9250 M4_cv_gcc_pragma_push_works=no
9252 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $M4_cv_gcc_pragma_push_works" >&5
9256 printf "%s\n" "$M4_cv_gcc_pragma_push_works" >&6; }
9257 if test $M4_cv_gcc_pragma_push_works = no; then
9258 nw="$nw -Wmissing-prototypes"
9259 nw="$nw -Wmissing-declarations"
9260 nw="$nw -Wunreachable-code"
9265 ac_cpp='$CPP $CPPFLAGS'
9266 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9267 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9268 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9272 if test -n "$GCC"; then
9274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
9275 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
9276 if test ${gl_cv_cc_nomfi_supported+y}
9278 printf %s "(cached) " >&6
9280 gl_save_CFLAGS="$CFLAGS"
9281 CFLAGS="$CFLAGS -Wextra -Werror -Wno-missing-field-initializers"
9282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9283 /* end confdefs.h. */
9293 if ac_fn_c_try_compile "$LINENO"
9295 gl_cv_cc_nomfi_supported=yes
9297 gl_cv_cc_nomfi_supported=no
9299 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9300 CFLAGS="$gl_save_CFLAGS"
9303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
9304 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
9306 if test "$gl_cv_cc_nomfi_supported" = yes; then
9307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
9308 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
9309 if test ${gl_cv_cc_nomfi_needed+y}
9311 printf %s "(cached) " >&6
9313 gl_save_CFLAGS="$CFLAGS"
9314 CFLAGS="$CFLAGS -Wextra -Werror"
9315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9316 /* end confdefs.h. */
9319 typedef struct { int a; int b; } s_t;
9332 if ac_fn_c_try_compile "$LINENO"
9334 gl_cv_cc_nomfi_needed=no
9336 gl_cv_cc_nomfi_needed=yes
9338 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9339 CFLAGS="$gl_save_CFLAGS"
9342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
9343 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
9346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
9347 printf %s "checking whether -Wuninitialized is supported... " >&6; }
9348 if test ${gl_cv_cc_uninitialized_supported+y}
9350 printf %s "(cached) " >&6
9352 gl_save_CFLAGS="$CFLAGS"
9353 CFLAGS="$CFLAGS -Werror -Wuninitialized"
9354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9355 /* end confdefs.h. */
9365 if ac_fn_c_try_compile "$LINENO"
9367 gl_cv_cc_uninitialized_supported=yes
9369 gl_cv_cc_uninitialized_supported=no
9371 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9372 CFLAGS="$gl_save_CFLAGS"
9375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
9376 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
9380 # List all gcc warning categories.
9381 # To compare this list to your installed GCC's, run this Bash command:
9384 # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
9385 # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
9386 # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
9389 for gl_manywarn_item in -fanalyzer -fno-common \
9391 -Warith-conversion \
9392 -Wbad-function-cast \
9393 -Wcast-align=strict \
9395 -Wdisabled-optimization \
9396 -Wdouble-promotion \
9397 -Wduplicated-branches \
9400 -Wformat-signedness \
9405 -Wmissing-declarations \
9406 -Wmissing-include-dirs \
9407 -Wmissing-prototypes \
9409 -Wnull-dereference \
9410 -Wold-style-definition \
9412 -Woverlength-strings \
9418 -Wstrict-prototypes \
9419 -Wsuggest-attribute=cold \
9420 -Wsuggest-attribute=const \
9421 -Wsuggest-attribute=format \
9422 -Wsuggest-attribute=malloc \
9423 -Wsuggest-attribute=noreturn \
9424 -Wsuggest-attribute=pure \
9425 -Wsuggest-final-methods \
9426 -Wsuggest-final-types \
9432 -Wunsafe-loop-optimizations \
9435 -Wvector-operation-performance \
9440 as_fn_append ws " $gl_manywarn_item"
9443 # gcc --help=warnings outputs an unusual form for these options; list
9444 # them here so that the above 'comm' command doesn't report a false match.
9445 as_fn_append ws ' -Warray-bounds=2'
9446 as_fn_append ws ' -Wattribute-alias=2'
9447 as_fn_append ws ' -Wformat-overflow=2'
9448 as_fn_append ws ' -Wformat=2'
9449 as_fn_append ws ' -Wformat-truncation=2'
9450 as_fn_append ws ' -Wimplicit-fallthrough=5'
9451 as_fn_append ws ' -Wshift-overflow=2'
9452 as_fn_append ws ' -Wunused-const-variable=2'
9453 as_fn_append ws ' -Wvla-larger-than=4031'
9455 # These are needed for older GCC versions.
9456 if test -n "$GCC"; then
9457 case `($CC --version) 2>/dev/null` in
9458 'gcc (GCC) '[0-3].* | \
9459 'gcc (GCC) '4.[0-7].*)
9460 as_fn_append ws ' -fdiagnostics-show-option'
9461 as_fn_append ws ' -funit-at-a-time'
9466 # Disable specific options as needed.
9467 if test "$gl_cv_cc_nomfi_needed" = yes; then
9468 as_fn_append ws ' -Wno-missing-field-initializers'
9471 if test "$gl_cv_cc_uninitialized_supported" = no; then
9472 as_fn_append ws ' -Wno-uninitialized'
9475 # Some warnings have too many false alarms in GCC 10.1.
9476 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93695
9477 as_fn_append ws ' -Wno-analyzer-double-free'
9478 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94458
9479 as_fn_append ws ' -Wno-analyzer-malloc-leak'
9480 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94851
9481 as_fn_append ws ' -Wno-analyzer-null-dereference'
9482 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95758
9483 as_fn_append ws ' -Wno-analyzer-use-after-free'
9486 ac_cpp='$CPP $CPPFLAGS'
9487 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9488 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9489 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9498 *" $gl_warn_item "*)
9501 as_fn_append gl_warn_set " $gl_warn_item"
9510 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
9512 case $gl_positive in
9513 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
9515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
9516 printf %s "checking whether C compiler handles $w... " >&6; }
9517 if eval test \${$as_gl_Warn+y}
9519 printf %s "(cached) " >&6
9522 gl_save_compiler_FLAGS="$CFLAGS"
9523 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
9524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9525 /* end confdefs.h. */
9535 if ac_fn_c_try_link "$LINENO"
9537 eval "$as_gl_Warn=yes"
9539 eval "$as_gl_Warn=no"
9541 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9542 conftest$ac_exeext conftest.$ac_ext
9543 CFLAGS="$gl_save_compiler_FLAGS"
9546 eval ac_res=\$$as_gl_Warn
9547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9548 printf "%s\n" "$ac_res" >&6; }
9549 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
9551 as_fn_append WARN_CFLAGS " $w"
9557 # Gnulib turns on -Wformat=2, which implies -Wformat-nonliteral, but
9558 # we temporarily override it in format.c if possible.
9559 if test $M4_cv_gcc_pragma_push_works = no; then
9562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
9563 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
9564 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
9566 printf %s "(cached) " >&6
9569 gl_save_compiler_FLAGS="$CFLAGS"
9570 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
9571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9572 /* end confdefs.h. */
9582 if ac_fn_c_try_link "$LINENO"
9584 gl_cv_warn_c__Wno_format_nonliteral=yes
9586 gl_cv_warn_c__Wno_format_nonliteral=no
9588 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9589 conftest$ac_exeext conftest.$ac_ext
9590 CFLAGS="$gl_save_compiler_FLAGS"
9593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
9594 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
9595 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
9597 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
9608 # Tandem/NSK is broken - it has 'long long int' but not
9609 # 'unsigned long long int', which confuses assumptions made by gnulib.
9610 # Simply pretend that neither type exists if both do not work.
9612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
9613 printf %s "checking for unsigned long long int... " >&6; }
9614 if test ${ac_cv_type_unsigned_long_long_int+y}
9616 printf %s "(cached) " >&6
9618 ac_cv_type_unsigned_long_long_int=yes
9619 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9621 /* end confdefs.h. */
9623 /* For now, do not test the preprocessor; as of 2007 there are too many
9624 implementations with broken preprocessors. Perhaps this can
9625 be revisited in 2012. In the meantime, code should not expect
9626 #if to work with literals wider than 32 bits. */
9627 /* Test literals. */
9628 long long int ll = 9223372036854775807ll;
9629 long long int nll = -9223372036854775807LL;
9630 unsigned long long int ull = 18446744073709551615ULL;
9631 /* Test constant expressions. */
9632 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9634 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9640 /* Test availability of runtime routines for shift and division. */
9641 long long int llmax = 9223372036854775807ll;
9642 unsigned long long int ullmax = 18446744073709551615ull;
9643 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9644 | (llmax / ll) | (llmax % ll)
9645 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9646 | (ullmax / ull) | (ullmax % ull));
9652 if ac_fn_c_try_link "$LINENO"
9656 ac_cv_type_unsigned_long_long_int=no
9658 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9659 conftest$ac_exeext conftest.$ac_ext
9662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9663 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
9664 if test $ac_cv_type_unsigned_long_long_int = yes; then
9666 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
9672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9673 printf %s "checking for long long int... " >&6; }
9674 if test ${ac_cv_type_long_long_int+y}
9676 printf %s "(cached) " >&6
9678 ac_cv_type_long_long_int=yes
9679 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9680 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
9681 if test $ac_cv_type_long_long_int = yes; then
9682 if test "$cross_compiling" = yes
9686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9687 /* end confdefs.h. */
9691 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
9692 # define LLONG_MAX (HALF - 1 + HALF)
9697 long long int n = 1;
9701 long long int m = n << i;
9704 if (LLONG_MAX / 2 < m)
9712 if ac_fn_c_try_run "$LINENO"
9716 ac_cv_type_long_long_int=no
9718 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9719 conftest.$ac_objext conftest.beam conftest.$ac_ext
9725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9726 printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
9727 if test $ac_cv_type_long_long_int = yes; then
9729 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
9734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
9735 printf %s "checking for unsigned long long int... " >&6; }
9736 if test ${ac_cv_type_unsigned_long_long_int+y}
9738 printf %s "(cached) " >&6
9740 ac_cv_type_unsigned_long_long_int=yes
9741 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9743 /* end confdefs.h. */
9745 /* For now, do not test the preprocessor; as of 2007 there are too many
9746 implementations with broken preprocessors. Perhaps this can
9747 be revisited in 2012. In the meantime, code should not expect
9748 #if to work with literals wider than 32 bits. */
9749 /* Test literals. */
9750 long long int ll = 9223372036854775807ll;
9751 long long int nll = -9223372036854775807LL;
9752 unsigned long long int ull = 18446744073709551615ULL;
9753 /* Test constant expressions. */
9754 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9756 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9762 /* Test availability of runtime routines for shift and division. */
9763 long long int llmax = 9223372036854775807ll;
9764 unsigned long long int ullmax = 18446744073709551615ull;
9765 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9766 | (llmax / ll) | (llmax % ll)
9767 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9768 | (ullmax / ull) | (ullmax % ull));
9774 if ac_fn_c_try_link "$LINENO"
9778 ac_cv_type_unsigned_long_long_int=no
9780 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9781 conftest$ac_exeext conftest.$ac_ext
9784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9785 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
9786 if test $ac_cv_type_unsigned_long_long_int = yes; then
9788 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
9792 if test $ac_cv_type_long_long_int:$ac_cv_type_unsigned_long_long_int = yes:no
9794 ac_cv_type_long_long_int=no
9796 printf "%s\n" "#define HAVE_LONG_LONG_INT 0" >>confdefs.h
9808 # Check whether --enable-cross-guesses was given.
9809 if test ${enable_cross_guesses+y}
9811 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
9812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
9813 printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
9814 enableval=conservative
9816 gl_cross_guesses="$enableval"
9818 gl_cross_guesses=conservative
9821 if test $gl_cross_guesses = risky; then
9822 gl_cross_guess_normal="guessing yes"
9823 gl_cross_guess_inverted="guessing no"
9825 gl_cross_guess_normal="guessing no"
9826 gl_cross_guess_inverted="guessing yes"
9828 LIBC_FATAL_STDERR_=1
9829 export LIBC_FATAL_STDERR_
9834 HAVE_COPY_FILE_RANGE=1;
9844 HAVE_GETDTABLESIZE=1;
9851 HAVE_GROUP_MEMBER=1;
9867 HAVE_DECL_ENVIRON=1;
9868 HAVE_DECL_EXECVPE=1;
9870 HAVE_DECL_FDATASYNC=1;
9871 HAVE_DECL_GETDOMAINNAME=1;
9872 HAVE_DECL_GETLOGIN=1;
9873 HAVE_DECL_GETLOGIN_R=1;
9874 HAVE_DECL_GETPAGESIZE=1;
9875 HAVE_DECL_GETUSERSHELL=1;
9876 HAVE_DECL_SETHOSTNAME=1;
9877 HAVE_DECL_TRUNCATE=1;
9878 HAVE_DECL_TTYNAME_R=1;
9893 REPLACE_FACCESSAT=0;
9895 REPLACE_FTRUNCATE=0;
9897 REPLACE_GETDOMAINNAME=0;
9898 REPLACE_GETDTABLESIZE=0;
9899 REPLACE_GETLOGIN_R=0;
9900 REPLACE_GETGROUPS=0;
9901 REPLACE_GETPAGESIZE=0;
9912 REPLACE_READLINKAT=0;
9916 REPLACE_SYMLINKAT=0;
9918 REPLACE_TTYNAME_R=0;
9923 UNISTD_H_HAVE_SYS_RANDOM_H=0;
9924 UNISTD_H_HAVE_WINSOCK2_H=0;
9925 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9930 GL_M4_GNULIB_ACCESS=0
9934 GL_M4_GNULIB_CHDIR=0
9938 GL_M4_GNULIB_CHOWN=0
9942 GL_M4_GNULIB_CLOSE=0
9946 GL_M4_GNULIB_COPY_FILE_RANGE=0
9962 GL_M4_GNULIB_ENVIRON=0
9966 GL_M4_GNULIB_EUIDACCESS=0
9970 GL_M4_GNULIB_EXECL=0
9974 GL_M4_GNULIB_EXECLE=0
9978 GL_M4_GNULIB_EXECLP=0
9982 GL_M4_GNULIB_EXECV=0
9986 GL_M4_GNULIB_EXECVE=0
9990 GL_M4_GNULIB_EXECVP=0
9994 GL_M4_GNULIB_EXECVPE=0
9998 GL_M4_GNULIB_FACCESSAT=0
10002 GL_M4_GNULIB_FCHDIR=0
10006 GL_M4_GNULIB_FCHOWNAT=0
10010 GL_M4_GNULIB_FDATASYNC=0
10014 GL_M4_GNULIB_FSYNC=0
10018 GL_M4_GNULIB_FTRUNCATE=0
10022 GL_M4_GNULIB_GETCWD=0
10026 GL_M4_GNULIB_GETDOMAINNAME=0
10030 GL_M4_GNULIB_GETDTABLESIZE=0
10034 GL_M4_GNULIB_GETENTROPY=0
10038 GL_M4_GNULIB_GETGROUPS=0
10042 GL_M4_GNULIB_GETHOSTNAME=0
10046 GL_M4_GNULIB_GETLOGIN=0
10050 GL_M4_GNULIB_GETLOGIN_R=0
10054 GL_M4_GNULIB_GETOPT_POSIX=0
10058 GL_M4_GNULIB_GETPAGESIZE=0
10062 GL_M4_GNULIB_GETPASS=0
10066 GL_M4_GNULIB_GETUSERSHELL=0
10070 GL_M4_GNULIB_GROUP_MEMBER=0
10074 GL_M4_GNULIB_ISATTY=0
10078 GL_M4_GNULIB_LCHOWN=0
10082 GL_M4_GNULIB_LINK=0
10086 GL_M4_GNULIB_LINKAT=0
10090 GL_M4_GNULIB_LSEEK=0
10094 GL_M4_GNULIB_PIPE=0
10098 GL_M4_GNULIB_PIPE2=0
10102 GL_M4_GNULIB_PREAD=0
10106 GL_M4_GNULIB_PWRITE=0
10110 GL_M4_GNULIB_READ=0
10114 GL_M4_GNULIB_READLINK=0
10118 GL_M4_GNULIB_READLINKAT=0
10122 GL_M4_GNULIB_RMDIR=0
10126 GL_M4_GNULIB_SETHOSTNAME=0
10130 GL_M4_GNULIB_SLEEP=0
10134 GL_M4_GNULIB_SYMLINK=0
10138 GL_M4_GNULIB_SYMLINKAT=0
10142 GL_M4_GNULIB_TRUNCATE=0
10146 GL_M4_GNULIB_TTYNAME_R=0
10150 GL_M4_GNULIB_UNISTD_H_NONBLOCKING=0
10154 GL_M4_GNULIB_UNISTD_H_SIGPIPE=0
10158 GL_M4_GNULIB_UNLINK=0
10162 GL_M4_GNULIB_UNLINKAT=0
10166 GL_M4_GNULIB_USLEEP=0
10170 GL_M4_GNULIB_WRITE=0
10174 GL_M4_GNULIB_MDA_ACCESS=1
10178 GL_M4_GNULIB_MDA_CHDIR=1
10182 GL_M4_GNULIB_MDA_CLOSE=1
10186 GL_M4_GNULIB_MDA_DUP=1
10190 GL_M4_GNULIB_MDA_DUP2=1
10194 GL_M4_GNULIB_MDA_EXECL=1
10198 GL_M4_GNULIB_MDA_EXECLE=1
10202 GL_M4_GNULIB_MDA_EXECLP=1
10206 GL_M4_GNULIB_MDA_EXECV=1
10210 GL_M4_GNULIB_MDA_EXECVE=1
10214 GL_M4_GNULIB_MDA_EXECVP=1
10218 GL_M4_GNULIB_MDA_EXECVPE=1
10222 GL_M4_GNULIB_MDA_GETCWD=1
10226 GL_M4_GNULIB_MDA_GETPID=1
10230 GL_M4_GNULIB_MDA_ISATTY=1
10234 GL_M4_GNULIB_MDA_LSEEK=1
10238 GL_M4_GNULIB_MDA_READ=1
10242 GL_M4_GNULIB_MDA_RMDIR=1
10246 GL_M4_GNULIB_MDA_SWAB=1
10250 GL_M4_GNULIB_MDA_UNLINK=1
10254 GL_M4_GNULIB_MDA_WRITE=1
10258 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
10259 if test "x$ac_cv_type_size_t" = xyes
10264 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
10268 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10269 # for constant arguments. Useless!
10270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10271 printf %s "checking for working alloca.h... " >&6; }
10272 if test ${ac_cv_working_alloca_h+y}
10274 printf %s "(cached) " >&6
10276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10277 /* end confdefs.h. */
10278 #include <alloca.h>
10282 char *p = (char *) alloca (2 * sizeof (int));
10288 if ac_fn_c_try_link "$LINENO"
10290 ac_cv_working_alloca_h=yes
10292 ac_cv_working_alloca_h=no
10294 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10295 conftest$ac_exeext conftest.$ac_ext
10297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10298 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
10299 if test $ac_cv_working_alloca_h = yes; then
10301 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
10305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10306 printf %s "checking for alloca... " >&6; }
10307 if test ${ac_cv_func_alloca_works+y}
10309 printf %s "(cached) " >&6
10311 if test $ac_cv_working_alloca_h = yes; then
10312 ac_cv_func_alloca_works=yes
10314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10315 /* end confdefs.h. */
10316 #include <stdlib.h>
10317 #include <stddef.h>
10320 # define alloca __builtin_alloca
10321 # elif defined _MSC_VER
10322 # include <malloc.h>
10323 # define alloca _alloca
10325 # ifdef __cplusplus
10328 void *alloca (size_t);
10335 char *p = (char *) alloca (1);
10341 if ac_fn_c_try_link "$LINENO"
10343 ac_cv_func_alloca_works=yes
10345 ac_cv_func_alloca_works=no
10347 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10348 conftest$ac_exeext conftest.$ac_ext
10350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10351 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
10354 if test $ac_cv_func_alloca_works = yes; then
10356 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
10359 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10360 # that cause trouble. Some versions do not even contain alloca or
10361 # contain a buggy version. If you still want to use their alloca,
10362 # use ar to extract alloca.o from them instead of compiling alloca.c.
10368 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10370 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
10373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10374 printf %s "checking stack direction for C alloca... " >&6; }
10375 if test ${ac_cv_c_stack_direction+y}
10377 printf %s "(cached) " >&6
10379 if test "$cross_compiling" = yes
10381 ac_cv_c_stack_direction=0
10383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10384 /* end confdefs.h. */
10385 $ac_includes_default
10387 find_stack_direction (int *addr, int depth)
10389 int dir, dummy = 0;
10392 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
10393 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
10394 return dir + dummy;
10398 main (int argc, char **argv)
10400 return find_stack_direction (0, argc + !argv + 20) < 0;
10403 if ac_fn_c_try_run "$LINENO"
10405 ac_cv_c_stack_direction=1
10407 ac_cv_c_stack_direction=-1
10409 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10410 conftest.$ac_objext conftest.beam conftest.$ac_ext
10414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10415 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
10416 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
10421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10422 printf %s "checking for inline... " >&6; }
10423 if test ${ac_cv_c_inline+y}
10425 printf %s "(cached) " >&6
10428 for ac_kw in inline __inline__ __inline; do
10429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10430 /* end confdefs.h. */
10431 #ifndef __cplusplus
10433 static $ac_kw foo_t static_foo (void) {return 0; }
10434 $ac_kw foo_t foo (void) {return 0; }
10438 if ac_fn_c_try_compile "$LINENO"
10440 ac_cv_c_inline=$ac_kw
10442 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10443 test "$ac_cv_c_inline" != no && break
10447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10448 printf "%s\n" "$ac_cv_c_inline" >&6; }
10450 case $ac_cv_c_inline in
10453 case $ac_cv_c_inline in
10455 *) ac_val=$ac_cv_c_inline;;
10457 cat >>confdefs.h <<_ACEOF
10458 #ifndef __cplusplus
10459 #define inline $ac_val
10493 HAVE_WCSNCASECMP=1;
10507 HAVE_DECL_WCSDUP=1;
10508 HAVE_DECL_WCWIDTH=1;
10509 REPLACE_MBSTATE_T=0;
10515 REPLACE_MBSRTOWCS=0;
10516 REPLACE_MBSNRTOWCS=0;
10518 REPLACE_WCSRTOMBS=0;
10519 REPLACE_WCSNRTOMBS=0;
10521 REPLACE_WCSWIDTH=0;
10522 REPLACE_WCSFTIME=0;
10527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
10528 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
10529 if test ${gl_cv_header_wchar_h_correct_inline+y}
10531 printf %s "(cached) " >&6
10533 gl_cv_header_wchar_h_correct_inline=yes
10536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10537 /* end confdefs.h. */
10540 #define wcstod renamed_wcstod
10542 extern int zero (void);
10543 int main () { return zero(); }
10546 save_ac_compile="$ac_compile"
10547 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
10548 if echo '#include "conftest.c"' >conftest1.c \
10549 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10550 (eval $ac_compile) 2>&5
10552 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10553 test $ac_status = 0; }; then
10554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10555 /* end confdefs.h. */
10558 #define wcstod renamed_wcstod
10560 int zero (void) { return 0; }
10563 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
10564 if echo '#include "conftest.c"' >conftest2.c \
10565 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10566 (eval $ac_compile) 2>&5
10568 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10569 test $ac_status = 0; }; then
10570 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
10573 gl_cv_header_wchar_h_correct_inline=no
10577 ac_compile="$save_ac_compile"
10578 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
10583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
10584 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
10585 if test $gl_cv_header_wchar_h_correct_inline = no; then
10586 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
10587 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
10588 C99 mode. You have four options:
10589 - Add the flag -fgnu89-inline to CC and reconfigure, or
10590 - Fix your include files, using parts of
10591 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
10592 - Use a gcc version older than 4.3, or
10593 - Don't use the flags -std=c99 or -std=gnu99.
10594 Configuration aborted." "$LINENO" 5
10598 for ac_item in $ac_func_c_list
10600 if test $ac_func; then
10601 ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
10602 if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
10603 echo "#define $ac_item 1" >> confdefs.h
10611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10612 printf %s "checking for nl_langinfo and CODESET... " >&6; }
10613 if test ${am_cv_langinfo_codeset+y}
10615 printf %s "(cached) " >&6
10617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10618 /* end confdefs.h. */
10619 #include <langinfo.h>
10623 char* cs = nl_langinfo(CODESET); return !cs;
10628 if ac_fn_c_try_link "$LINENO"
10630 am_cv_langinfo_codeset=yes
10632 am_cv_langinfo_codeset=no
10634 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10635 conftest$ac_exeext conftest.$ac_ext
10638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10639 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
10640 if test $am_cv_langinfo_codeset = yes; then
10642 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
10650 printf %s "checking for a traditional french locale... " >&6; }
10651 if test ${gt_cv_locale_fr+y}
10653 printf %s "(cached) " >&6
10656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10657 /* end confdefs.h. */
10659 #include <locale.h>
10661 #if HAVE_LANGINFO_CODESET
10662 # include <langinfo.h>
10664 #include <stdlib.h>
10665 #include <string.h>
10669 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
10670 imitates locale dependent behaviour by looking at the environment
10671 variables, and all locales use the UTF-8 encoding. */
10672 #if defined __BEOS__ || defined __HAIKU__
10675 /* Check whether the given locale name is recognized by the system. */
10676 # if defined _WIN32 && !defined __CYGWIN__
10677 /* On native Windows, setlocale(category, "") looks at the system settings,
10678 not at the environment variables. Also, when an encoding suffix such
10679 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10680 category of the locale to "C". */
10681 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10682 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10685 if (setlocale (LC_ALL, "") == NULL) return 1;
10687 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10688 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10689 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10690 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10691 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10692 some unit tests fail.
10693 On MirBSD 10, when an unsupported locale is specified, setlocale()
10694 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
10695 # if HAVE_LANGINFO_CODESET
10697 const char *cs = nl_langinfo (CODESET);
10698 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
10699 || strcmp (cs, "UTF-8") == 0)
10704 /* On Cygwin, avoid locale names without encoding suffix, because the
10705 locale_charset() function relies on the encoding suffix. Note that
10706 LC_ALL is set on the command line. */
10707 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10709 /* Check whether in the abbreviation of the second month, the second
10710 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
10711 one byte long. This excludes the UTF-8 encoding. */
10712 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10713 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
10714 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
10715 /* Check whether the decimal separator is a comma.
10716 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
10717 are nl_langinfo(RADIXCHAR) are both ".". */
10718 if (localeconv () ->decimal_point[0] != ',') return 1;
10725 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10726 (eval $ac_link) 2>&5
10728 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10729 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10731 # Handle native Windows specially, because there setlocale() interprets
10732 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10733 # "fr" or "fra" as "French" or "French_France.1252",
10734 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10735 # "ja" as "Japanese" or "Japanese_Japan.932",
10738 # Test for the native Windows locale name.
10739 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10740 gt_cv_locale_fr=French_France.1252
10743 gt_cv_locale_fr=none
10747 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10748 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10749 # configure script would override the LC_ALL setting. Likewise for
10750 # LC_CTYPE, which is also set at the beginning of the configure script.
10751 # Test for the usual locale name.
10752 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10753 gt_cv_locale_fr=fr_FR
10755 # Test for the locale name with explicit encoding suffix.
10756 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10757 gt_cv_locale_fr=fr_FR.ISO-8859-1
10759 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
10760 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10761 gt_cv_locale_fr=fr_FR.ISO8859-1
10763 # Test for the HP-UX locale name.
10764 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10765 gt_cv_locale_fr=fr_FR.iso88591
10767 # Test for the Solaris 7 locale name.
10768 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10772 gt_cv_locale_fr=none
10784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
10785 printf "%s\n" "$gt_cv_locale_fr" >&6; }
10786 LOCALE_FR=$gt_cv_locale_fr
10791 GL_M4_GNULIB_BTOWC=0
10795 GL_M4_GNULIB_WCTOB=0
10799 GL_M4_GNULIB_MBSINIT=0
10803 GL_M4_GNULIB_MBRTOWC=0
10807 GL_M4_GNULIB_MBRLEN=0
10811 GL_M4_GNULIB_MBSRTOWCS=0
10815 GL_M4_GNULIB_MBSNRTOWCS=0
10819 GL_M4_GNULIB_WCRTOMB=0
10823 GL_M4_GNULIB_WCSRTOMBS=0
10827 GL_M4_GNULIB_WCSNRTOMBS=0
10831 GL_M4_GNULIB_WCWIDTH=0
10835 GL_M4_GNULIB_WMEMCHR=0
10839 GL_M4_GNULIB_WMEMCMP=0
10843 GL_M4_GNULIB_WMEMCPY=0
10847 GL_M4_GNULIB_WMEMMOVE=0
10851 GL_M4_GNULIB_WMEMPCPY=0
10855 GL_M4_GNULIB_WMEMSET=0
10859 GL_M4_GNULIB_WCSLEN=0
10863 GL_M4_GNULIB_WCSNLEN=0
10867 GL_M4_GNULIB_WCSCPY=0
10871 GL_M4_GNULIB_WCPCPY=0
10875 GL_M4_GNULIB_WCSNCPY=0
10879 GL_M4_GNULIB_WCPNCPY=0
10883 GL_M4_GNULIB_WCSCAT=0
10887 GL_M4_GNULIB_WCSNCAT=0
10891 GL_M4_GNULIB_WCSCMP=0
10895 GL_M4_GNULIB_WCSNCMP=0
10899 GL_M4_GNULIB_WCSCASECMP=0
10903 GL_M4_GNULIB_WCSNCASECMP=0
10907 GL_M4_GNULIB_WCSCOLL=0
10911 GL_M4_GNULIB_WCSXFRM=0
10915 GL_M4_GNULIB_WCSDUP=0
10919 GL_M4_GNULIB_WCSCHR=0
10923 GL_M4_GNULIB_WCSRCHR=0
10927 GL_M4_GNULIB_WCSCSPN=0
10931 GL_M4_GNULIB_WCSSPN=0
10935 GL_M4_GNULIB_WCSPBRK=0
10939 GL_M4_GNULIB_WCSSTR=0
10943 GL_M4_GNULIB_WCSTOK=0
10947 GL_M4_GNULIB_WCSWIDTH=0
10951 GL_M4_GNULIB_WCSFTIME=0
10955 GL_M4_GNULIB_MDA_WCSDUP=1
10961 HAVE_ALIGNED_ALLOC=1;
10963 HAVE_CANONICALIZE_FILE_NAME=1;
10967 HAVE_DECL_GETLOADAVG=1;
10971 HAVE_DECL_INITSTATE=1;
10978 HAVE_POSIX_MEMALIGN=1;
10979 HAVE_POSIX_OPENPT=1;
10986 HAVE_REALLOCARRAY=1;
10989 HAVE_SECURE_GETENV=1;
10991 HAVE_DECL_SETENV=1;
10993 HAVE_DECL_SETSTATE=1;
11000 HAVE_STRUCT_RANDOM_DATA=1;
11001 HAVE_SYS_LOADAVG_H=0;
11003 HAVE_DECL_UNSETENV=1;
11004 REPLACE_ALIGNED_ALLOC=0;
11006 REPLACE_CANONICALIZE_FILE_NAME=0;
11008 REPLACE_INITSTATE=0;
11012 REPLACE_POSIX_MEMALIGN=0;
11014 REPLACE_PTSNAME_R=0;
11018 REPLACE_RANDOM_R=0;
11020 REPLACE_REALLOCARRAY=0;
11021 REPLACE_REALPATH=0;
11023 REPLACE_SETSTATE=0;
11029 REPLACE_STRTOULL=0;
11030 REPLACE_UNSETENV=0;
11034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
11035 printf %s "checking whether malloc is ptrdiff_t safe... " >&6; }
11036 if test ${gl_cv_malloc_ptrdiff+y}
11038 printf %s "(cached) " >&6
11040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11041 /* end confdefs.h. */
11042 #include <stdint.h>
11047 /* 64-bit ptrdiff_t is so wide that no practical platform
11049 #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
11051 /* On rare machines where size_t fits in ptrdiff_t there
11053 #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
11055 /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
11056 bounds even on 32-bit platforms. We don't know which
11057 non-glibc systems are safe. */
11058 #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
11060 #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
11063 #error "malloc might not be ptrdiff_t safe"
11071 if ac_fn_c_try_compile "$LINENO"
11073 gl_cv_malloc_ptrdiff=yes
11075 gl_cv_malloc_ptrdiff=no
11077 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
11081 printf "%s\n" "$gl_cv_malloc_ptrdiff" >&6; }
11086 test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1
11090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
11091 printf %s "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
11092 if test ${gl_cv_func_malloc_posix+y}
11094 printf %s "(cached) " >&6
11099 gl_cv_func_malloc_posix=no ;;
11102 gl_cv_func_malloc_posix=no ;;
11104 gl_cv_func_malloc_posix=yes ;;
11108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
11109 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
11115 if test "$gl_cv_func_malloc_posix" = yes; then
11117 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
11126 if test $REPLACE_MALLOC = 1; then
11132 GL_M4_GNULIB__EXIT=0
11136 GL_M4_GNULIB_ALIGNED_ALLOC=0
11140 GL_M4_GNULIB_ATOLL=0
11144 GL_M4_GNULIB_CALLOC_POSIX=0
11148 GL_M4_GNULIB_CANONICALIZE_FILE_NAME=0
11152 GL_M4_GNULIB_FREE_POSIX=0
11156 GL_M4_GNULIB_GETLOADAVG=0
11160 GL_M4_GNULIB_GETSUBOPT=0
11164 GL_M4_GNULIB_GRANTPT=0
11168 GL_M4_GNULIB_MALLOC_POSIX=0
11172 GL_M4_GNULIB_MBTOWC=0
11176 GL_M4_GNULIB_MKDTEMP=0
11180 GL_M4_GNULIB_MKOSTEMP=0
11184 GL_M4_GNULIB_MKOSTEMPS=0
11188 GL_M4_GNULIB_MKSTEMP=0
11192 GL_M4_GNULIB_MKSTEMPS=0
11196 GL_M4_GNULIB_POSIX_MEMALIGN=0
11200 GL_M4_GNULIB_POSIX_OPENPT=0
11204 GL_M4_GNULIB_PTSNAME=0
11208 GL_M4_GNULIB_PTSNAME_R=0
11212 GL_M4_GNULIB_PUTENV=0
11216 GL_M4_GNULIB_QSORT_R=0
11220 GL_M4_GNULIB_RANDOM=0
11224 GL_M4_GNULIB_RANDOM_R=0
11228 GL_M4_GNULIB_REALLOCARRAY=0
11232 GL_M4_GNULIB_REALLOC_POSIX=0
11236 GL_M4_GNULIB_REALPATH=0
11240 GL_M4_GNULIB_RPMATCH=0
11244 GL_M4_GNULIB_SECURE_GETENV=0
11248 GL_M4_GNULIB_SETENV=0
11252 GL_M4_GNULIB_STRTOD=0
11256 GL_M4_GNULIB_STRTOL=0
11260 GL_M4_GNULIB_STRTOLD=0
11264 GL_M4_GNULIB_STRTOLL=0
11268 GL_M4_GNULIB_STRTOUL=0
11272 GL_M4_GNULIB_STRTOULL=0
11276 GL_M4_GNULIB_SYSTEM_POSIX=0
11280 GL_M4_GNULIB_UNLOCKPT=0
11284 GL_M4_GNULIB_UNSETENV=0
11288 GL_M4_GNULIB_WCTOMB=0
11292 GL_M4_GNULIB_MDA_ECVT=1
11296 GL_M4_GNULIB_MDA_FCVT=1
11300 GL_M4_GNULIB_MDA_GCVT=1
11304 GL_M4_GNULIB_MDA_MKTEMP=1
11308 GL_M4_GNULIB_MDA_PUTENV=1
11313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
11314 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
11315 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
11317 printf %s "(cached) " >&6
11319 rm -f conftest.sym conftest.file
11320 echo >conftest.file
11321 if test "$cross_compiling" = yes
11325 # Guess yes on Linux systems.
11326 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
11328 # Guess yes on glibc systems.
11329 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
11331 # Guess no on native Windows.
11332 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
11334 # If we don't know, obey --enable-cross-guesses.
11335 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
11339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11340 /* end confdefs.h. */
11341 $ac_includes_default
11346 if (symlink ("conftest.file", "conftest.sym") != 0)
11348 /* Linux will dereference the symlink and fail, as required by
11349 POSIX. That is better in the sense that it means we will not
11350 have to compile and use the lstat wrapper. */
11351 return lstat ("conftest.sym/", &sbuf) == 0;
11357 if ac_fn_c_try_run "$LINENO"
11359 gl_cv_func_lstat_dereferences_slashed_symlink=yes
11361 gl_cv_func_lstat_dereferences_slashed_symlink=no
11363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11364 conftest.$ac_objext conftest.beam conftest.$ac_ext
11367 rm -f conftest.sym conftest.file
11370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
11371 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
11372 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
11375 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
11384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
11385 printf %s "checking whether // is distinct from /... " >&6; }
11386 if test ${gl_cv_double_slash_root+y}
11388 printf %s "(cached) " >&6
11390 if test x"$cross_compiling" = xyes ; then
11391 # When cross-compiling, there is no way to tell whether // is special
11392 # short of a list of hosts. However, the only known hosts to date
11393 # that have a distinct // are Apollo DomainOS (too old to port to),
11394 # Cygwin, and z/OS. If anyone knows of another system for which // has
11395 # special semantics and is distinct from /, please report it to
11396 # <bug-gnulib@gnu.org>.
11398 *-cygwin | i370-ibm-openedition)
11399 gl_cv_double_slash_root=yes ;;
11401 # Be optimistic and assume that / and // are the same when we
11403 gl_cv_double_slash_root='unknown, assuming no' ;;
11406 set x `ls -di / // 2>/dev/null`
11407 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
11408 gl_cv_double_slash_root=no
11410 gl_cv_double_slash_root=yes
11414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
11415 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
11416 if test "$gl_cv_double_slash_root" = yes; then
11418 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
11426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
11427 printf %s "checking whether realpath works... " >&6; }
11428 if test ${gl_cv_func_realpath_works+y}
11430 printf %s "(cached) " >&6
11433 rm -rf conftest.a conftest.d
11435 # Assume that if we have lstat, we can also check symlinks.
11436 if test $ac_cv_func_lstat = yes; then
11437 ln -s conftest.a conftest.l
11440 if test "$cross_compiling" = yes
11443 # Guess yes on glibc systems.
11444 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
11445 # Guess 'nearly' on musl systems.
11446 *-musl*) gl_cv_func_realpath_works="guessing nearly" ;;
11447 # Guess no on Cygwin.
11448 cygwin*) gl_cv_func_realpath_works="guessing no" ;;
11449 # Guess no on native Windows.
11450 mingw*) gl_cv_func_realpath_works="guessing no" ;;
11451 # If we don't know, obey --enable-cross-guesses.
11452 *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
11456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11457 /* end confdefs.h. */
11461 #include <stdlib.h>
11462 #if defined __MACH__ && defined __APPLE__
11463 /* Avoid a crash on Mac OS X. */
11464 #include <mach/mach.h>
11465 #include <mach/mach_error.h>
11466 #include <mach/thread_status.h>
11467 #include <mach/exception.h>
11468 #include <mach/task.h>
11469 #include <pthread.h>
11470 /* The exception port on which our thread listens. */
11471 static mach_port_t our_exception_port;
11472 /* The main function of the thread listening for exceptions of type
11475 mach_exception_thread (void *arg)
11477 /* Buffer for a message to be received. */
11479 mach_msg_header_t head;
11480 mach_msg_body_t msgh_body;
11483 mach_msg_return_t retval;
11484 /* Wait for a message on the exception port. */
11485 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11486 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11487 if (retval != MACH_MSG_SUCCESS)
11492 nocrash_init (void)
11494 mach_port_t self = mach_task_self ();
11495 /* Allocate a port on which the thread shall listen for exceptions. */
11496 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11498 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
11499 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11500 MACH_MSG_TYPE_MAKE_SEND)
11502 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
11504 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11505 /* Create the thread listening on the exception port. */
11506 pthread_attr_t attr;
11508 if (pthread_attr_init (&attr) == 0
11509 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11510 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11511 pthread_attr_destroy (&attr);
11512 /* Replace the exception port info for these exceptions with our own.
11513 Note that we replace the exception port for the entire task, not only
11514 for a particular thread. This has the effect that when our exception
11515 port gets the message, the thread specific exception port has already
11516 been asked, and we don't need to bother about it.
11517 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
11518 task_set_exception_ports (self, mask, our_exception_port,
11519 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11524 #elif defined _WIN32 && ! defined __CYGWIN__
11525 /* Avoid a crash on native Windows. */
11526 #define WIN32_LEAN_AND_MEAN
11527 #include <windows.h>
11528 #include <winerror.h>
11530 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11532 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11534 case EXCEPTION_ACCESS_VIOLATION:
11535 case EXCEPTION_IN_PAGE_ERROR:
11536 case EXCEPTION_STACK_OVERFLOW:
11537 case EXCEPTION_GUARD_PAGE:
11538 case EXCEPTION_PRIV_INSTRUCTION:
11539 case EXCEPTION_ILLEGAL_INSTRUCTION:
11540 case EXCEPTION_DATATYPE_MISALIGNMENT:
11541 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11542 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11545 return EXCEPTION_CONTINUE_SEARCH;
11548 nocrash_init (void)
11550 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11553 /* Avoid a crash on POSIX systems. */
11554 #include <signal.h>
11555 #include <unistd.h>
11556 /* A POSIX signal handler. */
11558 exception_handler (int sig)
11563 nocrash_init (void)
11566 signal (SIGSEGV, exception_handler);
11569 signal (SIGBUS, exception_handler);
11575 #include <stdlib.h>
11576 #include <string.h>
11583 /* This test fails on Solaris 10. */
11585 char *name = realpath ("conftest.a", NULL);
11586 if (!(name && *name == '/'))
11590 /* This test fails on older versions of Cygwin. */
11592 char *name = realpath ("conftest.b/../conftest.a", NULL);
11597 /* This test fails on Cygwin 2.9. */
11600 char *name = realpath ("conftest.l/../conftest.a", NULL);
11601 if (name != NULL || errno != ENOTDIR)
11606 /* This test fails on Mac OS X 10.13, OpenBSD 6.0. */
11608 char *name = realpath ("conftest.a/", NULL);
11613 /* This test fails on AIX 7, Solaris 10. */
11615 char *name1 = realpath (".", NULL);
11616 char *name2 = realpath ("conftest.d//./..", NULL);
11617 if (! name1 || ! name2 || strcmp (name1, name2))
11623 /* On Linux, // is the same as /. See also double-slash-root.m4.
11624 realpath() should respect this.
11625 This test fails on musl libc 1.2.2. */
11627 char *name = realpath ("//", NULL);
11628 if (! name || strcmp (name, "/"))
11640 if ac_fn_c_try_run "$LINENO"
11642 gl_cv_func_realpath_works=yes
11645 32) gl_cv_func_realpath_works=nearly ;;
11646 *) gl_cv_func_realpath_works=no ;;
11650 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11651 conftest.$ac_objext conftest.beam conftest.$ac_ext
11654 rm -rf conftest.a conftest.l conftest.d
11657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
11658 printf "%s\n" "$gl_cv_func_realpath_works" >&6; }
11659 case "$gl_cv_func_realpath_works" in
11662 printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
11667 printf "%s\n" "#define FUNC_REALPATH_NEARLY_WORKS 1" >>confdefs.h
11681 *) ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
11682 if test "x$ac_cv_func_getcwd" = xyes
11684 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
11700 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
11701 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
11703 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
11706 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
11711 SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
11712 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
11724 HAVE_DECL_FDOPENDIR=1;
11729 REPLACE_CLOSEDIR=0;
11731 REPLACE_FDOPENDIR=0;
11739 GL_M4_GNULIB_OPENDIR=0
11743 GL_M4_GNULIB_READDIR=0
11747 GL_M4_GNULIB_REWINDDIR=0
11751 GL_M4_GNULIB_CLOSEDIR=0
11755 GL_M4_GNULIB_DIRFD=0
11759 GL_M4_GNULIB_FDOPENDIR=0
11763 GL_M4_GNULIB_SCANDIR=0
11767 GL_M4_GNULIB_ALPHASORT=0
11773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
11774 printf %s "checking whether the preprocessor supports include_next... " >&6; }
11775 if test ${gl_cv_have_include_next+y}
11777 printf %s "(cached) " >&6
11779 rm -rf conftestd1a conftestd1b conftestd2
11780 mkdir conftestd1a conftestd1b conftestd2
11781 cat <<EOF > conftestd1a/conftest.h
11782 #define DEFINED_IN_CONFTESTD1
11783 #include_next <conftest.h>
11784 #ifdef DEFINED_IN_CONFTESTD2
11787 #error "include_next doesn't work"
11790 cat <<EOF > conftestd1b/conftest.h
11791 #define DEFINED_IN_CONFTESTD1
11793 #include_next <conftest.h>
11794 #ifdef DEFINED_IN_CONFTESTD2
11797 #error "include_next doesn't work"
11800 cat <<EOF > conftestd2/conftest.h
11801 #ifndef DEFINED_IN_CONFTESTD1
11802 #error "include_next test doesn't work"
11804 #define DEFINED_IN_CONFTESTD2
11806 gl_save_CPPFLAGS="$CPPFLAGS"
11807 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
11808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11809 /* end confdefs.h. */
11810 #include <conftest.h>
11812 if ac_fn_c_try_compile "$LINENO"
11814 gl_cv_have_include_next=yes
11816 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
11817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11818 /* end confdefs.h. */
11819 #include <conftest.h>
11821 if ac_fn_c_try_compile "$LINENO"
11823 gl_cv_have_include_next=buggy
11825 gl_cv_have_include_next=no
11827 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11830 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11831 CPPFLAGS="$gl_save_CPPFLAGS"
11832 rm -rf conftestd1a conftestd1b conftestd2
11835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
11836 printf "%s\n" "$gl_cv_have_include_next" >&6; }
11837 PRAGMA_SYSTEM_HEADER=
11838 if test $gl_cv_have_include_next = yes; then
11839 INCLUDE_NEXT=include_next
11840 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
11841 if test -n "$GCC"; then
11842 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
11845 if test $gl_cv_have_include_next = buggy; then
11846 INCLUDE_NEXT=include
11847 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
11849 INCLUDE_NEXT=include
11850 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
11857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
11858 printf %s "checking whether source code line length is unlimited... " >&6; }
11859 if test ${gl_cv_source_line_length_unlimited+y}
11861 printf %s "(cached) " >&6
11863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11864 /* end confdefs.h. */
11871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11872 $EGREP "choke me" >/dev/null 2>&1
11874 gl_cv_source_line_length_unlimited=no
11876 gl_cv_source_line_length_unlimited=yes
11882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
11883 printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
11884 if test $gl_cv_source_line_length_unlimited = no; then
11885 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
11904 if test $gl_cv_have_include_next = yes; then
11905 gl_cv_next_dirent_h='<'dirent.h'>'
11907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
11908 printf %s "checking absolute name of <dirent.h>... " >&6; }
11909 if test ${gl_cv_next_dirent_h+y}
11911 printf %s "(cached) " >&6
11914 if test $ac_cv_header_dirent_h = yes; then
11919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11920 /* end confdefs.h. */
11921 #include <dirent.h>
11924 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11925 *) gl_absname_cpp="$ac_cpp" ;;
11930 gl_dirsep_regex='[/\\]'
11933 gl_dirsep_regex='\/'
11936 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11937 gl_header_literal_regex=`echo 'dirent.h' \
11938 | sed -e "$gl_make_literal_regex_sed"`
11939 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11940 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11946 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11947 sed -n "$gl_absolute_header_sed"`
11949 gl_header=$gl_cv_absolute_dirent_h
11950 gl_cv_next_dirent_h='"'$gl_header'"'
11952 gl_cv_next_dirent_h='<'dirent.h'>'
11957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
11958 printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
11960 NEXT_DIRENT_H=$gl_cv_next_dirent_h
11962 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11963 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11964 gl_next_as_first_directive='<'dirent.h'>'
11966 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11967 gl_next_as_first_directive=$gl_cv_next_dirent_h
11969 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
11974 if test $ac_cv_header_dirent_h = yes; then
11983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
11984 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
11985 if test ${ac_cv_c_undeclared_builtin_options+y}
11987 printf %s "(cached) " >&6
11989 ac_save_CFLAGS=$CFLAGS
11990 ac_cv_c_undeclared_builtin_options='cannot detect'
11991 for ac_arg in '' -fno-builtin; do
11992 CFLAGS="$ac_save_CFLAGS $ac_arg"
11993 # This test program should *not* compile successfully.
11994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11995 /* end confdefs.h. */
12005 if ac_fn_c_try_compile "$LINENO"
12009 # This test program should compile successfully.
12010 # No library function is consistently available on
12011 # freestanding implementations, so test against a dummy
12012 # declaration. Include always-available headers on the
12013 # off chance that they somehow elicit warnings.
12014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12015 /* end confdefs.h. */
12017 #include <limits.h>
12018 #include <stdarg.h>
12019 #include <stddef.h>
12020 extern void ac_decl (int, char *);
12025 (void) ac_decl (0, (char *) 0);
12032 if ac_fn_c_try_compile "$LINENO"
12034 if test x"$ac_arg" = x
12036 ac_cv_c_undeclared_builtin_options='none needed'
12038 ac_cv_c_undeclared_builtin_options=$ac_arg
12042 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12044 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12046 CFLAGS=$ac_save_CFLAGS
12049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
12050 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
12051 case $ac_cv_c_undeclared_builtin_options in #(
12053 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12054 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
12055 as_fn_error $? "cannot make $CC report undeclared builtins
12056 See \`config.log' for more details" "$LINENO" 5; } ;; #(
12058 ac_c_undeclared_builtin_options='' ;; #(
12060 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
12064 #if defined _WIN32 && !defined __CYGWIN__
12065 #define access _access
12066 #define chdir _chdir
12067 #define chmod _chmod
12068 #define close _close
12069 #define creat _creat
12073 #define execl _execl
12074 #define execle _execle
12075 #define execlp _execlp
12076 #define execv _execv
12077 #define execve _execve
12078 #define execvp _execvp
12079 #define execvpe _execvpe
12080 #define fcloseall _fcloseall
12082 #define fdopen _fdopen
12083 #define fileno _fileno
12085 #define getcwd _getcwd
12086 #define getpid _getpid
12088 #define isatty _isatty
12092 #define lfind _lfind
12093 #define lsearch _lsearch
12094 #define lseek _lseek
12095 #define memccpy _memccpy
12096 #define mkdir _mkdir
12097 #define mktemp _mktemp
12099 #define putenv _putenv
12102 #define rmdir _rmdir
12103 #define strdup _strdup
12105 #define tempnam _tempnam
12106 #define tzset _tzset
12107 #define umask _umask
12108 #define unlink _unlink
12109 #define utime _utime
12110 #define wcsdup _wcsdup
12111 #define write _write
12125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
12126 printf %s "checking if environ is properly declared... " >&6; }
12127 if test ${gt_cv_var_environ_declaration+y}
12129 printf %s "(cached) " >&6
12131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12132 /* end confdefs.h. */
12134 #include <unistd.h>
12136 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
12137 #include <stdlib.h>
12139 extern struct { int foo; } environ;
12148 if ac_fn_c_try_compile "$LINENO"
12150 gt_cv_var_environ_declaration=no
12152 gt_cv_var_environ_declaration=yes
12154 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
12157 printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
12158 if test $gt_cv_var_environ_declaration = yes; then
12160 printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
12165 if test $gt_cv_var_environ_declaration != yes; then
12166 HAVE_DECL_ENVIRON=0
12171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
12172 printf %s "checking for complete errno.h... " >&6; }
12173 if test ${gl_cv_header_errno_h_complete+y}
12175 printf %s "(cached) " >&6
12178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12179 /* end confdefs.h. */
12182 #if !defined ETXTBSY
12185 #if !defined ENOMSG
12191 #if !defined ENOLINK
12194 #if !defined EPROTO
12197 #if !defined EMULTIHOP
12200 #if !defined EBADMSG
12203 #if !defined EOVERFLOW
12206 #if !defined ENOTSUP
12209 #if !defined ENETRESET
12212 #if !defined ECONNABORTED
12215 #if !defined ESTALE
12218 #if !defined EDQUOT
12221 #if !defined ECANCELED
12224 #if !defined EOWNERDEAD
12227 #if !defined ENOTRECOVERABLE
12230 #if !defined EILSEQ
12235 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12236 $EGREP "booboo" >/dev/null 2>&1
12238 gl_cv_header_errno_h_complete=no
12240 gl_cv_header_errno_h_complete=yes
12246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
12247 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
12248 if test $gl_cv_header_errno_h_complete = yes; then
12259 if test $gl_cv_have_include_next = yes; then
12260 gl_cv_next_errno_h='<'errno.h'>'
12262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
12263 printf %s "checking absolute name of <errno.h>... " >&6; }
12264 if test ${gl_cv_next_errno_h+y}
12266 printf %s "(cached) " >&6
12271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12272 /* end confdefs.h. */
12276 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12277 *) gl_absname_cpp="$ac_cpp" ;;
12282 gl_dirsep_regex='[/\\]'
12285 gl_dirsep_regex='\/'
12288 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12289 gl_header_literal_regex=`echo 'errno.h' \
12290 | sed -e "$gl_make_literal_regex_sed"`
12291 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12292 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12298 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12299 sed -n "$gl_absolute_header_sed"`
12301 gl_header=$gl_cv_absolute_errno_h
12302 gl_cv_next_errno_h='"'$gl_header'"'
12306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
12307 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
12309 NEXT_ERRNO_H=$gl_cv_next_errno_h
12311 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12312 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12313 gl_next_as_first_directive='<'errno.h'>'
12315 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12316 gl_next_as_first_directive=$gl_cv_next_errno_h
12318 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
12326 if test -n "$ERRNO_H"; then
12327 GL_GENERATE_ERRNO_H_TRUE=
12328 GL_GENERATE_ERRNO_H_FALSE='#'
12330 GL_GENERATE_ERRNO_H_TRUE='#'
12331 GL_GENERATE_ERRNO_H_FALSE=
12335 if test -n "$ERRNO_H"; then
12336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
12337 printf %s "checking for EMULTIHOP value... " >&6; }
12338 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
12340 printf %s "(cached) " >&6
12343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12344 /* end confdefs.h. */
12352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12353 $EGREP "yes" >/dev/null 2>&1
12355 gl_cv_header_errno_h_EMULTIHOP=yes
12357 gl_cv_header_errno_h_EMULTIHOP=no
12361 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
12362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12363 /* end confdefs.h. */
12365 #define _XOPEN_SOURCE_EXTENDED 1
12372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12373 $EGREP "yes" >/dev/null 2>&1
12375 gl_cv_header_errno_h_EMULTIHOP=hidden
12379 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
12380 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
12381 #define _XOPEN_SOURCE_EXTENDED 1
12383 /* The following two lines are a workaround against an autoconf-2.52 bug. */
12385 #include <stdlib.h>
12395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
12396 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
12397 case $gl_cv_header_errno_h_EMULTIHOP in
12399 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
12402 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
12410 if test -n "$ERRNO_H"; then
12411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
12412 printf %s "checking for ENOLINK value... " >&6; }
12413 if test ${gl_cv_header_errno_h_ENOLINK+y}
12415 printf %s "(cached) " >&6
12418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12419 /* end confdefs.h. */
12427 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12428 $EGREP "yes" >/dev/null 2>&1
12430 gl_cv_header_errno_h_ENOLINK=yes
12432 gl_cv_header_errno_h_ENOLINK=no
12436 if test $gl_cv_header_errno_h_ENOLINK = no; then
12437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12438 /* end confdefs.h. */
12440 #define _XOPEN_SOURCE_EXTENDED 1
12447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12448 $EGREP "yes" >/dev/null 2>&1
12450 gl_cv_header_errno_h_ENOLINK=hidden
12454 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
12455 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
12456 #define _XOPEN_SOURCE_EXTENDED 1
12458 /* The following two lines are a workaround against an autoconf-2.52 bug. */
12460 #include <stdlib.h>
12470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
12471 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
12472 case $gl_cv_header_errno_h_ENOLINK in
12474 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
12477 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
12485 if test -n "$ERRNO_H"; then
12486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
12487 printf %s "checking for EOVERFLOW value... " >&6; }
12488 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
12490 printf %s "(cached) " >&6
12493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12494 /* end confdefs.h. */
12502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12503 $EGREP "yes" >/dev/null 2>&1
12505 gl_cv_header_errno_h_EOVERFLOW=yes
12507 gl_cv_header_errno_h_EOVERFLOW=no
12511 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
12512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12513 /* end confdefs.h. */
12515 #define _XOPEN_SOURCE_EXTENDED 1
12522 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12523 $EGREP "yes" >/dev/null 2>&1
12525 gl_cv_header_errno_h_EOVERFLOW=hidden
12529 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
12530 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
12531 #define _XOPEN_SOURCE_EXTENDED 1
12533 /* The following two lines are a workaround against an autoconf-2.52 bug. */
12535 #include <stdlib.h>
12545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
12546 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
12547 case $gl_cv_header_errno_h_EOVERFLOW in
12549 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
12552 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
12560 ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
12561 if test "x$ac_cv_have_decl_strerror_r" = xyes
12567 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
12570 if test $ac_cv_have_decl_strerror_r = yes; then
12571 # For backward compatibility's sake, define HAVE_STRERROR_R.
12572 # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
12573 # as AC_CHECK_DECLS_ONCE.)
12575 printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
12579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
12580 printf %s "checking whether strerror_r returns char *... " >&6; }
12581 if test ${ac_cv_func_strerror_r_char_p+y}
12583 printf %s "(cached) " >&6
12586 ac_cv_func_strerror_r_char_p=no
12587 if test $ac_cv_have_decl_strerror_r = yes; then
12588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12589 /* end confdefs.h. */
12590 #include <string.h>
12596 char x = *strerror_r (0, buf, sizeof buf);
12597 char *p = strerror_r (0, buf, sizeof buf);
12604 if ac_fn_c_try_compile "$LINENO"
12606 ac_cv_func_strerror_r_char_p=yes
12608 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
12614 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
12615 if test $ac_cv_func_strerror_r_char_p = yes; then
12617 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
12622 XGETTEXT_EXTRA_OPTIONS=
12624 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
12625 if test "x$ac_cv_type_mode_t" = xyes
12630 printf "%s\n" "#define mode_t int" >>confdefs.h
12638 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
12640 if test "x$ac_cv_type_sig_atomic_t" = xyes
12643 printf "%s\n" "#define HAVE_SIG_ATOMIC_T 1" >>confdefs.h
12648 printf "%s\n" "#define sig_atomic_t int" >>confdefs.h
12653 ac_fn_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
12654 if test "x$ac_cv_have_decl_fchdir" = xyes
12660 printf "%s\n" "#define HAVE_DECL_FCHDIR $ac_have_decl" >>confdefs.h
12663 HAVE_DECL_FCLOSEALL=1;
12664 HAVE_DECL_FPURGE=1;
12665 HAVE_DECL_FSEEKO=1;
12666 HAVE_DECL_FTELLO=1;
12667 HAVE_DECL_GETDELIM=1;
12668 HAVE_DECL_GETLINE=1;
12669 HAVE_DECL_OBSTACK_PRINTF=1;
12670 HAVE_DECL_SNPRINTF=1;
12671 HAVE_DECL_VSNPRINTF=1;
12692 REPLACE_GETDELIM=0;
12694 REPLACE_OBSTACK_PRINTF=0;
12700 REPLACE_RENAMEAT=0;
12701 REPLACE_SNPRINTF=0;
12703 REPLACE_STDIO_READ_FUNCS=0;
12704 REPLACE_STDIO_WRITE_FUNCS=0;
12706 REPLACE_VASPRINTF=0;
12707 REPLACE_VDPRINTF=0;
12708 REPLACE_VFPRINTF=0;
12710 REPLACE_VSNPRINTF=0;
12711 REPLACE_VSPRINTF=0;
12715 GL_M4_GNULIB_DPRINTF=0
12719 GL_M4_GNULIB_FCLOSE=0
12723 GL_M4_GNULIB_FDOPEN=0
12727 GL_M4_GNULIB_FFLUSH=0
12731 GL_M4_GNULIB_FGETC=0
12735 GL_M4_GNULIB_FGETS=0
12739 GL_M4_GNULIB_FOPEN=0
12743 GL_M4_GNULIB_FPRINTF=0
12747 GL_M4_GNULIB_FPRINTF_POSIX=0
12751 GL_M4_GNULIB_FPURGE=0
12755 GL_M4_GNULIB_FPUTC=0
12759 GL_M4_GNULIB_FPUTS=0
12763 GL_M4_GNULIB_FREAD=0
12767 GL_M4_GNULIB_FREOPEN=0
12771 GL_M4_GNULIB_FSCANF=0
12775 GL_M4_GNULIB_FSEEK=0
12779 GL_M4_GNULIB_FSEEKO=0
12783 GL_M4_GNULIB_FTELL=0
12787 GL_M4_GNULIB_FTELLO=0
12791 GL_M4_GNULIB_FWRITE=0
12795 GL_M4_GNULIB_GETC=0
12799 GL_M4_GNULIB_GETCHAR=0
12803 GL_M4_GNULIB_GETDELIM=0
12807 GL_M4_GNULIB_GETLINE=0
12811 GL_M4_GNULIB_OBSTACK_PRINTF=0
12815 GL_M4_GNULIB_OBSTACK_PRINTF_POSIX=0
12819 GL_M4_GNULIB_PCLOSE=0
12823 GL_M4_GNULIB_PERROR=0
12827 GL_M4_GNULIB_POPEN=0
12831 GL_M4_GNULIB_PRINTF=0
12835 GL_M4_GNULIB_PRINTF_POSIX=0
12839 GL_M4_GNULIB_PUTC=0
12843 GL_M4_GNULIB_PUTCHAR=0
12847 GL_M4_GNULIB_PUTS=0
12851 GL_M4_GNULIB_REMOVE=0
12855 GL_M4_GNULIB_RENAME=0
12859 GL_M4_GNULIB_RENAMEAT=0
12863 GL_M4_GNULIB_SCANF=0
12867 GL_M4_GNULIB_SNPRINTF=0
12871 GL_M4_GNULIB_SPRINTF_POSIX=0
12875 GL_M4_GNULIB_STDIO_H_NONBLOCKING=0
12879 GL_M4_GNULIB_STDIO_H_SIGPIPE=0
12883 GL_M4_GNULIB_TMPFILE=0
12887 GL_M4_GNULIB_VASPRINTF=0
12891 GL_M4_GNULIB_VFSCANF=0
12895 GL_M4_GNULIB_VSCANF=0
12899 GL_M4_GNULIB_VDPRINTF=0
12903 GL_M4_GNULIB_VFPRINTF=0
12907 GL_M4_GNULIB_VFPRINTF_POSIX=0
12911 GL_M4_GNULIB_VPRINTF=0
12915 GL_M4_GNULIB_VPRINTF_POSIX=0
12919 GL_M4_GNULIB_VSNPRINTF=0
12923 GL_M4_GNULIB_VSPRINTF_POSIX=0
12927 GL_M4_GNULIB_MDA_FCLOSEALL=1
12931 GL_M4_GNULIB_MDA_FDOPEN=1
12935 GL_M4_GNULIB_MDA_FILENO=1
12939 GL_M4_GNULIB_MDA_GETW=1
12943 GL_M4_GNULIB_MDA_PUTW=1
12947 GL_M4_GNULIB_MDA_TEMPNAM=1
12962 GL_M4_GNULIB_CREAT=0
12966 GL_M4_GNULIB_FCNTL=0
12970 GL_M4_GNULIB_NONBLOCKING=0
12974 GL_M4_GNULIB_OPEN=0
12978 GL_M4_GNULIB_OPENAT=0
12982 GL_M4_GNULIB_MDA_CREAT=1
12986 GL_M4_GNULIB_MDA_OPEN=1
12996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
12997 printf %s "checking for working fcntl.h... " >&6; }
12998 if test ${gl_cv_header_working_fcntl_h+y}
13000 printf %s "(cached) " >&6
13002 if test "$cross_compiling" = yes
13005 # Guess 'no' on native Windows.
13006 mingw*) gl_cv_header_working_fcntl_h='no' ;;
13007 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
13011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13012 /* end confdefs.h. */
13013 #include <sys/types.h>
13014 #include <sys/stat.h>
13016 # include <unistd.h>
13017 #else /* on Windows with MSVC */
13019 # include <stdlib.h>
13020 # defined sleep(n) _sleep ((n) * 1000)
13028 #define O_NOATIME 0
13031 #define O_NOFOLLOW 0
13033 static int const constants[] =
13035 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
13036 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
13043 int result = !constants;
13046 static char const sym[] = "conftest.sym";
13047 if (symlink ("/dev/null", sym) != 0)
13051 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
13058 if (unlink (sym) != 0 || symlink (".", sym) != 0)
13062 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
13073 static char const file[] = "confdefs.h";
13074 int fd = open (file, O_RDONLY | O_NOATIME);
13080 if (fstat (fd, &st0) != 0)
13086 if (read (fd, &c, 1) != 1)
13090 if (close (fd) != 0)
13095 if (stat (file, &st1) != 0)
13098 if (st0.st_atime != st1.st_atime)
13110 if ac_fn_c_try_run "$LINENO"
13112 gl_cv_header_working_fcntl_h=yes
13115 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
13116 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
13117 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
13118 *) gl_cv_header_working_fcntl_h='no';;
13121 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13122 conftest.$ac_objext conftest.beam conftest.$ac_ext
13127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
13128 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
13130 case $gl_cv_header_working_fcntl_h in #(
13131 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
13135 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
13138 case $gl_cv_header_working_fcntl_h in #(
13139 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
13143 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
13147 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
13149 if test "x$ac_cv_type_pid_t" = xyes
13153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13154 /* end confdefs.h. */
13156 #if defined _WIN64 && !defined __CYGWIN__
13169 if ac_fn_c_try_compile "$LINENO"
13173 ac_pid_type='__int64'
13175 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13177 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
13194 if test $gl_cv_have_include_next = yes; then
13195 gl_cv_next_fcntl_h='<'fcntl.h'>'
13197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
13198 printf %s "checking absolute name of <fcntl.h>... " >&6; }
13199 if test ${gl_cv_next_fcntl_h+y}
13201 printf %s "(cached) " >&6
13206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13207 /* end confdefs.h. */
13211 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13212 *) gl_absname_cpp="$ac_cpp" ;;
13217 gl_dirsep_regex='[/\\]'
13220 gl_dirsep_regex='\/'
13223 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13224 gl_header_literal_regex=`echo 'fcntl.h' \
13225 | sed -e "$gl_make_literal_regex_sed"`
13226 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13227 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13233 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13234 sed -n "$gl_absolute_header_sed"`
13236 gl_header=$gl_cv_absolute_fcntl_h
13237 gl_cv_next_fcntl_h='"'$gl_header'"'
13241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
13242 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
13244 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
13246 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13247 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13248 gl_next_as_first_directive='<'fcntl.h'>'
13250 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13251 gl_next_as_first_directive=$gl_cv_next_fcntl_h
13253 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
13271 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
13272 if test "x$ac_cv_func_eaccess" = xyes
13277 printf "%s\n" "#define eaccess access" >>confdefs.h
13355 HAVE_DECL_COPYSIGNF=1;
13361 HAVE_DECL_EXPM1L=1;
13362 HAVE_DECL_FLOORF=1;
13363 HAVE_DECL_FLOORL=1;
13364 HAVE_DECL_FREXPL=1;
13365 HAVE_DECL_LDEXPL=1;
13367 HAVE_DECL_LOG10L=1;
13372 HAVE_DECL_REMAINDER=1;
13373 HAVE_DECL_REMAINDERL=1;
13376 HAVE_DECL_ROUNDF=1;
13377 HAVE_DECL_ROUNDL=1;
13382 HAVE_DECL_TRUNCF=1;
13383 HAVE_DECL_TRUNCL=1;
13415 REPLACE_HUGE_VAL=0;
13422 REPLACE_ISFINITE=0;
13445 REPLACE_REMAINDER=0;
13446 REPLACE_REMAINDERF=0;
13447 REPLACE_REMAINDERL=0;
13453 REPLACE_SIGNBIT_USING_BUILTINS=0;
13465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
13466 printf %s "checking whether frexp() can be used without linking with libm... " >&6; }
13467 if test ${gl_cv_func_frexp_no_libm+y}
13469 printf %s "(cached) " >&6
13472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13473 /* end confdefs.h. */
13479 int e; return frexp (x, &e) > 0;
13484 if ac_fn_c_try_link "$LINENO"
13486 gl_cv_func_frexp_no_libm=yes
13488 gl_cv_func_frexp_no_libm=no
13490 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13491 conftest$ac_exeext conftest.$ac_ext
13494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
13495 printf "%s\n" "$gl_cv_func_frexp_no_libm" >&6; }
13497 ac_fn_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
13498 if test "x$ac_cv_have_decl_alarm" = xyes
13504 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
13508 GL_M4_GNULIB_ACOSF=0
13512 GL_M4_GNULIB_ACOSL=0
13516 GL_M4_GNULIB_ASINF=0
13520 GL_M4_GNULIB_ASINL=0
13524 GL_M4_GNULIB_ATANF=0
13528 GL_M4_GNULIB_ATANL=0
13532 GL_M4_GNULIB_ATAN2F=0
13536 GL_M4_GNULIB_CBRT=0
13540 GL_M4_GNULIB_CBRTF=0
13544 GL_M4_GNULIB_CBRTL=0
13548 GL_M4_GNULIB_CEIL=0
13552 GL_M4_GNULIB_CEILF=0
13556 GL_M4_GNULIB_CEILL=0
13560 GL_M4_GNULIB_COPYSIGN=0
13564 GL_M4_GNULIB_COPYSIGNF=0
13568 GL_M4_GNULIB_COPYSIGNL=0
13572 GL_M4_GNULIB_COSF=0
13576 GL_M4_GNULIB_COSL=0
13580 GL_M4_GNULIB_COSHF=0
13584 GL_M4_GNULIB_EXPF=0
13588 GL_M4_GNULIB_EXPL=0
13592 GL_M4_GNULIB_EXP2=0
13596 GL_M4_GNULIB_EXP2F=0
13600 GL_M4_GNULIB_EXP2L=0
13604 GL_M4_GNULIB_EXPM1=0
13608 GL_M4_GNULIB_EXPM1F=0
13612 GL_M4_GNULIB_EXPM1L=0
13616 GL_M4_GNULIB_FABSF=0
13620 GL_M4_GNULIB_FABSL=0
13624 GL_M4_GNULIB_FLOOR=0
13628 GL_M4_GNULIB_FLOORF=0
13632 GL_M4_GNULIB_FLOORL=0
13640 GL_M4_GNULIB_FMAF=0
13644 GL_M4_GNULIB_FMAL=0
13648 GL_M4_GNULIB_FMOD=0
13652 GL_M4_GNULIB_FMODF=0
13656 GL_M4_GNULIB_FMODL=0
13660 GL_M4_GNULIB_FREXPF=0
13664 GL_M4_GNULIB_FREXP=0
13668 GL_M4_GNULIB_FREXPL=0
13672 GL_M4_GNULIB_HYPOT=0
13676 GL_M4_GNULIB_HYPOTF=0
13680 GL_M4_GNULIB_HYPOTL=0
13684 GL_M4_GNULIB_ILOGB=0
13688 GL_M4_GNULIB_ILOGBF=0
13692 GL_M4_GNULIB_ILOGBL=0
13696 GL_M4_GNULIB_ISFINITE=0
13700 GL_M4_GNULIB_ISINF=0
13704 GL_M4_GNULIB_ISNAN=0
13708 GL_M4_GNULIB_ISNANF=0
13712 GL_M4_GNULIB_ISNAND=0
13716 GL_M4_GNULIB_ISNANL=0
13720 GL_M4_GNULIB_LDEXPF=0
13724 GL_M4_GNULIB_LDEXPL=0
13732 GL_M4_GNULIB_LOGF=0
13736 GL_M4_GNULIB_LOGL=0
13740 GL_M4_GNULIB_LOG10=0
13744 GL_M4_GNULIB_LOG10F=0
13748 GL_M4_GNULIB_LOG10L=0
13752 GL_M4_GNULIB_LOG1P=0
13756 GL_M4_GNULIB_LOG1PF=0
13760 GL_M4_GNULIB_LOG1PL=0
13764 GL_M4_GNULIB_LOG2=0
13768 GL_M4_GNULIB_LOG2F=0
13772 GL_M4_GNULIB_LOG2L=0
13776 GL_M4_GNULIB_LOGB=0
13780 GL_M4_GNULIB_LOGBF=0
13784 GL_M4_GNULIB_LOGBL=0
13788 GL_M4_GNULIB_MODF=0
13792 GL_M4_GNULIB_MODFF=0
13796 GL_M4_GNULIB_MODFL=0
13800 GL_M4_GNULIB_POWF=0
13804 GL_M4_GNULIB_REMAINDER=0
13808 GL_M4_GNULIB_REMAINDERF=0
13812 GL_M4_GNULIB_REMAINDERL=0
13816 GL_M4_GNULIB_RINT=0
13820 GL_M4_GNULIB_RINTF=0
13824 GL_M4_GNULIB_RINTL=0
13828 GL_M4_GNULIB_ROUND=0
13832 GL_M4_GNULIB_ROUNDF=0
13836 GL_M4_GNULIB_ROUNDL=0
13840 GL_M4_GNULIB_SIGNBIT=0
13844 GL_M4_GNULIB_SINF=0
13848 GL_M4_GNULIB_SINL=0
13852 GL_M4_GNULIB_SINHF=0
13856 GL_M4_GNULIB_SQRTF=0
13860 GL_M4_GNULIB_SQRTL=0
13864 GL_M4_GNULIB_TANF=0
13868 GL_M4_GNULIB_TANL=0
13872 GL_M4_GNULIB_TANHF=0
13876 GL_M4_GNULIB_TRUNC=0
13880 GL_M4_GNULIB_TRUNCF=0
13884 GL_M4_GNULIB_TRUNCL=0
13888 GL_M4_GNULIB_MDA_J0=1
13892 GL_M4_GNULIB_MDA_J1=1
13896 GL_M4_GNULIB_MDA_JN=1
13900 GL_M4_GNULIB_MDA_Y0=1
13904 GL_M4_GNULIB_MDA_Y1=1
13908 GL_M4_GNULIB_MDA_YN=1
13913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
13914 printf %s "checking whether long double and double are the same... " >&6; }
13915 if test ${gl_cv_long_double_equals_double+y}
13917 printf %s "(cached) " >&6
13919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13920 /* end confdefs.h. */
13925 typedef int check[sizeof (long double) == sizeof (double)
13926 && LDBL_MANT_DIG == DBL_MANT_DIG
13927 && LDBL_MAX_EXP == DBL_MAX_EXP
13928 && LDBL_MIN_EXP == DBL_MIN_EXP
13935 if ac_fn_c_try_compile "$LINENO"
13937 gl_cv_long_double_equals_double=yes
13939 gl_cv_long_double_equals_double=no
13941 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
13945 printf "%s\n" "$gl_cv_long_double_equals_double" >&6; }
13946 if test $gl_cv_long_double_equals_double = yes; then
13948 printf "%s\n" "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
13950 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
13952 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
13957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
13958 printf %s "checking whether stdin defaults to large file offsets... " >&6; }
13959 if test ${gl_cv_var_stdin_large_offset+y}
13961 printf %s "(cached) " >&6
13963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13964 /* end confdefs.h. */
13969 #if defined __SL64 && defined __SCLE /* cygwin */
13970 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
13971 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
13972 it is easier to do a version check than building a runtime test. */
13973 # include <cygwin/version.h>
13974 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
13982 if ac_fn_c_try_link "$LINENO"
13984 gl_cv_var_stdin_large_offset=yes
13986 gl_cv_var_stdin_large_offset=no
13988 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13989 conftest$ac_exeext conftest.$ac_ext
13991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
13992 printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
14000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
14001 printf %s "checking for 64-bit off_t... " >&6; }
14002 if test ${gl_cv_type_off_t_64+y}
14004 printf %s "(cached) " >&6
14006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14007 /* end confdefs.h. */
14008 #include <sys/types.h>
14009 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
14019 if ac_fn_c_try_compile "$LINENO"
14021 gl_cv_type_off_t_64=yes
14023 gl_cv_type_off_t_64=no
14025 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
14029 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
14030 if test $gl_cv_type_off_t_64 = no; then
14031 WINDOWS_64_BIT_OFF_T=1
14033 WINDOWS_64_BIT_OFF_T=0
14035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
14036 printf %s "checking for 64-bit st_size... " >&6; }
14037 if test ${gl_cv_member_st_size_64+y}
14039 printf %s "(cached) " >&6
14041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14042 /* end confdefs.h. */
14043 #include <sys/types.h>
14045 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
14055 if ac_fn_c_try_compile "$LINENO"
14057 gl_cv_member_st_size_64=yes
14059 gl_cv_member_st_size_64=no
14061 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
14065 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
14066 if test $gl_cv_member_st_size_64 = no; then
14067 WINDOWS_64_BIT_ST_SIZE=1
14069 WINDOWS_64_BIT_ST_SIZE=0
14073 WINDOWS_64_BIT_OFF_T=0
14074 WINDOWS_64_BIT_ST_SIZE=0
14088 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
14099 if test $gl_cv_have_include_next = yes; then
14100 gl_cv_next_sys_types_h='<'sys/types.h'>'
14102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
14103 printf %s "checking absolute name of <sys/types.h>... " >&6; }
14104 if test ${gl_cv_next_sys_types_h+y}
14106 printf %s "(cached) " >&6
14111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14112 /* end confdefs.h. */
14113 #include <sys/types.h>
14116 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14117 *) gl_absname_cpp="$ac_cpp" ;;
14122 gl_dirsep_regex='[/\\]'
14125 gl_dirsep_regex='\/'
14128 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14129 gl_header_literal_regex=`echo 'sys/types.h' \
14130 | sed -e "$gl_make_literal_regex_sed"`
14131 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14132 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14138 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14139 sed -n "$gl_absolute_header_sed"`
14141 gl_header=$gl_cv_absolute_sys_types_h
14142 gl_cv_next_sys_types_h='"'$gl_header'"'
14146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
14147 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
14149 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
14151 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14152 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14153 gl_next_as_first_directive='<'sys/types.h'>'
14155 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14156 gl_next_as_first_directive=$gl_cv_next_sys_types_h
14158 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
14171 WINDOWS_STAT_INODES=0
14175 ac_fn_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14176 if test "x$ac_cv_have_decl_fseeko" = xyes
14182 printf "%s\n" "#define HAVE_DECL_FSEEKO $ac_have_decl" >>confdefs.h
14192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
14193 printf %s "checking for fseeko... " >&6; }
14194 if test ${gl_cv_func_fseeko+y}
14196 printf %s "(cached) " >&6
14199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14200 /* end confdefs.h. */
14206 fseeko (stdin, 0, 0);
14211 if ac_fn_c_try_link "$LINENO"
14213 gl_cv_func_fseeko=yes
14215 gl_cv_func_fseeko=no
14217 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14218 conftest$ac_exeext conftest.$ac_ext
14221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
14222 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
14225 if test $ac_cv_have_decl_fseeko = no; then
14229 if test $gl_cv_func_fseeko = no; then
14232 if test $WINDOWS_64_BIT_OFF_T = 1; then
14235 if test $gl_cv_var_stdin_large_offset = no; then
14241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
14242 printf %s "checking whether fflush works on input streams... " >&6; }
14243 if test ${gl_cv_func_fflush_stdin+y}
14245 printf %s "(cached) " >&6
14247 echo hello world > conftest.txt
14248 if test "$cross_compiling" = yes
14251 # Guess no on native Windows.
14252 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
14253 *) gl_cv_func_fflush_stdin=cross ;;
14257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14258 /* end confdefs.h. */
14262 # include <unistd.h>
14263 #else /* on Windows with MSVC */
14273 FILE *f = fopen ("conftest.txt", "r");
14280 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
14281 { fclose (f); return 2; }
14282 /* For deterministic results, ensure f read a bigger buffer. */
14283 if (lseek (fd, 0, SEEK_CUR) == 5)
14284 { fclose (f); return 3; }
14285 /* POSIX requires fflush-fseek to set file offset of fd. This fails
14286 on BSD systems and on mingw. */
14287 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
14288 { fclose (f); return 4; }
14289 if (lseek (fd, 0, SEEK_CUR) != 5)
14290 { fclose (f); return 5; }
14291 /* Verify behaviour of fflush after ungetc. See
14292 <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
14293 /* Verify behaviour of fflush after a backup ungetc. This fails on
14298 if (fgetc (f) != c)
14299 { fclose (f); return 6; }
14300 /* Verify behaviour of fflush after a non-backup ungetc. This fails
14301 on glibc 2.8 and on BSD systems. */
14305 if (fgetc (f) != c)
14306 { fclose (f); return 7; }
14314 if ac_fn_c_try_run "$LINENO"
14316 gl_cv_func_fflush_stdin=yes
14318 gl_cv_func_fflush_stdin=no
14320 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14321 conftest.$ac_objext conftest.beam conftest.$ac_ext
14327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
14328 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
14329 case "$gl_cv_func_fflush_stdin" in
14330 *yes) gl_func_fflush_stdin=1 ;;
14331 *no) gl_func_fflush_stdin=0 ;;
14332 *) gl_func_fflush_stdin='(-1)' ;;
14335 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
14338 case "$gl_cv_func_fflush_stdin" in
14340 *) REPLACE_FSEEKO=1 ;;
14358 REPLACE_FCHMODAT=0;
14361 REPLACE_FUTIMENS=0;
14365 REPLACE_MKFIFOAT=0;
14369 REPLACE_UTIMENSAT=0;
14371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
14372 printf %s "checking whether stat file-mode macros are broken... " >&6; }
14373 if test ${ac_cv_header_stat_broken+y}
14375 printf %s "(cached) " >&6
14377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14378 /* end confdefs.h. */
14379 #include <sys/types.h>
14380 #include <sys/stat.h>
14382 #if defined S_ISBLK && defined S_IFDIR
14383 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
14386 #if defined S_ISBLK && defined S_IFCHR
14387 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
14390 #if defined S_ISLNK && defined S_IFREG
14391 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
14394 #if defined S_ISSOCK && defined S_IFREG
14395 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
14399 if ac_fn_c_try_compile "$LINENO"
14401 ac_cv_header_stat_broken=no
14403 ac_cv_header_stat_broken=yes
14405 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
14408 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
14409 if test $ac_cv_header_stat_broken = yes; then
14411 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
14415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14416 printf %s "checking for C/C++ restrict keyword... " >&6; }
14417 if test ${ac_cv_c_restrict+y}
14419 printf %s "(cached) " >&6
14421 ac_cv_c_restrict=no
14422 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
14423 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
14424 # Put 'restrict' last, because C++ lacks it.
14425 for ac_kw in __restrict__ __restrict _Restrict restrict; do
14426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14427 /* end confdefs.h. */
14428 typedef int *int_ptr;
14429 int foo (int_ptr $ac_kw ip) { return ip[0]; }
14430 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
14431 int bar (int ip[$ac_kw]) { return ip[0]; }
14439 return foo (t) + bar (t);
14445 if ac_fn_c_try_compile "$LINENO"
14447 ac_cv_c_restrict=$ac_kw
14449 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14450 test "$ac_cv_c_restrict" != no && break
14454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14455 printf "%s\n" "$ac_cv_c_restrict" >&6; }
14457 case $ac_cv_c_restrict in
14459 no) printf "%s\n" "#define restrict /**/" >>confdefs.h
14461 *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
14479 if test $gl_cv_have_include_next = yes; then
14480 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
14482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
14483 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
14484 if test ${gl_cv_next_sys_stat_h+y}
14486 printf %s "(cached) " >&6
14489 if test $ac_cv_header_sys_stat_h = yes; then
14494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14495 /* end confdefs.h. */
14496 #include <sys/stat.h>
14499 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14500 *) gl_absname_cpp="$ac_cpp" ;;
14505 gl_dirsep_regex='[/\\]'
14508 gl_dirsep_regex='\/'
14511 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14512 gl_header_literal_regex=`echo 'sys/stat.h' \
14513 | sed -e "$gl_make_literal_regex_sed"`
14514 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14515 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14521 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14522 sed -n "$gl_absolute_header_sed"`
14524 gl_header=$gl_cv_absolute_sys_stat_h
14525 gl_cv_next_sys_stat_h='"'$gl_header'"'
14527 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
14532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
14533 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
14535 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
14537 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14538 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14539 gl_next_as_first_directive='<'sys/stat.h'>'
14541 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14542 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
14544 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
14553 WINDOWS_STAT_TIMESPEC=0
14562 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
14563 #include <sys/stat.h>
14565 if test "x$ac_cv_type_nlink_t" = xyes
14570 printf "%s\n" "#define nlink_t int" >>confdefs.h
14583 ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
14584 if test "x$ac_cv_header_sdkddkver_h" = xyes
14586 printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h
14599 GL_M4_GNULIB_FCHMODAT=0
14603 GL_M4_GNULIB_FSTAT=0
14607 GL_M4_GNULIB_FSTATAT=0
14611 GL_M4_GNULIB_FUTIMENS=0
14615 GL_M4_GNULIB_GETUMASK=0
14619 GL_M4_GNULIB_LCHMOD=0
14623 GL_M4_GNULIB_LSTAT=0
14627 GL_M4_GNULIB_MKDIR=0
14631 GL_M4_GNULIB_MKDIRAT=0
14635 GL_M4_GNULIB_MKFIFO=0
14639 GL_M4_GNULIB_MKFIFOAT=0
14643 GL_M4_GNULIB_MKNOD=0
14647 GL_M4_GNULIB_MKNODAT=0
14651 GL_M4_GNULIB_STAT=0
14655 GL_M4_GNULIB_UTIMENSAT=0
14659 GL_M4_GNULIB_OVERRIDES_STRUCT_STAT=0
14663 GL_M4_GNULIB_MDA_CHMOD=1
14667 GL_M4_GNULIB_MDA_MKDIR=1
14671 GL_M4_GNULIB_MDA_UMASK=1
14676 ac_fn_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14677 if test "x$ac_cv_have_decl_ftello" = xyes
14683 printf "%s\n" "#define HAVE_DECL_FTELLO $ac_have_decl" >>confdefs.h
14688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
14689 printf %s "checking whether ungetc works on arbitrary bytes... " >&6; }
14690 if test ${gl_cv_func_ungetc_works+y}
14692 printf %s "(cached) " >&6
14694 if test "$cross_compiling" = yes
14697 # Guess yes on glibc systems.
14698 *-gnu* | gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
14699 # Guess yes on musl systems.
14700 *-musl*) gl_cv_func_ungetc_works="guessing yes" ;;
14701 # Guess yes on bionic systems.
14702 *-android*) gl_cv_func_ungetc_works="guessing yes" ;;
14703 # Guess yes on native Windows.
14704 mingw*) gl_cv_func_ungetc_works="guessing yes" ;;
14705 # If we don't know, obey --enable-cross-guesses.
14706 *) gl_cv_func_ungetc_works="$gl_cross_guess_normal" ;;
14710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14711 /* end confdefs.h. */
14719 if (!(f = fopen ("conftest.tmp", "w+")))
14721 if (fputs ("abc", f) < 0)
14722 { fclose (f); return 2; }
14724 if (fgetc (f) != 'a')
14725 { fclose (f); return 3; }
14726 if (fgetc (f) != 'b')
14727 { fclose (f); return 4; }
14728 if (ungetc ('d', f) != 'd')
14729 { fclose (f); return 5; }
14730 if (ftell (f) != 1)
14731 { fclose (f); return 6; }
14732 if (fgetc (f) != 'd')
14733 { fclose (f); return 7; }
14734 if (ftell (f) != 2)
14735 { fclose (f); return 8; }
14736 if (fseek (f, 0, SEEK_CUR) != 0)
14737 { fclose (f); return 9; }
14738 if (ftell (f) != 2)
14739 { fclose (f); return 10; }
14740 if (fgetc (f) != 'c')
14741 { fclose (f); return 11; }
14743 remove ("conftest.tmp");
14749 if ac_fn_c_try_run "$LINENO"
14751 gl_cv_func_ungetc_works=yes
14753 gl_cv_func_ungetc_works=no
14755 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14756 conftest.$ac_objext conftest.beam conftest.$ac_ext
14761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
14762 printf "%s\n" "$gl_cv_func_ungetc_works" >&6; }
14763 gl_ftello_broken_after_ungetc=no
14764 case "$gl_cv_func_ungetc_works" in
14768 darwin*) gl_ftello_broken_after_ungetc=yes ;;
14771 printf "%s\n" "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
14787 if test $ac_cv_have_decl_ftello = no; then
14791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
14792 printf %s "checking for ftello... " >&6; }
14793 if test ${gl_cv_func_ftello+y}
14795 printf %s "(cached) " >&6
14798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14799 /* end confdefs.h. */
14809 if ac_fn_c_try_link "$LINENO"
14811 gl_cv_func_ftello=yes
14813 gl_cv_func_ftello=no
14815 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14816 conftest$ac_exeext conftest.$ac_ext
14819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
14820 printf "%s\n" "$gl_cv_func_ftello" >&6; }
14821 if test $gl_cv_func_ftello = no; then
14824 if test $WINDOWS_64_BIT_OFF_T = 1; then
14827 if test $gl_cv_var_stdin_large_offset = no; then
14830 if test $REPLACE_FTELLO = 0; then
14832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
14833 printf %s "checking whether ftello works... " >&6; }
14834 if test ${gl_cv_func_ftello_works+y}
14836 printf %s "(cached) " >&6
14840 # Guess no on Solaris.
14841 solaris*) gl_cv_func_ftello_works="guessing no" ;;
14842 # Guess yes on native Windows.
14843 mingw*) gl_cv_func_ftello_works="guessing yes" ;;
14844 # Guess yes otherwise.
14845 *) gl_cv_func_ftello_works="guessing yes" ;;
14847 if test "$cross_compiling" = yes
14851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14852 /* end confdefs.h. */
14855 #include <stdlib.h>
14856 #include <string.h>
14857 #define TESTFILE "conftest.tmp"
14863 /* Create a file with some contents. */
14864 fp = fopen (TESTFILE, "w");
14867 if (fwrite ("foogarsh", 1, 8, fp) < 8)
14868 { fclose (fp); return 71; }
14872 /* The file's contents is now "foogarsh". */
14874 /* Try writing after reading to EOF. */
14875 fp = fopen (TESTFILE, "r+");
14878 if (fseek (fp, -1, SEEK_END))
14879 { fclose (fp); return 74; }
14880 if (!(getc (fp) == 'h'))
14881 { fclose (fp); return 1; }
14882 if (!(getc (fp) == EOF))
14883 { fclose (fp); return 2; }
14884 if (!(ftell (fp) == 8))
14885 { fclose (fp); return 3; }
14886 if (!(ftell (fp) == 8))
14887 { fclose (fp); return 4; }
14888 if (!(putc ('!', fp) == '!'))
14889 { fclose (fp); return 5; }
14890 if (!(ftell (fp) == 9))
14891 { fclose (fp); return 6; }
14892 if (!(fclose (fp) == 0))
14894 fp = fopen (TESTFILE, "r");
14899 if (!(fread (buf, 1, 10, fp) == 9))
14900 { fclose (fp); return 10; }
14901 if (!(memcmp (buf, "foogarsh!", 9) == 0))
14902 { fclose (fp); return 11; }
14904 if (!(fclose (fp) == 0))
14907 /* The file's contents is now "foogarsh!". */
14912 if ac_fn_c_try_run "$LINENO"
14914 gl_cv_func_ftello_works=yes
14916 gl_cv_func_ftello_works=no
14918 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14919 conftest.$ac_objext conftest.beam conftest.$ac_ext
14924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
14925 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
14926 case "$gl_cv_func_ftello_works" in
14931 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
14936 if test $REPLACE_FTELLO = 0; then
14938 if test $gl_ftello_broken_after_ungetc = yes; then
14941 printf "%s\n" "#define FTELLO_BROKEN_AFTER_UNGETC 1" >>confdefs.h
14949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
14950 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
14951 if test ${gl_cv_func_getcwd_null+y}
14953 printf %s "(cached) " >&6
14955 if test "$cross_compiling" = yes
14958 # Guess yes on glibc systems.
14959 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
14960 # Guess yes on musl systems.
14961 *-musl*) gl_cv_func_getcwd_null="guessing yes";;
14962 # Guess yes on Cygwin.
14963 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
14964 # If we don't know, obey --enable-cross-guesses.
14965 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
14969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14970 /* end confdefs.h. */
14972 # include <stdlib.h>
14974 # include <unistd.h>
14975 # else /* on Windows with MSVC */
14976 # include <direct.h>
14990 #if defined _WIN32 && ! defined __CYGWIN__
14991 /* mingw cwd does not start with '/', but _getcwd does allocate.
14992 However, mingw fails to honor non-zero size. */
14994 if (chdir ("/") != 0)
14998 char *f = getcwd (NULL, 0);
15002 { free (f); return 3; }
15004 { free (f); return 4; }
15014 if ac_fn_c_try_run "$LINENO"
15016 gl_cv_func_getcwd_null=yes
15018 gl_cv_func_getcwd_null=no
15020 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15021 conftest.$ac_objext conftest.beam conftest.$ac_ext
15025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
15026 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
15029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
15030 printf %s "checking for getcwd with POSIX signature... " >&6; }
15031 if test ${gl_cv_func_getcwd_posix_signature+y}
15033 printf %s "(cached) " >&6
15035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15036 /* end confdefs.h. */
15037 #include <unistd.h>
15049 char *getcwd (char *, size_t);
15056 if ac_fn_c_try_compile "$LINENO"
15058 gl_cv_func_getcwd_posix_signature=yes
15060 gl_cv_func_getcwd_posix_signature=no
15062 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
15066 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
15068 ac_fn_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15069 if test "x$ac_cv_have_decl_getcwd" = xyes
15075 printf "%s\n" "#define HAVE_DECL_GETCWD $ac_have_decl" >>confdefs.h
15078 ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15079 if test "x$ac_cv_have_decl_getdtablesize" = xyes
15085 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
15101 if test $gl_cv_have_include_next = yes; then
15102 gl_cv_next_getopt_h='<'getopt.h'>'
15104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
15105 printf %s "checking absolute name of <getopt.h>... " >&6; }
15106 if test ${gl_cv_next_getopt_h+y}
15108 printf %s "(cached) " >&6
15111 if test $ac_cv_header_getopt_h = yes; then
15116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15117 /* end confdefs.h. */
15118 #include <getopt.h>
15121 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15122 *) gl_absname_cpp="$ac_cpp" ;;
15127 gl_dirsep_regex='[/\\]'
15130 gl_dirsep_regex='\/'
15133 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15134 gl_header_literal_regex=`echo 'getopt.h' \
15135 | sed -e "$gl_make_literal_regex_sed"`
15136 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15137 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15143 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15144 sed -n "$gl_absolute_header_sed"`
15146 gl_header=$gl_cv_absolute_getopt_h
15147 gl_cv_next_getopt_h='"'$gl_header'"'
15149 gl_cv_next_getopt_h='<'getopt.h'>'
15154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
15155 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
15157 NEXT_GETOPT_H=$gl_cv_next_getopt_h
15159 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15160 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15161 gl_next_as_first_directive='<'getopt.h'>'
15163 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15164 gl_next_as_first_directive=$gl_cv_next_getopt_h
15166 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
15171 if test $ac_cv_header_getopt_h = yes; then
15180 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
15181 for ac_header in getopt.h
15183 ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
15184 if test "x$ac_cv_header_getopt_h" = xyes
15186 printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
15189 gl_replace_getopt=yes
15195 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
15197 for ac_func in getopt_long_only
15199 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
15200 if test "x$ac_cv_func_getopt_long_only" = xyes
15202 printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
15205 gl_replace_getopt=yes
15211 if test -z "$gl_replace_getopt"; then
15212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
15213 printf %s "checking whether getopt is POSIX compatible... " >&6; }
15214 if test ${gl_cv_func_getopt_posix+y}
15216 printf %s "(cached) " >&6
15219 if test $cross_compiling = no; then
15220 if test "$cross_compiling" = yes
15222 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15223 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15224 as_fn_error $? "cannot run test program while cross compiling
15225 See \`config.log' for more details" "$LINENO" 5; }
15227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15228 /* end confdefs.h. */
15230 #include <unistd.h>
15231 #include <stdlib.h>
15232 #include <string.h>
15237 static char program[] = "program";
15238 static char a[] = "-a";
15239 static char foo[] = "foo";
15240 static char bar[] = "bar";
15241 char *argv[] = { program, a, foo, bar, NULL };
15244 c = getopt (4, argv, "ab");
15247 c = getopt (4, argv, "ab");
15250 if (!(optind == 2))
15256 if ac_fn_c_try_run "$LINENO"
15258 gl_cv_func_getopt_posix=maybe
15260 gl_cv_func_getopt_posix=no
15262 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15263 conftest.$ac_objext conftest.beam conftest.$ac_ext
15266 if test $gl_cv_func_getopt_posix = maybe; then
15267 if test "$cross_compiling" = yes
15269 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15270 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15271 as_fn_error $? "cannot run test program while cross compiling
15272 See \`config.log' for more details" "$LINENO" 5; }
15274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15275 /* end confdefs.h. */
15277 #include <unistd.h>
15278 #include <stdlib.h>
15279 #include <string.h>
15284 static char program[] = "program";
15285 static char donald[] = "donald";
15286 static char p[] = "-p";
15287 static char billy[] = "billy";
15288 static char duck[] = "duck";
15289 static char a[] = "-a";
15290 static char bar[] = "bar";
15291 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
15294 c = getopt (7, argv, "+abp:q:");
15297 if (!(strcmp (argv[0], "program") == 0))
15299 if (!(strcmp (argv[1], "donald") == 0))
15301 if (!(strcmp (argv[2], "-p") == 0))
15303 if (!(strcmp (argv[3], "billy") == 0))
15305 if (!(strcmp (argv[4], "duck") == 0))
15307 if (!(strcmp (argv[5], "-a") == 0))
15309 if (!(strcmp (argv[6], "bar") == 0))
15311 if (!(optind == 1))
15317 if ac_fn_c_try_run "$LINENO"
15319 gl_cv_func_getopt_posix=maybe
15321 gl_cv_func_getopt_posix=no
15323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15324 conftest.$ac_objext conftest.beam conftest.$ac_ext
15328 if test $gl_cv_func_getopt_posix = maybe; then
15329 if test "$cross_compiling" = yes
15331 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15332 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15333 as_fn_error $? "cannot run test program while cross compiling
15334 See \`config.log' for more details" "$LINENO" 5; }
15336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15337 /* end confdefs.h. */
15339 #include <unistd.h>
15340 #include <stdlib.h>
15341 #include <string.h>
15346 static char program[] = "program";
15347 static char ab[] = "-ab";
15348 char *argv[3] = { program, ab, NULL };
15349 if (getopt (2, argv, "ab:") != 'a')
15351 if (getopt (2, argv, "ab:") != '?')
15361 if ac_fn_c_try_run "$LINENO"
15363 gl_cv_func_getopt_posix=yes
15365 gl_cv_func_getopt_posix=no
15367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15368 conftest.$ac_objext conftest.beam conftest.$ac_ext
15374 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
15375 *) gl_cv_func_getopt_posix="guessing yes";;
15380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
15381 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
15382 case "$gl_cv_func_getopt_posix" in
15383 *no) gl_replace_getopt=yes ;;
15387 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
15388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
15389 printf %s "checking for working GNU getopt function... " >&6; }
15390 if test ${gl_cv_func_getopt_gnu+y}
15392 printf %s "(cached) " >&6
15394 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
15395 # optstring is necessary for programs like m4 that have POSIX-mandated
15396 # semantics for supporting options interspersed with files.
15397 # Also, since getopt_long is a GNU extension, we require optind=0.
15398 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
15399 # so take care to revert to the correct (non-)export state.
15400 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
15401 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
15402 xx) gl_had_POSIXLY_CORRECT=exported ;;
15403 x) gl_had_POSIXLY_CORRECT=yes ;;
15404 *) gl_had_POSIXLY_CORRECT= ;;
15407 export POSIXLY_CORRECT
15408 if test "$cross_compiling" = yes
15410 gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
15413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15414 /* end confdefs.h. */
15415 #include <getopt.h>
15416 #include <stddef.h>
15417 #include <string.h>
15419 #include <stdlib.h>
15420 #if defined __MACH__ && defined __APPLE__
15421 /* Avoid a crash on Mac OS X. */
15422 #include <mach/mach.h>
15423 #include <mach/mach_error.h>
15424 #include <mach/thread_status.h>
15425 #include <mach/exception.h>
15426 #include <mach/task.h>
15427 #include <pthread.h>
15428 /* The exception port on which our thread listens. */
15429 static mach_port_t our_exception_port;
15430 /* The main function of the thread listening for exceptions of type
15433 mach_exception_thread (void *arg)
15435 /* Buffer for a message to be received. */
15437 mach_msg_header_t head;
15438 mach_msg_body_t msgh_body;
15441 mach_msg_return_t retval;
15442 /* Wait for a message on the exception port. */
15443 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
15444 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
15445 if (retval != MACH_MSG_SUCCESS)
15450 nocrash_init (void)
15452 mach_port_t self = mach_task_self ();
15453 /* Allocate a port on which the thread shall listen for exceptions. */
15454 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
15456 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
15457 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
15458 MACH_MSG_TYPE_MAKE_SEND)
15460 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
15462 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
15463 /* Create the thread listening on the exception port. */
15464 pthread_attr_t attr;
15466 if (pthread_attr_init (&attr) == 0
15467 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
15468 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
15469 pthread_attr_destroy (&attr);
15470 /* Replace the exception port info for these exceptions with our own.
15471 Note that we replace the exception port for the entire task, not only
15472 for a particular thread. This has the effect that when our exception
15473 port gets the message, the thread specific exception port has already
15474 been asked, and we don't need to bother about it.
15475 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
15476 task_set_exception_ports (self, mask, our_exception_port,
15477 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
15482 #elif defined _WIN32 && ! defined __CYGWIN__
15483 /* Avoid a crash on native Windows. */
15484 #define WIN32_LEAN_AND_MEAN
15485 #include <windows.h>
15486 #include <winerror.h>
15488 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
15490 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
15492 case EXCEPTION_ACCESS_VIOLATION:
15493 case EXCEPTION_IN_PAGE_ERROR:
15494 case EXCEPTION_STACK_OVERFLOW:
15495 case EXCEPTION_GUARD_PAGE:
15496 case EXCEPTION_PRIV_INSTRUCTION:
15497 case EXCEPTION_ILLEGAL_INSTRUCTION:
15498 case EXCEPTION_DATATYPE_MISALIGNMENT:
15499 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
15500 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
15503 return EXCEPTION_CONTINUE_SEARCH;
15506 nocrash_init (void)
15508 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
15511 /* Avoid a crash on POSIX systems. */
15512 #include <signal.h>
15513 #include <unistd.h>
15514 /* A POSIX signal handler. */
15516 exception_handler (int sig)
15521 nocrash_init (void)
15524 signal (SIGSEGV, exception_handler);
15527 signal (SIGBUS, exception_handler);
15541 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
15542 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
15543 OSF/1 5.1, Solaris 10. */
15545 static char conftest[] = "conftest";
15546 static char plus[] = "-+";
15547 char *argv[3] = { conftest, plus, NULL };
15549 if (getopt (2, argv, "+a") != '?')
15552 /* This code succeeds on glibc 2.8, mingw,
15553 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
15554 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
15556 static char program[] = "program";
15557 static char p[] = "-p";
15558 static char foo[] = "foo";
15559 static char bar[] = "bar";
15560 char *argv[] = { program, p, foo, bar, NULL };
15563 if (getopt (4, argv, "p::") != 'p')
15565 else if (optarg != NULL)
15567 else if (getopt (4, argv, "p::") != -1)
15569 else if (optind != 2)
15572 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
15574 static char program[] = "program";
15575 static char foo[] = "foo";
15576 static char p[] = "-p";
15577 char *argv[] = { program, foo, p, NULL };
15579 if (getopt (3, argv, "-p") != 1)
15581 else if (getopt (3, argv, "-p") != 'p')
15584 /* This code fails on glibc 2.11. */
15586 static char program[] = "program";
15587 static char b[] = "-b";
15588 static char a[] = "-a";
15589 char *argv[] = { program, b, a, NULL };
15590 optind = opterr = 0;
15591 if (getopt (3, argv, "+:a:b") != 'b')
15593 else if (getopt (3, argv, "+:a:b") != ':')
15596 /* This code dumps core on glibc 2.14. */
15598 static char program[] = "program";
15599 static char w[] = "-W";
15600 static char dummy[] = "dummy";
15601 char *argv[] = { program, w, dummy, NULL };
15602 optind = opterr = 1;
15603 if (getopt (3, argv, "W;") != 'W')
15612 if ac_fn_c_try_run "$LINENO"
15614 gl_cv_func_getopt_gnu=yes
15616 gl_cv_func_getopt_gnu=no
15618 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15619 conftest.$ac_objext conftest.beam conftest.$ac_ext
15622 case $gl_had_POSIXLY_CORRECT in
15624 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
15625 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
15629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
15630 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
15631 if test "$gl_cv_func_getopt_gnu" != yes; then
15632 gl_replace_getopt=yes
15634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
15635 printf %s "checking for working GNU getopt_long function... " >&6; }
15636 if test ${gl_cv_func_getopt_long_gnu+y}
15638 printf %s "(cached) " >&6
15640 if test "$cross_compiling" = yes
15643 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
15644 *) gl_cv_func_getopt_long_gnu="guessing yes";;
15648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15649 /* end confdefs.h. */
15650 #include <getopt.h>
15651 #include <stddef.h>
15652 #include <string.h>
15657 static const struct option long_options[] =
15659 { "xtremely-",no_argument, NULL, 1003 },
15660 { "xtra", no_argument, NULL, 1001 },
15661 { "xtreme", no_argument, NULL, 1002 },
15662 { "xtremely", no_argument, NULL, 1003 },
15663 { NULL, 0, NULL, 0 }
15665 /* This code fails on OpenBSD 5.0. */
15667 static char program[] = "program";
15668 static char xtremel[] = "--xtremel";
15669 char *argv[] = { program, xtremel, NULL };
15671 optind = 1; opterr = 0;
15672 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
15681 if ac_fn_c_try_run "$LINENO"
15683 gl_cv_func_getopt_long_gnu=yes
15685 gl_cv_func_getopt_long_gnu=no
15687 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15688 conftest.$ac_objext conftest.beam conftest.$ac_ext
15693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
15694 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
15695 case "$gl_cv_func_getopt_long_gnu" in
15697 *) gl_replace_getopt=yes ;;
15707 REPLACE_GETRANDOM=0;
15712 GL_M4_GNULIB_GETRANDOM=0
15720 if test -z "$gl_pthreadlib_body_done"; then
15724 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
15725 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
15726 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15727 if test "x$ac_cv_header_pthread_h" = xyes
15729 gl_have_pthread_h=yes
15731 gl_have_pthread_h=no
15734 if test "$gl_have_pthread_h" = yes; then
15735 # Other possible tests:
15736 # -lpthreads (FSU threads, PCthreads)
15738 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
15739 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
15740 # the second one only in libpthread, and lock.c needs it.
15742 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
15743 # needs -pthread for some reason. See:
15744 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
15746 for gl_pthread in '' '-pthread'; do
15747 LIBS="$LIBS $gl_pthread"
15748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15749 /* end confdefs.h. */
15750 #include <pthread.h>
15752 pthread_mutexattr_t ma;
15757 pthread_mutex_lock (&m);
15758 pthread_mutexattr_init (&ma);
15763 if ac_fn_c_try_link "$LINENO"
15766 LIBPTHREAD=$gl_pthread
15767 LIBPMULTITHREAD=$gl_pthread
15769 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15770 conftest$ac_exeext conftest.$ac_ext
15772 test $gl_pthread_api = yes && break
15775 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
15776 # since it is defined as a macro on OSF/1.)
15777 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
15778 # The program links fine without libpthread. But it may actually
15779 # need to link with libpthread in order to create multiple threads.
15780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15781 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15782 if test ${ac_cv_lib_pthread_pthread_kill+y}
15784 printf %s "(cached) " >&6
15786 ac_check_lib_save_LIBS=$LIBS
15787 LIBS="-lpthread $LIBS"
15788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15789 /* end confdefs.h. */
15791 /* Override any GCC internal prototype to avoid an error.
15792 Use char because int might match the return type of a GCC
15793 builtin and then its argument prototype would still apply. */
15794 char pthread_kill ();
15798 return pthread_kill ();
15803 if ac_fn_c_try_link "$LINENO"
15805 ac_cv_lib_pthread_pthread_kill=yes
15807 ac_cv_lib_pthread_pthread_kill=no
15809 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15810 conftest$ac_exeext conftest.$ac_ext
15811 LIBS=$ac_check_lib_save_LIBS
15813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15814 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15815 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15817 LIBPMULTITHREAD=-lpthread
15818 # On Solaris and HP-UX, most pthread functions exist also in libc.
15819 # Therefore pthread_in_use() needs to actually try to create a
15820 # thread: pthread_create from libc will fail, whereas
15821 # pthread_create will actually create a thread.
15822 # On Solaris 10 or newer, this test is no longer needed, because
15823 # libc contains the fully functional pthread functions.
15825 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
15827 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15833 elif test $gl_pthread_api != yes; then
15834 # Some library is needed. Try libpthread and libc_r.
15835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15836 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15837 if test ${ac_cv_lib_pthread_pthread_kill+y}
15839 printf %s "(cached) " >&6
15841 ac_check_lib_save_LIBS=$LIBS
15842 LIBS="-lpthread $LIBS"
15843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15844 /* end confdefs.h. */
15846 /* Override any GCC internal prototype to avoid an error.
15847 Use char because int might match the return type of a GCC
15848 builtin and then its argument prototype would still apply. */
15849 char pthread_kill ();
15853 return pthread_kill ();
15858 if ac_fn_c_try_link "$LINENO"
15860 ac_cv_lib_pthread_pthread_kill=yes
15862 ac_cv_lib_pthread_pthread_kill=no
15864 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15865 conftest$ac_exeext conftest.$ac_ext
15866 LIBS=$ac_check_lib_save_LIBS
15868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15869 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15870 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15873 LIBPTHREAD=-lpthread
15874 LIBPMULTITHREAD=-lpthread
15877 if test $gl_pthread_api != yes; then
15879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15880 printf %s "checking for pthread_kill in -lc_r... " >&6; }
15881 if test ${ac_cv_lib_c_r_pthread_kill+y}
15883 printf %s "(cached) " >&6
15885 ac_check_lib_save_LIBS=$LIBS
15887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15888 /* end confdefs.h. */
15890 /* Override any GCC internal prototype to avoid an error.
15891 Use char because int might match the return type of a GCC
15892 builtin and then its argument prototype would still apply. */
15893 char pthread_kill ();
15897 return pthread_kill ();
15902 if ac_fn_c_try_link "$LINENO"
15904 ac_cv_lib_c_r_pthread_kill=yes
15906 ac_cv_lib_c_r_pthread_kill=no
15908 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15909 conftest$ac_exeext conftest.$ac_ext
15910 LIBS=$ac_check_lib_save_LIBS
15912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15913 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
15914 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
15918 LIBPMULTITHREAD=-lc_r
15924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
15925 printf %s "checking whether POSIX threads API is available... " >&6; }
15926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
15927 printf "%s\n" "$gl_pthread_api" >&6; }
15930 if test $gl_pthread_api = yes; then
15932 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
15936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15937 /* end confdefs.h. */
15947 if ac_fn_c_try_link "$LINENO"
15952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
15953 printf %s "checking for sched_yield in -lrt... " >&6; }
15954 if test ${ac_cv_lib_rt_sched_yield+y}
15956 printf %s "(cached) " >&6
15958 ac_check_lib_save_LIBS=$LIBS
15960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15961 /* end confdefs.h. */
15963 /* Override any GCC internal prototype to avoid an error.
15964 Use char because int might match the return type of a GCC
15965 builtin and then its argument prototype would still apply. */
15966 char sched_yield ();
15970 return sched_yield ();
15975 if ac_fn_c_try_link "$LINENO"
15977 ac_cv_lib_rt_sched_yield=yes
15979 ac_cv_lib_rt_sched_yield=no
15981 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15982 conftest$ac_exeext conftest.$ac_ext
15983 LIBS=$ac_check_lib_save_LIBS
15985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
15986 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
15987 if test "x$ac_cv_lib_rt_sched_yield" = xyes
15989 LIB_SCHED_YIELD=-lrt
15991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
15992 printf %s "checking for sched_yield in -lposix4... " >&6; }
15993 if test ${ac_cv_lib_posix4_sched_yield+y}
15995 printf %s "(cached) " >&6
15997 ac_check_lib_save_LIBS=$LIBS
15998 LIBS="-lposix4 $LIBS"
15999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16000 /* end confdefs.h. */
16002 /* Override any GCC internal prototype to avoid an error.
16003 Use char because int might match the return type of a GCC
16004 builtin and then its argument prototype would still apply. */
16005 char sched_yield ();
16009 return sched_yield ();
16014 if ac_fn_c_try_link "$LINENO"
16016 ac_cv_lib_posix4_sched_yield=yes
16018 ac_cv_lib_posix4_sched_yield=no
16020 rm -f core conftest.err conftest.$ac_objext conftest.beam \
16021 conftest$ac_exeext conftest.$ac_ext
16022 LIBS=$ac_check_lib_save_LIBS
16024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
16025 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
16026 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
16028 LIB_SCHED_YIELD=-lposix4
16035 rm -f core conftest.err conftest.$ac_objext conftest.beam \
16036 conftest$ac_exeext conftest.$ac_ext
16039 gl_pthreadlib_body_done=done
16049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
16050 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
16051 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
16053 printf %s "(cached) " >&6
16056 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
16057 *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
16058 gl_cv_func_setlocale_null_all_mtsafe=no ;;
16059 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
16060 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
16061 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
16062 # If we don't know, obey --enable-cross-guesses.
16064 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
16068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
16069 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
16073 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
16074 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
16078 case "$gl_cv_func_setlocale_null_all_mtsafe" in
16079 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
16080 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
16083 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
16086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
16087 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
16088 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
16090 printf %s "(cached) " >&6
16093 # Guess no on OpenBSD, AIX.
16095 gl_cv_func_setlocale_null_one_mtsafe=no ;;
16096 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
16097 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
16098 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
16099 # If we don't know, obey --enable-cross-guesses.
16101 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
16105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
16106 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
16110 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
16111 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
16115 case "$gl_cv_func_setlocale_null_one_mtsafe" in
16116 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
16117 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
16120 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
16123 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
16125 mingw*) LIB_SETLOCALE_NULL= ;;
16129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
16130 printf %s "checking whether imported symbols can be declared weak... " >&6; }
16131 if test ${gl_cv_have_weak+y}
16133 printf %s "(cached) " >&6
16136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16137 /* end confdefs.h. */
16138 extern void xyzzy ();
16148 if ac_fn_c_try_link "$LINENO"
16150 gl_cv_have_weak=maybe
16152 rm -f core conftest.err conftest.$ac_objext conftest.beam \
16153 conftest$ac_exeext conftest.$ac_ext
16154 if test $gl_cv_have_weak = maybe; then
16155 if test "$cross_compiling" = yes
16157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16158 /* end confdefs.h. */
16160 Extensible Linking Format
16164 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16165 $EGREP "Extensible Linking Format" >/dev/null 2>&1
16167 gl_cv_have_weak="guessing yes"
16169 gl_cv_have_weak="guessing no"
16175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16176 /* end confdefs.h. */
16182 return (fputs == NULL);
16185 if ac_fn_c_try_run "$LINENO"
16187 gl_cv_have_weak=yes
16191 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16192 conftest.$ac_objext conftest.beam conftest.$ac_ext
16196 case " $LDFLAGS " in
16197 *" -static "*) gl_cv_have_weak=no ;;
16199 case "$gl_cv_have_weak" in
16202 freebsd* | dragonfly* | midnightbsd*)
16204 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
16205 cat <<EOF > conftest2.c
16206 #include <pthread.h>
16207 #pragma weak pthread_mutexattr_gettype
16210 return (pthread_mutexattr_gettype != NULL);
16213 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
16214 || gl_cv_have_weak=no
16215 rm -f conftest1.c libempty.so conftest2.c conftest
16222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
16223 printf "%s\n" "$gl_cv_have_weak" >&6; }
16224 case "$gl_cv_have_weak" in
16227 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
16232 case "$gl_cv_have_weak" in
16233 *yes) LIB_SETLOCALE_NULL= ;;
16234 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
16239 LIB_SETLOCALE_NULL=
16244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16245 /* end confdefs.h. */
16252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16253 $EGREP "MicrosoftCompiler" >/dev/null 2>&1
16256 echo 'int dummy;' > conftest.c
16257 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
16258 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16259 (eval $ac_try) 2>&5
16261 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16262 test $ac_status = 0; }; } >/dev/null 2>&1
16263 if test -f conftest.o; then
16268 gl_c_asm_opt='-c -Fa'
16283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
16284 printf %s "checking host CPU and C ABI... " >&6; }
16285 if test ${gl_cv_host_cpu_c_abi+y}
16287 printf %s "(cached) " >&6
16289 case "$host_cpu" in
16292 gl_cv_host_cpu_c_abi=i386
16296 # On x86_64 systems, the C compiler may be generating code in one of
16298 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
16299 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
16300 # with native Windows (mingw, MSVC).
16301 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
16302 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
16303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16304 /* end confdefs.h. */
16305 #if (defined __x86_64__ || defined __amd64__ \
16306 || defined _M_X64 || defined _M_AMD64)
16313 if ac_fn_c_try_compile "$LINENO"
16315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16316 /* end confdefs.h. */
16317 #if defined __ILP32__ || defined _ILP32
16324 if ac_fn_c_try_compile "$LINENO"
16326 gl_cv_host_cpu_c_abi=x86_64-x32
16328 gl_cv_host_cpu_c_abi=x86_64
16330 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16332 gl_cv_host_cpu_c_abi=i386
16334 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16337 alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
16338 gl_cv_host_cpu_c_abi=alpha
16342 # Assume arm with EABI.
16343 # On arm64 systems, the C compiler may be generating code in one of
16345 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
16346 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
16347 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
16348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16349 /* end confdefs.h. */
16357 if ac_fn_c_try_compile "$LINENO"
16359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16360 /* end confdefs.h. */
16361 #if defined __ILP32__ || defined _ILP32
16368 if ac_fn_c_try_compile "$LINENO"
16370 gl_cv_host_cpu_c_abi=arm64-ilp32
16372 gl_cv_host_cpu_c_abi=arm64
16374 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16376 # Don't distinguish little-endian and big-endian arm, since they
16377 # don't require different machine code for simple operations and
16378 # since the user can distinguish them through the preprocessor
16379 # defines __ARMEL__ vs. __ARMEB__.
16380 # But distinguish arm which passes floating-point arguments and
16381 # return values in integer registers (r0, r1, ...) - this is
16382 # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
16383 # passes them in float registers (s0, s1, ...) and double registers
16384 # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
16385 # sets the preprocessor defines __ARM_PCS (for the first case) and
16386 # __ARM_PCS_VFP (for the second case), but older GCC does not.
16387 echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
16388 # Look for a reference to the register d0 in the .s file.
16389 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
16390 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16391 (eval $ac_try) 2>&5
16393 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16394 test $ac_status = 0; }; } >/dev/null 2>&1
16395 if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
16396 gl_cv_host_cpu_c_abi=armhf
16398 gl_cv_host_cpu_c_abi=arm
16403 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16406 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
16407 # On hppa, the C compiler may be generating 32-bit code or 64-bit
16408 # code. In the latter case, it defines _LP64 and __LP64__.
16409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16410 /* end confdefs.h. */
16418 if ac_fn_c_try_compile "$LINENO"
16420 gl_cv_host_cpu_c_abi=hppa64
16422 gl_cv_host_cpu_c_abi=hppa
16424 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16428 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
16429 # 32-bit code. In the latter case, it defines _ILP32.
16430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16431 /* end confdefs.h. */
16439 if ac_fn_c_try_compile "$LINENO"
16441 gl_cv_host_cpu_c_abi=ia64-ilp32
16443 gl_cv_host_cpu_c_abi=ia64
16445 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16449 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
16451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16452 /* end confdefs.h. */
16453 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
16460 if ac_fn_c_try_compile "$LINENO"
16462 gl_cv_host_cpu_c_abi=mips64
16464 # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
16465 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
16466 # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
16467 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
16468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16469 /* end confdefs.h. */
16470 #if (_MIPS_SIM == _ABIN32)
16477 if ac_fn_c_try_compile "$LINENO"
16479 gl_cv_host_cpu_c_abi=mipsn32
16481 gl_cv_host_cpu_c_abi=mips
16483 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16485 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16489 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
16490 # No need to distinguish them here; the caller may distinguish
16491 # them based on the OS.
16492 # On powerpc64 systems, the C compiler may still be generating
16493 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
16494 # be generating 64-bit code.
16495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16496 /* end confdefs.h. */
16497 #if defined __powerpc64__ || defined __LP64__
16504 if ac_fn_c_try_compile "$LINENO"
16506 # On powerpc64, there are two ABIs on Linux: The AIX compatible
16507 # one and the ELFv2 one. The latter defines _CALL_ELF=2.
16508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16509 /* end confdefs.h. */
16510 #if defined _CALL_ELF && _CALL_ELF == 2
16517 if ac_fn_c_try_compile "$LINENO"
16519 gl_cv_host_cpu_c_abi=powerpc64-elfv2
16521 gl_cv_host_cpu_c_abi=powerpc64
16523 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16526 gl_cv_host_cpu_c_abi=powerpc
16528 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16532 gl_cv_host_cpu_c_abi=powerpc
16535 riscv32 | riscv64 )
16536 # There are 2 architectures (with variants): rv32* and rv64*.
16537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16538 /* end confdefs.h. */
16539 #if __riscv_xlen == 64
16546 if ac_fn_c_try_compile "$LINENO"
16552 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16553 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
16554 # Size of 'long' and 'void *':
16555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16556 /* end confdefs.h. */
16557 #if defined __LP64__
16564 if ac_fn_c_try_compile "$LINENO"
16570 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16572 # __riscv_float_abi_double:
16573 # 'float' and 'double' are passed in floating-point registers.
16574 # __riscv_float_abi_single:
16575 # 'float' are passed in floating-point registers.
16576 # __riscv_float_abi_soft:
16577 # No values are passed in floating-point registers.
16578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16579 /* end confdefs.h. */
16580 #if defined __riscv_float_abi_double
16587 if ac_fn_c_try_compile "$LINENO"
16591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16592 /* end confdefs.h. */
16593 #if defined __riscv_float_abi_single
16600 if ac_fn_c_try_compile "$LINENO"
16606 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16609 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16610 gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
16614 # On s390x, the C compiler may be generating 64-bit (= s390x) code
16615 # or 31-bit (= s390) code.
16616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16617 /* end confdefs.h. */
16618 #if defined __LP64__ || defined __s390x__
16625 if ac_fn_c_try_compile "$LINENO"
16627 gl_cv_host_cpu_c_abi=s390x
16629 gl_cv_host_cpu_c_abi=s390
16631 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16635 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
16636 # C compiler still generates 32-bit code.
16637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16638 /* end confdefs.h. */
16639 #if defined __sparcv9 || defined __arch64__
16646 if ac_fn_c_try_compile "$LINENO"
16648 gl_cv_host_cpu_c_abi=sparc64
16650 gl_cv_host_cpu_c_abi=sparc
16652 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16656 gl_cv_host_cpu_c_abi="$host_cpu"
16661 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
16662 printf "%s\n" "$gl_cv_host_cpu_c_abi" >&6; }
16664 HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
16665 HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
16670 # AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
16671 # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
16672 # earlier, but KAI C++ 3.2d doesn't like this.
16673 sed -e 's/-/_/g' >> confdefs.h <<EOF
16674 #ifndef __${HOST_CPU}__
16675 #define __${HOST_CPU}__ 1
16677 #ifndef __${HOST_CPU_C_ABI}__
16678 #define __${HOST_CPU_C_ABI}__ 1
16685 if test "X$prefix" = "XNONE"; then
16686 acl_final_prefix="$ac_default_prefix"
16688 acl_final_prefix="$prefix"
16690 if test "X$exec_prefix" = "XNONE"; then
16691 acl_final_exec_prefix='${prefix}'
16693 acl_final_exec_prefix="$exec_prefix"
16695 acl_save_prefix="$prefix"
16696 prefix="$acl_final_prefix"
16697 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
16698 prefix="$acl_save_prefix"
16702 # Check whether --with-gnu-ld was given.
16703 if test ${with_gnu_ld+y}
16705 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
16710 # Prepare PATH_SEPARATOR.
16711 # The user is always right.
16712 if test "${PATH_SEPARATOR+set}" != set; then
16713 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
16714 # contains only /bin. Note that ksh looks also at the FPATH variable,
16715 # so we have to set that as well for the test.
16717 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
16718 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
16719 || PATH_SEPARATOR=';'
16723 if test -n "$LD"; then
16724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
16725 printf %s "checking for ld... " >&6; }
16726 elif test "$GCC" = yes; then
16727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
16728 printf %s "checking for ld used by $CC... " >&6; }
16729 elif test "$with_gnu_ld" = yes; then
16730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
16731 printf %s "checking for GNU ld... " >&6; }
16733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
16734 printf %s "checking for non-GNU ld... " >&6; }
16736 if test -n "$LD"; then
16737 # Let the user override the test with a path.
16740 if test ${acl_cv_path_LD+y}
16742 printf %s "(cached) " >&6
16745 acl_cv_path_LD= # Final result of this test
16746 ac_prog=ld # Program to search in $PATH
16747 if test "$GCC" = yes; then
16748 # Check if gcc -print-prog-name=ld gives a path.
16751 # gcc leaves a trailing carriage return which upsets mingw
16752 acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
16754 acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
16756 case $acl_output in
16757 # Accept absolute paths.
16759 re_direlt='/[^/][^/]*/\.\./'
16760 # Canonicalize the pathname of ld
16761 acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
16762 while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
16763 acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
16765 # Got the pathname. No search in PATH is needed.
16766 acl_cv_path_LD="$acl_output"
16770 # If it fails, then pretend we aren't using GCC.
16773 # If it is relative, then search for the first ld in PATH.
16774 with_gnu_ld=unknown
16778 if test -n "$ac_prog"; then
16779 # Search for $ac_prog in $PATH.
16780 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16781 for ac_dir in $PATH; do
16782 IFS="$acl_save_ifs"
16783 test -z "$ac_dir" && ac_dir=.
16784 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
16785 acl_cv_path_LD="$ac_dir/$ac_prog"
16786 # Check to see if the program is GNU ld. I'd rather use --version,
16787 # but apparently some variants of GNU ld only accept -v.
16788 # Break only if it was the GNU/non-GNU ld that we prefer.
16789 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
16790 *GNU* | *'with BFD'*)
16791 test "$with_gnu_ld" != no && break
16794 test "$with_gnu_ld" != yes && break
16799 IFS="$acl_save_ifs"
16803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16804 /* end confdefs.h. */
16805 #if defined __powerpc64__ || defined __LP64__
16812 if ac_fn_c_try_compile "$LINENO"
16814 # The compiler produces 64-bit code. Add option '-b64' so that the
16815 # linker groks 64-bit object files.
16816 case "$acl_cv_path_LD " in
16818 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
16822 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16826 /* end confdefs.h. */
16827 #if defined __sparcv9 || defined __arch64__
16834 if ac_fn_c_try_compile "$LINENO"
16838 # The compiler produces 32-bit code. Add option '-m elf32_sparc'
16839 # so that the linker groks 32-bit object files.
16840 case "$acl_cv_path_LD " in
16841 *" -m elf32_sparc "*) ;;
16842 *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
16846 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16852 LD="$acl_cv_path_LD"
16854 if test -n "$LD"; then
16855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
16856 printf "%s\n" "$LD" >&6; }
16858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16859 printf "%s\n" "no" >&6; }
16860 as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
16862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
16863 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
16864 if test ${acl_cv_prog_gnu_ld+y}
16866 printf %s "(cached) " >&6
16868 # I'd rather use --version here, but apparently some GNU lds only accept -v.
16869 case `$LD -v 2>&1 </dev/null` in
16870 *GNU* | *'with BFD'*)
16871 acl_cv_prog_gnu_ld=yes
16874 acl_cv_prog_gnu_ld=no
16878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
16879 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
16880 with_gnu_ld=$acl_cv_prog_gnu_ld
16886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
16887 printf %s "checking for shared library run path origin... " >&6; }
16888 if test ${acl_cv_rpath+y}
16890 printf %s "(cached) " >&6
16893 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
16894 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
16896 rm -f ./conftest.sh
16900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
16901 printf "%s\n" "$acl_cv_rpath" >&6; }
16903 acl_libext="$acl_cv_libext"
16904 acl_shlibext="$acl_cv_shlibext"
16905 acl_libname_spec="$acl_cv_libname_spec"
16906 acl_library_names_spec="$acl_cv_library_names_spec"
16907 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
16908 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
16909 acl_hardcode_direct="$acl_cv_hardcode_direct"
16910 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
16911 # Check whether --enable-rpath was given.
16912 if test ${enable_rpath+y}
16914 enableval=$enable_rpath; :
16922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
16923 printf %s "checking 32-bit host C ABI... " >&6; }
16924 if test ${gl_cv_host_cpu_c_abi_32bit+y}
16926 printf %s "(cached) " >&6
16928 if test -n "$gl_cv_host_cpu_c_abi"; then
16929 case "$gl_cv_host_cpu_c_abi" in
16930 i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
16931 gl_cv_host_cpu_c_abi_32bit=yes ;;
16932 x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
16933 gl_cv_host_cpu_c_abi_32bit=no ;;
16935 gl_cv_host_cpu_c_abi_32bit=unknown ;;
16938 case "$host_cpu" in
16940 # CPUs that only support a 32-bit ABI.
16949 | microblaze | microblazeel \
16950 | nds32 | nds32le | nds32be \
16951 | nios2 | nios2eb | nios2el \
16954 | sh | sh1234 | sh1234elb \
16957 gl_cv_host_cpu_c_abi_32bit=yes
16960 # CPUs that only support a 64-bit ABI.
16961 alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
16963 gl_cv_host_cpu_c_abi_32bit=no
16967 gl_cv_host_cpu_c_abi_32bit=yes
16971 # On x86_64 systems, the C compiler may be generating code in one of
16973 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
16974 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
16975 # with native Windows (mingw, MSVC).
16976 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
16977 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
16978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16979 /* end confdefs.h. */
16980 #if (defined __x86_64__ || defined __amd64__ \
16981 || defined _M_X64 || defined _M_AMD64) \
16982 && !(defined __ILP32__ || defined _ILP32)
16989 if ac_fn_c_try_compile "$LINENO"
16991 gl_cv_host_cpu_c_abi_32bit=no
16993 gl_cv_host_cpu_c_abi_32bit=yes
16995 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16999 # Assume arm with EABI.
17000 # On arm64 systems, the C compiler may be generating code in one of
17002 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
17003 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
17004 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
17005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17006 /* end confdefs.h. */
17007 #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
17014 if ac_fn_c_try_compile "$LINENO"
17016 gl_cv_host_cpu_c_abi_32bit=no
17018 gl_cv_host_cpu_c_abi_32bit=yes
17020 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17023 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
17024 # On hppa, the C compiler may be generating 32-bit code or 64-bit
17025 # code. In the latter case, it defines _LP64 and __LP64__.
17026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17027 /* end confdefs.h. */
17035 if ac_fn_c_try_compile "$LINENO"
17037 gl_cv_host_cpu_c_abi_32bit=no
17039 gl_cv_host_cpu_c_abi_32bit=yes
17041 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17045 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
17046 # 32-bit code. In the latter case, it defines _ILP32.
17047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17048 /* end confdefs.h. */
17056 if ac_fn_c_try_compile "$LINENO"
17058 gl_cv_host_cpu_c_abi_32bit=yes
17060 gl_cv_host_cpu_c_abi_32bit=no
17062 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17066 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
17068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17069 /* end confdefs.h. */
17070 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
17077 if ac_fn_c_try_compile "$LINENO"
17079 gl_cv_host_cpu_c_abi_32bit=no
17081 gl_cv_host_cpu_c_abi_32bit=yes
17083 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17087 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
17088 # No need to distinguish them here; the caller may distinguish
17089 # them based on the OS.
17090 # On powerpc64 systems, the C compiler may still be generating
17091 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
17092 # be generating 64-bit code.
17093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17094 /* end confdefs.h. */
17095 #if defined __powerpc64__ || defined __LP64__
17102 if ac_fn_c_try_compile "$LINENO"
17104 gl_cv_host_cpu_c_abi_32bit=no
17106 gl_cv_host_cpu_c_abi_32bit=yes
17108 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17112 gl_cv_host_cpu_c_abi_32bit=yes
17115 riscv32 | riscv64 )
17116 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
17117 # Size of 'long' and 'void *':
17118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17119 /* end confdefs.h. */
17120 #if defined __LP64__
17127 if ac_fn_c_try_compile "$LINENO"
17129 gl_cv_host_cpu_c_abi_32bit=no
17131 gl_cv_host_cpu_c_abi_32bit=yes
17133 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17137 # On s390x, the C compiler may be generating 64-bit (= s390x) code
17138 # or 31-bit (= s390) code.
17139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17140 /* end confdefs.h. */
17141 #if defined __LP64__ || defined __s390x__
17148 if ac_fn_c_try_compile "$LINENO"
17150 gl_cv_host_cpu_c_abi_32bit=no
17152 gl_cv_host_cpu_c_abi_32bit=yes
17154 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17158 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
17159 # C compiler still generates 32-bit code.
17160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17161 /* end confdefs.h. */
17162 #if defined __sparcv9 || defined __arch64__
17169 if ac_fn_c_try_compile "$LINENO"
17171 gl_cv_host_cpu_c_abi_32bit=no
17173 gl_cv_host_cpu_c_abi_32bit=yes
17175 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17179 gl_cv_host_cpu_c_abi_32bit=unknown
17185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
17186 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
17188 HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
17194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
17195 printf %s "checking for ELF binary format... " >&6; }
17196 if test ${gl_cv_elf+y}
17198 printf %s "(cached) " >&6
17200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17201 /* end confdefs.h. */
17203 Extensible Linking Format
17207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17208 $EGREP "Extensible Linking Format" >/dev/null 2>&1
17218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
17219 printf "%s\n" "$gl_cv_elf" >&6; }
17220 if test $gl_cv_elf = yes; then
17221 # Extract the ELF class of a file (5th byte) in decimal.
17222 # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
17223 if od -A x < /dev/null >/dev/null 2>/dev/null; then
17227 od -A n -t d1 -j 4 -N 1
17233 dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
17237 # Use 'expr', not 'test', to compare the values of func_elfclass, because on
17238 # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002,
17240 case $HOST_CPU_C_ABI_32BIT in
17243 acl_is_expected_elfclass ()
17245 expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null
17250 acl_is_expected_elfclass ()
17252 expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null
17257 acl_is_expected_elfclass ()
17264 acl_is_expected_elfclass ()
17270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
17271 printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
17272 if test ${acl_cv_libdirstems+y}
17274 printf %s "(cached) " >&6
17281 if test $HOST_CPU_C_ABI_32BIT = no; then
17282 acl_libdirstem2=lib/64
17283 case "$host_cpu" in
17284 sparc*) acl_libdirstem3=lib/sparcv9 ;;
17285 i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
17290 searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
17291 | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
17292 if test $HOST_CPU_C_ABI_32BIT != no; then
17293 # 32-bit or unknown ABI.
17294 if test -d /usr/lib32; then
17295 acl_libdirstem2=lib32
17298 if test $HOST_CPU_C_ABI_32BIT != yes; then
17299 # 64-bit or unknown ABI.
17300 if test -d /usr/lib64; then
17301 acl_libdirstem3=lib64
17304 if test -n "$searchpath"; then
17305 acl_save_IFS="${IFS= }"; IFS=":"
17306 for searchdir in $searchpath; do
17307 if test -d "$searchdir"; then
17308 case "$searchdir" in
17309 */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
17310 */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
17312 # Better ignore directories of this form. They are misleading.
17314 *) searchdir=`cd "$searchdir" && pwd`
17315 case "$searchdir" in
17316 */lib32 ) acl_libdirstem2=lib32 ;;
17317 */lib64 ) acl_libdirstem3=lib64 ;;
17322 IFS="$acl_save_IFS"
17323 if test $HOST_CPU_C_ABI_32BIT = yes; then
17327 if test $HOST_CPU_C_ABI_32BIT = no; then
17334 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
17335 test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
17336 acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
17339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
17340 printf "%s\n" "$acl_cv_libdirstems" >&6; }
17341 acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
17342 acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
17343 acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
17357 acl_save_prefix="$prefix"
17358 prefix="$acl_final_prefix"
17359 acl_save_exec_prefix="$exec_prefix"
17360 exec_prefix="$acl_final_exec_prefix"
17362 eval additional_includedir=\"$includedir\"
17363 eval additional_libdir=\"$libdir\"
17364 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
17365 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
17367 exec_prefix="$acl_save_exec_prefix"
17368 prefix="$acl_save_prefix"
17371 # Check whether --with-libiconv-prefix was given.
17372 if test ${with_libiconv_prefix+y}
17374 withval=$with_libiconv_prefix;
17375 if test "X$withval" = "Xno"; then
17378 if test "X$withval" = "X"; then
17380 acl_save_prefix="$prefix"
17381 prefix="$acl_final_prefix"
17382 acl_save_exec_prefix="$exec_prefix"
17383 exec_prefix="$acl_final_exec_prefix"
17385 eval additional_includedir=\"$includedir\"
17386 eval additional_libdir=\"$libdir\"
17387 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
17388 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
17390 exec_prefix="$acl_save_exec_prefix"
17391 prefix="$acl_save_prefix"
17394 additional_includedir="$withval/include"
17395 additional_libdir="$withval/$acl_libdirstem"
17396 additional_libdir2="$withval/$acl_libdirstem2"
17397 additional_libdir3="$withval/$acl_libdirstem3"
17403 if test "X$additional_libdir2" = "X$additional_libdir"; then
17404 additional_libdir2=
17406 if test "X$additional_libdir3" = "X$additional_libdir"; then
17407 additional_libdir3=
17416 names_already_handled=
17417 names_next_round='iconv '
17418 while test -n "$names_next_round"; do
17419 names_this_round="$names_next_round"
17421 for name in $names_this_round; do
17423 for n in $names_already_handled; do
17424 if test "$n" = "$name"; then
17425 already_handled=yes
17429 if test -z "$already_handled"; then
17430 names_already_handled="$names_already_handled $name"
17431 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
17432 eval value=\"\$HAVE_LIB$uppername\"
17433 if test -n "$value"; then
17434 if test "$value" = yes; then
17435 eval value=\"\$LIB$uppername\"
17436 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
17437 eval value=\"\$LTLIB$uppername\"
17438 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
17447 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
17448 if test -n "$acl_shlibext"; then
17449 shrext=".$acl_shlibext" # typically: shrext=.so
17453 if test $use_additional = yes; then
17454 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
17455 if test "X$found_dir" = "X"; then
17456 eval dir=\$$additional_libdir_variable
17457 if test -n "$dir"; then
17458 if test -n "$acl_shlibext"; then
17459 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
17461 found_so="$dir/$libname$shrext"
17463 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
17464 ver=`(cd "$dir" && \
17465 for f in "$libname$shrext".*; do echo "$f"; done \
17466 | sed -e "s,^$libname$shrext\\\\.,," \
17467 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
17468 | sed 1q ) 2>/dev/null`
17469 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
17471 found_so="$dir/$libname$shrext.$ver"
17474 eval library_names=\"$acl_library_names_spec\"
17475 for f in $library_names; do
17476 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
17485 if test "X$found_dir" = "X"; then
17486 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
17488 found_a="$dir/$libname.$acl_libext"
17491 if test "X$found_dir" != "X"; then
17492 if test -f "$dir/$libname.la"; then
17493 found_la="$dir/$libname.la"
17500 if test "X$found_dir" = "X"; then
17501 for x in $LDFLAGS $LTLIBICONV; do
17503 acl_save_prefix="$prefix"
17504 prefix="$acl_final_prefix"
17505 acl_save_exec_prefix="$exec_prefix"
17506 exec_prefix="$acl_final_exec_prefix"
17508 exec_prefix="$acl_save_exec_prefix"
17509 prefix="$acl_save_prefix"
17513 dir=`echo "X$x" | sed -e 's/^X-L//'`
17514 if test -n "$acl_shlibext"; then
17515 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
17517 found_so="$dir/$libname$shrext"
17519 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
17520 ver=`(cd "$dir" && \
17521 for f in "$libname$shrext".*; do echo "$f"; done \
17522 | sed -e "s,^$libname$shrext\\\\.,," \
17523 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
17524 | sed 1q ) 2>/dev/null`
17525 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
17527 found_so="$dir/$libname$shrext.$ver"
17530 eval library_names=\"$acl_library_names_spec\"
17531 for f in $library_names; do
17532 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
17541 if test "X$found_dir" = "X"; then
17542 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
17544 found_a="$dir/$libname.$acl_libext"
17547 if test "X$found_dir" != "X"; then
17548 if test -f "$dir/$libname.la"; then
17549 found_la="$dir/$libname.la"
17554 if test "X$found_dir" != "X"; then
17559 if test "X$found_dir" != "X"; then
17560 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
17561 if test "X$found_so" != "X"; then
17562 if test "$enable_rpath" = no \
17563 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
17564 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
17565 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
17566 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17569 for x in $ltrpathdirs; do
17570 if test "X$x" = "X$found_dir"; then
17575 if test -z "$haveit"; then
17576 ltrpathdirs="$ltrpathdirs $found_dir"
17578 if test "$acl_hardcode_direct" = yes; then
17579 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17581 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
17582 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17584 for x in $rpathdirs; do
17585 if test "X$x" = "X$found_dir"; then
17590 if test -z "$haveit"; then
17591 rpathdirs="$rpathdirs $found_dir"
17595 for x in $LDFLAGS $LIBICONV; do
17597 acl_save_prefix="$prefix"
17598 prefix="$acl_final_prefix"
17599 acl_save_exec_prefix="$exec_prefix"
17600 exec_prefix="$acl_final_exec_prefix"
17602 exec_prefix="$acl_save_exec_prefix"
17603 prefix="$acl_save_prefix"
17605 if test "X$x" = "X-L$found_dir"; then
17610 if test -z "$haveit"; then
17611 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
17613 if test "$acl_hardcode_minus_L" != no; then
17614 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
17616 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
17622 if test "X$found_a" != "X"; then
17623 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
17625 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
17628 additional_includedir=
17629 case "$found_dir" in
17630 */$acl_libdirstem | */$acl_libdirstem/)
17631 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
17632 if test "$name" = 'iconv'; then
17633 LIBICONV_PREFIX="$basedir"
17635 additional_includedir="$basedir/include"
17637 */$acl_libdirstem2 | */$acl_libdirstem2/)
17638 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
17639 if test "$name" = 'iconv'; then
17640 LIBICONV_PREFIX="$basedir"
17642 additional_includedir="$basedir/include"
17644 */$acl_libdirstem3 | */$acl_libdirstem3/)
17645 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
17646 if test "$name" = 'iconv'; then
17647 LIBICONV_PREFIX="$basedir"
17649 additional_includedir="$basedir/include"
17652 if test "X$additional_includedir" != "X"; then
17653 if test "X$additional_includedir" != "X/usr/include"; then
17655 if test "X$additional_includedir" = "X/usr/local/include"; then
17656 if test -n "$GCC"; then
17658 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
17662 if test -z "$haveit"; then
17663 for x in $CPPFLAGS $INCICONV; do
17665 acl_save_prefix="$prefix"
17666 prefix="$acl_final_prefix"
17667 acl_save_exec_prefix="$exec_prefix"
17668 exec_prefix="$acl_final_exec_prefix"
17670 exec_prefix="$acl_save_exec_prefix"
17671 prefix="$acl_save_prefix"
17673 if test "X$x" = "X-I$additional_includedir"; then
17678 if test -z "$haveit"; then
17679 if test -d "$additional_includedir"; then
17680 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
17686 if test -n "$found_la"; then
17687 save_libdir="$libdir"
17688 case "$found_la" in
17689 */* | *\\*) . "$found_la" ;;
17690 *) . "./$found_la" ;;
17692 libdir="$save_libdir"
17693 for dep in $dependency_libs; do
17696 dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17697 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
17698 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
17699 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
17701 if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
17702 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
17703 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
17704 if test -n "$GCC"; then
17706 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
17710 if test -z "$haveit"; then
17712 for x in $LDFLAGS $LIBICONV; do
17714 acl_save_prefix="$prefix"
17715 prefix="$acl_final_prefix"
17716 acl_save_exec_prefix="$exec_prefix"
17717 exec_prefix="$acl_final_exec_prefix"
17719 exec_prefix="$acl_save_exec_prefix"
17720 prefix="$acl_save_prefix"
17722 if test "X$x" = "X-L$dependency_libdir"; then
17727 if test -z "$haveit"; then
17728 if test -d "$dependency_libdir"; then
17729 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
17733 for x in $LDFLAGS $LTLIBICONV; do
17735 acl_save_prefix="$prefix"
17736 prefix="$acl_final_prefix"
17737 acl_save_exec_prefix="$exec_prefix"
17738 exec_prefix="$acl_final_exec_prefix"
17740 exec_prefix="$acl_save_exec_prefix"
17741 prefix="$acl_save_prefix"
17743 if test "X$x" = "X-L$dependency_libdir"; then
17748 if test -z "$haveit"; then
17749 if test -d "$dependency_libdir"; then
17750 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
17757 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17758 if test "$enable_rpath" != no; then
17760 for x in $rpathdirs; do
17761 if test "X$x" = "X$dir"; then
17766 if test -z "$haveit"; then
17767 rpathdirs="$rpathdirs $dir"
17770 for x in $ltrpathdirs; do
17771 if test "X$x" = "X$dir"; then
17776 if test -z "$haveit"; then
17777 ltrpathdirs="$ltrpathdirs $dir"
17782 dep=`echo "X$dep" | sed -e 's/^X-l//'`
17783 if test "X$dep" != Xc \
17784 || case $host_os in
17785 linux* | gnu* | k*bsd*-gnu) false ;;
17788 names_next_round="$names_next_round $dep"
17792 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17795 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
17796 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
17802 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
17803 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
17809 if test "X$rpathdirs" != "X"; then
17810 if test -n "$acl_hardcode_libdir_separator"; then
17812 for found_dir in $rpathdirs; do
17813 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
17815 acl_save_libdir="$libdir"
17817 eval flag=\"$acl_hardcode_libdir_flag_spec\"
17818 libdir="$acl_save_libdir"
17819 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
17821 for found_dir in $rpathdirs; do
17822 acl_save_libdir="$libdir"
17823 libdir="$found_dir"
17824 eval flag=\"$acl_hardcode_libdir_flag_spec\"
17825 libdir="$acl_save_libdir"
17826 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
17830 if test "X$ltrpathdirs" != "X"; then
17831 for found_dir in $ltrpathdirs; do
17832 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
17845 REPLACE_ICONV_OPEN=0;
17846 REPLACE_ICONV_UTF=0;
17848 if test "$CXX" != no; then
17852 if test -n "$ICONV_H"; then
17853 GL_GENERATE_ICONV_H_TRUE=
17854 GL_GENERATE_ICONV_H_FALSE='#'
17856 GL_GENERATE_ICONV_H_TRUE='#'
17857 GL_GENERATE_ICONV_H_FALSE=
17866 am_save_CPPFLAGS="$CPPFLAGS"
17868 for element in $INCICONV; do
17870 for x in $CPPFLAGS; do
17872 acl_save_prefix="$prefix"
17873 prefix="$acl_final_prefix"
17874 acl_save_exec_prefix="$exec_prefix"
17875 exec_prefix="$acl_final_exec_prefix"
17877 exec_prefix="$acl_save_exec_prefix"
17878 prefix="$acl_save_prefix"
17880 if test "X$x" = "X$element"; then
17885 if test -z "$haveit"; then
17886 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
17892 printf %s "checking for iconv... " >&6; }
17893 if test ${am_cv_func_iconv+y}
17895 printf %s "(cached) " >&6
17898 am_cv_func_iconv="no, consider installing GNU libiconv"
17900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17901 /* end confdefs.h. */
17903 #include <stdlib.h>
17909 iconv_t cd = iconv_open("","");
17910 iconv(cd,NULL,NULL,NULL,NULL);
17916 if ac_fn_c_try_link "$LINENO"
17918 am_cv_func_iconv=yes
17920 rm -f core conftest.err conftest.$ac_objext conftest.beam \
17921 conftest$ac_exeext conftest.$ac_ext
17922 if test "$am_cv_func_iconv" != yes; then
17923 am_save_LIBS="$LIBS"
17924 LIBS="$LIBS $LIBICONV"
17925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17926 /* end confdefs.h. */
17928 #include <stdlib.h>
17934 iconv_t cd = iconv_open("","");
17935 iconv(cd,NULL,NULL,NULL,NULL);
17941 if ac_fn_c_try_link "$LINENO"
17943 am_cv_lib_iconv=yes
17944 am_cv_func_iconv=yes
17946 rm -f core conftest.err conftest.$ac_objext conftest.beam \
17947 conftest$ac_exeext conftest.$ac_ext
17948 LIBS="$am_save_LIBS"
17952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
17953 printf "%s\n" "$am_cv_func_iconv" >&6; }
17954 if test "$am_cv_func_iconv" = yes; then
17955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
17956 printf %s "checking for working iconv... " >&6; }
17957 if test ${am_cv_func_iconv_works+y}
17959 printf %s "(cached) " >&6
17962 am_save_LIBS="$LIBS"
17963 if test $am_cv_lib_iconv = yes; then
17964 LIBS="$LIBS $LIBICONV"
17966 am_cv_func_iconv_works=no
17967 for ac_iconv_const in '' 'const'; do
17968 if test "$cross_compiling" = yes
17971 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
17972 *) am_cv_func_iconv_works="guessing yes" ;;
17975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17976 /* end confdefs.h. */
17979 #include <string.h>
17981 #ifndef ICONV_CONST
17982 # define ICONV_CONST $ac_iconv_const
17989 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
17990 successful returns. This is even documented in
17991 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
17993 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
17994 if (cd_utf8_to_88591 != (iconv_t)(-1))
17996 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
17998 ICONV_CONST char *inptr = input;
17999 size_t inbytesleft = strlen (input);
18000 char *outptr = buf;
18001 size_t outbytesleft = sizeof (buf);
18002 size_t res = iconv (cd_utf8_to_88591,
18003 &inptr, &inbytesleft,
18004 &outptr, &outbytesleft);
18007 iconv_close (cd_utf8_to_88591);
18010 /* Test against Solaris 10 bug: Failures are not distinguishable from
18011 successful returns. */
18013 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
18014 if (cd_ascii_to_88591 != (iconv_t)(-1))
18016 static ICONV_CONST char input[] = "\263";
18018 ICONV_CONST char *inptr = input;
18019 size_t inbytesleft = strlen (input);
18020 char *outptr = buf;
18021 size_t outbytesleft = sizeof (buf);
18022 size_t res = iconv (cd_ascii_to_88591,
18023 &inptr, &inbytesleft,
18024 &outptr, &outbytesleft);
18027 iconv_close (cd_ascii_to_88591);
18030 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
18032 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
18033 if (cd_88591_to_utf8 != (iconv_t)(-1))
18035 static ICONV_CONST char input[] = "\304";
18036 static char buf[2] = { (char)0xDE, (char)0xAD };
18037 ICONV_CONST char *inptr = input;
18038 size_t inbytesleft = 1;
18039 char *outptr = buf;
18040 size_t outbytesleft = 1;
18041 size_t res = iconv (cd_88591_to_utf8,
18042 &inptr, &inbytesleft,
18043 &outptr, &outbytesleft);
18044 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
18046 iconv_close (cd_88591_to_utf8);
18049 #if 0 /* This bug could be worked around by the caller. */
18050 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
18052 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
18053 if (cd_88591_to_utf8 != (iconv_t)(-1))
18055 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
18057 ICONV_CONST char *inptr = input;
18058 size_t inbytesleft = strlen (input);
18059 char *outptr = buf;
18060 size_t outbytesleft = sizeof (buf);
18061 size_t res = iconv (cd_88591_to_utf8,
18062 &inptr, &inbytesleft,
18063 &outptr, &outbytesleft);
18066 iconv_close (cd_88591_to_utf8);
18070 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
18073 /* Try standardized names. */
18074 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
18075 /* Try IRIX, OSF/1 names. */
18076 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
18077 /* Try AIX names. */
18078 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
18079 /* Try HP-UX names. */
18080 iconv_t cd4 = iconv_open ("utf8", "eucJP");
18081 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
18082 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
18084 if (cd1 != (iconv_t)(-1))
18086 if (cd2 != (iconv_t)(-1))
18088 if (cd3 != (iconv_t)(-1))
18090 if (cd4 != (iconv_t)(-1))
18099 if ac_fn_c_try_run "$LINENO"
18101 am_cv_func_iconv_works=yes
18103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18104 conftest.$ac_objext conftest.beam conftest.$ac_ext
18107 test "$am_cv_func_iconv_works" = no || break
18109 LIBS="$am_save_LIBS"
18112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
18113 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
18114 case "$am_cv_func_iconv_works" in
18115 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
18116 *) am_func_iconv=yes ;;
18119 am_func_iconv=no am_cv_lib_iconv=no
18121 if test "$am_func_iconv" = yes; then
18123 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
18126 if test "$am_cv_lib_iconv" = yes; then
18127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
18128 printf %s "checking how to link with libiconv... " >&6; }
18129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
18130 printf "%s\n" "$LIBICONV" >&6; }
18132 CPPFLAGS="$am_save_CPPFLAGS"
18139 if test "$am_cv_func_iconv" = yes; then
18140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
18141 printf %s "checking whether iconv is compatible with its POSIX signature... " >&6; }
18142 if test ${gl_cv_iconv_nonconst+y}
18144 printf %s "(cached) " >&6
18146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18147 /* end confdefs.h. */
18149 #include <stdlib.h>
18155 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
18165 if ac_fn_c_try_compile "$LINENO"
18167 gl_cv_iconv_nonconst=yes
18169 gl_cv_iconv_nonconst=no
18171 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
18175 printf "%s\n" "$gl_cv_iconv_nonconst" >&6; }
18177 gl_cv_iconv_nonconst=yes
18179 if test $gl_cv_iconv_nonconst = yes; then
18185 printf "%s\n" "#define ICONV_CONST $iconv_arg1" >>confdefs.h
18188 if test $gl_cv_iconv_nonconst != yes; then
18189 ICONV_CONST="const"
18195 GL_M4_GNULIB_ICONV=0
18212 if test $gl_cv_have_include_next = yes; then
18213 gl_cv_next_iconv_h='<'iconv.h'>'
18215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
18216 printf %s "checking absolute name of <iconv.h>... " >&6; }
18217 if test ${gl_cv_next_iconv_h+y}
18219 printf %s "(cached) " >&6
18222 if test $ac_cv_header_iconv_h = yes; then
18227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18228 /* end confdefs.h. */
18232 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18233 *) gl_absname_cpp="$ac_cpp" ;;
18238 gl_dirsep_regex='[/\\]'
18241 gl_dirsep_regex='\/'
18244 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18245 gl_header_literal_regex=`echo 'iconv.h' \
18246 | sed -e "$gl_make_literal_regex_sed"`
18247 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18248 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18254 gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18255 sed -n "$gl_absolute_header_sed"`
18257 gl_header=$gl_cv_absolute_iconv_h
18258 gl_cv_next_iconv_h='"'$gl_header'"'
18260 gl_cv_next_iconv_h='<'iconv.h'>'
18265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
18266 printf "%s\n" "$gl_cv_next_iconv_h" >&6; }
18268 NEXT_ICONV_H=$gl_cv_next_iconv_h
18270 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18271 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18272 gl_next_as_first_directive='<'iconv.h'>'
18274 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18275 gl_next_as_first_directive=$gl_cv_next_iconv_h
18277 NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
18298 if test $gl_cv_have_include_next = yes; then
18299 gl_cv_next_limits_h='<'limits.h'>'
18301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
18302 printf %s "checking absolute name of <limits.h>... " >&6; }
18303 if test ${gl_cv_next_limits_h+y}
18305 printf %s "(cached) " >&6
18308 if test $ac_cv_header_limits_h = yes; then
18313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18314 /* end confdefs.h. */
18315 #include <limits.h>
18318 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18319 *) gl_absname_cpp="$ac_cpp" ;;
18324 gl_dirsep_regex='[/\\]'
18327 gl_dirsep_regex='\/'
18330 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18331 gl_header_literal_regex=`echo 'limits.h' \
18332 | sed -e "$gl_make_literal_regex_sed"`
18333 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18334 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18340 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18341 sed -n "$gl_absolute_header_sed"`
18343 gl_header=$gl_cv_absolute_limits_h
18344 gl_cv_next_limits_h='"'$gl_header'"'
18346 gl_cv_next_limits_h='<'limits.h'>'
18351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
18352 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
18354 NEXT_LIMITS_H=$gl_cv_next_limits_h
18356 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18357 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18358 gl_next_as_first_directive='<'limits.h'>'
18360 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18361 gl_next_as_first_directive=$gl_cv_next_limits_h
18363 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
18369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
18370 printf %s "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
18371 if test ${gl_cv_header_limits_width+y}
18373 printf %s "(cached) " >&6
18375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18376 /* end confdefs.h. */
18377 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
18378 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
18380 #include <limits.h>
18381 long long llm = LLONG_MAX;
18383 int ullw = ULLONG_WIDTH;
18393 if ac_fn_c_try_compile "$LINENO"
18395 gl_cv_header_limits_width=yes
18397 gl_cv_header_limits_width=no
18399 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
18402 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
18403 if test "$gl_cv_header_limits_width" = yes; then
18409 if test -n "$LIMITS_H"; then
18410 GL_GENERATE_LIMITS_H_TRUE=
18411 GL_GENERATE_LIMITS_H_FALSE='#'
18413 GL_GENERATE_LIMITS_H_TRUE='#'
18414 GL_GENERATE_LIMITS_H_FALSE=
18419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
18420 printf %s "checking for wint_t... " >&6; }
18421 if test ${gt_cv_c_wint_t+y}
18423 printf %s "(cached) " >&6
18425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18426 /* end confdefs.h. */
18428 wint_t foo = (wchar_t)'\0';
18437 if ac_fn_c_try_compile "$LINENO"
18443 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
18446 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
18447 if test $gt_cv_c_wint_t = yes; then
18449 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
18452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
18453 printf %s "checking whether wint_t is large enough... " >&6; }
18454 if test ${gl_cv_type_wint_t_large_enough+y}
18456 printf %s "(cached) " >&6
18458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18459 /* end confdefs.h. */
18461 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
18471 if ac_fn_c_try_compile "$LINENO"
18473 gl_cv_type_wint_t_large_enough=yes
18475 gl_cv_type_wint_t_large_enough=no
18477 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
18480 printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; }
18481 if test $gl_cv_type_wint_t_large_enough = no; then
18482 GNULIBHEADERS_OVERRIDE_WINT_T=1
18484 GNULIBHEADERS_OVERRIDE_WINT_T=0
18487 GNULIBHEADERS_OVERRIDE_WINT_T=0
18492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
18493 printf %s "checking whether the compiler produces multi-arch binaries... " >&6; }
18494 if test ${gl_cv_c_multiarch+y}
18496 printf %s "(cached) " >&6
18498 gl_cv_c_multiarch=no
18499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18500 /* end confdefs.h. */
18501 #ifndef __APPLE_CC__
18502 not a universal capable compiler
18507 if ac_fn_c_try_compile "$LINENO"
18512 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
18513 if test -n "$prev"; then
18515 i?86 | x86_64 | ppc | ppc64 | arm | arm64)
18516 if test -z "$arch" || test "$arch" = "$word"; then
18519 gl_cv_c_multiarch=yes
18525 if test "x$word" = "x-arch"; then
18532 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
18536 printf "%s\n" "$gl_cv_c_multiarch" >&6; }
18537 if test $gl_cv_c_multiarch = yes; then
18538 APPLE_UNIVERSAL_BUILD=1
18540 APPLE_UNIVERSAL_BUILD=0
18550 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
18553 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
18557 if test $ac_cv_header_wchar_h = yes; then
18565 if test $ac_cv_header_inttypes_h = yes; then
18573 if test $ac_cv_header_sys_types_h = yes; then
18589 if test $gl_cv_have_include_next = yes; then
18590 gl_cv_next_stdint_h='<'stdint.h'>'
18592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
18593 printf %s "checking absolute name of <stdint.h>... " >&6; }
18594 if test ${gl_cv_next_stdint_h+y}
18596 printf %s "(cached) " >&6
18599 if test $ac_cv_header_stdint_h = yes; then
18604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18605 /* end confdefs.h. */
18606 #include <stdint.h>
18609 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18610 *) gl_absname_cpp="$ac_cpp" ;;
18615 gl_dirsep_regex='[/\\]'
18618 gl_dirsep_regex='\/'
18621 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18622 gl_header_literal_regex=`echo 'stdint.h' \
18623 | sed -e "$gl_make_literal_regex_sed"`
18624 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18625 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18631 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18632 sed -n "$gl_absolute_header_sed"`
18634 gl_header=$gl_cv_absolute_stdint_h
18635 gl_cv_next_stdint_h='"'$gl_header'"'
18637 gl_cv_next_stdint_h='<'stdint.h'>'
18642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
18643 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
18645 NEXT_STDINT_H=$gl_cv_next_stdint_h
18647 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18648 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18649 gl_next_as_first_directive='<'stdint.h'>'
18651 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18652 gl_next_as_first_directive=$gl_cv_next_stdint_h
18654 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
18659 if test $ac_cv_header_stdint_h = yes; then
18666 if test $ac_cv_header_stdint_h = yes; then
18667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
18668 printf %s "checking whether stdint.h conforms to C99... " >&6; }
18669 if test ${gl_cv_header_working_stdint_h+y}
18671 printf %s "(cached) " >&6
18673 gl_cv_header_working_stdint_h=no
18674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18675 /* end confdefs.h. */
18678 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18679 #define __STDC_CONSTANT_MACROS 1
18680 #define __STDC_LIMIT_MACROS 1
18681 #include <stdint.h>
18682 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
18683 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
18684 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
18688 #include <stddef.h>
18689 #include <signal.h>
18691 # include <wchar.h>
18696 int8_t a1 = INT8_MAX;
18697 int8_t a1min = INT8_MIN;
18700 int16_t a2 = INT16_MAX;
18701 int16_t a2min = INT16_MIN;
18704 int32_t a3 = INT32_MAX;
18705 int32_t a3min = INT32_MIN;
18708 int64_t a4 = INT64_MAX;
18709 int64_t a4min = INT64_MIN;
18712 uint8_t b1 = UINT8_MAX;
18714 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
18717 uint16_t b2 = UINT16_MAX;
18720 uint32_t b3 = UINT32_MAX;
18723 uint64_t b4 = UINT64_MAX;
18725 int_least8_t c1 = INT8_C (0x7f);
18726 int_least8_t c1max = INT_LEAST8_MAX;
18727 int_least8_t c1min = INT_LEAST8_MIN;
18728 int_least16_t c2 = INT16_C (0x7fff);
18729 int_least16_t c2max = INT_LEAST16_MAX;
18730 int_least16_t c2min = INT_LEAST16_MIN;
18731 int_least32_t c3 = INT32_C (0x7fffffff);
18732 int_least32_t c3max = INT_LEAST32_MAX;
18733 int_least32_t c3min = INT_LEAST32_MIN;
18734 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
18735 int_least64_t c4max = INT_LEAST64_MAX;
18736 int_least64_t c4min = INT_LEAST64_MIN;
18737 uint_least8_t d1 = UINT8_C (0xff);
18738 uint_least8_t d1max = UINT_LEAST8_MAX;
18739 uint_least16_t d2 = UINT16_C (0xffff);
18740 uint_least16_t d2max = UINT_LEAST16_MAX;
18741 uint_least32_t d3 = UINT32_C (0xffffffff);
18742 uint_least32_t d3max = UINT_LEAST32_MAX;
18743 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
18744 uint_least64_t d4max = UINT_LEAST64_MAX;
18745 int_fast8_t e1 = INT_FAST8_MAX;
18746 int_fast8_t e1min = INT_FAST8_MIN;
18747 int_fast16_t e2 = INT_FAST16_MAX;
18748 int_fast16_t e2min = INT_FAST16_MIN;
18749 int_fast32_t e3 = INT_FAST32_MAX;
18750 int_fast32_t e3min = INT_FAST32_MIN;
18751 int_fast64_t e4 = INT_FAST64_MAX;
18752 int_fast64_t e4min = INT_FAST64_MIN;
18753 uint_fast8_t f1 = UINT_FAST8_MAX;
18754 uint_fast16_t f2 = UINT_FAST16_MAX;
18755 uint_fast32_t f3 = UINT_FAST32_MAX;
18756 uint_fast64_t f4 = UINT_FAST64_MAX;
18758 intptr_t g = INTPTR_MAX;
18759 intptr_t gmin = INTPTR_MIN;
18762 uintptr_t h = UINTPTR_MAX;
18764 intmax_t i = INTMAX_MAX;
18765 uintmax_t j = UINTMAX_MAX;
18767 /* Check that SIZE_MAX has the correct type, if possible. */
18768 #if 201112 <= __STDC_VERSION__
18769 int k = _Generic (SIZE_MAX, size_t: 0);
18770 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
18771 || (0x5110 <= __SUNPRO_C && !__STDC__))
18773 extern __typeof__ (SIZE_MAX) k;
18776 #include <limits.h> /* for CHAR_BIT */
18777 #define TYPE_MINIMUM(t) \
18778 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
18779 #define TYPE_MAXIMUM(t) \
18780 ((t) ((t) 0 < (t) -1 \
18782 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
18785 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
18786 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
18788 /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64. */
18789 int check_SIG_ATOMIC:
18790 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
18791 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
18793 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
18795 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
18796 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
18798 /* Detect bug in mingw. */
18800 WINT_MIN == TYPE_MINIMUM (wint_t)
18801 && WINT_MAX == TYPE_MAXIMUM (wint_t)
18804 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
18806 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
18807 int check_UINT16_C:
18808 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
18810 /* Detect bugs in OpenBSD 3.9 stdint.h. */
18812 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
18815 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
18818 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
18821 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
18823 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
18824 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
18825 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
18826 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
18827 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
18828 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
18829 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
18830 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
18831 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
18832 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
18833 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
18844 if ac_fn_c_try_compile "$LINENO"
18846 if test "$cross_compiling" = yes
18849 # Guess yes on native Windows.
18850 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
18851 # In general, assume it works.
18852 *) gl_cv_header_working_stdint_h="guessing yes" ;;
18856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18857 /* end confdefs.h. */
18860 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18861 #define __STDC_CONSTANT_MACROS 1
18862 #define __STDC_LIMIT_MACROS 1
18863 #include <stdint.h>
18866 #include <stddef.h>
18867 #include <signal.h>
18869 # include <wchar.h>
18874 #include <string.h>
18875 #define MVAL(macro) MVAL1(macro)
18876 #define MVAL1(expression) #expression
18877 static const char *macro_values[] =
18911 for (mv = macro_values; *mv != NULL; mv++)
18913 const char *value = *mv;
18914 /* Test whether it looks like a cast expression. */
18915 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
18916 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
18917 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
18918 || strncmp (value, "((int)"/*)*/, 6) == 0
18919 || strncmp (value, "((signed short)"/*)*/, 15) == 0
18920 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
18921 return mv - macro_values + 1;
18929 if ac_fn_c_try_run "$LINENO"
18931 gl_cv_header_working_stdint_h=yes
18933 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18934 conftest.$ac_objext conftest.beam conftest.$ac_ext
18939 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
18943 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
18946 HAVE_C99_STDINT_H=0
18947 HAVE_SYS_BITYPES_H=0
18948 HAVE_SYS_INTTYPES_H=0
18950 case "$gl_cv_header_working_stdint_h" in
18952 HAVE_C99_STDINT_H=1
18953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
18954 printf %s "checking whether stdint.h works without ISO C predefines... " >&6; }
18955 if test ${gl_cv_header_stdint_without_STDC_macros+y}
18957 printf %s "(cached) " >&6
18959 gl_cv_header_stdint_without_STDC_macros=no
18960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18961 /* end confdefs.h. */
18964 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18965 #include <stdint.h>
18968 #include <stddef.h>
18969 #include <signal.h>
18971 # include <wchar.h>
18975 intmax_t im = INTMAX_MAX;
18976 int32_t i32 = INT32_C (0x7fffffff);
18986 if ac_fn_c_try_compile "$LINENO"
18988 gl_cv_header_stdint_without_STDC_macros=yes
18990 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
18994 printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; }
18996 if test $gl_cv_header_stdint_without_STDC_macros = no; then
18998 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
19001 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
19004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
19005 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
19006 if test ${gl_cv_header_stdint_width+y}
19008 printf %s "(cached) " >&6
19010 gl_cv_header_stdint_width=no
19011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19012 /* end confdefs.h. */
19014 /* Work if build is not clean. */
19015 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
19016 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
19017 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
19019 #include <stdint.h>
19021 #include <stddef.h>
19022 #include <signal.h>
19024 # include <wchar.h>
19027 int iw = UINTMAX_WIDTH;
19037 if ac_fn_c_try_compile "$LINENO"
19039 gl_cv_header_stdint_width=yes
19041 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
19044 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
19045 if test "$gl_cv_header_stdint_width" = yes; then
19050 ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
19051 if test "x$ac_cv_header_sys_inttypes_h" = xyes
19053 printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
19056 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
19057 if test "x$ac_cv_header_sys_bitypes_h" = xyes
19059 printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
19063 if test $ac_cv_header_sys_inttypes_h = yes; then
19064 HAVE_SYS_INTTYPES_H=1
19066 if test $ac_cv_header_sys_bitypes_h = yes; then
19067 HAVE_SYS_BITYPES_H=1
19071 if test $APPLE_UNIVERSAL_BUILD = 0; then
19074 for gltype in ptrdiff_t size_t ; do
19075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
19076 printf %s "checking for bit size of $gltype... " >&6; }
19077 if eval test \${gl_cv_bitsizeof_${gltype}+y}
19079 printf %s "(cached) " >&6
19081 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
19082 #include <stddef.h>
19083 #include <signal.h>
19085 # include <wchar.h>
19088 #include <limits.h>"
19095 eval gl_cv_bitsizeof_${gltype}=\$result
19098 eval ac_res=\$gl_cv_bitsizeof_${gltype}
19099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19100 printf "%s\n" "$ac_res" >&6; }
19101 eval result=\$gl_cv_bitsizeof_${gltype}
19102 if test $result = unknown; then
19105 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19106 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
19108 eval BITSIZEOF_${GLTYPE}=\$result
19115 for gltype in sig_atomic_t wchar_t wint_t ; do
19116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
19117 printf %s "checking for bit size of $gltype... " >&6; }
19118 if eval test \${gl_cv_bitsizeof_${gltype}+y}
19120 printf %s "(cached) " >&6
19122 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
19123 #include <stddef.h>
19124 #include <signal.h>
19126 # include <wchar.h>
19129 #include <limits.h>"
19136 eval gl_cv_bitsizeof_${gltype}=\$result
19139 eval ac_res=\$gl_cv_bitsizeof_${gltype}
19140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19141 printf "%s\n" "$ac_res" >&6; }
19142 eval result=\$gl_cv_bitsizeof_${gltype}
19143 if test $result = unknown; then
19146 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19147 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
19149 eval BITSIZEOF_${GLTYPE}=\$result
19155 for gltype in sig_atomic_t wchar_t wint_t ; do
19156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
19157 printf %s "checking whether $gltype is signed... " >&6; }
19158 if eval test \${gl_cv_type_${gltype}_signed+y}
19160 printf %s "(cached) " >&6
19162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19163 /* end confdefs.h. */
19165 #include <stddef.h>
19166 #include <signal.h>
19168 # include <wchar.h>
19171 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
19180 if ac_fn_c_try_compile "$LINENO"
19186 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19187 eval gl_cv_type_${gltype}_signed=\$result
19190 eval ac_res=\$gl_cv_type_${gltype}_signed
19191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19192 printf "%s\n" "$ac_res" >&6; }
19193 eval result=\$gl_cv_type_${gltype}_signed
19194 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19195 if test "$result" = yes; then
19196 printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
19198 eval HAVE_SIGNED_${GLTYPE}=1
19200 eval HAVE_SIGNED_${GLTYPE}=0
19205 gl_cv_type_ptrdiff_t_signed=yes
19206 gl_cv_type_size_t_signed=no
19207 if test $APPLE_UNIVERSAL_BUILD = 0; then
19210 for gltype in ptrdiff_t size_t ; do
19211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19212 printf %s "checking for $gltype integer literal suffix... " >&6; }
19213 if eval test \${gl_cv_type_${gltype}_suffix+y}
19215 printf %s "(cached) " >&6
19217 eval gl_cv_type_${gltype}_suffix=no
19218 eval result=\$gl_cv_type_${gltype}_signed
19219 if test "$result" = yes; then
19224 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19226 '') gltype1='int';;
19227 l) gltype1='long int';;
19228 ll) gltype1='long long int';;
19229 i64) gltype1='__int64';;
19230 u) gltype1='unsigned int';;
19231 ul) gltype1='unsigned long int';;
19232 ull) gltype1='unsigned long long int';;
19233 ui64)gltype1='unsigned __int64';;
19235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19236 /* end confdefs.h. */
19238 #include <stddef.h>
19239 #include <signal.h>
19241 # include <wchar.h>
19244 extern $gltype foo;
19245 extern $gltype1 foo;
19254 if ac_fn_c_try_compile "$LINENO"
19256 eval gl_cv_type_${gltype}_suffix=\$glsuf
19258 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19259 eval result=\$gl_cv_type_${gltype}_suffix
19260 test "$result" != no && break
19263 eval ac_res=\$gl_cv_type_${gltype}_suffix
19264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19265 printf "%s\n" "$ac_res" >&6; }
19266 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19267 eval result=\$gl_cv_type_${gltype}_suffix
19268 test "$result" = no && result=
19269 eval ${GLTYPE}_SUFFIX=\$result
19270 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
19278 for gltype in sig_atomic_t wchar_t wint_t ; do
19279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19280 printf %s "checking for $gltype integer literal suffix... " >&6; }
19281 if eval test \${gl_cv_type_${gltype}_suffix+y}
19283 printf %s "(cached) " >&6
19285 eval gl_cv_type_${gltype}_suffix=no
19286 eval result=\$gl_cv_type_${gltype}_signed
19287 if test "$result" = yes; then
19292 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19294 '') gltype1='int';;
19295 l) gltype1='long int';;
19296 ll) gltype1='long long int';;
19297 i64) gltype1='__int64';;
19298 u) gltype1='unsigned int';;
19299 ul) gltype1='unsigned long int';;
19300 ull) gltype1='unsigned long long int';;
19301 ui64)gltype1='unsigned __int64';;
19303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19304 /* end confdefs.h. */
19306 #include <stddef.h>
19307 #include <signal.h>
19309 # include <wchar.h>
19312 extern $gltype foo;
19313 extern $gltype1 foo;
19322 if ac_fn_c_try_compile "$LINENO"
19324 eval gl_cv_type_${gltype}_suffix=\$glsuf
19326 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19327 eval result=\$gl_cv_type_${gltype}_suffix
19328 test "$result" != no && break
19331 eval ac_res=\$gl_cv_type_${gltype}_suffix
19332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19333 printf "%s\n" "$ac_res" >&6; }
19334 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19335 eval result=\$gl_cv_type_${gltype}_suffix
19336 test "$result" = no && result=
19337 eval ${GLTYPE}_SUFFIX=\$result
19338 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
19344 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
19345 BITSIZEOF_WINT_T=32
19353 LIMITS_H='limits.h'
19354 if test -n "$LIMITS_H"; then
19355 GL_GENERATE_LIMITS_H_TRUE=
19356 GL_GENERATE_LIMITS_H_FALSE='#'
19358 GL_GENERATE_LIMITS_H_TRUE='#'
19359 GL_GENERATE_LIMITS_H_FALSE=
19368 if test -n "$STDINT_H"; then
19369 GL_GENERATE_STDINT_H_TRUE=
19370 GL_GENERATE_STDINT_H_FALSE='#'
19372 GL_GENERATE_STDINT_H_TRUE='#'
19373 GL_GENERATE_STDINT_H_FALSE=
19378 HAVE_DECL_IMAXABS=1;
19379 HAVE_DECL_IMAXDIV=1;
19380 HAVE_DECL_STRTOIMAX=1;
19381 HAVE_DECL_STRTOUMAX=1;
19383 REPLACE_STRTOIMAX=0;
19384 REPLACE_STRTOUMAX=0;
19385 INT32_MAX_LT_INTMAX_MAX=1;
19386 INT64_MAX_EQ_LONG_MAX='defined _LP64';
19387 PRIPTR_PREFIX=__PRIPTR_PREFIX;
19388 UINT32_MAX_LT_UINTMAX_MAX=1;
19389 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
19405 if test $gl_cv_have_include_next = yes; then
19406 gl_cv_next_inttypes_h='<'inttypes.h'>'
19408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
19409 printf %s "checking absolute name of <inttypes.h>... " >&6; }
19410 if test ${gl_cv_next_inttypes_h+y}
19412 printf %s "(cached) " >&6
19415 if test $ac_cv_header_inttypes_h = yes; then
19420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19421 /* end confdefs.h. */
19422 #include <inttypes.h>
19425 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19426 *) gl_absname_cpp="$ac_cpp" ;;
19431 gl_dirsep_regex='[/\\]'
19434 gl_dirsep_regex='\/'
19437 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19438 gl_header_literal_regex=`echo 'inttypes.h' \
19439 | sed -e "$gl_make_literal_regex_sed"`
19440 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19441 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19447 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19448 sed -n "$gl_absolute_header_sed"`
19450 gl_header=$gl_cv_absolute_inttypes_h
19451 gl_cv_next_inttypes_h='"'$gl_header'"'
19453 gl_cv_next_inttypes_h='<'inttypes.h'>'
19458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
19459 printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
19461 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
19463 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19464 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19465 gl_next_as_first_directive='<'inttypes.h'>'
19467 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19468 gl_next_as_first_directive=$gl_cv_next_inttypes_h
19470 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
19484 GL_M4_GNULIB_IMAXABS=0
19488 GL_M4_GNULIB_IMAXDIV=0
19492 GL_M4_GNULIB_STRTOIMAX=0
19496 GL_M4_GNULIB_STRTOUMAX=0
19501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
19502 printf %s "checking where to find the exponent in a 'double'... " >&6; }
19503 if test ${gl_cv_cc_double_expbit0+y}
19505 printf %s "(cached) " >&6
19508 if test "$cross_compiling" = yes
19511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19512 /* end confdefs.h. */
19514 #if defined arm || defined __arm || defined __arm__
19519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19520 $EGREP "mixed_endianness" >/dev/null 2>&1
19522 gl_cv_cc_double_expbit0="unknown"
19526 if test ${ac_cv_c_bigendian+y}
19528 printf %s "(cached) " >&6
19530 ac_cv_c_bigendian=unknown
19531 # See if we're dealing with a universal compiler.
19532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19533 /* end confdefs.h. */
19534 #ifndef __APPLE_CC__
19535 not a universal capable compiler
19540 if ac_fn_c_try_compile "$LINENO"
19543 # Check for potential -arch flags. It is not universal unless
19544 # there are at least two -arch flags with different values.
19547 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
19548 if test -n "$ac_prev"; then
19550 i?86 | x86_64 | ppc | ppc64)
19551 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
19554 ac_cv_c_bigendian=universal
19560 elif test "x$ac_word" = "x-arch"; then
19565 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19566 if test $ac_cv_c_bigendian = unknown; then
19567 # See if sys/param.h defines the BYTE_ORDER macro.
19568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19569 /* end confdefs.h. */
19570 #include <sys/types.h>
19571 #include <sys/param.h>
19576 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
19577 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
19579 bogus endian macros
19586 if ac_fn_c_try_compile "$LINENO"
19588 # It does; now see whether it defined to BIG_ENDIAN or not.
19589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19590 /* end confdefs.h. */
19591 #include <sys/types.h>
19592 #include <sys/param.h>
19597 #if BYTE_ORDER != BIG_ENDIAN
19605 if ac_fn_c_try_compile "$LINENO"
19607 ac_cv_c_bigendian=yes
19609 ac_cv_c_bigendian=no
19611 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19613 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19615 if test $ac_cv_c_bigendian = unknown; then
19616 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
19617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19618 /* end confdefs.h. */
19619 #include <limits.h>
19624 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
19625 bogus endian macros
19632 if ac_fn_c_try_compile "$LINENO"
19634 # It does; now see whether it defined to _BIG_ENDIAN or not.
19635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19636 /* end confdefs.h. */
19637 #include <limits.h>
19642 #ifndef _BIG_ENDIAN
19650 if ac_fn_c_try_compile "$LINENO"
19652 ac_cv_c_bigendian=yes
19654 ac_cv_c_bigendian=no
19656 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19658 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19660 if test $ac_cv_c_bigendian = unknown; then
19661 # Compile a test program.
19662 if test "$cross_compiling" = yes
19664 # Try to guess by grepping values from an object file.
19665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19666 /* end confdefs.h. */
19667 unsigned short int ascii_mm[] =
19668 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19669 unsigned short int ascii_ii[] =
19670 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19671 int use_ascii (int i) {
19672 return ascii_mm[i] + ascii_ii[i];
19674 unsigned short int ebcdic_ii[] =
19675 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19676 unsigned short int ebcdic_mm[] =
19677 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19678 int use_ebcdic (int i) {
19679 return ebcdic_mm[i] + ebcdic_ii[i];
19686 return use_ascii (foo) == use_ebcdic (foo);
19691 if ac_fn_c_try_compile "$LINENO"
19693 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
19694 ac_cv_c_bigendian=yes
19696 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
19697 if test "$ac_cv_c_bigendian" = unknown; then
19698 ac_cv_c_bigendian=no
19700 # finding both strings is unlikely to happen, but who knows?
19701 ac_cv_c_bigendian=unknown
19705 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19708 /* end confdefs.h. */
19709 $ac_includes_default
19714 /* Are we little or big endian? From Harbison&Steele. */
19718 char c[sizeof (long int)];
19721 return u.c[sizeof (long int) - 1] == 1;
19727 if ac_fn_c_try_run "$LINENO"
19729 ac_cv_c_bigendian=no
19731 ac_cv_c_bigendian=yes
19733 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19734 conftest.$ac_objext conftest.beam conftest.$ac_ext
19740 case $ac_cv_c_bigendian in #(
19742 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
19744 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
19747 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
19751 gl_cv_cc_double_expbit0="unknown" ;;
19760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19761 /* end confdefs.h. */
19764 #include <stddef.h>
19766 #include <string.h>
19768 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19769 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
19770 static unsigned int ored_words[NWORDS];
19771 static unsigned int anded_words[NWORDS];
19772 static void add_to_ored_words (double x)
19776 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
19777 memset (&m, 0, sizeof (memory_double));
19779 for (i = 0; i < NWORDS; i++)
19781 ored_words[i] |= m.word[i];
19782 anded_words[i] &= m.word[i];
19788 FILE *fp = fopen ("conftest.out", "w");
19791 for (j = 0; j < NWORDS; j++)
19792 anded_words[j] = ~ (unsigned int) 0;
19793 add_to_ored_words (0.25);
19794 add_to_ored_words (0.5);
19795 add_to_ored_words (1.0);
19796 add_to_ored_words (2.0);
19797 add_to_ored_words (4.0);
19798 /* Remove bits that are common (e.g. if representation of the first mantissa
19799 bit is explicit). */
19800 for (j = 0; j < NWORDS; j++)
19801 ored_words[j] &= ~anded_words[j];
19802 /* Now find the nonzero word. */
19803 for (j = 0; j < NWORDS; j++)
19804 if (ored_words[j] != 0)
19809 for (i = j + 1; i < NWORDS; i++)
19810 if (ored_words[i] != 0)
19812 fprintf (fp, "unknown");
19813 return (fclose (fp) != 0);
19816 if ((ored_words[j] >> i) & 1)
19818 fprintf (fp, "word %d bit %d", (int) j, (int) i);
19819 return (fclose (fp) != 0);
19822 fprintf (fp, "unknown");
19823 return (fclose (fp) != 0);
19827 if ac_fn_c_try_run "$LINENO"
19829 gl_cv_cc_double_expbit0=`cat conftest.out`
19831 gl_cv_cc_double_expbit0="unknown"
19833 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19834 conftest.$ac_objext conftest.beam conftest.$ac_ext
19840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
19841 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
19842 case "$gl_cv_cc_double_expbit0" in
19844 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
19845 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
19847 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
19850 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
19856 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
19857 printf %s "checking where to find the exponent in a 'float'... " >&6; }
19858 if test ${gl_cv_cc_float_expbit0+y}
19860 printf %s "(cached) " >&6
19863 if test "$cross_compiling" = yes
19865 gl_cv_cc_float_expbit0="word 0 bit 23"
19867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19868 /* end confdefs.h. */
19871 #include <stddef.h>
19873 #include <string.h>
19875 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19876 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
19877 static unsigned int ored_words[NWORDS];
19878 static unsigned int anded_words[NWORDS];
19879 static void add_to_ored_words (float x)
19883 /* Clear it first, in case
19884 sizeof (float) < sizeof (memory_float). */
19885 memset (&m, 0, sizeof (memory_float));
19887 for (i = 0; i < NWORDS; i++)
19889 ored_words[i] |= m.word[i];
19890 anded_words[i] &= m.word[i];
19896 FILE *fp = fopen ("conftest.out", "w");
19899 for (j = 0; j < NWORDS; j++)
19900 anded_words[j] = ~ (unsigned int) 0;
19901 add_to_ored_words (0.25f);
19902 add_to_ored_words (0.5f);
19903 add_to_ored_words (1.0f);
19904 add_to_ored_words (2.0f);
19905 add_to_ored_words (4.0f);
19906 /* Remove bits that are common (e.g. if representation of the first mantissa
19907 bit is explicit). */
19908 for (j = 0; j < NWORDS; j++)
19909 ored_words[j] &= ~anded_words[j];
19910 /* Now find the nonzero word. */
19911 for (j = 0; j < NWORDS; j++)
19912 if (ored_words[j] != 0)
19917 for (i = j + 1; i < NWORDS; i++)
19918 if (ored_words[i] != 0)
19920 fprintf (fp, "unknown");
19921 return (fclose (fp) != 0);
19924 if ((ored_words[j] >> i) & 1)
19926 fprintf (fp, "word %d bit %d", (int) j, (int) i);
19927 return (fclose (fp) != 0);
19930 fprintf (fp, "unknown");
19931 return (fclose (fp) != 0);
19935 if ac_fn_c_try_run "$LINENO"
19937 gl_cv_cc_float_expbit0=`cat conftest.out`
19939 gl_cv_cc_float_expbit0="unknown"
19941 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19942 conftest.$ac_objext conftest.beam conftest.$ac_ext
19948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
19949 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
19950 case "$gl_cv_cc_float_expbit0" in
19952 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
19953 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
19955 printf "%s\n" "#define FLT_EXPBIT0_WORD $word" >>confdefs.h
19958 printf "%s\n" "#define FLT_EXPBIT0_BIT $bit" >>confdefs.h
19964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
19965 printf %s "checking whether byte ordering is bigendian... " >&6; }
19966 if test ${ac_cv_c_bigendian+y}
19968 printf %s "(cached) " >&6
19970 ac_cv_c_bigendian=unknown
19971 # See if we're dealing with a universal compiler.
19972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19973 /* end confdefs.h. */
19974 #ifndef __APPLE_CC__
19975 not a universal capable compiler
19980 if ac_fn_c_try_compile "$LINENO"
19983 # Check for potential -arch flags. It is not universal unless
19984 # there are at least two -arch flags with different values.
19987 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
19988 if test -n "$ac_prev"; then
19990 i?86 | x86_64 | ppc | ppc64)
19991 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
19994 ac_cv_c_bigendian=universal
20000 elif test "x$ac_word" = "x-arch"; then
20005 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20006 if test $ac_cv_c_bigendian = unknown; then
20007 # See if sys/param.h defines the BYTE_ORDER macro.
20008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20009 /* end confdefs.h. */
20010 #include <sys/types.h>
20011 #include <sys/param.h>
20016 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
20017 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
20019 bogus endian macros
20026 if ac_fn_c_try_compile "$LINENO"
20028 # It does; now see whether it defined to BIG_ENDIAN or not.
20029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20030 /* end confdefs.h. */
20031 #include <sys/types.h>
20032 #include <sys/param.h>
20037 #if BYTE_ORDER != BIG_ENDIAN
20045 if ac_fn_c_try_compile "$LINENO"
20047 ac_cv_c_bigendian=yes
20049 ac_cv_c_bigendian=no
20051 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20053 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20055 if test $ac_cv_c_bigendian = unknown; then
20056 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
20057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20058 /* end confdefs.h. */
20059 #include <limits.h>
20064 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
20065 bogus endian macros
20072 if ac_fn_c_try_compile "$LINENO"
20074 # It does; now see whether it defined to _BIG_ENDIAN or not.
20075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20076 /* end confdefs.h. */
20077 #include <limits.h>
20082 #ifndef _BIG_ENDIAN
20090 if ac_fn_c_try_compile "$LINENO"
20092 ac_cv_c_bigendian=yes
20094 ac_cv_c_bigendian=no
20096 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20098 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20100 if test $ac_cv_c_bigendian = unknown; then
20101 # Compile a test program.
20102 if test "$cross_compiling" = yes
20104 # Try to guess by grepping values from an object file.
20105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20106 /* end confdefs.h. */
20107 unsigned short int ascii_mm[] =
20108 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
20109 unsigned short int ascii_ii[] =
20110 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
20111 int use_ascii (int i) {
20112 return ascii_mm[i] + ascii_ii[i];
20114 unsigned short int ebcdic_ii[] =
20115 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
20116 unsigned short int ebcdic_mm[] =
20117 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
20118 int use_ebcdic (int i) {
20119 return ebcdic_mm[i] + ebcdic_ii[i];
20126 return use_ascii (foo) == use_ebcdic (foo);
20131 if ac_fn_c_try_compile "$LINENO"
20133 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
20134 ac_cv_c_bigendian=yes
20136 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
20137 if test "$ac_cv_c_bigendian" = unknown; then
20138 ac_cv_c_bigendian=no
20140 # finding both strings is unlikely to happen, but who knows?
20141 ac_cv_c_bigendian=unknown
20145 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20148 /* end confdefs.h. */
20149 $ac_includes_default
20154 /* Are we little or big endian? From Harbison&Steele. */
20158 char c[sizeof (long int)];
20161 return u.c[sizeof (long int) - 1] == 1;
20167 if ac_fn_c_try_run "$LINENO"
20169 ac_cv_c_bigendian=no
20171 ac_cv_c_bigendian=yes
20173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20174 conftest.$ac_objext conftest.beam conftest.$ac_ext
20179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
20180 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
20181 case $ac_cv_c_bigendian in #(
20183 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
20189 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
20193 as_fn_error $? "unknown endianness
20194 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
20202 REPLACE_ISWBLANK=0;
20203 REPLACE_ISWDIGIT=0;
20204 REPLACE_ISWXDIGIT=0;
20210 if test $ac_cv_header_crtdefs_h = yes; then
20223 if test $ac_cv_func_iswcntrl = yes; then
20231 if test $gt_cv_c_wint_t = yes; then
20249 if test $gl_cv_have_include_next = yes; then
20250 gl_cv_next_wctype_h='<'wctype.h'>'
20252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
20253 printf %s "checking absolute name of <wctype.h>... " >&6; }
20254 if test ${gl_cv_next_wctype_h+y}
20256 printf %s "(cached) " >&6
20259 if test $ac_cv_header_wctype_h = yes; then
20264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20265 /* end confdefs.h. */
20266 #include <wctype.h>
20269 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20270 *) gl_absname_cpp="$ac_cpp" ;;
20275 gl_dirsep_regex='[/\\]'
20278 gl_dirsep_regex='\/'
20281 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20282 gl_header_literal_regex=`echo 'wctype.h' \
20283 | sed -e "$gl_make_literal_regex_sed"`
20284 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20285 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20291 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20292 sed -n "$gl_absolute_header_sed"`
20294 gl_header=$gl_cv_absolute_wctype_h
20295 gl_cv_next_wctype_h='"'$gl_header'"'
20297 gl_cv_next_wctype_h='<'wctype.h'>'
20302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
20303 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
20305 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
20307 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20308 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20309 gl_next_as_first_directive='<'wctype.h'>'
20311 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20312 gl_next_as_first_directive=$gl_cv_next_wctype_h
20314 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
20319 if test $ac_cv_header_wctype_h = yes; then
20320 if test $ac_cv_func_iswcntrl = yes; then
20321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
20322 printf %s "checking whether iswcntrl works... " >&6; }
20323 if test ${gl_cv_func_iswcntrl_works+y}
20325 printf %s "(cached) " >&6
20328 if test "$cross_compiling" = yes
20330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20331 /* end confdefs.h. */
20332 #include <stdlib.h>
20333 #if __GNU_LIBRARY__ == 1
20334 Linux libc5 i18n is broken.
20344 if ac_fn_c_try_compile "$LINENO"
20346 gl_cv_func_iswcntrl_works="guessing yes"
20348 gl_cv_func_iswcntrl_works="guessing no"
20350 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20354 /* end confdefs.h. */
20357 #include <wctype.h>
20358 int main () { return iswprint ('x') == 0; }
20361 if ac_fn_c_try_run "$LINENO"
20363 gl_cv_func_iswcntrl_works=yes
20365 gl_cv_func_iswcntrl_works=no
20367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20368 conftest.$ac_objext conftest.beam conftest.$ac_ext
20373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
20374 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
20382 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
20385 case "$gl_cv_func_iswcntrl_works" in
20386 *yes) REPLACE_ISWCNTRL=0 ;;
20387 *) REPLACE_ISWCNTRL=1 ;;
20392 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
20396 if test $REPLACE_ISWCNTRL = 1; then
20399 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
20400 if test "x$ac_cv_func_towlower" = xyes
20402 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
20406 if test $ac_cv_func_towlower = yes; then
20409 ac_fn_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
20411 # include <wctype.h>
20414 " "$ac_c_undeclared_builtin_options" "CFLAGS"
20415 if test "x$ac_cv_have_decl_towlower" = xyes
20421 printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
20423 if test $ac_cv_have_decl_towlower = yes; then
20432 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
20436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
20437 printf %s "checking for wctype_t... " >&6; }
20438 if test ${gl_cv_type_wctype_t+y}
20440 printf %s "(cached) " >&6
20442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20443 /* end confdefs.h. */
20446 # include <wctype.h>
20458 if ac_fn_c_try_compile "$LINENO"
20460 gl_cv_type_wctype_t=yes
20462 gl_cv_type_wctype_t=no
20464 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
20468 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
20469 if test $gl_cv_type_wctype_t = no; then
20473 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
20474 printf %s "checking for wctrans_t... " >&6; }
20475 if test ${gl_cv_type_wctrans_t+y}
20477 printf %s "(cached) " >&6
20479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20480 /* end confdefs.h. */
20482 #include <wctype.h>
20493 if ac_fn_c_try_compile "$LINENO"
20495 gl_cv_type_wctrans_t=yes
20497 gl_cv_type_wctrans_t=no
20499 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
20503 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
20504 if test $gl_cv_type_wctrans_t = no; then
20513 GL_M4_GNULIB_ISWBLANK=0
20517 GL_M4_GNULIB_ISWDIGIT=0
20521 GL_M4_GNULIB_ISWXDIGIT=0
20525 GL_M4_GNULIB_WCTYPE=0
20529 GL_M4_GNULIB_ISWCTYPE=0
20533 GL_M4_GNULIB_WCTRANS=0
20537 GL_M4_GNULIB_TOWCTRANS=0
20544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
20545 printf %s "checking for a traditional japanese locale... " >&6; }
20546 if test ${gt_cv_locale_ja+y}
20548 printf %s "(cached) " >&6
20551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20552 /* end confdefs.h. */
20554 #include <locale.h>
20556 #if HAVE_LANGINFO_CODESET
20557 # include <langinfo.h>
20559 #include <stdlib.h>
20560 #include <string.h>
20565 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
20566 imitates locale dependent behaviour by looking at the environment
20567 variables, and all locales use the UTF-8 encoding. */
20568 #if defined __BEOS__ || defined __HAIKU__
20571 /* Check whether the given locale name is recognized by the system. */
20572 # if defined _WIN32 && !defined __CYGWIN__
20573 /* On native Windows, setlocale(category, "") looks at the system settings,
20574 not at the environment variables. Also, when an encoding suffix such
20575 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
20576 category of the locale to "C". */
20577 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
20578 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
20581 if (setlocale (LC_ALL, "") == NULL) return 1;
20583 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
20584 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
20585 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
20586 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
20587 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
20588 some unit tests fail.
20589 On MirBSD 10, when an unsupported locale is specified, setlocale()
20590 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
20591 # if HAVE_LANGINFO_CODESET
20593 const char *cs = nl_langinfo (CODESET);
20594 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
20595 || strcmp (cs, "UTF-8") == 0)
20600 /* On Cygwin, avoid locale names without encoding suffix, because the
20601 locale_charset() function relies on the encoding suffix. Note that
20602 LC_ALL is set on the command line. */
20603 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
20605 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
20606 on Cygwin 1.5.x. */
20607 if (MB_CUR_MAX == 1)
20609 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
20610 This excludes the UTF-8 encoding (except on MirBSD). */
20613 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
20614 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
20615 for (p = buf; *p != '\0'; p++)
20616 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
20624 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
20625 (eval $ac_link) 2>&5
20627 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20628 test $ac_status = 0; } && test -s conftest$ac_exeext; then
20630 # Handle native Windows specially, because there setlocale() interprets
20631 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
20632 # "fr" or "fra" as "French" or "French_France.1252",
20633 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
20634 # "ja" as "Japanese" or "Japanese_Japan.932",
20637 # Note that on native Windows, the Japanese locale is
20638 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
20639 # cannot use it here.
20640 gt_cv_locale_ja=none
20643 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
20644 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
20645 # configure script would override the LC_ALL setting. Likewise for
20646 # LC_CTYPE, which is also set at the beginning of the configure script.
20647 # Test for the AIX locale name.
20648 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20649 gt_cv_locale_ja=ja_JP
20651 # Test for the locale name with explicit encoding suffix.
20652 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20653 gt_cv_locale_ja=ja_JP.EUC-JP
20655 # Test for the HP-UX, OSF/1, NetBSD locale name.
20656 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20657 gt_cv_locale_ja=ja_JP.eucJP
20659 # Test for the IRIX, FreeBSD locale name.
20660 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20661 gt_cv_locale_ja=ja_JP.EUC
20663 # Test for the Solaris 7 locale name.
20664 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20667 # Special test for NetBSD 1.6.
20668 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
20669 gt_cv_locale_ja=ja_JP.eucJP
20672 gt_cv_locale_ja=none
20685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
20686 printf "%s\n" "$gt_cv_locale_ja" >&6; }
20687 LOCALE_JA=$gt_cv_locale_ja
20692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
20693 printf %s "checking for a french Unicode locale... " >&6; }
20694 if test ${gt_cv_locale_fr_utf8+y}
20696 printf %s "(cached) " >&6
20699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20700 /* end confdefs.h. */
20702 #include <locale.h>
20704 #if HAVE_LANGINFO_CODESET
20705 # include <langinfo.h>
20707 #include <stdlib.h>
20708 #include <string.h>
20712 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
20713 imitates locale dependent behaviour by looking at the environment
20714 variables, and all locales use the UTF-8 encoding. */
20715 #if !(defined __BEOS__ || defined __HAIKU__)
20716 /* Check whether the given locale name is recognized by the system. */
20717 # if defined _WIN32 && !defined __CYGWIN__
20718 /* On native Windows, setlocale(category, "") looks at the system settings,
20719 not at the environment variables. Also, when an encoding suffix such
20720 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
20721 category of the locale to "C". */
20722 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
20723 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
20726 if (setlocale (LC_ALL, "") == NULL) return 1;
20728 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
20729 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
20730 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
20731 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
20732 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
20733 some unit tests fail. */
20734 # if HAVE_LANGINFO_CODESET
20736 const char *cs = nl_langinfo (CODESET);
20737 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
20742 /* On Cygwin, avoid locale names without encoding suffix, because the
20743 locale_charset() function relies on the encoding suffix. Note that
20744 LC_ALL is set on the command line. */
20745 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
20747 /* Check whether in the abbreviation of the second month, the second
20748 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
20749 two bytes long, with UTF-8 encoding. */
20750 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
20751 if (strftime (buf, sizeof (buf), "%b", &t) < 4
20752 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
20755 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
20756 /* Check whether the decimal separator is a comma.
20757 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
20758 are nl_langinfo(RADIXCHAR) are both ".". */
20759 if (localeconv () ->decimal_point[0] != ',') return 1;
20765 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
20766 (eval $ac_link) 2>&5
20768 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20769 test $ac_status = 0; } && test -s conftest$ac_exeext; then
20771 # Handle native Windows specially, because there setlocale() interprets
20772 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
20773 # "fr" or "fra" as "French" or "French_France.1252",
20774 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
20775 # "ja" as "Japanese" or "Japanese_Japan.932",
20778 # Test for the hypothetical native Windows locale name.
20779 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20780 gt_cv_locale_fr_utf8=French_France.65001
20783 gt_cv_locale_fr_utf8=none
20787 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
20788 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
20789 # configure script would override the LC_ALL setting. Likewise for
20790 # LC_CTYPE, which is also set at the beginning of the configure script.
20791 # Test for the usual locale name.
20792 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20793 gt_cv_locale_fr_utf8=fr_FR
20795 # Test for the locale name with explicit encoding suffix.
20796 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20797 gt_cv_locale_fr_utf8=fr_FR.UTF-8
20799 # Test for the Solaris 7 locale name.
20800 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20801 gt_cv_locale_fr_utf8=fr.UTF-8
20804 gt_cv_locale_fr_utf8=none
20814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
20815 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
20816 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
20822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
20823 printf %s "checking for a transitional chinese locale... " >&6; }
20824 if test ${gt_cv_locale_zh_CN+y}
20826 printf %s "(cached) " >&6
20829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20830 /* end confdefs.h. */
20832 #include <locale.h>
20833 #include <stdlib.h>
20835 #if HAVE_LANGINFO_CODESET
20836 # include <langinfo.h>
20838 #include <stdlib.h>
20839 #include <string.h>
20844 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
20845 imitates locale dependent behaviour by looking at the environment
20846 variables, and all locales use the UTF-8 encoding. */
20847 #if defined __BEOS__ || defined __HAIKU__
20850 /* Check whether the given locale name is recognized by the system. */
20851 # if defined _WIN32 && !defined __CYGWIN__
20852 /* On native Windows, setlocale(category, "") looks at the system settings,
20853 not at the environment variables. Also, when an encoding suffix such
20854 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
20855 category of the locale to "C". */
20856 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
20857 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
20860 if (setlocale (LC_ALL, "") == NULL) return 1;
20862 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
20863 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
20864 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
20865 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
20866 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
20867 some unit tests fail.
20868 On MirBSD 10, when an unsupported locale is specified, setlocale()
20869 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
20870 # if HAVE_LANGINFO_CODESET
20872 const char *cs = nl_langinfo (CODESET);
20873 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
20874 || strcmp (cs, "UTF-8") == 0)
20879 /* On Cygwin, avoid locale names without encoding suffix, because the
20880 locale_charset() function relies on the encoding suffix. Note that
20881 LC_ALL is set on the command line. */
20882 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
20884 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
20885 This excludes the UTF-8 encoding (except on MirBSD). */
20888 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
20889 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
20890 for (p = buf; *p != '\0'; p++)
20891 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
20894 /* Check whether a typical GB18030 multibyte sequence is recognized as a
20895 single wide character. This excludes the GB2312 and GBK encodings. */
20896 if (mblen ("\203\062\332\066", 5) != 4)
20903 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
20904 (eval $ac_link) 2>&5
20906 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20907 test $ac_status = 0; } && test -s conftest$ac_exeext; then
20909 # Handle native Windows specially, because there setlocale() interprets
20910 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
20911 # "fr" or "fra" as "French" or "French_France.1252",
20912 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
20913 # "ja" as "Japanese" or "Japanese_Japan.932",
20916 # Test for the hypothetical native Windows locale name.
20917 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20918 gt_cv_locale_zh_CN=Chinese_China.54936
20921 gt_cv_locale_zh_CN=none
20925 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
20926 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
20927 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
20928 gt_cv_locale_zh_CN=none
20931 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
20932 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
20933 # configure script would override the LC_ALL setting. Likewise for
20934 # LC_CTYPE, which is also set at the beginning of the configure script.
20935 # Test for the locale name without encoding suffix.
20936 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20937 gt_cv_locale_zh_CN=zh_CN
20939 # Test for the locale name with explicit encoding suffix.
20940 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
20941 gt_cv_locale_zh_CN=zh_CN.GB18030
20944 gt_cv_locale_zh_CN=none
20950 # If there was a link error, due to mblen(), the system is so old that
20951 # it certainly doesn't have a chinese locale.
20952 gt_cv_locale_zh_CN=none
20957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
20958 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
20959 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
20963 HAVE_NL_LANGINFO=1;
20964 REPLACE_NL_LANGINFO=0;
20981 if test $gl_cv_have_include_next = yes; then
20982 gl_cv_next_langinfo_h='<'langinfo.h'>'
20984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
20985 printf %s "checking absolute name of <langinfo.h>... " >&6; }
20986 if test ${gl_cv_next_langinfo_h+y}
20988 printf %s "(cached) " >&6
20991 if test $ac_cv_header_langinfo_h = yes; then
20996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20997 /* end confdefs.h. */
20998 #include <langinfo.h>
21001 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21002 *) gl_absname_cpp="$ac_cpp" ;;
21007 gl_dirsep_regex='[/\\]'
21010 gl_dirsep_regex='\/'
21013 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21014 gl_header_literal_regex=`echo 'langinfo.h' \
21015 | sed -e "$gl_make_literal_regex_sed"`
21016 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21017 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21023 gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21024 sed -n "$gl_absolute_header_sed"`
21026 gl_header=$gl_cv_absolute_langinfo_h
21027 gl_cv_next_langinfo_h='"'$gl_header'"'
21029 gl_cv_next_langinfo_h='<'langinfo.h'>'
21034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
21035 printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
21037 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
21039 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21040 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21041 gl_next_as_first_directive='<'langinfo.h'>'
21043 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21044 gl_next_as_first_directive=$gl_cv_next_langinfo_h
21046 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
21052 HAVE_LANGINFO_CODESET=0
21053 HAVE_LANGINFO_T_FMT_AMPM=0
21054 HAVE_LANGINFO_ALTMON=0
21055 HAVE_LANGINFO_ERA=0
21056 HAVE_LANGINFO_YESEXPR=0
21058 if test $ac_cv_header_langinfo_h = yes; then
21060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
21061 printf %s "checking whether langinfo.h defines CODESET... " >&6; }
21062 if test ${gl_cv_header_langinfo_codeset+y}
21064 printf %s "(cached) " >&6
21066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21067 /* end confdefs.h. */
21068 #include <langinfo.h>
21079 if ac_fn_c_try_compile "$LINENO"
21081 gl_cv_header_langinfo_codeset=yes
21083 gl_cv_header_langinfo_codeset=no
21085 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
21089 printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
21090 if test $gl_cv_header_langinfo_codeset = yes; then
21091 HAVE_LANGINFO_CODESET=1
21093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
21094 printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
21095 if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
21097 printf %s "(cached) " >&6
21099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21100 /* end confdefs.h. */
21101 #include <langinfo.h>
21102 int a = T_FMT_AMPM;
21112 if ac_fn_c_try_compile "$LINENO"
21114 gl_cv_header_langinfo_t_fmt_ampm=yes
21116 gl_cv_header_langinfo_t_fmt_ampm=no
21118 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
21122 printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
21123 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
21124 HAVE_LANGINFO_T_FMT_AMPM=1
21126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
21127 printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
21128 if test ${gl_cv_header_langinfo_altmon+y}
21130 printf %s "(cached) " >&6
21132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21133 /* end confdefs.h. */
21134 #include <langinfo.h>
21145 if ac_fn_c_try_compile "$LINENO"
21147 gl_cv_header_langinfo_altmon=yes
21149 gl_cv_header_langinfo_altmon=no
21151 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
21155 printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
21156 if test $gl_cv_header_langinfo_altmon = yes; then
21157 HAVE_LANGINFO_ALTMON=1
21159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
21160 printf %s "checking whether langinfo.h defines ERA... " >&6; }
21161 if test ${gl_cv_header_langinfo_era+y}
21163 printf %s "(cached) " >&6
21165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21166 /* end confdefs.h. */
21167 #include <langinfo.h>
21178 if ac_fn_c_try_compile "$LINENO"
21180 gl_cv_header_langinfo_era=yes
21182 gl_cv_header_langinfo_era=no
21184 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
21188 printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
21189 if test $gl_cv_header_langinfo_era = yes; then
21190 HAVE_LANGINFO_ERA=1
21192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
21193 printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
21194 if test ${gl_cv_header_langinfo_yesexpr+y}
21196 printf %s "(cached) " >&6
21198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21199 /* end confdefs.h. */
21200 #include <langinfo.h>
21211 if ac_fn_c_try_compile "$LINENO"
21213 gl_cv_header_langinfo_yesexpr=yes
21215 gl_cv_header_langinfo_yesexpr=no
21217 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
21221 printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
21222 if test $gl_cv_header_langinfo_yesexpr = yes; then
21223 HAVE_LANGINFO_YESEXPR=1
21239 GL_M4_GNULIB_NL_LANGINFO=0
21247 REPLACE_LOCALECONV=0;
21248 REPLACE_SETLOCALE=0;
21249 REPLACE_NEWLOCALE=0;
21250 REPLACE_DUPLOCALE=0;
21251 REPLACE_FREELOCALE=0;
21252 REPLACE_STRUCT_LCONV=0;
21253 LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
21257 HAVE_MAX_ALIGN_T=1;
21261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21262 printf %s "checking for wchar_t... " >&6; }
21263 if test ${gt_cv_c_wchar_t+y}
21265 printf %s "(cached) " >&6
21267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21268 /* end confdefs.h. */
21269 #include <stddef.h>
21270 wchar_t foo = (wchar_t)'\0';
21279 if ac_fn_c_try_compile "$LINENO"
21281 gt_cv_c_wchar_t=yes
21285 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21288 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
21289 if test $gt_cv_c_wchar_t = yes; then
21291 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
21303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
21304 printf %s "checking for good max_align_t... " >&6; }
21305 if test ${gl_cv_type_max_align_t+y}
21307 printf %s "(cached) " >&6
21309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21310 /* end confdefs.h. */
21311 #include <stddef.h>
21312 unsigned int s = sizeof (max_align_t);
21313 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
21314 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
21315 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
21317 typedef struct { char a; max_align_t b; } max_helper;
21318 typedef struct { char a; long b; } long_helper;
21319 typedef struct { char a; double b; } double_helper;
21320 typedef struct { char a; long double b; } long_double_helper;
21321 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
21322 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
21323 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
21333 if ac_fn_c_try_compile "$LINENO"
21335 gl_cv_type_max_align_t=yes
21337 gl_cv_type_max_align_t=no
21339 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
21343 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
21344 if test $gl_cv_type_max_align_t = no; then
21349 if test $gt_cv_c_wchar_t = no; then
21354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
21355 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
21356 if test ${gl_cv_decl_null_works+y}
21358 printf %s "(cached) " >&6
21360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21361 /* end confdefs.h. */
21362 #include <stddef.h>
21363 int test[2 * (sizeof NULL == sizeof (void *)) -1];
21373 if ac_fn_c_try_compile "$LINENO"
21375 gl_cv_decl_null_works=yes
21377 gl_cv_decl_null_works=no
21379 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
21382 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
21383 if test $gl_cv_decl_null_works = no; then
21389 if test -n "$STDDEF_H"; then
21390 GL_GENERATE_STDDEF_H_TRUE=
21391 GL_GENERATE_STDDEF_H_FALSE='#'
21393 GL_GENERATE_STDDEF_H_TRUE='#'
21394 GL_GENERATE_STDDEF_H_FALSE=
21397 if test -n "$STDDEF_H"; then
21406 if test $gl_cv_have_include_next = yes; then
21407 gl_cv_next_stddef_h='<'stddef.h'>'
21409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
21410 printf %s "checking absolute name of <stddef.h>... " >&6; }
21411 if test ${gl_cv_next_stddef_h+y}
21413 printf %s "(cached) " >&6
21418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21419 /* end confdefs.h. */
21420 #include <stddef.h>
21423 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21424 *) gl_absname_cpp="$ac_cpp" ;;
21429 gl_dirsep_regex='[/\\]'
21432 gl_dirsep_regex='\/'
21435 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21436 gl_header_literal_regex=`echo 'stddef.h' \
21437 | sed -e "$gl_make_literal_regex_sed"`
21438 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21439 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21445 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21446 sed -n "$gl_absolute_header_sed"`
21448 gl_header=$gl_cv_absolute_stddef_h
21449 gl_cv_next_stddef_h='"'$gl_header'"'
21453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
21454 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
21456 NEXT_STDDEF_H=$gl_cv_next_stddef_h
21458 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21459 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21460 gl_next_as_first_directive='<'stddef.h'>'
21462 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21463 gl_next_as_first_directive=$gl_cv_next_stddef_h
21465 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
21476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
21477 printf %s "checking whether locale.h defines locale_t... " >&6; }
21478 if test ${gl_cv_header_locale_has_locale_t+y}
21480 printf %s "(cached) " >&6
21482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21483 /* end confdefs.h. */
21484 #include <locale.h>
21494 if ac_fn_c_try_compile "$LINENO"
21496 gl_cv_header_locale_has_locale_t=yes
21498 gl_cv_header_locale_has_locale_t=no
21500 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
21504 printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
21507 if test $ac_cv_header_xlocale_h = yes; then
21509 if test $gl_cv_header_locale_has_locale_t = yes; then
21510 gl_cv_header_locale_h_needs_xlocale_h=no
21512 gl_cv_header_locale_h_needs_xlocale_h=yes
21517 gl_cv_header_locale_h_needs_xlocale_h=no
21518 if test $gl_cv_header_locale_has_locale_t = yes; then
21539 printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
21544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
21545 printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
21546 if test ${gl_cv_header_locale_h_posix2001+y}
21548 printf %s "(cached) " >&6
21550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21551 /* end confdefs.h. */
21552 #include <locale.h>
21553 int x = LC_MESSAGES;
21554 int y = sizeof (((struct lconv *) 0)->decimal_point);
21563 if ac_fn_c_try_compile "$LINENO"
21565 gl_cv_header_locale_h_posix2001=yes
21567 gl_cv_header_locale_h_posix2001=no
21569 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
21572 printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
21574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
21575 printf %s "checking whether struct lconv is properly defined... " >&6; }
21576 if test ${gl_cv_sys_struct_lconv_ok+y}
21578 printf %s "(cached) " >&6
21580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21581 /* end confdefs.h. */
21582 #include <locale.h>
21584 int x = sizeof (l.decimal_point);
21585 int y = sizeof (l.int_p_cs_precedes);
21594 if ac_fn_c_try_compile "$LINENO"
21596 gl_cv_sys_struct_lconv_ok=yes
21598 gl_cv_sys_struct_lconv_ok=no
21600 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
21604 printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
21605 if test $gl_cv_sys_struct_lconv_ok = no; then
21608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21609 /* end confdefs.h. */
21616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21617 $EGREP "Special" >/dev/null 2>&1
21621 REPLACE_STRUCT_LCONV=1
21626 *) REPLACE_STRUCT_LCONV=1 ;;
21638 if test $gl_cv_have_include_next = yes; then
21639 gl_cv_next_locale_h='<'locale.h'>'
21641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
21642 printf %s "checking absolute name of <locale.h>... " >&6; }
21643 if test ${gl_cv_next_locale_h+y}
21645 printf %s "(cached) " >&6
21650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21651 /* end confdefs.h. */
21652 #include <locale.h>
21655 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21656 *) gl_absname_cpp="$ac_cpp" ;;
21661 gl_dirsep_regex='[/\\]'
21664 gl_dirsep_regex='\/'
21667 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21668 gl_header_literal_regex=`echo 'locale.h' \
21669 | sed -e "$gl_make_literal_regex_sed"`
21670 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21671 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21677 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21678 sed -n "$gl_absolute_header_sed"`
21680 gl_header=$gl_cv_absolute_locale_h
21681 gl_cv_next_locale_h='"'$gl_header'"'
21685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
21686 printf "%s\n" "$gl_cv_next_locale_h" >&6; }
21688 NEXT_LOCALE_H=$gl_cv_next_locale_h
21690 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21691 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21692 gl_next_as_first_directive='<'locale.h'>'
21694 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21695 gl_next_as_first_directive=$gl_cv_next_locale_h
21697 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
21707 GL_M4_GNULIB_LOCALECONV=0
21711 GL_M4_GNULIB_SETLOCALE=0
21715 GL_M4_GNULIB_SETLOCALE_NULL=0
21719 GL_M4_GNULIB_DUPLOCALE=0
21723 GL_M4_GNULIB_LOCALENAME=0
21728 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
21729 printf %s "checking for LC_MESSAGES... " >&6; }
21730 if test ${gt_cv_val_LC_MESSAGES+y}
21732 printf %s "(cached) " >&6
21734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21735 /* end confdefs.h. */
21736 #include <locale.h>
21745 if ac_fn_c_try_link "$LINENO"
21747 gt_cv_val_LC_MESSAGES=yes
21749 gt_cv_val_LC_MESSAGES=no
21751 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21752 conftest$ac_exeext conftest.$ac_ext
21754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
21755 printf "%s\n" "$gt_cv_val_LC_MESSAGES" >&6; }
21756 if test $gt_cv_val_LC_MESSAGES = yes; then
21758 printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h
21774 if test $ac_cv_func_uselocale = yes; then
21776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5
21777 printf %s "checking whether uselocale works... " >&6; }
21778 if test ${gt_cv_func_uselocale_works+y}
21780 printf %s "(cached) " >&6
21782 if test "$cross_compiling" = yes
21784 # Guess no on AIX and z/OS, yes otherwise.
21786 aix* | openedition*) gt_cv_func_uselocale_works="guessing no" ;;
21787 *) gt_cv_func_uselocale_works="guessing yes" ;;
21791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21792 /* end confdefs.h. */
21794 #include <locale.h>
21796 # include <xlocale.h>
21802 setlocale (LC_ALL, "en_US.UTF-8");
21806 if ac_fn_c_try_run "$LINENO"
21808 gt_cv_func_uselocale_works=yes
21810 gt_cv_func_uselocale_works=no
21812 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21813 conftest.$ac_objext conftest.beam conftest.$ac_ext
21818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5
21819 printf "%s\n" "$gt_cv_func_uselocale_works" >&6; }
21821 gt_cv_func_uselocale_works=no
21823 case "$gt_cv_func_uselocale_works" in
21825 gt_working_uselocale=yes
21827 printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h
21831 gt_working_uselocale=no
21836 case "$gt_cv_func_uselocale_works" in
21839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5
21840 printf %s "checking for fake locale system (OpenBSD)... " >&6; }
21841 if test ${gt_cv_locale_fake+y}
21843 printf %s "(cached) " >&6
21845 if test "$cross_compiling" = yes
21848 openbsd*) gt_cv_locale_fake="guessing yes" ;;
21849 *) gt_cv_locale_fake="guessing no" ;;
21853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21854 /* end confdefs.h. */
21856 #include <locale.h>
21858 # include <xlocale.h>
21862 locale_t loc1, loc2;
21863 if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1;
21864 if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1;
21865 loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0);
21866 loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0);
21867 return !(loc1 == loc2);
21870 if ac_fn_c_try_run "$LINENO"
21872 gt_cv_locale_fake=yes
21874 gt_cv_locale_fake=no
21876 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21877 conftest.$ac_objext conftest.beam conftest.$ac_ext
21882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fake" >&5
21883 printf "%s\n" "$gt_cv_locale_fake" >&6; }
21885 *) gt_cv_locale_fake=no ;;
21887 case "$gt_cv_locale_fake" in
21889 gt_fake_locales=yes
21891 printf "%s\n" "#define HAVE_FAKE_LOCALES 1" >>confdefs.h
21899 case "$gt_cv_func_uselocale_works" in
21901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5
21902 printf %s "checking for Solaris 11.4 locale system... " >&6; }
21903 if test ${gt_cv_locale_solaris114+y}
21905 printf %s "(cached) " >&6
21909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21910 /* end confdefs.h. */
21912 #include <locale.h>
21913 struct _LC_locale_t *x;
21924 if ac_fn_c_try_compile "$LINENO"
21926 gt_cv_locale_solaris114=yes
21928 gt_cv_locale_solaris114=no
21930 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21932 *) gt_cv_locale_solaris114=no ;;
21936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5
21937 printf "%s\n" "$gt_cv_locale_solaris114" >&6; }
21939 *) gt_cv_locale_solaris114=no ;;
21941 if test $gt_cv_locale_solaris114 = yes; then
21943 printf "%s\n" "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h
21947 case "$gt_cv_func_uselocale_works" in
21949 ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l"
21950 if test "x$ac_cv_func_getlocalename_l" = xyes
21952 printf "%s\n" "#define HAVE_GETLOCALENAME_L 1" >>confdefs.h
21959 gt_nameless_locales=no
21962 gt_nameless_locales=yes
21964 printf "%s\n" "#define HAVE_NAMELESS_LOCALES 1" >>confdefs.h
21969 if test $gt_working_uselocale = yes && test $gt_fake_locales = no; then
21970 gt_good_uselocale=yes
21972 printf "%s\n" "#define HAVE_GOOD_USELOCALE 1" >>confdefs.h
21975 gt_good_uselocale=no
21978 if test $gt_good_uselocale = yes && test $gt_nameless_locales = yes; then
21979 gt_localename_enhances_locale_funcs=yes
21980 LOCALENAME_ENHANCE_LOCALE_FUNCS=1
21982 printf "%s\n" "#define LOCALENAME_ENHANCE_LOCALE_FUNCS 1" >>confdefs.h
21985 gt_localename_enhances_locale_funcs=no
21989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
21990 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
21991 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
21993 printf %s "(cached) " >&6
21995 gt_save_LIBS="$LIBS"
21996 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
21997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21998 /* end confdefs.h. */
21999 #include <CoreFoundation/CFPreferences.h>
22003 CFPreferencesCopyAppValue(NULL, NULL)
22008 if ac_fn_c_try_link "$LINENO"
22010 gt_cv_func_CFPreferencesCopyAppValue=yes
22012 gt_cv_func_CFPreferencesCopyAppValue=no
22014 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22015 conftest$ac_exeext conftest.$ac_ext
22016 LIBS="$gt_save_LIBS"
22018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
22019 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
22020 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
22022 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
22025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
22026 printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
22027 if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y}
22029 printf %s "(cached) " >&6
22031 gt_save_LIBS="$LIBS"
22032 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
22033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22034 /* end confdefs.h. */
22035 #include <CoreFoundation/CFLocale.h>
22039 CFLocaleCopyPreferredLanguages();
22044 if ac_fn_c_try_link "$LINENO"
22046 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
22048 gt_cv_func_CFLocaleCopyPreferredLanguages=no
22050 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22051 conftest$ac_exeext conftest.$ac_ext
22052 LIBS="$gt_save_LIBS"
22054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
22055 printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
22056 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
22058 printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
22062 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
22063 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
22064 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
22073 gl_threads_api=none
22078 if test "$gl_use_threads" != no; then
22081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
22082 printf %s "checking whether imported symbols can be declared weak... " >&6; }
22083 if test ${gl_cv_have_weak+y}
22085 printf %s "(cached) " >&6
22088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22089 /* end confdefs.h. */
22090 extern void xyzzy ();
22100 if ac_fn_c_try_link "$LINENO"
22102 gl_cv_have_weak=maybe
22104 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22105 conftest$ac_exeext conftest.$ac_ext
22106 if test $gl_cv_have_weak = maybe; then
22107 if test "$cross_compiling" = yes
22109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22110 /* end confdefs.h. */
22112 Extensible Linking Format
22116 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22117 $EGREP "Extensible Linking Format" >/dev/null 2>&1
22119 gl_cv_have_weak="guessing yes"
22121 gl_cv_have_weak="guessing no"
22127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22128 /* end confdefs.h. */
22134 return (fputs == NULL);
22137 if ac_fn_c_try_run "$LINENO"
22139 gl_cv_have_weak=yes
22143 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22144 conftest.$ac_objext conftest.beam conftest.$ac_ext
22148 case " $LDFLAGS " in
22149 *" -static "*) gl_cv_have_weak=no ;;
22151 case "$gl_cv_have_weak" in
22154 freebsd* | dragonfly* | midnightbsd*)
22156 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
22157 cat <<EOF > conftest2.c
22158 #include <pthread.h>
22159 #pragma weak pthread_mutexattr_gettype
22162 return (pthread_mutexattr_gettype != NULL);
22165 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
22166 || gl_cv_have_weak=no
22167 rm -f conftest1.c libempty.so conftest2.c conftest
22174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
22175 printf "%s\n" "$gl_cv_have_weak" >&6; }
22176 case "$gl_cv_have_weak" in
22179 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
22184 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
22188 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
22190 gl_have_isoc_threads="$ac_cv_header_threads_h"
22192 if test "$gl_use_threads" = yes \
22193 || test "$gl_use_threads" = posix \
22194 || test "$gl_use_threads" = isoc+posix; then
22197 if test -z "$gl_pthreadlib_body_done"; then
22201 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
22202 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
22203 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
22204 if test "x$ac_cv_header_pthread_h" = xyes
22206 gl_have_pthread_h=yes
22208 gl_have_pthread_h=no
22211 if test "$gl_have_pthread_h" = yes; then
22212 # Other possible tests:
22213 # -lpthreads (FSU threads, PCthreads)
22215 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
22216 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
22217 # the second one only in libpthread, and lock.c needs it.
22219 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
22220 # needs -pthread for some reason. See:
22221 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
22223 for gl_pthread in '' '-pthread'; do
22224 LIBS="$LIBS $gl_pthread"
22225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22226 /* end confdefs.h. */
22227 #include <pthread.h>
22229 pthread_mutexattr_t ma;
22234 pthread_mutex_lock (&m);
22235 pthread_mutexattr_init (&ma);
22240 if ac_fn_c_try_link "$LINENO"
22243 LIBPTHREAD=$gl_pthread
22244 LIBPMULTITHREAD=$gl_pthread
22246 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22247 conftest$ac_exeext conftest.$ac_ext
22249 test $gl_pthread_api = yes && break
22252 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
22253 # since it is defined as a macro on OSF/1.)
22254 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
22255 # The program links fine without libpthread. But it may actually
22256 # need to link with libpthread in order to create multiple threads.
22257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
22258 printf %s "checking for pthread_kill in -lpthread... " >&6; }
22259 if test ${ac_cv_lib_pthread_pthread_kill+y}
22261 printf %s "(cached) " >&6
22263 ac_check_lib_save_LIBS=$LIBS
22264 LIBS="-lpthread $LIBS"
22265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22266 /* end confdefs.h. */
22268 /* Override any GCC internal prototype to avoid an error.
22269 Use char because int might match the return type of a GCC
22270 builtin and then its argument prototype would still apply. */
22271 char pthread_kill ();
22275 return pthread_kill ();
22280 if ac_fn_c_try_link "$LINENO"
22282 ac_cv_lib_pthread_pthread_kill=yes
22284 ac_cv_lib_pthread_pthread_kill=no
22286 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22287 conftest$ac_exeext conftest.$ac_ext
22288 LIBS=$ac_check_lib_save_LIBS
22290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
22291 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
22292 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
22294 LIBPMULTITHREAD=-lpthread
22295 # On Solaris and HP-UX, most pthread functions exist also in libc.
22296 # Therefore pthread_in_use() needs to actually try to create a
22297 # thread: pthread_create from libc will fail, whereas
22298 # pthread_create will actually create a thread.
22299 # On Solaris 10 or newer, this test is no longer needed, because
22300 # libc contains the fully functional pthread functions.
22302 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
22304 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
22310 elif test $gl_pthread_api != yes; then
22311 # Some library is needed. Try libpthread and libc_r.
22312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
22313 printf %s "checking for pthread_kill in -lpthread... " >&6; }
22314 if test ${ac_cv_lib_pthread_pthread_kill+y}
22316 printf %s "(cached) " >&6
22318 ac_check_lib_save_LIBS=$LIBS
22319 LIBS="-lpthread $LIBS"
22320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22321 /* end confdefs.h. */
22323 /* Override any GCC internal prototype to avoid an error.
22324 Use char because int might match the return type of a GCC
22325 builtin and then its argument prototype would still apply. */
22326 char pthread_kill ();
22330 return pthread_kill ();
22335 if ac_fn_c_try_link "$LINENO"
22337 ac_cv_lib_pthread_pthread_kill=yes
22339 ac_cv_lib_pthread_pthread_kill=no
22341 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22342 conftest$ac_exeext conftest.$ac_ext
22343 LIBS=$ac_check_lib_save_LIBS
22345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
22346 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
22347 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
22350 LIBPTHREAD=-lpthread
22351 LIBPMULTITHREAD=-lpthread
22354 if test $gl_pthread_api != yes; then
22356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
22357 printf %s "checking for pthread_kill in -lc_r... " >&6; }
22358 if test ${ac_cv_lib_c_r_pthread_kill+y}
22360 printf %s "(cached) " >&6
22362 ac_check_lib_save_LIBS=$LIBS
22364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22365 /* end confdefs.h. */
22367 /* Override any GCC internal prototype to avoid an error.
22368 Use char because int might match the return type of a GCC
22369 builtin and then its argument prototype would still apply. */
22370 char pthread_kill ();
22374 return pthread_kill ();
22379 if ac_fn_c_try_link "$LINENO"
22381 ac_cv_lib_c_r_pthread_kill=yes
22383 ac_cv_lib_c_r_pthread_kill=no
22385 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22386 conftest$ac_exeext conftest.$ac_ext
22387 LIBS=$ac_check_lib_save_LIBS
22389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
22390 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
22391 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
22395 LIBPMULTITHREAD=-lc_r
22401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
22402 printf %s "checking whether POSIX threads API is available... " >&6; }
22403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
22404 printf "%s\n" "$gl_pthread_api" >&6; }
22407 if test $gl_pthread_api = yes; then
22409 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
22413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22414 /* end confdefs.h. */
22424 if ac_fn_c_try_link "$LINENO"
22429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
22430 printf %s "checking for sched_yield in -lrt... " >&6; }
22431 if test ${ac_cv_lib_rt_sched_yield+y}
22433 printf %s "(cached) " >&6
22435 ac_check_lib_save_LIBS=$LIBS
22437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22438 /* end confdefs.h. */
22440 /* Override any GCC internal prototype to avoid an error.
22441 Use char because int might match the return type of a GCC
22442 builtin and then its argument prototype would still apply. */
22443 char sched_yield ();
22447 return sched_yield ();
22452 if ac_fn_c_try_link "$LINENO"
22454 ac_cv_lib_rt_sched_yield=yes
22456 ac_cv_lib_rt_sched_yield=no
22458 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22459 conftest$ac_exeext conftest.$ac_ext
22460 LIBS=$ac_check_lib_save_LIBS
22462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
22463 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
22464 if test "x$ac_cv_lib_rt_sched_yield" = xyes
22466 LIB_SCHED_YIELD=-lrt
22468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
22469 printf %s "checking for sched_yield in -lposix4... " >&6; }
22470 if test ${ac_cv_lib_posix4_sched_yield+y}
22472 printf %s "(cached) " >&6
22474 ac_check_lib_save_LIBS=$LIBS
22475 LIBS="-lposix4 $LIBS"
22476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22477 /* end confdefs.h. */
22479 /* Override any GCC internal prototype to avoid an error.
22480 Use char because int might match the return type of a GCC
22481 builtin and then its argument prototype would still apply. */
22482 char sched_yield ();
22486 return sched_yield ();
22491 if ac_fn_c_try_link "$LINENO"
22493 ac_cv_lib_posix4_sched_yield=yes
22495 ac_cv_lib_posix4_sched_yield=no
22497 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22498 conftest$ac_exeext conftest.$ac_ext
22499 LIBS=$ac_check_lib_save_LIBS
22501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
22502 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
22503 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
22505 LIB_SCHED_YIELD=-lposix4
22512 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22513 conftest$ac_exeext conftest.$ac_ext
22516 gl_pthreadlib_body_done=done
22519 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
22520 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
22521 if test $gl_pthread_api = yes; then
22522 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
22523 gl_threads_api='isoc+posix'
22525 printf "%s\n" "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
22527 LIBTHREAD= LTLIBTHREAD=
22529 gl_threads_api=posix
22531 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
22533 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
22534 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
22536 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
22538 LIBTHREAD= LTLIBTHREAD=
22541 freebsd* | dragonfly* | midnightbsd*)
22542 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
22544 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
22554 if test $gl_threads_api = none; then
22555 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
22559 if test -z "$gl_stdthreadlib_body_done"; then
22569 if test -z "$gl_pthreadlib_body_done"; then
22573 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
22574 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
22575 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
22576 if test "x$ac_cv_header_pthread_h" = xyes
22578 gl_have_pthread_h=yes
22580 gl_have_pthread_h=no
22583 if test "$gl_have_pthread_h" = yes; then
22584 # Other possible tests:
22585 # -lpthreads (FSU threads, PCthreads)
22587 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
22588 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
22589 # the second one only in libpthread, and lock.c needs it.
22591 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
22592 # needs -pthread for some reason. See:
22593 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
22595 for gl_pthread in '' '-pthread'; do
22596 LIBS="$LIBS $gl_pthread"
22597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22598 /* end confdefs.h. */
22599 #include <pthread.h>
22601 pthread_mutexattr_t ma;
22606 pthread_mutex_lock (&m);
22607 pthread_mutexattr_init (&ma);
22612 if ac_fn_c_try_link "$LINENO"
22615 LIBPTHREAD=$gl_pthread
22616 LIBPMULTITHREAD=$gl_pthread
22618 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22619 conftest$ac_exeext conftest.$ac_ext
22621 test $gl_pthread_api = yes && break
22624 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
22625 # since it is defined as a macro on OSF/1.)
22626 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
22627 # The program links fine without libpthread. But it may actually
22628 # need to link with libpthread in order to create multiple threads.
22629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
22630 printf %s "checking for pthread_kill in -lpthread... " >&6; }
22631 if test ${ac_cv_lib_pthread_pthread_kill+y}
22633 printf %s "(cached) " >&6
22635 ac_check_lib_save_LIBS=$LIBS
22636 LIBS="-lpthread $LIBS"
22637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22638 /* end confdefs.h. */
22640 /* Override any GCC internal prototype to avoid an error.
22641 Use char because int might match the return type of a GCC
22642 builtin and then its argument prototype would still apply. */
22643 char pthread_kill ();
22647 return pthread_kill ();
22652 if ac_fn_c_try_link "$LINENO"
22654 ac_cv_lib_pthread_pthread_kill=yes
22656 ac_cv_lib_pthread_pthread_kill=no
22658 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22659 conftest$ac_exeext conftest.$ac_ext
22660 LIBS=$ac_check_lib_save_LIBS
22662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
22663 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
22664 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
22666 LIBPMULTITHREAD=-lpthread
22667 # On Solaris and HP-UX, most pthread functions exist also in libc.
22668 # Therefore pthread_in_use() needs to actually try to create a
22669 # thread: pthread_create from libc will fail, whereas
22670 # pthread_create will actually create a thread.
22671 # On Solaris 10 or newer, this test is no longer needed, because
22672 # libc contains the fully functional pthread functions.
22674 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
22676 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
22682 elif test $gl_pthread_api != yes; then
22683 # Some library is needed. Try libpthread and libc_r.
22684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
22685 printf %s "checking for pthread_kill in -lpthread... " >&6; }
22686 if test ${ac_cv_lib_pthread_pthread_kill+y}
22688 printf %s "(cached) " >&6
22690 ac_check_lib_save_LIBS=$LIBS
22691 LIBS="-lpthread $LIBS"
22692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22693 /* end confdefs.h. */
22695 /* Override any GCC internal prototype to avoid an error.
22696 Use char because int might match the return type of a GCC
22697 builtin and then its argument prototype would still apply. */
22698 char pthread_kill ();
22702 return pthread_kill ();
22707 if ac_fn_c_try_link "$LINENO"
22709 ac_cv_lib_pthread_pthread_kill=yes
22711 ac_cv_lib_pthread_pthread_kill=no
22713 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22714 conftest$ac_exeext conftest.$ac_ext
22715 LIBS=$ac_check_lib_save_LIBS
22717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
22718 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
22719 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
22722 LIBPTHREAD=-lpthread
22723 LIBPMULTITHREAD=-lpthread
22726 if test $gl_pthread_api != yes; then
22728 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
22729 printf %s "checking for pthread_kill in -lc_r... " >&6; }
22730 if test ${ac_cv_lib_c_r_pthread_kill+y}
22732 printf %s "(cached) " >&6
22734 ac_check_lib_save_LIBS=$LIBS
22736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22737 /* end confdefs.h. */
22739 /* Override any GCC internal prototype to avoid an error.
22740 Use char because int might match the return type of a GCC
22741 builtin and then its argument prototype would still apply. */
22742 char pthread_kill ();
22746 return pthread_kill ();
22751 if ac_fn_c_try_link "$LINENO"
22753 ac_cv_lib_c_r_pthread_kill=yes
22755 ac_cv_lib_c_r_pthread_kill=no
22757 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22758 conftest$ac_exeext conftest.$ac_ext
22759 LIBS=$ac_check_lib_save_LIBS
22761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
22762 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
22763 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
22767 LIBPMULTITHREAD=-lc_r
22773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
22774 printf %s "checking whether POSIX threads API is available... " >&6; }
22775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
22776 printf "%s\n" "$gl_pthread_api" >&6; }
22779 if test $gl_pthread_api = yes; then
22781 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
22785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22786 /* end confdefs.h. */
22796 if ac_fn_c_try_link "$LINENO"
22801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
22802 printf %s "checking for sched_yield in -lrt... " >&6; }
22803 if test ${ac_cv_lib_rt_sched_yield+y}
22805 printf %s "(cached) " >&6
22807 ac_check_lib_save_LIBS=$LIBS
22809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22810 /* end confdefs.h. */
22812 /* Override any GCC internal prototype to avoid an error.
22813 Use char because int might match the return type of a GCC
22814 builtin and then its argument prototype would still apply. */
22815 char sched_yield ();
22819 return sched_yield ();
22824 if ac_fn_c_try_link "$LINENO"
22826 ac_cv_lib_rt_sched_yield=yes
22828 ac_cv_lib_rt_sched_yield=no
22830 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22831 conftest$ac_exeext conftest.$ac_ext
22832 LIBS=$ac_check_lib_save_LIBS
22834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
22835 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
22836 if test "x$ac_cv_lib_rt_sched_yield" = xyes
22838 LIB_SCHED_YIELD=-lrt
22840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
22841 printf %s "checking for sched_yield in -lposix4... " >&6; }
22842 if test ${ac_cv_lib_posix4_sched_yield+y}
22844 printf %s "(cached) " >&6
22846 ac_check_lib_save_LIBS=$LIBS
22847 LIBS="-lposix4 $LIBS"
22848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22849 /* end confdefs.h. */
22851 /* Override any GCC internal prototype to avoid an error.
22852 Use char because int might match the return type of a GCC
22853 builtin and then its argument prototype would still apply. */
22854 char sched_yield ();
22858 return sched_yield ();
22863 if ac_fn_c_try_link "$LINENO"
22865 ac_cv_lib_posix4_sched_yield=yes
22867 ac_cv_lib_posix4_sched_yield=no
22869 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22870 conftest$ac_exeext conftest.$ac_ext
22871 LIBS=$ac_check_lib_save_LIBS
22873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
22874 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
22875 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
22877 LIB_SCHED_YIELD=-lposix4
22884 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22885 conftest$ac_exeext conftest.$ac_ext
22888 gl_pthreadlib_body_done=done
22891 if test $ac_cv_header_threads_h = yes; then
22892 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
22893 if test "x$ac_cv_func_thrd_create" = xyes
22895 printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h
22899 if test $ac_cv_func_thrd_create = yes; then
22902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
22903 printf %s "checking for thrd_create in -lstdthreads... " >&6; }
22904 if test ${ac_cv_lib_stdthreads_thrd_create+y}
22906 printf %s "(cached) " >&6
22908 ac_check_lib_save_LIBS=$LIBS
22909 LIBS="-lstdthreads $LIBS"
22910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22911 /* end confdefs.h. */
22913 /* Override any GCC internal prototype to avoid an error.
22914 Use char because int might match the return type of a GCC
22915 builtin and then its argument prototype would still apply. */
22916 char thrd_create ();
22920 return thrd_create ();
22925 if ac_fn_c_try_link "$LINENO"
22927 ac_cv_lib_stdthreads_thrd_create=yes
22929 ac_cv_lib_stdthreads_thrd_create=no
22931 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22932 conftest$ac_exeext conftest.$ac_ext
22933 LIBS=$ac_check_lib_save_LIBS
22935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
22936 printf "%s\n" "$ac_cv_lib_stdthreads_thrd_create" >&6; }
22937 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes
22940 LIBSTDTHREAD='-lstdthreads -lpthread'
22944 LIBSTDTHREAD="$LIBPMULTITHREAD"
22950 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
22956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
22957 printf %s "checking whether ISO C threads API is available... " >&6; }
22958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
22959 printf "%s\n" "$ac_cv_header_threads_h" >&6; }
22960 gl_stdthreadlib_body_done=done
22963 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
22964 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
22965 gl_threads_api=isoc
22967 printf "%s\n" "#define USE_ISOC_THREADS 1" >>confdefs.h
22971 if test $gl_threads_api = none; then
22972 case "$gl_use_threads" in
22973 yes | windows | win32) # The 'win32' is for backward compatibility.
22974 if { case "$host_os" in
22979 gl_threads_api=windows
22981 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
22988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
22989 printf %s "checking for multithread API to use... " >&6; }
22990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
22991 printf "%s\n" "$gl_threads_api" >&6; }
23001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
23002 printf %s "checking for a sed that does not truncate output... " >&6; }
23003 if test ${ac_cv_path_SED+y}
23005 printf %s "(cached) " >&6
23007 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
23008 for ac_i in 1 2 3 4 5 6 7; do
23009 ac_script="$ac_script$as_nl$ac_script"
23011 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
23012 { ac_script=; unset ac_script;}
23013 if test -z "$SED"; then
23014 ac_path_SED_found=false
23015 # Loop through the user's path and test for each of PROGNAME-LIST
23016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23017 for as_dir in $PATH
23020 case $as_dir in #(((
23023 *) as_dir=$as_dir/ ;;
23025 for ac_prog in sed gsed
23027 for ac_exec_ext in '' $ac_executable_extensions; do
23028 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
23029 as_fn_executable_p "$ac_path_SED" || continue
23030 # Check for GNU ac_path_SED and select it if it is found.
23031 # Check for GNU $ac_path_SED
23032 case `"$ac_path_SED" --version 2>&1` in
23034 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
23037 printf %s 0123456789 >"conftest.in"
23040 cat "conftest.in" "conftest.in" >"conftest.tmp"
23041 mv "conftest.tmp" "conftest.in"
23042 cp "conftest.in" "conftest.nl"
23043 printf "%s\n" '' >> "conftest.nl"
23044 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
23045 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
23046 as_fn_arith $ac_count + 1 && ac_count=$as_val
23047 if test $ac_count -gt ${ac_path_SED_max-0}; then
23048 # Best one so far, save it but keep looking for a better one
23049 ac_cv_path_SED="$ac_path_SED"
23050 ac_path_SED_max=$ac_count
23052 # 10*(2^10) chars as input seems more than enough
23053 test $ac_count -gt 10 && break
23055 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
23058 $ac_path_SED_found && break 3
23063 if test -z "$ac_cv_path_SED"; then
23064 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
23067 ac_cv_path_SED=$SED
23071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
23072 printf "%s\n" "$ac_cv_path_SED" >&6; }
23073 SED="$ac_cv_path_SED"
23078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
23079 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
23080 if test ${ac_cv_func_malloc_0_nonnull+y}
23082 printf %s "(cached) " >&6
23084 if test "$cross_compiling" = yes
23087 # Guess yes on platforms where we know the result.
23088 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
23089 | gnu* | *-musl* | midnightbsd* \
23090 | hpux* | solaris* | cygwin* | mingw* | msys* )
23091 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
23092 # If we don't know, obey --enable-cross-guesses.
23093 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
23097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23098 /* end confdefs.h. */
23099 #include <stdlib.h>
23104 void *p = malloc (0);
23113 if ac_fn_c_try_run "$LINENO"
23115 ac_cv_func_malloc_0_nonnull=yes
23117 ac_cv_func_malloc_0_nonnull=no
23119 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23120 conftest.$ac_objext conftest.beam conftest.$ac_ext
23125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
23126 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
23127 case $ac_cv_func_malloc_0_nonnull in #(
23129 gl_cv_func_malloc_0_nonnull=1 ;; #(
23131 gl_cv_func_malloc_0_nonnull=0 ;;
23135 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
23150 if test $gl_cv_have_include_next = yes; then
23151 gl_cv_next_math_h='<'math.h'>'
23153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
23154 printf %s "checking absolute name of <math.h>... " >&6; }
23155 if test ${gl_cv_next_math_h+y}
23157 printf %s "(cached) " >&6
23160 if test $ac_cv_header_math_h = yes; then
23165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23166 /* end confdefs.h. */
23170 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23171 *) gl_absname_cpp="$ac_cpp" ;;
23176 gl_dirsep_regex='[/\\]'
23179 gl_dirsep_regex='\/'
23182 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23183 gl_header_literal_regex=`echo 'math.h' \
23184 | sed -e "$gl_make_literal_regex_sed"`
23185 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23186 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23192 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23193 sed -n "$gl_absolute_header_sed"`
23195 gl_header=$gl_cv_absolute_math_h
23196 gl_cv_next_math_h='"'$gl_header'"'
23198 gl_cv_next_math_h='<'math.h'>'
23203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
23204 printf "%s\n" "$gl_cv_next_math_h" >&6; }
23206 NEXT_MATH_H=$gl_cv_next_math_h
23208 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23209 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23210 gl_next_as_first_directive='<'math.h'>'
23212 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23213 gl_next_as_first_directive=$gl_cv_next_math_h
23215 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
23221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
23222 printf %s "checking whether NAN macro works... " >&6; }
23223 if test ${gl_cv_header_math_nan_works+y}
23225 printf %s "(cached) " >&6
23227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23228 /* end confdefs.h. */
23233 /* Solaris 10 has a broken definition of NAN. Other platforms
23234 fail to provide NAN, or provide it only in C99 mode; this
23235 test only needs to fail when NAN is provided but wrong. */
23245 if ac_fn_c_try_compile "$LINENO"
23247 gl_cv_header_math_nan_works=yes
23249 gl_cv_header_math_nan_works=no
23251 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
23254 printf "%s\n" "$gl_cv_header_math_nan_works" >&6; }
23255 if test $gl_cv_header_math_nan_works = no; then
23258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
23259 printf %s "checking whether HUGE_VAL works... " >&6; }
23260 if test ${gl_cv_header_math_huge_val_works+y}
23262 printf %s "(cached) " >&6
23264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23265 /* end confdefs.h. */
23270 /* Solaris 10 has a broken definition of HUGE_VAL. */
23271 double d = HUGE_VAL;
23277 if ac_fn_c_try_compile "$LINENO"
23279 gl_cv_header_math_huge_val_works=yes
23281 gl_cv_header_math_huge_val_works=no
23283 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
23286 printf "%s\n" "$gl_cv_header_math_huge_val_works" >&6; }
23287 if test $gl_cv_header_math_huge_val_works = no; then
23295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
23296 printf %s "checking for mbstate_t... " >&6; }
23297 if test ${ac_cv_type_mbstate_t+y}
23299 printf %s "(cached) " >&6
23301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23302 /* end confdefs.h. */
23303 $ac_includes_default
23308 mbstate_t x; return sizeof x;
23313 if ac_fn_c_try_compile "$LINENO"
23315 ac_cv_type_mbstate_t=yes
23317 ac_cv_type_mbstate_t=no
23319 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
23322 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
23323 if test $ac_cv_type_mbstate_t = yes; then
23325 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
23329 printf "%s\n" "#define mbstate_t int" >>confdefs.h
23337 HAVE_EXPLICIT_BZERO=1;
23340 HAVE_DECL_MEMMEM=1;
23342 HAVE_DECL_MEMRCHR=1;
23347 HAVE_DECL_STRDUP=1;
23348 HAVE_DECL_STRNDUP=1;
23349 HAVE_DECL_STRNLEN=1;
23353 HAVE_DECL_STRTOK_R=1;
23354 HAVE_DECL_STRERROR_R=1;
23355 HAVE_STRERRORNAME_NP=1;
23356 HAVE_SIGABBREV_NP=1;
23357 HAVE_SIGDESCR_NP=1;
23358 HAVE_DECL_STRSIGNAL=1;
23364 REPLACE_STRCHRNUL=0;
23370 REPLACE_STRCASESTR=0;
23371 REPLACE_STRTOK_R=0;
23372 REPLACE_STRERROR=0;
23373 REPLACE_STRERROR_R=0;
23374 REPLACE_STRERRORNAME_NP=0;
23375 REPLACE_STRSIGNAL=0;
23376 UNDEFINE_STRTOK_R=0;
23381 GL_M4_GNULIB_EXPLICIT_BZERO=0
23385 GL_M4_GNULIB_FFSL=0
23389 GL_M4_GNULIB_FFSLL=0
23393 GL_M4_GNULIB_MEMCHR=0
23397 GL_M4_GNULIB_MEMMEM=0
23401 GL_M4_GNULIB_MEMPCPY=0
23405 GL_M4_GNULIB_MEMRCHR=0
23409 GL_M4_GNULIB_RAWMEMCHR=0
23413 GL_M4_GNULIB_STPCPY=0
23417 GL_M4_GNULIB_STPNCPY=0
23421 GL_M4_GNULIB_STRCHRNUL=0
23425 GL_M4_GNULIB_STRDUP=0
23429 GL_M4_GNULIB_STRNCAT=0
23433 GL_M4_GNULIB_STRNDUP=0
23437 GL_M4_GNULIB_STRNLEN=0
23441 GL_M4_GNULIB_STRPBRK=0
23445 GL_M4_GNULIB_STRSEP=0
23449 GL_M4_GNULIB_STRSTR=0
23453 GL_M4_GNULIB_STRCASESTR=0
23457 GL_M4_GNULIB_STRTOK_R=0
23461 GL_M4_GNULIB_MBSLEN=0
23465 GL_M4_GNULIB_MBSNLEN=0
23469 GL_M4_GNULIB_MBSCHR=0
23473 GL_M4_GNULIB_MBSRCHR=0
23477 GL_M4_GNULIB_MBSSTR=0
23481 GL_M4_GNULIB_MBSCASECMP=0
23485 GL_M4_GNULIB_MBSNCASECMP=0
23489 GL_M4_GNULIB_MBSPCASECMP=0
23493 GL_M4_GNULIB_MBSCASESTR=0
23497 GL_M4_GNULIB_MBSCSPN=0
23501 GL_M4_GNULIB_MBSPBRK=0
23505 GL_M4_GNULIB_MBSSPN=0
23509 GL_M4_GNULIB_MBSSEP=0
23513 GL_M4_GNULIB_MBSTOK_R=0
23517 GL_M4_GNULIB_STRERROR=0
23521 GL_M4_GNULIB_STRERROR_R=0
23525 GL_M4_GNULIB_STRERRORNAME_NP=0
23529 GL_M4_GNULIB_SIGABBREV_NP=0
23533 GL_M4_GNULIB_SIGDESCR_NP=0
23537 GL_M4_GNULIB_STRSIGNAL=0
23541 GL_M4_GNULIB_STRVERSCMP=0
23545 GL_M4_GNULIB_MDA_MEMCCPY=1
23549 GL_M4_GNULIB_MDA_STRDUP=1
23556 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
23557 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
23558 # irrelevant for anonymous mappings.
23559 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
23560 if test "x$ac_cv_func_mmap" = xyes
23568 # Try to allow MAP_ANONYMOUS.
23569 gl_have_mmap_anonymous=no
23570 if test $gl_have_mmap = yes; then
23571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
23572 printf %s "checking for MAP_ANONYMOUS... " >&6; }
23573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23574 /* end confdefs.h. */
23576 #include <sys/mman.h>
23577 #ifdef MAP_ANONYMOUS
23578 I cannot identify this map
23582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23583 $EGREP "I cannot identify this map" >/dev/null 2>&1
23585 gl_have_mmap_anonymous=yes
23589 if test $gl_have_mmap_anonymous != yes; then
23590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23591 /* end confdefs.h. */
23593 #include <sys/mman.h>
23595 I cannot identify this map
23599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23600 $EGREP "I cannot identify this map" >/dev/null 2>&1
23603 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
23605 gl_have_mmap_anonymous=yes
23610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
23611 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
23612 if test $gl_have_mmap_anonymous = yes; then
23614 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
23628 # Detect platform-specific bugs in some versions of glibc:
23629 # memchr should not dereference anything with length 0
23630 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
23631 # memchr should not dereference overestimated length after a match
23632 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
23633 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
23634 # memchr should cast the second argument to 'unsigned char'.
23635 # This bug exists in Android 4.3.
23636 # Assume that memchr works on platforms that lack mprotect.
23637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
23638 printf %s "checking whether memchr works... " >&6; }
23639 if test ${gl_cv_func_memchr_works+y}
23641 printf %s "(cached) " >&6
23643 if test "$cross_compiling" = yes
23646 # Guess no on Android.
23647 linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
23648 # Guess yes on native Windows.
23649 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
23650 # If we don't know, obey --enable-cross-guesses.
23651 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
23655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23656 /* end confdefs.h. */
23658 #include <string.h>
23659 #if HAVE_SYS_MMAN_H
23660 # include <fcntl.h>
23661 # include <unistd.h>
23662 # include <sys/types.h>
23663 # include <sys/mman.h>
23665 # define MAP_FILE 0
23674 char *fence = NULL;
23675 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
23676 # if HAVE_MAP_ANONYMOUS
23677 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
23679 # else /* !HAVE_MAP_ANONYMOUS */
23680 const int flags = MAP_FILE | MAP_PRIVATE;
23681 int fd = open ("/dev/zero", O_RDONLY, 0666);
23685 int pagesize = getpagesize ();
23687 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
23689 if (two_pages != (char *)(-1)
23690 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
23691 fence = two_pages + pagesize;
23696 /* Test against bugs on glibc systems. */
23697 if (memchr (fence, 0, 0))
23699 strcpy (fence - 9, "12345678");
23700 if (memchr (fence - 9, 0, 79) != fence - 1)
23702 if (memchr (fence - 1, 0, 3) != fence - 1)
23704 /* Test against bug on AIX 7.2. */
23705 if (memchr (fence - 4, '6', 16) != fence - 4)
23708 /* Test against bug on Android 4.3. */
23714 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
23723 if ac_fn_c_try_run "$LINENO"
23725 gl_cv_func_memchr_works=yes
23727 gl_cv_func_memchr_works=no
23729 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23730 conftest.$ac_objext conftest.beam conftest.$ac_ext
23735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
23736 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
23737 case "$gl_cv_func_memchr_works" in
23739 *) REPLACE_MEMCHR=1 ;;
23742 ac_fn_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23743 if test "x$ac_cv_have_decl_memrchr" = xyes
23749 printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h
23755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
23756 printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
23757 if test ${gl_cv_minmax_in_limits_h+y}
23759 printf %s "(cached) " >&6
23761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23762 /* end confdefs.h. */
23763 #include <limits.h>
23764 int x = MIN (42, 17);
23773 if ac_fn_c_try_compile "$LINENO"
23775 gl_cv_minmax_in_limits_h=yes
23777 gl_cv_minmax_in_limits_h=no
23779 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
23782 printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
23783 if test $gl_cv_minmax_in_limits_h = yes; then
23785 printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
23794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
23795 printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
23796 if test ${gl_cv_minmax_in_sys_param_h+y}
23798 printf %s "(cached) " >&6
23800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23801 /* end confdefs.h. */
23802 #include <sys/param.h>
23803 int x = MIN (42, 17);
23812 if ac_fn_c_try_compile "$LINENO"
23814 gl_cv_minmax_in_sys_param_h=yes
23816 gl_cv_minmax_in_sys_param_h=no
23818 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
23821 printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
23822 if test $gl_cv_minmax_in_sys_param_h = yes; then
23824 printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
23837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
23838 printf %s "checking for O_CLOEXEC... " >&6; }
23839 if test ${gl_cv_macro_O_CLOEXEC+y}
23841 printf %s "(cached) " >&6
23843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23844 /* end confdefs.h. */
23858 if ac_fn_c_try_compile "$LINENO"
23860 gl_cv_macro_O_CLOEXEC=yes
23862 gl_cv_macro_O_CLOEXEC=no
23864 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
23867 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
23871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
23872 printf %s "checking for promoted mode_t type... " >&6; }
23873 if test ${gl_cv_promoted_mode_t+y}
23875 printf %s "(cached) " >&6
23878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23879 /* end confdefs.h. */
23880 #include <sys/types.h>
23884 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
23889 if ac_fn_c_try_compile "$LINENO"
23891 gl_cv_promoted_mode_t='int'
23893 gl_cv_promoted_mode_t='mode_t'
23895 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
23899 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
23901 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
23908 HAVE_POSIX_SPAWN=1;
23909 HAVE_POSIX_SPAWNATTR_T=1;
23910 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
23912 HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1;
23914 HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=1;
23916 REPLACE_POSIX_SPAWN=0;
23917 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0;
23919 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
23921 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
23923 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0;
23925 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
23933 gl_saved_libs=$LIBS
23934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing posix_spawn" >&5
23935 printf %s "checking for library containing posix_spawn... " >&6; }
23936 if test ${ac_cv_search_posix_spawn+y}
23938 printf %s "(cached) " >&6
23940 ac_func_search_save_LIBS=$LIBS
23941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23942 /* end confdefs.h. */
23944 /* Override any GCC internal prototype to avoid an error.
23945 Use char because int might match the return type of a GCC
23946 builtin and then its argument prototype would still apply. */
23947 char posix_spawn ();
23951 return posix_spawn ();
23956 for ac_lib in '' rt
23958 if test -z "$ac_lib"; then
23959 ac_res="none required"
23962 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
23964 if ac_fn_c_try_link "$LINENO"
23966 ac_cv_search_posix_spawn=$ac_res
23968 rm -f core conftest.err conftest.$ac_objext conftest.beam \
23970 if test ${ac_cv_search_posix_spawn+y}
23975 if test ${ac_cv_search_posix_spawn+y}
23979 ac_cv_search_posix_spawn=no
23981 rm conftest.$ac_ext
23982 LIBS=$ac_func_search_save_LIBS
23984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_posix_spawn" >&5
23985 printf "%s\n" "$ac_cv_search_posix_spawn" >&6; }
23986 ac_res=$ac_cv_search_posix_spawn
23987 if test "$ac_res" != no
23989 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23990 test "$ac_cv_search_posix_spawn" = "none required" ||
23991 LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn
23994 ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
23995 if test "x$ac_cv_func_posix_spawn" = xyes
23997 printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h
24001 LIBS=$gl_saved_libs
24003 if test $ac_cv_func_posix_spawn != yes; then
24011 ac_fn_check_decl "$LINENO" "posix_spawn" "ac_cv_have_decl_posix_spawn" "#include <spawn.h>
24012 " "$ac_c_undeclared_builtin_options" "CFLAGS"
24013 if test "x$ac_cv_have_decl_posix_spawn" = xyes
24019 printf "%s\n" "#define HAVE_DECL_POSIX_SPAWN $ac_have_decl" >>confdefs.h
24021 if test $ac_cv_func_posix_spawn = yes; then
24023 if test $ac_cv_func_posix_spawn_file_actions_addchdir_np = no; then
24024 REPLACE_POSIX_SPAWN=1
24028 if test $REPLACE_POSIX_SPAWN = 0; then
24031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
24032 printf %s "checking whether posix_spawn works... " >&6; }
24033 if test ${gl_cv_func_posix_spawn_works+y}
24035 printf %s "(cached) " >&6
24037 if test $cross_compiling = no; then
24038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24039 /* end confdefs.h. */
24043 #include <signal.h>
24045 #include <stdbool.h>
24047 #include <stdlib.h>
24048 #include <string.h>
24049 #include <unistd.h>
24050 #include <sys/types.h>
24051 #include <sys/wait.h>
24057 extern char **environ;
24059 #ifndef STDIN_FILENO
24060 # define STDIN_FILENO 0
24062 #ifndef STDOUT_FILENO
24063 # define STDOUT_FILENO 1
24065 #ifndef STDERR_FILENO
24066 # define STDERR_FILENO 2
24070 # define WTERMSIG(x) ((x) & 0x7f)
24073 # define WIFEXITED(x) (WTERMSIG (x) == 0)
24075 #ifndef WEXITSTATUS
24076 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
24079 #define CHILD_PROGRAM_FILENAME "/non/exist/ent"
24084 if (0 <= fd && fd <= 2)
24086 int f = fd_safer (dup (fd));
24099 char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
24101 sigset_t blocked_signals;
24102 sigset_t fatal_signal_set;
24103 posix_spawn_file_actions_t actions;
24104 bool actions_allocated;
24105 posix_spawnattr_t attrs;
24106 bool attrs_allocated;
24112 setvbuf (stdout, NULL, _IOFBF, 0);
24113 puts ("This should be seen only once.");
24114 if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
24116 perror ("cannot create pipe");
24119 sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
24120 sigemptyset (&fatal_signal_set);
24121 sigaddset (&fatal_signal_set, SIGINT);
24122 sigaddset (&fatal_signal_set, SIGTERM);
24123 sigaddset (&fatal_signal_set, SIGHUP);
24124 sigaddset (&fatal_signal_set, SIGPIPE);
24125 sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
24126 actions_allocated = false;
24127 attrs_allocated = false;
24128 if ((err = posix_spawn_file_actions_init (&actions)) != 0
24129 || (actions_allocated = true,
24130 (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
24131 || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
24132 || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
24133 || (err = posix_spawnattr_init (&attrs)) != 0
24134 || (attrs_allocated = true,
24135 (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
24136 || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
24137 || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
24139 if (actions_allocated)
24140 posix_spawn_file_actions_destroy (&actions);
24141 if (attrs_allocated)
24142 posix_spawnattr_destroy (&attrs);
24143 sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
24149 perror ("subprocess failed");
24153 posix_spawn_file_actions_destroy (&actions);
24154 posix_spawnattr_destroy (&attrs);
24155 sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
24159 while (waitpid (child, &status, 0) != child)
24161 if (!WIFEXITED (status))
24163 fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
24166 exitstatus = WEXITSTATUS (status);
24167 if (exitstatus != 127)
24169 fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
24176 if ac_fn_c_try_link "$LINENO"
24178 if test -s conftest$ac_exeext \
24179 && ./conftest$ac_exeext > conftest.out \
24180 && echo 'This should be seen only once.' > conftest.ok \
24181 && cmp conftest.out conftest.ok >/dev/null 2>&1; then
24182 gl_cv_func_posix_spawn_works=yes
24184 gl_cv_func_posix_spawn_works=no
24187 gl_cv_func_posix_spawn_works=no
24189 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24190 conftest$ac_exeext conftest.$ac_ext
24191 if test $gl_cv_func_posix_spawn_works = yes; then
24192 if test "$cross_compiling" = yes
24194 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24195 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
24196 as_fn_error $? "cannot run test program while cross compiling
24197 See \`config.log' for more details" "$LINENO" 5; }
24199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24200 /* end confdefs.h. */
24202 /* Test whether posix_spawn_file_actions_addopen supports filename arguments
24203 that contain special characters such as '*'. */
24207 #include <signal.h>
24209 #include <stdbool.h>
24211 #include <string.h>
24212 #include <unistd.h>
24213 #include <sys/types.h>
24214 #include <sys/wait.h>
24220 extern char **environ;
24222 #ifndef STDIN_FILENO
24223 # define STDIN_FILENO 0
24225 #ifndef STDOUT_FILENO
24226 # define STDOUT_FILENO 1
24228 #ifndef STDERR_FILENO
24229 # define STDERR_FILENO 2
24233 # define WTERMSIG(x) ((x) & 0x7f)
24236 # define WIFEXITED(x) (WTERMSIG (x) == 0)
24238 #ifndef WEXITSTATUS
24239 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
24242 #define CHILD_PROGRAM_FILENAME "conftest"
24243 #define DATA_FILENAME "conftest%=*#?"
24249 char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
24250 posix_spawn_file_actions_t actions;
24251 bool actions_allocated;
24257 /* Create a data file with specific contents. */
24258 fp = fopen (DATA_FILENAME, "wb");
24261 perror ("cannot create data file");
24264 fwrite ("Halle Potta", 1, 11, fp);
24265 if (fflush (fp) || fclose (fp))
24267 perror ("cannot prepare data file");
24271 /* Avoid reading from our stdin, as it could block. */
24272 freopen ("/dev/null", "rb", stdin);
24274 /* Test whether posix_spawn_file_actions_addopen with this file name
24275 actually works, but spawning a child that reads from this file. */
24276 actions_allocated = false;
24277 if ((err = posix_spawn_file_actions_init (&actions)) != 0
24278 || (actions_allocated = true,
24279 (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
24280 || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
24282 if (actions_allocated)
24283 posix_spawn_file_actions_destroy (&actions);
24285 perror ("subprocess failed");
24288 posix_spawn_file_actions_destroy (&actions);
24290 while (waitpid (child, &status, 0) != child)
24292 if (!WIFEXITED (status))
24294 fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
24297 exitstatus = WEXITSTATUS (status);
24298 if (exitstatus != 0)
24300 fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
24311 /* See if reading from STDIN_FILENO yields the expected contents. */
24312 if (fread (buf, 1, sizeof (buf), stdin) == 11
24313 && memcmp (buf, "Halle Potta", 11) == 0)
24320 cleanup_then_die (int sig)
24322 /* Clean up data file. */
24323 unlink (DATA_FILENAME);
24325 /* Re-raise the signal and die from it. */
24326 signal (sig, SIG_DFL);
24331 main (int argc, char *argv[])
24335 if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
24337 /* This is the parent process. */
24338 signal (SIGINT, cleanup_then_die);
24339 signal (SIGTERM, cleanup_then_die);
24341 signal (SIGHUP, cleanup_then_die);
24344 exitstatus = parent_main ();
24348 /* This is the child process. */
24350 exitstatus = child_main ();
24352 unlink (DATA_FILENAME);
24357 if ac_fn_c_try_run "$LINENO"
24361 gl_cv_func_posix_spawn_works=no
24363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24364 conftest.$ac_objext conftest.beam conftest.$ac_ext
24370 aix*) gl_cv_func_posix_spawn_works="guessing no";;
24371 *) gl_cv_func_posix_spawn_works="guessing yes";;
24376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
24377 printf "%s\n" "$gl_cv_func_posix_spawn_works" >&6; }
24379 case "$gl_cv_func_posix_spawn_works" in
24381 *) REPLACE_POSIX_SPAWN=1 ;;
24384 if test $REPLACE_POSIX_SPAWN = 0; then
24387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn rejects scripts without shebang" >&5
24388 printf %s "checking whether posix_spawn rejects scripts without shebang... " >&6; }
24389 if test ${gl_cv_func_posix_spawn_secure_exec+y}
24391 printf %s "(cached) " >&6
24393 echo ':' > conftest.scr
24394 chmod a+x conftest.scr
24395 if test "$cross_compiling" = yes
24398 # Guess no on GNU/Hurd.
24400 gl_cv_func_posix_spawn_secure_exec="guessing no" ;;
24401 # Guess yes on all other platforms.
24403 gl_cv_func_posix_spawn_secure_exec="guessing yes" ;;
24407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24408 /* end confdefs.h. */
24412 #include <stddef.h>
24413 #include <sys/types.h>
24414 #include <sys/wait.h>
24418 const char *prog_path = "./conftest.scr";
24419 const char *prog_argv[2] = { prog_path, NULL };
24420 const char *environment[2] = { "PATH=.", NULL };
24423 int err = posix_spawn (&child, prog_path, NULL, NULL,
24424 (char **) prog_argv, (char **) environment);
24425 if (err == ENOEXEC)
24430 while (waitpid (child, &status, 0) != child)
24432 if (!WIFEXITED (status))
24434 if (WEXITSTATUS (status) != 127)
24440 if ac_fn_c_try_run "$LINENO"
24442 gl_cv_func_posix_spawn_secure_exec=yes
24444 gl_cv_func_posix_spawn_secure_exec=no
24446 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24447 conftest.$ac_objext conftest.beam conftest.$ac_ext
24453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_secure_exec" >&5
24454 printf "%s\n" "$gl_cv_func_posix_spawn_secure_exec" >&6; }
24455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnp rejects scripts without shebang" >&5
24456 printf %s "checking whether posix_spawnp rejects scripts without shebang... " >&6; }
24457 if test ${gl_cv_func_posix_spawnp_secure_exec+y}
24459 printf %s "(cached) " >&6
24461 echo ':' > conftest.scr
24462 chmod a+x conftest.scr
24463 if test "$cross_compiling" = yes
24466 # Guess yes on glibc systems (glibc >= 2.15 actually) except GNU/Hurd,
24467 # musl libc, NetBSD.
24468 *-gnu* | *-musl* | netbsd*)
24469 gl_cv_func_posix_spawnp_secure_exec="guessing yes" ;;
24470 # Guess no on GNU/Hurd, macOS, FreeBSD, OpenBSD, AIX, Solaris, Cygwin.
24471 gnu* | darwin* | freebsd* | dragonfly* | midnightbsd* | openbsd* | \
24472 aix* | solaris* | cygwin*)
24473 gl_cv_func_posix_spawnp_secure_exec="guessing no" ;;
24474 # If we don't know, obey --enable-cross-guesses.
24476 gl_cv_func_posix_spawnp_secure_exec="$gl_cross_guess_normal" ;;
24480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24481 /* end confdefs.h. */
24485 #include <stddef.h>
24486 #include <sys/types.h>
24487 #include <sys/wait.h>
24491 const char *prog_path = "./conftest.scr";
24492 const char *prog_argv[2] = { prog_path, NULL };
24493 const char *environment[2] = { "PATH=.", NULL };
24496 int err = posix_spawnp (&child, prog_path, NULL, NULL,
24497 (char **) prog_argv, (char **) environment);
24498 if (err == ENOEXEC)
24503 while (waitpid (child, &status, 0) != child)
24505 if (!WIFEXITED (status))
24507 if (WEXITSTATUS (status) != 127)
24513 if ac_fn_c_try_run "$LINENO"
24515 gl_cv_func_posix_spawnp_secure_exec=yes
24517 gl_cv_func_posix_spawnp_secure_exec=no
24519 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24520 conftest.$ac_objext conftest.beam conftest.$ac_ext
24526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawnp_secure_exec" >&5
24527 printf "%s\n" "$gl_cv_func_posix_spawnp_secure_exec" >&6; }
24529 case "$gl_cv_func_posix_spawn_secure_exec" in
24531 *) REPLACE_POSIX_SPAWN=1 ;;
24533 case "$gl_cv_func_posix_spawnp_secure_exec" in
24535 *) REPLACE_POSIX_SPAWN=1 ;;
24538 if test $REPLACE_POSIX_SPAWN = 0; then
24539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
24540 printf %s "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
24541 if test ${gl_cv_func_spawnattr_setschedpolicy+y}
24543 printf %s "(cached) " >&6
24545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24546 /* end confdefs.h. */
24549 #if POSIX_SPAWN_SETSCHEDULER
24550 POSIX scheduling supported
24554 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24555 $EGREP "POSIX scheduling supported" >/dev/null 2>&1
24557 gl_cv_func_spawnattr_setschedpolicy=yes
24559 gl_cv_func_spawnattr_setschedpolicy=no
24565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
24566 printf "%s\n" "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
24567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
24568 printf %s "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
24569 if test ${gl_cv_func_spawnattr_setschedparam+y}
24571 printf %s "(cached) " >&6
24573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24574 /* end confdefs.h. */
24577 #if POSIX_SPAWN_SETSCHEDPARAM
24578 POSIX scheduling supported
24582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24583 $EGREP "POSIX scheduling supported" >/dev/null 2>&1
24585 gl_cv_func_spawnattr_setschedparam=yes
24587 gl_cv_func_spawnattr_setschedparam=no
24593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
24594 printf "%s\n" "$gl_cv_func_spawnattr_setschedparam" >&6; }
24597 if test $ac_cv_have_decl_posix_spawn = yes; then
24598 REPLACE_POSIX_SPAWN=1
24601 if test $ac_cv_func_posix_spawn != yes || test $REPLACE_POSIX_SPAWN = 1; then
24603 printf "%s\n" "#define REPLACE_POSIX_SPAWN 1" >>confdefs.h
24609 GL_M4_GNULIB_POSIX_SPAWN=0
24613 GL_M4_GNULIB_POSIX_SPAWNP=0
24617 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0
24621 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0
24625 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0
24629 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0
24633 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0
24637 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0
24641 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0
24645 GL_M4_GNULIB_POSIX_SPAWNATTR_INIT=0
24649 GL_M4_GNULIB_POSIX_SPAWNATTR_GETFLAGS=0
24653 GL_M4_GNULIB_POSIX_SPAWNATTR_SETFLAGS=0
24657 GL_M4_GNULIB_POSIX_SPAWNATTR_GETPGROUP=0
24661 GL_M4_GNULIB_POSIX_SPAWNATTR_SETPGROUP=0
24665 GL_M4_GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0
24669 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0
24673 GL_M4_GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0
24677 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0
24681 GL_M4_GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0
24685 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0
24689 GL_M4_GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0
24693 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0
24697 GL_M4_GNULIB_POSIX_SPAWNATTR_DESTROY=0
24703 HAVE_POSIX_SIGNALBLOCKING=1;
24704 HAVE_PTHREAD_SIGMASK=1;
24709 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
24711 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
24713 HAVE_SIGHANDLER_T=1;
24714 REPLACE_PTHREAD_SIGMASK=0;
24718 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
24719 #include <signal.h>
24720 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
24721 #include <sys/types.h>
24724 if test "x$ac_cv_type_sigset_t" = xyes
24727 printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
24729 gl_cv_type_sigset_t=yes
24731 gl_cv_type_sigset_t=no
24734 if test $gl_cv_type_sigset_t != yes; then
24740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGPIPE" >&5
24741 printf %s "checking for SIGPIPE... " >&6; }
24742 if test ${gl_cv_header_signal_h_SIGPIPE+y}
24744 printf %s "(cached) " >&6
24747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24748 /* end confdefs.h. */
24750 #include <signal.h>
24751 #if !defined SIGPIPE
24756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24757 $EGREP "booboo" >/dev/null 2>&1
24759 gl_cv_header_signal_h_SIGPIPE=no
24761 gl_cv_header_signal_h_SIGPIPE=yes
24767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_signal_h_SIGPIPE" >&5
24768 printf "%s\n" "$gl_cv_header_signal_h_SIGPIPE" >&6; }
24772 GL_M4_GNULIB_PTHREAD_SIGMASK=0
24776 GL_M4_GNULIB_RAISE=0
24780 GL_M4_GNULIB_SIGNAL_H_SIGPIPE=0
24784 GL_M4_GNULIB_SIGPROCMASK=0
24788 GL_M4_GNULIB_SIGACTION=0
24796 if test $REPLACE_MALLOC = 1; then
24805 HAVE_SCHED_YIELD=1;
24806 REPLACE_SCHED_YIELD=0;
24814 ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
24815 #include <sys/cdefs.h>
24819 if test "x$ac_cv_header_sched_h" = xyes
24821 printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
24833 if test $gl_cv_have_include_next = yes; then
24834 gl_cv_next_sched_h='<'sched.h'>'
24836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
24837 printf %s "checking absolute name of <sched.h>... " >&6; }
24838 if test ${gl_cv_next_sched_h+y}
24840 printf %s "(cached) " >&6
24845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24846 /* end confdefs.h. */
24850 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24851 *) gl_absname_cpp="$ac_cpp" ;;
24856 gl_dirsep_regex='[/\\]'
24859 gl_dirsep_regex='\/'
24862 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24863 gl_header_literal_regex=`echo 'sched.h' \
24864 | sed -e "$gl_make_literal_regex_sed"`
24865 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24866 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24872 gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24873 sed -n "$gl_absolute_header_sed"`
24875 gl_header=$gl_cv_absolute_sched_h
24876 gl_cv_next_sched_h='"'$gl_header'"'
24880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
24881 printf "%s\n" "$gl_cv_next_sched_h" >&6; }
24883 NEXT_SCHED_H=$gl_cv_next_sched_h
24885 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24886 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24887 gl_next_as_first_directive='<'sched.h'>'
24889 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24890 gl_next_as_first_directive=$gl_cv_next_sched_h
24892 NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
24898 if test "$ac_cv_header_sched_h" = yes; then
24905 if test "$HAVE_SCHED_H" = 1; then
24906 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
24907 #include <sys/cdefs.h>
24912 if test "x$ac_cv_type_struct_sched_param" = xyes
24914 HAVE_STRUCT_SCHED_PARAM=1
24916 HAVE_STRUCT_SCHED_PARAM=0
24920 HAVE_STRUCT_SCHED_PARAM=0
24923 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
24925 if test "x$ac_cv_type_struct_sched_param" = xyes
24927 HAVE_STRUCT_SCHED_PARAM=1
24932 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
24934 if test "x$ac_cv_type_struct_sched_param" = xyes
24936 HAVE_STRUCT_SCHED_PARAM=1
24944 if test "$ac_cv_header_sys_cdefs_h" = yes; then
24957 GL_M4_GNULIB_SCHED_YIELD=0
24967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
24968 printf %s "checking for uid_t in sys/types.h... " >&6; }
24969 if test ${ac_cv_type_uid_t+y}
24971 printf %s "(cached) " >&6
24973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24974 /* end confdefs.h. */
24975 #include <sys/types.h>
24978 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24979 $EGREP "uid_t" >/dev/null 2>&1
24981 ac_cv_type_uid_t=yes
24983 ac_cv_type_uid_t=no
24988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
24989 printf "%s\n" "$ac_cv_type_uid_t" >&6; }
24990 if test $ac_cv_type_uid_t = no; then
24992 printf "%s\n" "#define uid_t int" >>confdefs.h
24995 printf "%s\n" "#define gid_t int" >>confdefs.h
25012 if test $gl_cv_have_include_next = yes; then
25013 gl_cv_next_signal_h='<'signal.h'>'
25015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25016 printf %s "checking absolute name of <signal.h>... " >&6; }
25017 if test ${gl_cv_next_signal_h+y}
25019 printf %s "(cached) " >&6
25024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25025 /* end confdefs.h. */
25026 #include <signal.h>
25029 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25030 *) gl_absname_cpp="$ac_cpp" ;;
25035 gl_dirsep_regex='[/\\]'
25038 gl_dirsep_regex='\/'
25041 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25042 gl_header_literal_regex=`echo 'signal.h' \
25043 | sed -e "$gl_make_literal_regex_sed"`
25044 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25045 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25051 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25052 sed -n "$gl_absolute_header_sed"`
25054 gl_header=$gl_cv_absolute_signal_h
25055 gl_cv_next_signal_h='"'$gl_header'"'
25059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25060 printf "%s\n" "$gl_cv_next_signal_h" >&6; }
25062 NEXT_SIGNAL_H=$gl_cv_next_signal_h
25064 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25065 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25066 gl_next_as_first_directive='<'signal.h'>'
25068 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25069 gl_next_as_first_directive=$gl_cv_next_signal_h
25071 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
25077 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
25078 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
25079 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25080 #include <signal.h>
25083 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
25087 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
25096 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25097 #include <signal.h>
25100 if test "x$ac_cv_type_sighandler_t" = xyes
25104 HAVE_SIGHANDLER_T=0
25115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
25116 printf %s "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
25117 if test ${gl_cv_prog_as_underscore+y}
25119 printf %s "(cached) " >&6
25121 cat > conftest.c <<EOF
25123 extern "C" int foo (void);
25125 int foo(void) { return 0; }
25127 # Look for the assembly language name in the .s file.
25128 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
25129 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
25130 (eval $ac_try) 2>&5
25132 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25133 test $ac_status = 0; }; } >/dev/null 2>&1
25134 if LC_ALL=C $EGREP '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
25135 gl_cv_prog_as_underscore=yes
25137 gl_cv_prog_as_underscore=no
25142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
25143 printf "%s\n" "$gl_cv_prog_as_underscore" >&6; }
25144 if test $gl_cv_prog_as_underscore = yes; then
25145 USER_LABEL_PREFIX=_
25150 printf "%s\n" "#define USER_LABEL_PREFIX $USER_LABEL_PREFIX" >>confdefs.h
25152 ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
25164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
25165 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
25166 if test ${gl_cv_func_snprintf_retval_c99+y}
25168 printf %s "(cached) " >&6
25171 if test "$cross_compiling" = yes
25174 # Guess yes on glibc systems.
25175 *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25176 # Guess yes on musl systems.
25177 *-musl*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25178 # Guess yes on FreeBSD >= 5.
25179 freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
25180 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25181 midnightbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25182 # Guess yes on Mac OS X >= 10.3.
25183 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
25184 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25185 # Guess yes on OpenBSD >= 3.9.
25186 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
25187 gl_cv_func_snprintf_retval_c99="guessing no";;
25188 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25189 # Guess yes on Solaris >= 2.10.
25190 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
25191 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
25192 # Guess yes on AIX >= 4.
25193 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
25194 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25195 # Guess yes on NetBSD >= 3.
25196 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
25197 gl_cv_func_snprintf_retval_c99="guessing no";;
25198 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25199 # Guess yes on BeOS.
25200 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25201 # Guess yes on Android.
25202 linux*-android*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25203 # Guess yes on MSVC, no on mingw.
25204 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25205 /* end confdefs.h. */
25212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25213 $EGREP "Known" >/dev/null 2>&1
25215 gl_cv_func_snprintf_retval_c99="guessing yes"
25217 gl_cv_func_snprintf_retval_c99="guessing no"
25222 # If we don't know, obey --enable-cross-guesses.
25223 *) gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
25227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25228 /* end confdefs.h. */
25231 #include <string.h>
25233 # define my_snprintf snprintf
25235 # include <stdarg.h>
25236 static int my_snprintf (char *buf, int size, const char *format, ...)
25240 va_start (args, format);
25241 ret = vsnprintf (buf, size, format, args);
25246 static char buf[100];
25249 strcpy (buf, "ABCDEF");
25250 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
25252 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
25254 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
25259 if ac_fn_c_try_run "$LINENO"
25261 gl_cv_func_snprintf_retval_c99=yes
25263 gl_cv_func_snprintf_retval_c99=no
25265 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25266 conftest.$ac_objext conftest.beam conftest.$ac_ext
25271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
25272 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
25274 ac_fn_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25275 if test "x$ac_cv_have_decl_snprintf" = xyes
25281 printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
25296 if test $gl_cv_have_include_next = yes; then
25297 gl_cv_next_spawn_h='<'spawn.h'>'
25299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
25300 printf %s "checking absolute name of <spawn.h>... " >&6; }
25301 if test ${gl_cv_next_spawn_h+y}
25303 printf %s "(cached) " >&6
25306 if test $ac_cv_header_spawn_h = yes; then
25311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25312 /* end confdefs.h. */
25316 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25317 *) gl_absname_cpp="$ac_cpp" ;;
25322 gl_dirsep_regex='[/\\]'
25325 gl_dirsep_regex='\/'
25328 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25329 gl_header_literal_regex=`echo 'spawn.h' \
25330 | sed -e "$gl_make_literal_regex_sed"`
25331 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25332 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25338 gl_cv_absolute_spawn_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25339 sed -n "$gl_absolute_header_sed"`
25341 gl_header=$gl_cv_absolute_spawn_h
25342 gl_cv_next_spawn_h='"'$gl_header'"'
25344 gl_cv_next_spawn_h='<'spawn.h'>'
25349 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
25350 printf "%s\n" "$gl_cv_next_spawn_h" >&6; }
25352 NEXT_SPAWN_H=$gl_cv_next_spawn_h
25354 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25355 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25356 gl_next_as_first_directive='<'spawn.h'>'
25358 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25359 gl_next_as_first_directive=$gl_cv_next_spawn_h
25361 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
25367 if test $ac_cv_header_spawn_h = yes; then
25369 ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
25373 if test "x$ac_cv_type_posix_spawnattr_t" = xyes
25376 printf "%s\n" "#define HAVE_POSIX_SPAWNATTR_T 1" >>confdefs.h
25380 HAVE_POSIX_SPAWNATTR_T=0
25383 ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
25387 if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes
25390 printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1" >>confdefs.h
25394 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
25399 HAVE_POSIX_SPAWNATTR_T=0
25400 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
25415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
25416 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
25417 if test ${ac_cv_header_stdbool_h+y}
25419 printf %s "(cached) " >&6
25421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25422 /* end confdefs.h. */
25424 #include <stdbool.h>
25429 typedef _Bool Bool;
25431 "error: bool is not defined"
25434 "error: false is not defined"
25437 "error: false is not 0"
25440 "error: true is not defined"
25443 "error: true is not 1"
25447 #ifndef __bool_true_false_are_defined
25448 "error: __bool_true_false_are_defined is not defined"
25451 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
25453 char a[true == 1 ? 1 : -1];
25454 char b[false == 0 ? 1 : -1];
25455 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
25456 char d[(bool) 0.5 == true ? 1 : -1];
25457 /* See body of main program for 'e'. */
25458 char f[(Bool) 0.0 == false ? 1 : -1];
25460 char h[sizeof (Bool)];
25461 char i[sizeof s.t];
25462 enum { j = false, k = true, l = false * true, m = true * 256 };
25463 /* The following fails for
25464 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
25466 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
25467 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
25468 /* Catch a bug in an HP-UX C compiler. See
25469 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
25470 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
25481 *pq |= q; *pq |= ! q;
25482 *qq |= q; *qq |= ! q;
25483 /* Refer to every declared value, to avoid compiler optimizations. */
25484 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
25485 + !m + !n + !o + !p + !q + !pq + !qq);
25491 if ac_fn_c_try_compile "$LINENO"
25493 ac_cv_header_stdbool_h=yes
25495 ac_cv_header_stdbool_h=no
25497 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
25500 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
25501 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
25502 if test "x$ac_cv_type__Bool" = xyes
25505 printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
25513 ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25514 if test "x$ac_cv_have_decl_fcloseall" = xyes
25520 printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
25525 printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
25535 if test $gl_cv_have_include_next = yes; then
25536 gl_cv_next_stdio_h='<'stdio.h'>'
25538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25539 printf %s "checking absolute name of <stdio.h>... " >&6; }
25540 if test ${gl_cv_next_stdio_h+y}
25542 printf %s "(cached) " >&6
25547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25548 /* end confdefs.h. */
25552 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25553 *) gl_absname_cpp="$ac_cpp" ;;
25558 gl_dirsep_regex='[/\\]'
25561 gl_dirsep_regex='\/'
25564 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25565 gl_header_literal_regex=`echo 'stdio.h' \
25566 | sed -e "$gl_make_literal_regex_sed"`
25567 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25568 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25574 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25575 sed -n "$gl_absolute_header_sed"`
25577 gl_header=$gl_cv_absolute_stdio_h
25578 gl_cv_next_stdio_h='"'$gl_header'"'
25582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25583 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
25585 NEXT_STDIO_H=$gl_cv_next_stdio_h
25587 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25588 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25589 gl_next_as_first_directive='<'stdio.h'>'
25591 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25592 gl_next_as_first_directive=$gl_cv_next_stdio_h
25594 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
25601 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
25602 if test ${gl_cv_func_printf_attribute_flavor+y}
25604 printf %s "(cached) " >&6
25606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25607 /* end confdefs.h. */
25609 #define __STDC_FORMAT_MACROS 1
25611 #include <inttypes.h>
25612 /* For non-mingw systems, compilation will trivially succeed.
25613 For mingw, compilation will succeed for older mingw (system
25614 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
25615 #if (defined _WIN32 && ! defined __CYGWIN__) && \
25616 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
25617 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
25628 if ac_fn_c_try_compile "$LINENO"
25630 gl_cv_func_printf_attribute_flavor=system
25632 gl_cv_func_printf_attribute_flavor=gnu
25634 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
25637 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
25638 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
25640 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
25650 if test $gl_cv_header_signal_h_SIGPIPE != yes; then
25651 REPLACE_STDIO_WRITE_FUNCS=1
25660 M4_LIBOBJS="$M4_LIBOBJS stdio-write.$ac_objext"
25671 if test $ac_cv_have_decl_fcloseall = no; then
25672 HAVE_DECL_FCLOSEALL=0
25675 ac_fn_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25676 if test "x$ac_cv_have_decl_ecvt" = xyes
25682 printf "%s\n" "#define HAVE_DECL_ECVT $ac_have_decl" >>confdefs.h
25684 ac_fn_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25685 if test "x$ac_cv_have_decl_fcvt" = xyes
25691 printf "%s\n" "#define HAVE_DECL_FCVT $ac_have_decl" >>confdefs.h
25693 ac_fn_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25694 if test "x$ac_cv_have_decl_gcvt" = xyes
25700 printf "%s\n" "#define HAVE_DECL_GCVT $ac_have_decl" >>confdefs.h
25712 if test $gl_cv_have_include_next = yes; then
25713 gl_cv_next_stdlib_h='<'stdlib.h'>'
25715 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25716 printf %s "checking absolute name of <stdlib.h>... " >&6; }
25717 if test ${gl_cv_next_stdlib_h+y}
25719 printf %s "(cached) " >&6
25724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25725 /* end confdefs.h. */
25726 #include <stdlib.h>
25729 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25730 *) gl_absname_cpp="$ac_cpp" ;;
25735 gl_dirsep_regex='[/\\]'
25738 gl_dirsep_regex='\/'
25741 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25742 gl_header_literal_regex=`echo 'stdlib.h' \
25743 | sed -e "$gl_make_literal_regex_sed"`
25744 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25745 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25751 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25752 sed -n "$gl_absolute_header_sed"`
25754 gl_header=$gl_cv_absolute_stdlib_h
25755 gl_cv_next_stdlib_h='"'$gl_header'"'
25759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25760 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
25762 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
25764 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25765 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25766 gl_next_as_first_directive='<'stdlib.h'>'
25768 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25769 gl_next_as_first_directive=$gl_cv_next_stdlib_h
25771 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
25782 if test $ac_cv_have_decl_ecvt = no; then
25786 if test $ac_cv_have_decl_fcvt = no; then
25790 if test $ac_cv_have_decl_gcvt = no; then
25794 ac_fn_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25795 if test "x$ac_cv_have_decl_strdup" = xyes
25801 printf "%s\n" "#define HAVE_DECL_STRDUP $ac_have_decl" >>confdefs.h
25804 REPLACE_STRERROR_0=0
25805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
25806 printf %s "checking whether strerror(0) succeeds... " >&6; }
25807 if test ${gl_cv_func_strerror_0_works+y}
25809 printf %s "(cached) " >&6
25811 if test "$cross_compiling" = yes
25814 # Guess yes on glibc systems.
25815 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
25816 # Guess yes on musl systems.
25817 *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
25818 # Guess yes on native Windows.
25819 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
25820 # If we don't know, obey --enable-cross-guesses.
25821 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
25825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25826 /* end confdefs.h. */
25827 #include <string.h>
25836 str = strerror (0);
25837 if (!*str) result |= 1;
25838 if (errno) result |= 2;
25839 if (strstr (str, "nknown") || strstr (str, "ndefined"))
25846 if ac_fn_c_try_run "$LINENO"
25848 gl_cv_func_strerror_0_works=yes
25850 gl_cv_func_strerror_0_works=no
25852 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25853 conftest.$ac_objext conftest.beam conftest.$ac_ext
25858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
25859 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
25860 case "$gl_cv_func_strerror_0_works" in
25863 REPLACE_STRERROR_0=1
25865 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
25877 if test $ac_cv_func_strerror_r = yes; then
25878 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
25879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
25880 printf %s "checking for strerror_r with POSIX signature... " >&6; }
25881 if test ${gl_cv_func_strerror_r_posix_signature+y}
25883 printf %s "(cached) " >&6
25885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25886 /* end confdefs.h. */
25887 #include <string.h>
25888 int strerror_r (int, char *, size_t);
25898 if ac_fn_c_try_compile "$LINENO"
25900 gl_cv_func_strerror_r_posix_signature=yes
25902 gl_cv_func_strerror_r_posix_signature=no
25904 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
25908 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
25909 if test $gl_cv_func_strerror_r_posix_signature = yes; then
25910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
25911 printf %s "checking whether strerror_r works... " >&6; }
25912 if test ${gl_cv_func_strerror_r_works+y}
25914 printf %s "(cached) " >&6
25916 if test "$cross_compiling" = yes
25921 aix*) gl_cv_func_strerror_r_works="guessing no";;
25922 # Guess no on HP-UX.
25923 hpux*) gl_cv_func_strerror_r_works="guessing no";;
25924 # Guess no on BSD variants.
25925 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
25926 # Guess yes otherwise.
25927 *) gl_cv_func_strerror_r_works="guessing yes";;
25931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25932 /* end confdefs.h. */
25934 #include <string.h>
25941 if (strerror_r (EACCES, buf, 0) < 0)
25944 if (strerror_r (EACCES, buf, sizeof buf) != 0)
25946 strcpy (buf, "Unknown");
25947 if (strerror_r (0, buf, sizeof buf) != 0)
25951 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
25955 if (strerror_r (-3, buf, sizeof buf) < 0)
25967 if ac_fn_c_try_run "$LINENO"
25969 gl_cv_func_strerror_r_works=yes
25971 gl_cv_func_strerror_r_works=no
25973 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25974 conftest.$ac_objext conftest.beam conftest.$ac_ext
25979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
25980 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
25983 if test $ac_cv_func___xpg_strerror_r = yes; then
25984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
25985 printf %s "checking whether __xpg_strerror_r works... " >&6; }
25986 if test ${gl_cv_func_strerror_r_works+y}
25988 printf %s "(cached) " >&6
25990 if test "$cross_compiling" = yes
25992 gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
25995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25996 /* end confdefs.h. */
25998 #include <string.h>
26003 int __xpg_strerror_r(int, char *, size_t);
26009 char buf[256] = "^";
26011 char *str = strerror (-1);
26012 strcpy (copy, str);
26013 if (__xpg_strerror_r (-2, buf, 1) == 0)
26017 __xpg_strerror_r (-2, buf, 256);
26018 if (strcmp (str, copy))
26026 if ac_fn_c_try_run "$LINENO"
26028 gl_cv_func_strerror_r_works=yes
26030 gl_cv_func_strerror_r_works=no
26032 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26033 conftest.$ac_objext conftest.beam conftest.$ac_ext
26038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
26039 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
26055 if test $gl_cv_have_include_next = yes; then
26056 gl_cv_next_string_h='<'string.h'>'
26058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
26059 printf %s "checking absolute name of <string.h>... " >&6; }
26060 if test ${gl_cv_next_string_h+y}
26062 printf %s "(cached) " >&6
26067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26068 /* end confdefs.h. */
26069 #include <string.h>
26072 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26073 *) gl_absname_cpp="$ac_cpp" ;;
26078 gl_dirsep_regex='[/\\]'
26081 gl_dirsep_regex='\/'
26084 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26085 gl_header_literal_regex=`echo 'string.h' \
26086 | sed -e "$gl_make_literal_regex_sed"`
26087 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26088 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26094 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26095 sed -n "$gl_absolute_header_sed"`
26097 gl_header=$gl_cv_absolute_string_h
26098 gl_cv_next_string_h='"'$gl_header'"'
26102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
26103 printf "%s\n" "$gl_cv_next_string_h" >&6; }
26105 NEXT_STRING_H=$gl_cv_next_string_h
26107 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26108 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26109 gl_next_as_first_directive='<'string.h'>'
26111 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26112 gl_next_as_first_directive=$gl_cv_next_string_h
26114 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
26124 ac_fn_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26125 if test "x$ac_cv_have_decl_strndup" = xyes
26131 printf "%s\n" "#define HAVE_DECL_STRNDUP $ac_have_decl" >>confdefs.h
26134 ac_fn_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26135 if test "x$ac_cv_have_decl_strnlen" = xyes
26141 printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
26143 ac_fn_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26144 if test "x$ac_cv_have_decl_strsignal" = xyes
26150 printf "%s\n" "#define HAVE_DECL_STRSIGNAL $ac_have_decl" >>confdefs.h
26155 if test $REPLACE_MEMCHR = 1; then
26158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
26159 printf %s "checking whether strstr works... " >&6; }
26160 if test ${gl_cv_func_strstr_works_always+y}
26162 printf %s "(cached) " >&6
26164 if test "$cross_compiling" = yes
26166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26167 /* end confdefs.h. */
26169 #ifdef __GNU_LIBRARY__
26170 #include <features.h>
26171 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
26172 || defined __UCLIBC__
26175 #elif defined __CYGWIN__
26176 #include <cygwin/version.h>
26177 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26185 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26186 $EGREP "Lucky user" >/dev/null 2>&1
26188 gl_cv_func_strstr_works_always="guessing yes"
26190 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
26196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26197 /* end confdefs.h. */
26199 #include <string.h> /* for strstr */
26200 #ifdef __GNU_LIBRARY__
26201 #include <features.h>
26202 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
26206 #define P "_EF_BF_BD"
26207 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
26208 #define NEEDLE P P P P P
26213 return !!strstr (HAYSTACK, NEEDLE);
26219 if ac_fn_c_try_run "$LINENO"
26221 gl_cv_func_strstr_works_always=yes
26223 gl_cv_func_strstr_works_always=no
26225 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26226 conftest.$ac_objext conftest.beam conftest.$ac_ext
26231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
26232 printf "%s\n" "$gl_cv_func_strstr_works_always" >&6; }
26233 case "$gl_cv_func_strstr_works_always" in
26242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used without linking with libm" >&5
26243 printf %s "checking whether ldexp() can be used without linking with libm... " >&6; }
26244 if test ${gl_cv_func_ldexp_no_libm+y}
26246 printf %s "(cached) " >&6
26249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26250 /* end confdefs.h. */
26251 #ifndef __NO_MATH_INLINES
26252 # define __NO_MATH_INLINES 1 /* for glibc */
26255 double (*funcptr) (double, int) = ldexp;
26260 return ldexp (x, -1) > 0;
26265 if ac_fn_c_try_link "$LINENO"
26267 gl_cv_func_ldexp_no_libm=yes
26269 gl_cv_func_ldexp_no_libm=no
26271 rm -f core conftest.err conftest.$ac_objext conftest.beam \
26272 conftest$ac_exeext conftest.$ac_ext
26275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
26276 printf "%s\n" "$gl_cv_func_ldexp_no_libm" >&6; }
26290 if test $gl_cv_have_include_next = yes; then
26291 gl_cv_next_sys_random_h='<'sys/random.h'>'
26293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
26294 printf %s "checking absolute name of <sys/random.h>... " >&6; }
26295 if test ${gl_cv_next_sys_random_h+y}
26297 printf %s "(cached) " >&6
26300 if test $ac_cv_header_sys_random_h = yes; then
26305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26306 /* end confdefs.h. */
26307 #include <sys/random.h>
26310 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26311 *) gl_absname_cpp="$ac_cpp" ;;
26316 gl_dirsep_regex='[/\\]'
26319 gl_dirsep_regex='\/'
26322 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26323 gl_header_literal_regex=`echo 'sys/random.h' \
26324 | sed -e "$gl_make_literal_regex_sed"`
26325 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26326 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26332 gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26333 sed -n "$gl_absolute_header_sed"`
26335 gl_header=$gl_cv_absolute_sys_random_h
26336 gl_cv_next_sys_random_h='"'$gl_header'"'
26338 gl_cv_next_sys_random_h='<'sys/random.h'>'
26343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
26344 printf "%s\n" "$gl_cv_next_sys_random_h" >&6; }
26346 NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
26348 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26349 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26350 gl_next_as_first_directive='<'sys/random.h'>'
26352 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26353 gl_next_as_first_directive=$gl_cv_next_sys_random_h
26355 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
26360 if test $ac_cv_header_sys_random_h = yes; then
26361 HAVE_SYS_RANDOM_H=1
26363 HAVE_SYS_RANDOM_H=0
26368 if test $ac_cv_header_sys_random_h = yes; then
26369 UNISTD_H_HAVE_SYS_RANDOM_H=1
26391 if test $gl_cv_have_include_next = yes; then
26392 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
26394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
26395 printf %s "checking absolute name of <sys/wait.h>... " >&6; }
26396 if test ${gl_cv_next_sys_wait_h+y}
26398 printf %s "(cached) " >&6
26401 if test $ac_cv_header_sys_wait_h = yes; then
26406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26407 /* end confdefs.h. */
26408 #include <sys/wait.h>
26411 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26412 *) gl_absname_cpp="$ac_cpp" ;;
26417 gl_dirsep_regex='[/\\]'
26420 gl_dirsep_regex='\/'
26423 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26424 gl_header_literal_regex=`echo 'sys/wait.h' \
26425 | sed -e "$gl_make_literal_regex_sed"`
26426 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26427 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26433 gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26434 sed -n "$gl_absolute_header_sed"`
26436 gl_header=$gl_cv_absolute_sys_wait_h
26437 gl_cv_next_sys_wait_h='"'$gl_header'"'
26439 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
26444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
26445 printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
26447 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
26449 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26450 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26451 gl_next_as_first_directive='<'sys/wait.h'>'
26453 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26454 gl_next_as_first_directive=$gl_cv_next_sys_wait_h
26456 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
26468 GL_M4_GNULIB_WAITPID=0
26473 HAVE_DECL_LOCALTIME_R=1;
26477 HAVE_TIMESPEC_GET=1;
26479 REPLACE_CTIME=GNULIB_PORTCHECK;
26480 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
26481 REPLACE_MKTIME=GNULIB_PORTCHECK;
26482 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
26483 REPLACE_STRFTIME=GNULIB_PORTCHECK;
26484 REPLACE_TIMEGM=GNULIB_PORTCHECK;
26485 REPLACE_TZSET=GNULIB_PORTCHECK;
26487 : ${GNULIB_GETTIMEOFDAY=0};
26489 REPLACE_LOCALTIME=0;
26493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
26494 printf %s "checking for struct timespec in <time.h>... " >&6; }
26495 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
26497 printf %s "(cached) " >&6
26499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26500 /* end confdefs.h. */
26506 static struct timespec x; x.tv_sec = x.tv_nsec;
26511 if ac_fn_c_try_compile "$LINENO"
26513 gl_cv_sys_struct_timespec_in_time_h=yes
26515 gl_cv_sys_struct_timespec_in_time_h=no
26517 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
26520 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
26522 TIME_H_DEFINES_STRUCT_TIMESPEC=0
26523 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
26524 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
26525 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
26526 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
26527 TIME_H_DEFINES_STRUCT_TIMESPEC=1
26529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
26530 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
26531 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
26533 printf %s "(cached) " >&6
26535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26536 /* end confdefs.h. */
26537 #include <sys/time.h>
26542 static struct timespec x; x.tv_sec = x.tv_nsec;
26547 if ac_fn_c_try_compile "$LINENO"
26549 gl_cv_sys_struct_timespec_in_sys_time_h=yes
26551 gl_cv_sys_struct_timespec_in_sys_time_h=no
26553 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
26556 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
26557 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
26558 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
26560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
26561 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
26562 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
26564 printf %s "(cached) " >&6
26566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26567 /* end confdefs.h. */
26568 #include <pthread.h>
26573 static struct timespec x; x.tv_sec = x.tv_nsec;
26578 if ac_fn_c_try_compile "$LINENO"
26580 gl_cv_sys_struct_timespec_in_pthread_h=yes
26582 gl_cv_sys_struct_timespec_in_pthread_h=no
26584 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
26587 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
26588 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
26589 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
26591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
26592 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
26593 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
26595 printf %s "(cached) " >&6
26597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26598 /* end confdefs.h. */
26599 #include <unistd.h>
26604 static struct timespec x; x.tv_sec = x.tv_nsec;
26609 if ac_fn_c_try_compile "$LINENO"
26611 gl_cv_sys_struct_timespec_in_unistd_h=yes
26613 gl_cv_sys_struct_timespec_in_unistd_h=no
26615 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
26618 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
26619 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
26620 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
26641 if test $gl_cv_have_include_next = yes; then
26642 gl_cv_next_time_h='<'time.h'>'
26644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
26645 printf %s "checking absolute name of <time.h>... " >&6; }
26646 if test ${gl_cv_next_time_h+y}
26648 printf %s "(cached) " >&6
26653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26654 /* end confdefs.h. */
26658 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26659 *) gl_absname_cpp="$ac_cpp" ;;
26664 gl_dirsep_regex='[/\\]'
26667 gl_dirsep_regex='\/'
26670 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26671 gl_header_literal_regex=`echo 'time.h' \
26672 | sed -e "$gl_make_literal_regex_sed"`
26673 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26674 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26680 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26681 sed -n "$gl_absolute_header_sed"`
26683 gl_header=$gl_cv_absolute_time_h
26684 gl_cv_next_time_h='"'$gl_header'"'
26688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
26689 printf "%s\n" "$gl_cv_next_time_h" >&6; }
26691 NEXT_TIME_H=$gl_cv_next_time_h
26693 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26694 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26695 gl_next_as_first_directive='<'time.h'>'
26697 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26698 gl_next_as_first_directive=$gl_cv_next_time_h
26700 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
26709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
26710 printf %s "checking for TIME_UTC in <time.h>... " >&6; }
26711 if test ${gl_cv_time_h_has_TIME_UTC+y}
26713 printf %s "(cached) " >&6
26715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26716 /* end confdefs.h. */
26722 static int x = TIME_UTC; x++;
26727 if ac_fn_c_try_compile "$LINENO"
26729 gl_cv_time_h_has_TIME_UTC=yes
26731 gl_cv_time_h_has_TIME_UTC=no
26733 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
26736 printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
26737 if test $gl_cv_time_h_has_TIME_UTC = yes; then
26738 TIME_H_DEFINES_TIME_UTC=1
26740 TIME_H_DEFINES_TIME_UTC=0
26746 GL_M4_GNULIB_CTIME=0
26750 GL_M4_GNULIB_MKTIME=0
26754 GL_M4_GNULIB_LOCALTIME=0
26758 GL_M4_GNULIB_NANOSLEEP=0
26762 GL_M4_GNULIB_STRFTIME=0
26766 GL_M4_GNULIB_STRPTIME=0
26770 GL_M4_GNULIB_TIMEGM=0
26774 GL_M4_GNULIB_TIMESPEC_GET=0
26778 GL_M4_GNULIB_TIME_R=0
26782 GL_M4_GNULIB_TIME_RZ=0
26786 GL_M4_GNULIB_TZSET=0
26790 GL_M4_GNULIB_MDA_TZSET=1
26794 ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26795 if test "x$ac_cv_have_decl_execvpe" = xyes
26801 printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h
26815 if test $gl_cv_have_include_next = yes; then
26816 gl_cv_next_unistd_h='<'unistd.h'>'
26818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
26819 printf %s "checking absolute name of <unistd.h>... " >&6; }
26820 if test ${gl_cv_next_unistd_h+y}
26822 printf %s "(cached) " >&6
26825 if test $ac_cv_header_unistd_h = yes; then
26830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26831 /* end confdefs.h. */
26832 #include <unistd.h>
26835 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26836 *) gl_absname_cpp="$ac_cpp" ;;
26841 gl_dirsep_regex='[/\\]'
26844 gl_dirsep_regex='\/'
26847 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26848 gl_header_literal_regex=`echo 'unistd.h' \
26849 | sed -e "$gl_make_literal_regex_sed"`
26850 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26851 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26857 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26858 sed -n "$gl_absolute_header_sed"`
26860 gl_header=$gl_cv_absolute_unistd_h
26861 gl_cv_next_unistd_h='"'$gl_header'"'
26863 gl_cv_next_unistd_h='<'unistd.h'>'
26868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
26869 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
26871 NEXT_UNISTD_H=$gl_cv_next_unistd_h
26873 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26874 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26875 gl_next_as_first_directive='<'unistd.h'>'
26877 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26878 gl_next_as_first_directive=$gl_cv_next_unistd_h
26880 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
26885 if test $ac_cv_header_unistd_h = yes; then
26901 if test $ac_cv_have_decl_execvpe = no; then
26902 HAVE_DECL_EXECVPE=0
26911 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
26916 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
26921 gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
26928 if test "$HAVE_LIBUNISTRING" = yes; then
26929 LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
26930 LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
26931 LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
26934 ac_fn_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26935 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
26941 printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
26943 ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26944 if test "x$ac_cv_have_decl_feof_unlocked" = xyes
26950 printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
26952 ac_fn_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26953 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
26959 printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
26961 ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26962 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
26968 printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
26970 ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26971 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
26977 printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
26979 ac_fn_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26980 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
26986 printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
26988 ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26989 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
26995 printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
26997 ac_fn_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26998 if test "x$ac_cv_have_decl_fread_unlocked" = xyes
27004 printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
27006 ac_fn_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27007 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
27013 printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
27015 ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27016 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
27022 printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
27024 ac_fn_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27025 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
27031 printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
27033 ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27034 if test "x$ac_cv_have_decl_putc_unlocked" = xyes
27040 printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
27042 ac_fn_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27043 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
27049 printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
27055 if test $ac_cv_header_features_h = yes; then
27063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
27064 printf %s "checking for inttypes.h... " >&6; }
27065 if test ${gl_cv_header_inttypes_h+y}
27067 printf %s "(cached) " >&6
27069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27070 /* end confdefs.h. */
27072 #include <sys/types.h>
27073 #include <inttypes.h>
27078 uintmax_t i = (uintmax_t) -1; return !i;
27083 if ac_fn_c_try_compile "$LINENO"
27085 gl_cv_header_inttypes_h=yes
27087 gl_cv_header_inttypes_h=no
27089 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
27092 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
27093 if test $gl_cv_header_inttypes_h = yes; then
27095 printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
27100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
27101 printf %s "checking for stdint.h... " >&6; }
27102 if test ${gl_cv_header_stdint_h+y}
27104 printf %s "(cached) " >&6
27106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27107 /* end confdefs.h. */
27108 #include <sys/types.h>
27109 #include <stdint.h>
27113 uintmax_t i = (uintmax_t) -1; return !i;
27118 if ac_fn_c_try_compile "$LINENO"
27120 gl_cv_header_stdint_h=yes
27122 gl_cv_header_stdint_h=no
27124 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
27127 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
27128 if test $gl_cv_header_stdint_h = yes; then
27130 printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
27137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
27138 printf %s "checking for intmax_t... " >&6; }
27139 if test ${gt_cv_c_intmax_t+y}
27141 printf %s "(cached) " >&6
27143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27144 /* end confdefs.h. */
27146 #include <stddef.h>
27147 #include <stdlib.h>
27148 #if HAVE_STDINT_H_WITH_UINTMAX
27149 #include <stdint.h>
27151 #if HAVE_INTTYPES_H_WITH_UINTMAX
27152 #include <inttypes.h>
27158 intmax_t x = -1; return !x;
27163 if ac_fn_c_try_compile "$LINENO"
27165 gt_cv_c_intmax_t=yes
27167 gt_cv_c_intmax_t=no
27169 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
27172 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
27173 if test $gt_cv_c_intmax_t = yes; then
27175 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
27179 printf "%s\n" "#define intmax_t long long" >>confdefs.h
27186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
27187 printf %s "checking whether snprintf truncates the result as in C99... " >&6; }
27188 if test ${gl_cv_func_snprintf_truncation_c99+y}
27190 printf %s "(cached) " >&6
27193 if test "$cross_compiling" = yes
27197 # Guess yes on glibc systems.
27198 *-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27199 # Guess yes on musl systems.
27200 *-musl*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27201 # Guess yes on FreeBSD >= 5.
27202 freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
27203 freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27204 midnightbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27205 # Guess yes on Mac OS X >= 10.3.
27206 darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
27207 darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27208 # Guess yes on OpenBSD >= 3.9.
27209 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
27210 gl_cv_func_snprintf_truncation_c99="guessing no";;
27211 openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27212 # Guess yes on Solaris >= 2.6.
27213 solaris2.[0-5] | solaris2.[0-5].*)
27214 gl_cv_func_snprintf_truncation_c99="guessing no";;
27215 solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27216 # Guess yes on AIX >= 4.
27217 aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
27218 aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27219 # Guess yes on HP-UX >= 11.
27220 hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
27221 hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27222 # Guess yes on IRIX >= 6.5.
27223 irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27224 # Guess yes on OSF/1 >= 5.
27225 osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
27226 osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27227 # Guess yes on NetBSD >= 3.
27228 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
27229 gl_cv_func_snprintf_truncation_c99="guessing no";;
27230 netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27231 # Guess yes on BeOS.
27232 beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27233 # Guess yes on Android.
27234 linux*-android*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
27235 # Guess no on native Windows.
27236 mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";;
27237 # If we don't know, obey --enable-cross-guesses.
27238 *) gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
27242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27243 /* end confdefs.h. */
27246 #include <string.h>
27248 # define my_snprintf snprintf
27250 # include <stdarg.h>
27251 static int my_snprintf (char *buf, int size, const char *format, ...)
27255 va_start (args, format);
27256 ret = vsnprintf (buf, size, format, args);
27261 static char buf[100];
27264 strcpy (buf, "ABCDEF");
27265 my_snprintf (buf, 3, "%d %d", 4567, 89);
27266 if (memcmp (buf, "45\0DEF", 6) != 0)
27271 if ac_fn_c_try_run "$LINENO"
27273 gl_cv_func_snprintf_truncation_c99=yes
27275 gl_cv_func_snprintf_truncation_c99=no
27277 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27278 conftest.$ac_objext conftest.beam conftest.$ac_ext
27283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
27284 printf "%s\n" "$gl_cv_func_snprintf_truncation_c99" >&6; }
27290 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
27291 if test "x$ac_cv_func_snprintf" = xyes
27293 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
27296 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
27297 if test "x$ac_cv_func_strnlen" = xyes
27299 printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
27302 ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
27303 if test "x$ac_cv_func_wcslen" = xyes
27305 printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
27308 ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
27309 if test "x$ac_cv_func_wcsnlen" = xyes
27311 printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
27314 ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
27315 if test "x$ac_cv_func_mbrtowc" = xyes
27317 printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
27320 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
27321 if test "x$ac_cv_func_wcrtomb" = xyes
27323 printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
27327 ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
27328 " "$ac_c_undeclared_builtin_options" "CFLAGS"
27329 if test "x$ac_cv_have_decl__snprintf" = xyes
27335 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
27339 case "$gl_cv_func_snprintf_retval_c99" in
27342 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
27347 case "$gl_cv_func_snprintf_truncation_c99" in
27350 printf "%s\n" "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h
27359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
27360 printf %s "checking whether printf supports size specifiers as in C99... " >&6; }
27361 if test ${gl_cv_func_printf_sizes_c99+y}
27363 printf %s "(cached) " >&6
27366 if test "$cross_compiling" = yes
27370 # Guess yes on glibc systems.
27371 *-gnu* | gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
27372 # Guess yes on musl systems.
27373 *-musl*) gl_cv_func_printf_sizes_c99="guessing yes";;
27374 # Guess yes on FreeBSD >= 5.
27375 freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";;
27376 freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
27377 midnightbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
27378 # Guess yes on Mac OS X >= 10.3.
27379 darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
27380 darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
27381 # Guess yes on OpenBSD >= 3.9.
27382 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
27383 gl_cv_func_printf_sizes_c99="guessing no";;
27384 openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
27385 # Guess yes on Solaris >= 2.10.
27386 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
27387 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
27388 # Guess yes on NetBSD >= 3.
27389 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
27390 gl_cv_func_printf_sizes_c99="guessing no";;
27391 netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
27392 # Guess yes on Android.
27393 linux*-android*) gl_cv_func_printf_sizes_c99="guessing yes";;
27394 # Guess yes on MSVC, no on mingw.
27395 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27396 /* end confdefs.h. */
27403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27404 $EGREP "Known" >/dev/null 2>&1
27406 gl_cv_func_printf_sizes_c99="guessing yes"
27408 gl_cv_func_printf_sizes_c99="guessing no"
27413 # If we don't know, obey --enable-cross-guesses.
27414 *) gl_cv_func_printf_sizes_c99="$gl_cross_guess_normal";;
27418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27419 /* end confdefs.h. */
27421 #include <stddef.h>
27423 #include <string.h>
27424 #include <sys/types.h>
27425 #if HAVE_STDINT_H_WITH_UINTMAX
27426 # include <stdint.h>
27428 #if HAVE_INTTYPES_H_WITH_UINTMAX
27429 # include <inttypes.h>
27431 static char buf[100];
27435 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
27437 if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
27438 || strcmp (buf, "12345671 33") != 0)
27444 if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
27445 || strcmp (buf, "12345672 33") != 0)
27448 if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
27449 || strcmp (buf, "12345673 33") != 0)
27452 if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
27453 || strcmp (buf, "1.5 33") != 0)
27458 if ac_fn_c_try_run "$LINENO"
27460 gl_cv_func_printf_sizes_c99=yes
27462 gl_cv_func_printf_sizes_c99=no
27464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27465 conftest.$ac_objext conftest.beam conftest.$ac_ext
27470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
27471 printf "%s\n" "$gl_cv_func_printf_sizes_c99" >&6; }
27475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
27476 printf %s "checking whether printf supports 'long double' arguments... " >&6; }
27477 if test ${gl_cv_func_printf_long_double+y}
27479 printf %s "(cached) " >&6
27482 if test "$cross_compiling" = yes
27485 # Guess no on BeOS.
27486 beos*) gl_cv_func_printf_long_double="guessing no";;
27487 # Guess yes on Android.
27488 linux*-android*) gl_cv_func_printf_long_double="guessing yes";;
27489 # Guess yes on MSVC, no on mingw.
27490 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27491 /* end confdefs.h. */
27498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27499 $EGREP "Known" >/dev/null 2>&1
27501 gl_cv_func_printf_long_double="guessing yes"
27503 gl_cv_func_printf_long_double="guessing no"
27508 *) gl_cv_func_printf_long_double="guessing yes";;
27512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27513 /* end confdefs.h. */
27516 #include <string.h>
27517 static char buf[10000];
27522 if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
27523 || strcmp (buf, "1.750000 33") != 0)
27526 if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
27527 || strcmp (buf, "1.750000e+00 33") != 0)
27530 if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
27531 || strcmp (buf, "1.75 33") != 0)
27536 if ac_fn_c_try_run "$LINENO"
27538 gl_cv_func_printf_long_double=yes
27540 gl_cv_func_printf_long_double=no
27542 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27543 conftest.$ac_objext conftest.beam conftest.$ac_ext
27548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
27549 printf "%s\n" "$gl_cv_func_printf_long_double" >&6; }
27553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
27554 printf %s "checking whether printf supports infinite 'double' arguments... " >&6; }
27555 if test ${gl_cv_func_printf_infinite+y}
27557 printf %s "(cached) " >&6
27560 if test "$cross_compiling" = yes
27564 # Guess yes on glibc systems.
27565 *-gnu* | gnu*) gl_cv_func_printf_infinite="guessing yes";;
27566 # Guess yes on musl systems.
27567 *-musl*) gl_cv_func_printf_infinite="guessing yes";;
27568 # Guess yes on FreeBSD >= 6.
27569 freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";;
27570 freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
27571 midnightbsd*) gl_cv_func_printf_infinite="guessing yes";;
27572 # Guess yes on Mac OS X >= 10.3.
27573 darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
27574 darwin*) gl_cv_func_printf_infinite="guessing yes";;
27575 # Guess yes on HP-UX >= 11.
27576 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
27577 hpux*) gl_cv_func_printf_infinite="guessing yes";;
27578 # Guess yes on NetBSD >= 3.
27579 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
27580 gl_cv_func_printf_infinite="guessing no";;
27581 netbsd*) gl_cv_func_printf_infinite="guessing yes";;
27582 # Guess yes on OpenBSD >= 6.0.
27583 openbsd[1-5].*) gl_cv_func_printf_infinite="guessing no";;
27584 openbsd*) gl_cv_func_printf_infinite="guessing yes";;
27585 # Guess yes on BeOS.
27586 beos*) gl_cv_func_printf_infinite="guessing yes";;
27587 # Guess no on Android.
27588 linux*-android*) gl_cv_func_printf_infinite="guessing no";;
27589 # Guess yes on MSVC, no on mingw.
27590 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27591 /* end confdefs.h. */
27598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27599 $EGREP "Known" >/dev/null 2>&1
27601 gl_cv_func_printf_infinite="guessing yes"
27603 gl_cv_func_printf_infinite="guessing no"
27608 # If we don't know, obey --enable-cross-guesses.
27609 *) gl_cv_func_printf_infinite="$gl_cross_guess_normal";;
27613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27614 /* end confdefs.h. */
27617 #include <string.h>
27619 strisnan (const char *string, size_t start_index, size_t end_index)
27621 if (start_index < end_index)
27623 if (string[start_index] == '-')
27625 if (start_index + 3 <= end_index
27626 && memcmp (string + start_index, "nan", 3) == 0)
27629 if (start_index == end_index
27630 || (string[start_index] == '(' && string[end_index - 1] == ')'))
27639 static double plus_zero = 0.0;
27640 double minus_zero = - plus_zero;
27641 return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
27643 static char buf[10000];
27644 static double zero = 0.0;
27648 if (sprintf (buf, "%f", 1.0 / zero) < 0
27649 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
27651 if (sprintf (buf, "%f", -1.0 / zero) < 0
27652 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
27654 if (sprintf (buf, "%f", zero / zero) < 0
27655 || !strisnan (buf, 0, strlen (buf)))
27657 if (sprintf (buf, "%e", 1.0 / zero) < 0
27658 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
27660 if (sprintf (buf, "%e", -1.0 / zero) < 0
27661 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
27663 if (sprintf (buf, "%e", zero / zero) < 0
27664 || !strisnan (buf, 0, strlen (buf)))
27666 if (sprintf (buf, "%g", 1.0 / zero) < 0
27667 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
27669 if (sprintf (buf, "%g", -1.0 / zero) < 0
27670 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
27672 if (sprintf (buf, "%g", zero / zero) < 0
27673 || !strisnan (buf, 0, strlen (buf)))
27675 /* This test fails on HP-UX 10.20. */
27676 if (have_minus_zero ())
27677 if (sprintf (buf, "%g", - zero) < 0
27678 || strcmp (buf, "-0") != 0)
27683 if ac_fn_c_try_run "$LINENO"
27685 gl_cv_func_printf_infinite=yes
27687 gl_cv_func_printf_infinite=no
27689 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27690 conftest.$ac_objext conftest.beam conftest.$ac_ext
27695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
27696 printf "%s\n" "$gl_cv_func_printf_infinite" >&6; }
27703 if test -n "$gl_printf_safe"; then
27705 printf "%s\n" "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
27708 case "$gl_cv_func_printf_long_double" in
27710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
27711 printf %s "checking whether printf supports infinite 'long double' arguments... " >&6; }
27712 if test ${gl_cv_func_printf_infinite_long_double+y}
27714 printf %s "(cached) " >&6
27717 if test "$cross_compiling" = yes
27719 case "$host_cpu" in
27720 # Guess no on ia64, x86_64, i386.
27721 ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
27724 # Guess yes on glibc systems.
27725 *-gnu* | gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
27726 # Guess yes on musl systems.
27727 *-musl*) gl_cv_func_printf_infinite_long_double="guessing yes";;
27728 # Guess yes on FreeBSD >= 6.
27729 freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";;
27730 freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
27731 midnightbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
27732 # Guess yes on HP-UX >= 11.
27733 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
27734 hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
27735 # Guess yes on OpenBSD >= 6.0.
27736 openbsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";;
27737 openbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
27738 # Guess no on Android.
27739 linux*-android*) gl_cv_func_printf_infinite_long_double="guessing no";;
27740 # Guess yes on MSVC, no on mingw.
27741 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27742 /* end confdefs.h. */
27749 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27750 $EGREP "Known" >/dev/null 2>&1
27752 gl_cv_func_printf_infinite_long_double="guessing yes"
27754 gl_cv_func_printf_infinite_long_double="guessing no"
27759 # If we don't know, obey --enable-cross-guesses.
27760 *) gl_cv_func_printf_infinite_long_double="$gl_cross_guess_normal";;
27766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27767 /* end confdefs.h. */
27770 #include <stdlib.h>
27771 #if defined __MACH__ && defined __APPLE__
27772 /* Avoid a crash on Mac OS X. */
27773 #include <mach/mach.h>
27774 #include <mach/mach_error.h>
27775 #include <mach/thread_status.h>
27776 #include <mach/exception.h>
27777 #include <mach/task.h>
27778 #include <pthread.h>
27779 /* The exception port on which our thread listens. */
27780 static mach_port_t our_exception_port;
27781 /* The main function of the thread listening for exceptions of type
27784 mach_exception_thread (void *arg)
27786 /* Buffer for a message to be received. */
27788 mach_msg_header_t head;
27789 mach_msg_body_t msgh_body;
27792 mach_msg_return_t retval;
27793 /* Wait for a message on the exception port. */
27794 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
27795 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
27796 if (retval != MACH_MSG_SUCCESS)
27801 nocrash_init (void)
27803 mach_port_t self = mach_task_self ();
27804 /* Allocate a port on which the thread shall listen for exceptions. */
27805 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
27807 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
27808 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
27809 MACH_MSG_TYPE_MAKE_SEND)
27811 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
27813 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
27814 /* Create the thread listening on the exception port. */
27815 pthread_attr_t attr;
27817 if (pthread_attr_init (&attr) == 0
27818 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
27819 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
27820 pthread_attr_destroy (&attr);
27821 /* Replace the exception port info for these exceptions with our own.
27822 Note that we replace the exception port for the entire task, not only
27823 for a particular thread. This has the effect that when our exception
27824 port gets the message, the thread specific exception port has already
27825 been asked, and we don't need to bother about it.
27826 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
27827 task_set_exception_ports (self, mask, our_exception_port,
27828 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
27833 #elif defined _WIN32 && ! defined __CYGWIN__
27834 /* Avoid a crash on native Windows. */
27835 #define WIN32_LEAN_AND_MEAN
27836 #include <windows.h>
27837 #include <winerror.h>
27839 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
27841 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
27843 case EXCEPTION_ACCESS_VIOLATION:
27844 case EXCEPTION_IN_PAGE_ERROR:
27845 case EXCEPTION_STACK_OVERFLOW:
27846 case EXCEPTION_GUARD_PAGE:
27847 case EXCEPTION_PRIV_INSTRUCTION:
27848 case EXCEPTION_ILLEGAL_INSTRUCTION:
27849 case EXCEPTION_DATATYPE_MISALIGNMENT:
27850 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
27851 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
27854 return EXCEPTION_CONTINUE_SEARCH;
27857 nocrash_init (void)
27859 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
27862 /* Avoid a crash on POSIX systems. */
27863 #include <signal.h>
27864 #include <unistd.h>
27865 /* A POSIX signal handler. */
27867 exception_handler (int sig)
27872 nocrash_init (void)
27875 signal (SIGSEGV, exception_handler);
27878 signal (SIGBUS, exception_handler);
27885 #include <string.h>
27887 strisnan (const char *string, size_t start_index, size_t end_index)
27889 if (start_index < end_index)
27891 if (string[start_index] == '-')
27893 if (start_index + 3 <= end_index
27894 && memcmp (string + start_index, "nan", 3) == 0)
27897 if (start_index == end_index
27898 || (string[start_index] == '(' && string[end_index - 1] == ')'))
27904 static char buf[10000];
27905 static long double zeroL = 0.0L;
27910 if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
27911 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
27913 if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
27914 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
27916 if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
27917 || !strisnan (buf, 0, strlen (buf)))
27919 if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
27920 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
27922 if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
27923 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
27925 if (sprintf (buf, "%Le", zeroL / zeroL) < 0
27926 || !strisnan (buf, 0, strlen (buf)))
27928 if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
27929 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
27931 if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
27932 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
27934 if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
27935 || !strisnan (buf, 0, strlen (buf)))
27937 #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
27938 /* Representation of an 80-bit 'long double' as an initializer for a sequence
27939 of 'unsigned int' words. */
27940 # ifdef WORDS_BIGENDIAN
27941 # define LDBL80_WORDS(exponent,manthi,mantlo) \
27942 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
27943 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
27944 (unsigned int) (mantlo) << 16 \
27947 # define LDBL80_WORDS(exponent,manthi,mantlo) \
27948 { mantlo, manthi, exponent }
27951 static union { unsigned int word[4]; long double value; } x =
27952 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
27953 if (sprintf (buf, "%Lf", x.value) < 0
27954 || !strisnan (buf, 0, strlen (buf)))
27956 if (sprintf (buf, "%Le", x.value) < 0
27957 || !strisnan (buf, 0, strlen (buf)))
27959 if (sprintf (buf, "%Lg", x.value) < 0
27960 || !strisnan (buf, 0, strlen (buf)))
27964 /* Signalling NaN. */
27965 static union { unsigned int word[4]; long double value; } x =
27966 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
27967 if (sprintf (buf, "%Lf", x.value) < 0
27968 || !strisnan (buf, 0, strlen (buf)))
27970 if (sprintf (buf, "%Le", x.value) < 0
27971 || !strisnan (buf, 0, strlen (buf)))
27973 if (sprintf (buf, "%Lg", x.value) < 0
27974 || !strisnan (buf, 0, strlen (buf)))
27977 { /* Pseudo-NaN. */
27978 static union { unsigned int word[4]; long double value; } x =
27979 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
27980 if (sprintf (buf, "%Lf", x.value) <= 0)
27982 if (sprintf (buf, "%Le", x.value) <= 0)
27984 if (sprintf (buf, "%Lg", x.value) <= 0)
27987 { /* Pseudo-Infinity. */
27988 static union { unsigned int word[4]; long double value; } x =
27989 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
27990 if (sprintf (buf, "%Lf", x.value) <= 0)
27992 if (sprintf (buf, "%Le", x.value) <= 0)
27994 if (sprintf (buf, "%Lg", x.value) <= 0)
27997 { /* Pseudo-Zero. */
27998 static union { unsigned int word[4]; long double value; } x =
27999 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
28000 if (sprintf (buf, "%Lf", x.value) <= 0)
28002 if (sprintf (buf, "%Le", x.value) <= 0)
28004 if (sprintf (buf, "%Lg", x.value) <= 0)
28007 { /* Unnormalized number. */
28008 static union { unsigned int word[4]; long double value; } x =
28009 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
28010 if (sprintf (buf, "%Lf", x.value) <= 0)
28012 if (sprintf (buf, "%Le", x.value) <= 0)
28014 if (sprintf (buf, "%Lg", x.value) <= 0)
28017 { /* Pseudo-Denormal. */
28018 static union { unsigned int word[4]; long double value; } x =
28019 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
28020 if (sprintf (buf, "%Lf", x.value) <= 0)
28022 if (sprintf (buf, "%Le", x.value) <= 0)
28024 if (sprintf (buf, "%Lg", x.value) <= 0)
28031 if ac_fn_c_try_run "$LINENO"
28033 gl_cv_func_printf_infinite_long_double=yes
28035 gl_cv_func_printf_infinite_long_double=no
28037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28038 conftest.$ac_objext conftest.beam conftest.$ac_ext
28043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
28044 printf "%s\n" "$gl_cv_func_printf_infinite_long_double" >&6; }
28047 gl_cv_func_printf_infinite_long_double="irrelevant"
28053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
28054 printf %s "checking whether printf supports the 'a' and 'A' directives... " >&6; }
28055 if test ${gl_cv_func_printf_directive_a+y}
28057 printf %s "(cached) " >&6
28060 if test "$cross_compiling" = yes
28064 # Guess yes on glibc >= 2.5 systems.
28066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28067 /* end confdefs.h. */
28069 #include <features.h>
28070 #ifdef __GNU_LIBRARY__
28071 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
28077 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28078 $EGREP "BZ2908" >/dev/null 2>&1
28080 gl_cv_func_printf_directive_a="guessing yes"
28082 gl_cv_func_printf_directive_a="guessing no"
28087 # Guess yes on musl systems.
28088 *-musl*) gl_cv_func_printf_directive_a="guessing yes";;
28089 # Guess no on Android.
28090 linux*-android*) gl_cv_func_printf_directive_a="guessing no";;
28091 # Guess no on native Windows.
28092 mingw*) gl_cv_func_printf_directive_a="guessing no";;
28093 # If we don't know, obey --enable-cross-guesses.
28094 *) gl_cv_func_printf_directive_a="$gl_cross_guess_normal";;
28098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28099 /* end confdefs.h. */
28102 #include <string.h>
28103 static char buf[100];
28104 static double zero = 0.0;
28108 if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
28109 || (strcmp (buf, "0x1.922p+1 33") != 0
28110 && strcmp (buf, "0x3.244p+0 33") != 0
28111 && strcmp (buf, "0x6.488p-1 33") != 0
28112 && strcmp (buf, "0xc.91p-2 33") != 0))
28114 if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
28115 || (strcmp (buf, "-0X1.922P+1 33") != 0
28116 && strcmp (buf, "-0X3.244P+0 33") != 0
28117 && strcmp (buf, "-0X6.488P-1 33") != 0
28118 && strcmp (buf, "-0XC.91P-2 33") != 0))
28120 /* This catches a FreeBSD 13.0 bug: it doesn't round. */
28121 if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
28122 || (strcmp (buf, "0x1.83p+0 33") != 0
28123 && strcmp (buf, "0x3.05p-1 33") != 0
28124 && strcmp (buf, "0x6.0ap-2 33") != 0
28125 && strcmp (buf, "0xc.14p-3 33") != 0))
28127 /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round. */
28128 if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0
28129 || (strcmp (buf, "0x2p+0 33") != 0
28130 && strcmp (buf, "0x3p-1 33") != 0
28131 && strcmp (buf, "0x6p-2 33") != 0
28132 && strcmp (buf, "0xcp-3 33") != 0))
28134 /* This catches a FreeBSD 6.1 bug. See
28135 <https://lists.gnu.org/r/bug-gnulib/2007-04/msg00107.html> */
28136 if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
28139 /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
28140 if (sprintf (buf, "%.1a", 1.999) < 0
28141 || (strcmp (buf, "0x1.0p+1") != 0
28142 && strcmp (buf, "0x2.0p+0") != 0
28143 && strcmp (buf, "0x4.0p-1") != 0
28144 && strcmp (buf, "0x8.0p-2") != 0))
28146 /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
28147 glibc 2.4 bug <https://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
28148 if (sprintf (buf, "%.1La", 1.999L) < 0
28149 || (strcmp (buf, "0x1.0p+1") != 0
28150 && strcmp (buf, "0x2.0p+0") != 0
28151 && strcmp (buf, "0x4.0p-1") != 0
28152 && strcmp (buf, "0x8.0p-2") != 0))
28157 if ac_fn_c_try_run "$LINENO"
28159 gl_cv_func_printf_directive_a=yes
28161 gl_cv_func_printf_directive_a=no
28163 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28164 conftest.$ac_objext conftest.beam conftest.$ac_ext
28169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
28170 printf "%s\n" "$gl_cv_func_printf_directive_a" >&6; }
28174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
28175 printf %s "checking whether printf supports the 'F' directive... " >&6; }
28176 if test ${gl_cv_func_printf_directive_f+y}
28178 printf %s "(cached) " >&6
28181 if test "$cross_compiling" = yes
28185 # Guess yes on glibc systems.
28186 *-gnu* | gnu*) gl_cv_func_printf_directive_f="guessing yes";;
28187 # Guess yes on musl systems.
28188 *-musl*) gl_cv_func_printf_directive_f="guessing yes";;
28189 # Guess yes on FreeBSD >= 6.
28190 freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";;
28191 freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
28192 midnightbsd*) gl_cv_func_printf_directive_f="guessing yes";;
28193 # Guess yes on Mac OS X >= 10.3.
28194 darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
28195 darwin*) gl_cv_func_printf_directive_f="guessing yes";;
28196 # Guess yes on OpenBSD >= 6.0.
28197 openbsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";;
28198 openbsd*) gl_cv_func_printf_directive_f="guessing yes";;
28199 # Guess yes on Solaris >= 2.10.
28200 solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";;
28201 solaris*) gl_cv_func_printf_directive_f="guessing no";;
28202 # Guess no on Android.
28203 linux*-android*) gl_cv_func_printf_directive_f="guessing no";;
28204 # Guess yes on MSVC, no on mingw.
28205 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28206 /* end confdefs.h. */
28213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28214 $EGREP "Known" >/dev/null 2>&1
28216 gl_cv_func_printf_directive_f="guessing yes"
28218 gl_cv_func_printf_directive_f="guessing no"
28223 # If we don't know, obey --enable-cross-guesses.
28224 *) gl_cv_func_printf_directive_f="$gl_cross_guess_normal";;
28228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28229 /* end confdefs.h. */
28232 #include <string.h>
28233 static char buf[100];
28234 static double zero = 0.0;
28238 if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
28239 || strcmp (buf, "1234567.000000 33") != 0)
28241 if (sprintf (buf, "%F", 1.0 / zero) < 0
28242 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
28244 /* This catches a Cygwin 1.5.x bug. */
28245 if (sprintf (buf, "%.F", 1234.0) < 0
28246 || strcmp (buf, "1234") != 0)
28251 if ac_fn_c_try_run "$LINENO"
28253 gl_cv_func_printf_directive_f=yes
28255 gl_cv_func_printf_directive_f=no
28257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28258 conftest.$ac_objext conftest.beam conftest.$ac_ext
28263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
28264 printf "%s\n" "$gl_cv_func_printf_directive_f" >&6; }
28268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
28269 printf %s "checking whether printf supports the 'n' directive... " >&6; }
28270 if test ${gl_cv_func_printf_directive_n+y}
28272 printf %s "(cached) " >&6
28275 if test "$cross_compiling" = yes
28278 # Guess no on glibc when _FORTIFY_SOURCE >= 2.
28279 *-gnu* | gnu*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28280 /* end confdefs.h. */
28281 #if _FORTIFY_SOURCE >= 2
28286 if ac_fn_c_try_compile "$LINENO"
28288 gl_cv_func_printf_directive_n="guessing yes"
28290 gl_cv_func_printf_directive_n="guessing no"
28292 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28294 # Guess no on Android.
28295 linux*-android*) gl_cv_func_printf_directive_n="guessing no";;
28296 # Guess no on native Windows.
28297 mingw*) gl_cv_func_printf_directive_n="guessing no";;
28298 *) gl_cv_func_printf_directive_n="guessing yes";;
28302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28303 /* end confdefs.h. */
28306 #include <stdlib.h>
28307 #include <string.h>
28309 #include <inttypes.h>
28310 /* See page about "Parameter Validation" on msdn.microsoft.com.
28311 <https://docs.microsoft.com/en-us/cpp/c-runtime-library/parameter-validation>
28312 <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler> */
28314 invalid_parameter_handler (const wchar_t *expression,
28315 const wchar_t *function,
28316 const wchar_t *file, unsigned int line,
28322 static char fmtstring[10];
28323 static char buf[100];
28328 _set_invalid_parameter_handler (invalid_parameter_handler);
28330 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
28331 support %n in format strings in read-only memory but not in writable
28333 strcpy (fmtstring, "%d %n");
28334 if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
28335 || strcmp (buf, "123 ") != 0
28341 if ac_fn_c_try_run "$LINENO"
28343 gl_cv_func_printf_directive_n=yes
28345 gl_cv_func_printf_directive_n=no
28347 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28348 conftest.$ac_objext conftest.beam conftest.$ac_ext
28353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
28354 printf "%s\n" "$gl_cv_func_printf_directive_n" >&6; }
28358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
28359 printf %s "checking whether printf supports the 'ls' directive... " >&6; }
28360 if test ${gl_cv_func_printf_directive_ls+y}
28362 printf %s "(cached) " >&6
28365 if test "$cross_compiling" = yes
28369 # Guess yes on OpenBSD >= 6.0.
28370 openbsd[1-5].*) gl_cv_func_printf_directive_ls="guessing no";;
28371 openbsd*) gl_cv_func_printf_directive_ls="guessing yes";;
28372 irix*) gl_cv_func_printf_directive_ls="guessing no";;
28373 solaris*) gl_cv_func_printf_directive_ls="guessing no";;
28374 cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
28375 beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
28376 # Guess no on Android.
28377 linux*-android*) gl_cv_func_printf_directive_ls="guessing no";;
28378 # Guess yes on native Windows.
28379 mingw*) gl_cv_func_printf_directive_ls="guessing yes";;
28380 *) gl_cv_func_printf_directive_ls="guessing yes";;
28384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28385 /* end confdefs.h. */
28389 #include <string.h>
28394 /* Test whether %ls works at all.
28395 This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
28398 static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
28400 if (sprintf (buf, "%ls", wstring) < 0
28401 || strcmp (buf, "abc") != 0)
28404 /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
28405 assertion failure inside libc), but not on OpenBSD 4.0. */
28407 static const wchar_t wstring[] = { 'a', 0 };
28409 if (sprintf (buf, "%ls", wstring) < 0
28410 || strcmp (buf, "a") != 0)
28413 /* Test whether precisions in %ls are supported as specified in ISO C 99
28415 "If a precision is specified, no more than that many bytes are written
28416 (including shift sequences, if any), and the array shall contain a
28417 null wide character if, to equal the multibyte character sequence
28418 length given by the precision, the function would need to access a
28419 wide character one past the end of the array."
28420 This test fails on Solaris 10. */
28422 static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
28424 if (sprintf (buf, "%.2ls", wstring) < 0
28425 || strcmp (buf, "ab") != 0)
28431 if ac_fn_c_try_run "$LINENO"
28433 gl_cv_func_printf_directive_ls=yes
28435 gl_cv_func_printf_directive_ls=no
28437 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28438 conftest.$ac_objext conftest.beam conftest.$ac_ext
28443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
28444 printf "%s\n" "$gl_cv_func_printf_directive_ls" >&6; }
28448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
28449 printf %s "checking whether printf supports the grouping flag... " >&6; }
28450 if test ${gl_cv_func_printf_flag_grouping+y}
28452 printf %s "(cached) " >&6
28455 if test "$cross_compiling" = yes
28459 cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
28460 netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
28461 # Guess no on Android.
28462 linux*-android*) gl_cv_func_printf_flag_grouping="guessing no";;
28463 # Guess no on native Windows.
28464 mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
28465 *) gl_cv_func_printf_flag_grouping="guessing yes";;
28469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28470 /* end confdefs.h. */
28473 #include <string.h>
28474 static char buf[100];
28477 if (sprintf (buf, "%'d %d", 1234567, 99) < 0
28478 || buf[strlen (buf) - 1] != '9')
28483 if ac_fn_c_try_run "$LINENO"
28485 gl_cv_func_printf_flag_grouping=yes
28487 gl_cv_func_printf_flag_grouping=no
28489 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28490 conftest.$ac_objext conftest.beam conftest.$ac_ext
28495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
28496 printf "%s\n" "$gl_cv_func_printf_flag_grouping" >&6; }
28500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
28501 printf %s "checking whether printf supports the left-adjust flag correctly... " >&6; }
28502 if test ${gl_cv_func_printf_flag_leftadjust+y}
28504 printf %s "(cached) " >&6
28507 if test "$cross_compiling" = yes
28511 # Guess yes on HP-UX 11.
28512 hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
28513 # Guess no on HP-UX 10 and older.
28514 hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
28515 # Guess yes on Android.
28516 linux*-android*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
28517 # Guess yes on native Windows.
28518 mingw*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
28519 # Guess yes otherwise.
28520 *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
28524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28525 /* end confdefs.h. */
28528 #include <string.h>
28529 static char buf[100];
28532 /* Check that a '-' flag is not annihilated by a negative width. */
28533 if (sprintf (buf, "a%-*sc", -3, "b") < 0
28534 || strcmp (buf, "ab c") != 0)
28539 if ac_fn_c_try_run "$LINENO"
28541 gl_cv_func_printf_flag_leftadjust=yes
28543 gl_cv_func_printf_flag_leftadjust=no
28545 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28546 conftest.$ac_objext conftest.beam conftest.$ac_ext
28551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
28552 printf "%s\n" "$gl_cv_func_printf_flag_leftadjust" >&6; }
28556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
28557 printf %s "checking whether printf supports the zero flag correctly... " >&6; }
28558 if test ${gl_cv_func_printf_flag_zero+y}
28560 printf %s "(cached) " >&6
28563 if test "$cross_compiling" = yes
28567 # Guess yes on glibc systems.
28568 *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
28569 # Guess yes on musl systems.
28570 *-musl*) gl_cv_func_printf_flag_zero="guessing yes";;
28571 # Guess yes on BeOS.
28572 beos*) gl_cv_func_printf_flag_zero="guessing yes";;
28573 # Guess no on Android.
28574 linux*-android*) gl_cv_func_printf_flag_zero="guessing no";;
28575 # Guess no on native Windows.
28576 mingw*) gl_cv_func_printf_flag_zero="guessing no";;
28577 # If we don't know, obey --enable-cross-guesses.
28578 *) gl_cv_func_printf_flag_zero="$gl_cross_guess_normal";;
28582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28583 /* end confdefs.h. */
28586 #include <string.h>
28587 static char buf[100];
28588 static double zero = 0.0;
28591 if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
28592 || (strcmp (buf, " inf") != 0
28593 && strcmp (buf, " infinity") != 0))
28598 if ac_fn_c_try_run "$LINENO"
28600 gl_cv_func_printf_flag_zero=yes
28602 gl_cv_func_printf_flag_zero=no
28604 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28605 conftest.$ac_objext conftest.beam conftest.$ac_ext
28610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
28611 printf "%s\n" "$gl_cv_func_printf_flag_zero" >&6; }
28615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
28616 printf %s "checking whether printf supports large precisions... " >&6; }
28617 if test ${gl_cv_func_printf_precision+y}
28619 printf %s "(cached) " >&6
28622 if test "$cross_compiling" = yes
28626 # Guess no only on Solaris, native Windows, and BeOS systems.
28627 solaris*) gl_cv_func_printf_precision="guessing no" ;;
28628 mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
28629 beos*) gl_cv_func_printf_precision="guessing no" ;;
28630 # Guess yes on Android.
28631 linux*-android*) gl_cv_func_printf_precision="guessing yes" ;;
28632 *) gl_cv_func_printf_precision="guessing yes" ;;
28636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28637 /* end confdefs.h. */
28640 #include <string.h>
28641 static char buf[5000];
28646 /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
28649 if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
28651 if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
28653 if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
28656 if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
28662 if ac_fn_c_try_run "$LINENO"
28664 gl_cv_func_printf_precision=yes
28666 gl_cv_func_printf_precision=no
28668 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28669 conftest.$ac_objext conftest.beam conftest.$ac_ext
28674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
28675 printf "%s\n" "$gl_cv_func_printf_precision" >&6; }
28680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
28681 printf %s "checking whether printf survives out-of-memory conditions... " >&6; }
28682 if test ${gl_cv_func_printf_enomem+y}
28684 printf %s "(cached) " >&6
28687 gl_cv_func_printf_enomem="guessing no"
28688 if test "$cross_compiling" = no; then
28689 if test $APPLE_UNIVERSAL_BUILD = 0; then
28690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28691 /* end confdefs.h. */
28694 #include <stdlib.h>
28695 #if defined __MACH__ && defined __APPLE__
28696 /* Avoid a crash on Mac OS X. */
28697 #include <mach/mach.h>
28698 #include <mach/mach_error.h>
28699 #include <mach/thread_status.h>
28700 #include <mach/exception.h>
28701 #include <mach/task.h>
28702 #include <pthread.h>
28703 /* The exception port on which our thread listens. */
28704 static mach_port_t our_exception_port;
28705 /* The main function of the thread listening for exceptions of type
28708 mach_exception_thread (void *arg)
28710 /* Buffer for a message to be received. */
28712 mach_msg_header_t head;
28713 mach_msg_body_t msgh_body;
28716 mach_msg_return_t retval;
28717 /* Wait for a message on the exception port. */
28718 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
28719 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
28720 if (retval != MACH_MSG_SUCCESS)
28725 nocrash_init (void)
28727 mach_port_t self = mach_task_self ();
28728 /* Allocate a port on which the thread shall listen for exceptions. */
28729 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
28731 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
28732 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
28733 MACH_MSG_TYPE_MAKE_SEND)
28735 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
28737 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
28738 /* Create the thread listening on the exception port. */
28739 pthread_attr_t attr;
28741 if (pthread_attr_init (&attr) == 0
28742 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
28743 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
28744 pthread_attr_destroy (&attr);
28745 /* Replace the exception port info for these exceptions with our own.
28746 Note that we replace the exception port for the entire task, not only
28747 for a particular thread. This has the effect that when our exception
28748 port gets the message, the thread specific exception port has already
28749 been asked, and we don't need to bother about it.
28750 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
28751 task_set_exception_ports (self, mask, our_exception_port,
28752 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
28757 #elif defined _WIN32 && ! defined __CYGWIN__
28758 /* Avoid a crash on native Windows. */
28759 #define WIN32_LEAN_AND_MEAN
28760 #include <windows.h>
28761 #include <winerror.h>
28763 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
28765 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
28767 case EXCEPTION_ACCESS_VIOLATION:
28768 case EXCEPTION_IN_PAGE_ERROR:
28769 case EXCEPTION_STACK_OVERFLOW:
28770 case EXCEPTION_GUARD_PAGE:
28771 case EXCEPTION_PRIV_INSTRUCTION:
28772 case EXCEPTION_ILLEGAL_INSTRUCTION:
28773 case EXCEPTION_DATATYPE_MISALIGNMENT:
28774 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
28775 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
28778 return EXCEPTION_CONTINUE_SEARCH;
28781 nocrash_init (void)
28783 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
28786 /* Avoid a crash on POSIX systems. */
28787 #include <signal.h>
28788 #include <unistd.h>
28789 /* A POSIX signal handler. */
28791 exception_handler (int sig)
28796 nocrash_init (void)
28799 signal (SIGSEGV, exception_handler);
28802 signal (SIGBUS, exception_handler);
28808 #include <sys/types.h>
28809 #include <sys/time.h>
28810 #include <sys/resource.h>
28814 struct rlimit limit;
28817 /* Some printf implementations allocate temporary space with malloc. */
28818 /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
28820 if (getrlimit (RLIMIT_DATA, &limit) < 0)
28822 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
28823 limit.rlim_max = 5000000;
28824 limit.rlim_cur = limit.rlim_max;
28825 if (setrlimit (RLIMIT_DATA, &limit) < 0)
28828 /* On Linux systems, malloc() is limited by RLIMIT_AS. */
28830 if (getrlimit (RLIMIT_AS, &limit) < 0)
28832 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
28833 limit.rlim_max = 5000000;
28834 limit.rlim_cur = limit.rlim_max;
28835 if (setrlimit (RLIMIT_AS, &limit) < 0)
28838 /* Some printf implementations allocate temporary space on the stack. */
28839 #ifdef RLIMIT_STACK
28840 if (getrlimit (RLIMIT_STACK, &limit) < 0)
28842 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
28843 limit.rlim_max = 5000000;
28844 limit.rlim_cur = limit.rlim_max;
28845 if (setrlimit (RLIMIT_STACK, &limit) < 0)
28848 ret = printf ("%.5000000f", 1.0);
28849 return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
28853 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
28854 (eval $ac_link) 2>&5
28856 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28857 test $ac_status = 0; } && test -s conftest$ac_exeext; then
28860 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
28861 if test $result != 0 && test $result != 77; then result=1; fi
28863 ) >/dev/null 2>/dev/null
28865 0) gl_cv_func_printf_enomem="yes" ;;
28866 77) gl_cv_func_printf_enomem="guessing no" ;;
28867 *) gl_cv_func_printf_enomem="no" ;;
28870 gl_cv_func_printf_enomem="guessing no"
28874 gl_cv_func_printf_enomem="guessing no"
28877 if test "$gl_cv_func_printf_enomem" = "guessing no"; then
28879 # Guess yes on glibc systems.
28880 *-gnu* | gnu*) gl_cv_func_printf_enomem="guessing yes";;
28881 # Guess yes on Solaris.
28882 solaris*) gl_cv_func_printf_enomem="guessing yes";;
28883 # Guess yes on AIX.
28884 aix*) gl_cv_func_printf_enomem="guessing yes";;
28885 # Guess yes on HP-UX/hppa.
28886 hpux*) case "$host_cpu" in
28887 hppa*) gl_cv_func_printf_enomem="guessing yes";;
28888 *) gl_cv_func_printf_enomem="guessing no";;
28891 # Guess yes on IRIX.
28892 irix*) gl_cv_func_printf_enomem="guessing yes";;
28893 # Guess yes on OSF/1.
28894 osf*) gl_cv_func_printf_enomem="guessing yes";;
28895 # Guess yes on BeOS.
28896 beos*) gl_cv_func_printf_enomem="guessing yes";;
28897 # Guess yes on Haiku.
28898 haiku*) gl_cv_func_printf_enomem="guessing yes";;
28899 # Guess no on Android.
28900 linux*-android*) gl_cv_func_printf_enomem="guessing no";;
28901 # If we don't know, obey --enable-cross-guesses.
28902 *) gl_cv_func_printf_enomem="$gl_cross_guess_normal";;
28907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
28908 printf "%s\n" "$gl_cv_func_printf_enomem" >&6; }
28912 case "$gl_cv_func_printf_long_double" in
28917 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
28934 if test $gl_cv_have_include_next = yes; then
28935 gl_cv_next_wchar_h='<'wchar.h'>'
28937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
28938 printf %s "checking absolute name of <wchar.h>... " >&6; }
28939 if test ${gl_cv_next_wchar_h+y}
28941 printf %s "(cached) " >&6
28944 if test $ac_cv_header_wchar_h = yes; then
28949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28950 /* end confdefs.h. */
28954 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28955 *) gl_absname_cpp="$ac_cpp" ;;
28960 gl_dirsep_regex='[/\\]'
28963 gl_dirsep_regex='\/'
28966 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28967 gl_header_literal_regex=`echo 'wchar.h' \
28968 | sed -e "$gl_make_literal_regex_sed"`
28969 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28970 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28976 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28977 sed -n "$gl_absolute_header_sed"`
28979 gl_header=$gl_cv_absolute_wchar_h
28980 gl_cv_next_wchar_h='"'$gl_header'"'
28982 gl_cv_next_wchar_h='<'wchar.h'>'
28987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
28988 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
28990 NEXT_WCHAR_H=$gl_cv_next_wchar_h
28992 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28993 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28994 gl_next_as_first_directive='<'wchar.h'>'
28996 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28997 gl_next_as_first_directive=$gl_cv_next_wchar_h
28999 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
29004 if test $ac_cv_header_wchar_h = yes; then
29014 if test $gt_cv_c_wint_t = yes; then
29027 ac_fn_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
29030 " "$ac_c_undeclared_builtin_options" "CFLAGS"
29031 if test "x$ac_cv_have_decl_wcsdup" = xyes
29037 printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h
29039 if test $ac_cv_have_decl_wcsdup = no; then
29046 HAVE_STRUCT_SOCKADDR_STORAGE=1;
29047 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
29049 HAVE_SA_FAMILY_T=1;
29053 if test $ac_cv_header_sys_socket_h = no; then
29054 ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
29055 if test "x$ac_cv_header_ws2tcpip_h" = xyes
29057 printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
29070 printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
29075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
29076 printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
29077 if test ${gl_cv_header_sys_socket_h_selfcontained+y}
29079 printf %s "(cached) " >&6
29082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29083 /* end confdefs.h. */
29084 #include <sys/socket.h>
29093 if ac_fn_c_try_compile "$LINENO"
29095 gl_cv_header_sys_socket_h_selfcontained=yes
29097 gl_cv_header_sys_socket_h_selfcontained=no
29099 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
29103 printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
29104 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
29105 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
29106 if test "x$ac_cv_func_shutdown" = xyes
29108 printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
29112 if test $ac_cv_func_shutdown = yes; then
29113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
29114 printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
29115 if test ${gl_cv_header_sys_socket_h_shut+y}
29117 printf %s "(cached) " >&6
29120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29121 /* end confdefs.h. */
29122 #include <sys/socket.h>
29126 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
29131 if ac_fn_c_try_compile "$LINENO"
29133 gl_cv_header_sys_socket_h_shut=yes
29135 gl_cv_header_sys_socket_h_shut=no
29137 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
29141 printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
29142 if test $gl_cv_header_sys_socket_h_shut = no; then
29143 SYS_SOCKET_H='sys/socket.h'
29147 # We need to check for ws2tcpip.h now.
29159 if test $gl_cv_have_include_next = yes; then
29160 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
29162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
29163 printf %s "checking absolute name of <sys/socket.h>... " >&6; }
29164 if test ${gl_cv_next_sys_socket_h+y}
29166 printf %s "(cached) " >&6
29169 if test $ac_cv_header_sys_socket_h = yes; then
29174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29175 /* end confdefs.h. */
29176 #include <sys/socket.h>
29179 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29180 *) gl_absname_cpp="$ac_cpp" ;;
29185 gl_dirsep_regex='[/\\]'
29188 gl_dirsep_regex='\/'
29191 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29192 gl_header_literal_regex=`echo 'sys/socket.h' \
29193 | sed -e "$gl_make_literal_regex_sed"`
29194 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29195 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29201 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29202 sed -n "$gl_absolute_header_sed"`
29204 gl_header=$gl_cv_absolute_sys_socket_h
29205 gl_cv_next_sys_socket_h='"'$gl_header'"'
29207 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
29212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
29213 printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
29215 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
29217 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29218 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29219 gl_next_as_first_directive='<'sys/socket.h'>'
29221 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29222 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
29224 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
29229 if test $ac_cv_header_sys_socket_h = yes; then
29230 HAVE_SYS_SOCKET_H=1
29232 HAVE_SYS_SOCKET_H=0
29237 if test $ac_cv_header_sys_socket_h = yes; then
29240 if test $ac_cv_header_ws2tcpip_h = yes; then
29249 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
29250 /* sys/types.h is not needed according to POSIX, but the
29251 sys/socket.h in i386-unknown-freebsd4.10 and
29252 powerpc-apple-darwin5.5 required it. */
29253 #include <sys/types.h>
29254 #ifdef HAVE_SYS_SOCKET_H
29255 #include <sys/socket.h>
29257 #ifdef HAVE_WS2TCPIP_H
29258 #include <ws2tcpip.h>
29262 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
29265 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
29269 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
29270 /* sys/types.h is not needed according to POSIX, but the
29271 sys/socket.h in i386-unknown-freebsd4.10 and
29272 powerpc-apple-darwin5.5 required it. */
29273 #include <sys/types.h>
29274 #ifdef HAVE_SYS_SOCKET_H
29275 #include <sys/socket.h>
29277 #ifdef HAVE_WS2TCPIP_H
29278 #include <ws2tcpip.h>
29282 if test "x$ac_cv_type_sa_family_t" = xyes
29285 printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
29290 if test $ac_cv_type_struct_sockaddr_storage = no; then
29291 HAVE_STRUCT_SOCKADDR_STORAGE=0
29293 if test $ac_cv_type_sa_family_t = no; then
29296 if test $ac_cv_type_struct_sockaddr_storage != no; then
29297 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
29298 #ifdef HAVE_SYS_SOCKET_H
29299 #include <sys/socket.h>
29301 #ifdef HAVE_WS2TCPIP_H
29302 #include <ws2tcpip.h>
29306 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
29309 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
29313 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
29317 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
29318 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
29319 SYS_SOCKET_H='sys/socket.h'
29325 if test $ac_cv_header_sys_socket_h != yes; then
29326 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29327 if test "x$ac_cv_header_winsock2_h" = xyes
29329 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
29334 if test "$ac_cv_header_winsock2_h" = yes; then
29336 UNISTD_H_HAVE_WINSOCK2_H=1
29337 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29350 GL_M4_GNULIB_SOCKET=0
29354 GL_M4_GNULIB_CONNECT=0
29358 GL_M4_GNULIB_ACCEPT=0
29362 GL_M4_GNULIB_BIND=0
29366 GL_M4_GNULIB_GETPEERNAME=0
29370 GL_M4_GNULIB_GETSOCKNAME=0
29374 GL_M4_GNULIB_GETSOCKOPT=0
29378 GL_M4_GNULIB_LISTEN=0
29382 GL_M4_GNULIB_RECV=0
29386 GL_M4_GNULIB_SEND=0
29390 GL_M4_GNULIB_RECVFROM=0
29394 GL_M4_GNULIB_SENDTO=0
29398 GL_M4_GNULIB_SETSOCKOPT=0
29402 GL_M4_GNULIB_SHUTDOWN=0
29406 GL_M4_GNULIB_ACCEPT4=0
29411 HAVE_DECL_INET_NTOP=1;
29412 HAVE_DECL_INET_PTON=1;
29413 REPLACE_INET_NTOP=0;
29414 REPLACE_INET_PTON=0;
29421 if test $ac_cv_header_arpa_inet_h = yes; then
29436 if test $gl_cv_have_include_next = yes; then
29437 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
29439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
29440 printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
29441 if test ${gl_cv_next_arpa_inet_h+y}
29443 printf %s "(cached) " >&6
29446 if test $ac_cv_header_arpa_inet_h = yes; then
29451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29452 /* end confdefs.h. */
29453 #include <arpa/inet.h>
29456 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29457 *) gl_absname_cpp="$ac_cpp" ;;
29462 gl_dirsep_regex='[/\\]'
29465 gl_dirsep_regex='\/'
29468 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29469 gl_header_literal_regex=`echo 'arpa/inet.h' \
29470 | sed -e "$gl_make_literal_regex_sed"`
29471 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29472 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29478 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29479 sed -n "$gl_absolute_header_sed"`
29481 gl_header=$gl_cv_absolute_arpa_inet_h
29482 gl_cv_next_arpa_inet_h='"'$gl_header'"'
29484 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
29489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
29490 printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
29492 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
29494 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29495 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29496 gl_next_as_first_directive='<'arpa/inet.h'>'
29498 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29499 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
29501 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
29511 if test $ac_cv_header_sys_socket_h = yes; then
29514 if test $ac_cv_header_ws2tcpip_h = yes; then
29527 GL_M4_GNULIB_INET_NTOP=0
29531 GL_M4_GNULIB_INET_PTON=0
29538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library needed for semaphore functions" >&5
29539 printf %s "checking for library needed for semaphore functions... " >&6; }
29540 if test ${gl_cv_semaphore_lib+y}
29542 printf %s "(cached) " >&6
29545 LIBS="$LIBS $LIBMULTITHREAD"
29546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29547 /* end confdefs.h. */
29548 #include <semaphore.h>
29552 sem_post ((sem_t *)0);
29557 if ac_fn_c_try_link "$LINENO"
29559 gl_cv_semaphore_lib=none
29562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29563 /* end confdefs.h. */
29564 #include <semaphore.h>
29568 sem_post ((sem_t *)0);
29573 if ac_fn_c_try_link "$LINENO"
29575 gl_cv_semaphore_lib='-lrt'
29577 gl_cv_semaphore_lib=none
29579 rm -f core conftest.err conftest.$ac_objext conftest.beam \
29580 conftest$ac_exeext conftest.$ac_ext
29583 rm -f core conftest.err conftest.$ac_objext conftest.beam \
29584 conftest$ac_exeext conftest.$ac_ext
29588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_semaphore_lib" >&5
29589 printf "%s\n" "$gl_cv_semaphore_lib" >&6; }
29590 if test "x$gl_cv_semaphore_lib" = xnone; then
29593 LIB_SEMAPHORE="$gl_cv_semaphore_lib"
29611 if test $gl_cv_have_include_next = yes; then
29612 gl_cv_next_ctype_h='<'ctype.h'>'
29614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
29615 printf %s "checking absolute name of <ctype.h>... " >&6; }
29616 if test ${gl_cv_next_ctype_h+y}
29618 printf %s "(cached) " >&6
29623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29624 /* end confdefs.h. */
29628 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29629 *) gl_absname_cpp="$ac_cpp" ;;
29634 gl_dirsep_regex='[/\\]'
29637 gl_dirsep_regex='\/'
29640 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29641 gl_header_literal_regex=`echo 'ctype.h' \
29642 | sed -e "$gl_make_literal_regex_sed"`
29643 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29644 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29650 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29651 sed -n "$gl_absolute_header_sed"`
29653 gl_header=$gl_cv_absolute_ctype_h
29654 gl_cv_next_ctype_h='"'$gl_header'"'
29658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
29659 printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
29661 NEXT_CTYPE_H=$gl_cv_next_ctype_h
29663 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29664 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29665 gl_next_as_first_directive='<'ctype.h'>'
29667 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29668 gl_next_as_first_directive=$gl_cv_next_ctype_h
29670 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
29680 GL_M4_GNULIB_ISBLANK=0
29688 HAVE_GETTIMEOFDAY=1;
29689 HAVE_STRUCT_TIMEVAL=1;
29691 REPLACE_GETTIMEOFDAY=0;
29692 REPLACE_STRUCT_TIMEVAL=0;
29707 if test $gl_cv_have_include_next = yes; then
29708 gl_cv_next_sys_time_h='<'sys/time.h'>'
29710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
29711 printf %s "checking absolute name of <sys/time.h>... " >&6; }
29712 if test ${gl_cv_next_sys_time_h+y}
29714 printf %s "(cached) " >&6
29717 if test $ac_cv_header_sys_time_h = yes; then
29722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29723 /* end confdefs.h. */
29724 #include <sys/time.h>
29727 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29728 *) gl_absname_cpp="$ac_cpp" ;;
29733 gl_dirsep_regex='[/\\]'
29736 gl_dirsep_regex='\/'
29739 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29740 gl_header_literal_regex=`echo 'sys/time.h' \
29741 | sed -e "$gl_make_literal_regex_sed"`
29742 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29743 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29749 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29750 sed -n "$gl_absolute_header_sed"`
29752 gl_header=$gl_cv_absolute_sys_time_h
29753 gl_cv_next_sys_time_h='"'$gl_header'"'
29755 gl_cv_next_sys_time_h='<'sys/time.h'>'
29760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
29761 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
29763 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
29765 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29766 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29767 gl_next_as_first_directive='<'sys/time.h'>'
29769 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29770 gl_next_as_first_directive=$gl_cv_next_sys_time_h
29772 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
29778 if test $ac_cv_header_sys_time_h != yes; then
29786 if test $ac_cv_header_sys_socket_h != yes; then
29787 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29788 if test "x$ac_cv_header_winsock2_h" = xyes
29790 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
29795 if test "$ac_cv_header_winsock2_h" = yes; then
29797 UNISTD_H_HAVE_WINSOCK2_H=1
29798 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
29805 printf %s "checking for struct timeval... " >&6; }
29806 if test ${gl_cv_sys_struct_timeval+y}
29808 printf %s "(cached) " >&6
29810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29811 /* end confdefs.h. */
29812 #if HAVE_SYS_TIME_H
29813 #include <sys/time.h>
29816 #if HAVE_WINSOCK2_H
29817 # include <winsock2.h>
29823 static struct timeval x; x.tv_sec = x.tv_usec;
29828 if ac_fn_c_try_compile "$LINENO"
29830 gl_cv_sys_struct_timeval=yes
29832 gl_cv_sys_struct_timeval=no
29834 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
29838 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
29839 if test $gl_cv_sys_struct_timeval != yes; then
29840 HAVE_STRUCT_TIMEVAL=0
29842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
29843 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
29844 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
29846 printf %s "(cached) " >&6
29848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29849 /* end confdefs.h. */
29850 #if HAVE_SYS_TIME_H
29851 #include <sys/time.h>
29854 #if HAVE_WINSOCK2_H
29855 # include <winsock2.h>
29861 static struct timeval x;
29862 typedef int verify_tv_sec_type[
29863 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
29870 if ac_fn_c_try_compile "$LINENO"
29872 gl_cv_sys_struct_timeval_tv_sec=yes
29874 gl_cv_sys_struct_timeval_tv_sec=no
29876 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
29880 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
29881 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
29882 REPLACE_STRUCT_TIMEVAL=1
29891 GL_M4_GNULIB_GETTIMEOFDAY=0
29899 printf "%s\n" "#define MUSL_LIBC 1" >>confdefs.h
29909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
29910 printf %s "checking for IPv4 sockets... " >&6; }
29911 if test ${gl_cv_socket_ipv4+y}
29913 printf %s "(cached) " >&6
29915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29916 /* end confdefs.h. */
29917 #include <sys/types.h>
29918 #ifdef HAVE_SYS_SOCKET_H
29919 #include <sys/socket.h>
29921 #ifdef HAVE_NETINET_IN_H
29922 #include <netinet/in.h>
29924 #ifdef HAVE_WINSOCK2_H
29925 #include <winsock2.h>
29930 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
29931 if (&x && &y && &z) return 0;
29936 if ac_fn_c_try_compile "$LINENO"
29938 gl_cv_socket_ipv4=yes
29940 gl_cv_socket_ipv4=no
29942 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
29945 printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
29946 if test $gl_cv_socket_ipv4 = yes; then
29948 printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
29952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
29953 printf %s "checking for IPv6 sockets... " >&6; }
29954 if test ${gl_cv_socket_ipv6+y}
29956 printf %s "(cached) " >&6
29958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29959 /* end confdefs.h. */
29960 #include <sys/types.h>
29961 #ifdef HAVE_SYS_SOCKET_H
29962 #include <sys/socket.h>
29964 #ifdef HAVE_NETINET_IN_H
29965 #include <netinet/in.h>
29967 #ifdef HAVE_WINSOCK2_H
29968 #include <winsock2.h>
29970 #ifdef HAVE_WS2TCPIP_H
29971 #include <ws2tcpip.h>
29976 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
29977 if (&x && &y && &z) return 0;
29982 if ac_fn_c_try_compile "$LINENO"
29984 gl_cv_socket_ipv6=yes
29986 gl_cv_socket_ipv6=no
29988 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
29991 printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
29992 if test $gl_cv_socket_ipv6 = yes; then
29994 printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
29998 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
29999 if test "x$ac_cv_type_off_t" = xyes
30004 printf "%s\n" "#define off_t long int" >>confdefs.h
30012 if test -n "$STDINT_H"; then
30013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30014 /* end confdefs.h. */
30029 if ac_fn_c_try_compile "$LINENO"
30031 PRIPTR_PREFIX='"l"'
30033 PRIPTR_PREFIX='"ll"'
30035 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30037 for glpfx in '' l ll I64; do
30039 '') gltype1='int';;
30040 l) gltype1='long int';;
30041 ll) gltype1='long long int';;
30042 I64) gltype1='__int64';;
30044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30045 /* end confdefs.h. */
30046 #include <stdint.h>
30047 extern intptr_t foo;
30048 extern $gltype1 foo;
30057 if ac_fn_c_try_compile "$LINENO"
30059 PRIPTR_PREFIX='"'$glpfx'"'
30061 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30062 test -n "$PRIPTR_PREFIX" && break
30068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
30069 printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
30070 if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
30072 printf %s "(cached) " >&6
30074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30075 /* end confdefs.h. */
30076 /* Work also in C++ mode. */
30077 #define __STDC_LIMIT_MACROS 1
30079 /* Work if build is not clean. */
30080 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
30082 #include <limits.h>
30084 #include <stdint.h>
30087 #if defined INT32_MAX && defined INTMAX_MAX
30088 #define CONDITION (INT32_MAX < INTMAX_MAX)
30090 #define CONDITION (sizeof (int) < sizeof (long long int))
30092 int test[CONDITION ? 1 : -1];
30101 if ac_fn_c_try_compile "$LINENO"
30103 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
30105 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
30107 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
30110 printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
30111 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
30112 INT32_MAX_LT_INTMAX_MAX=1;
30114 INT32_MAX_LT_INTMAX_MAX=0;
30118 if test $APPLE_UNIVERSAL_BUILD = 0; then
30120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
30121 printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
30122 if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
30124 printf %s "(cached) " >&6
30126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30127 /* end confdefs.h. */
30128 /* Work also in C++ mode. */
30129 #define __STDC_LIMIT_MACROS 1
30131 /* Work if build is not clean. */
30132 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
30134 #include <limits.h>
30136 #include <stdint.h>
30139 #if defined INT64_MAX
30140 #define CONDITION (INT64_MAX == LONG_MAX)
30142 #define CONDITION (sizeof (long long int) == sizeof (long int))
30144 int test[CONDITION ? 1 : -1];
30153 if ac_fn_c_try_compile "$LINENO"
30155 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
30157 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
30159 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
30162 printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
30163 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
30164 INT64_MAX_EQ_LONG_MAX=1;
30166 INT64_MAX_EQ_LONG_MAX=0;
30171 INT64_MAX_EQ_LONG_MAX=-1
30174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
30175 printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
30176 if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
30178 printf %s "(cached) " >&6
30180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30181 /* end confdefs.h. */
30182 /* Work also in C++ mode. */
30183 #define __STDC_LIMIT_MACROS 1
30185 /* Work if build is not clean. */
30186 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
30188 #include <limits.h>
30190 #include <stdint.h>
30193 #if defined UINT32_MAX && defined UINTMAX_MAX
30194 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
30196 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
30198 int test[CONDITION ? 1 : -1];
30207 if ac_fn_c_try_compile "$LINENO"
30209 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
30211 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
30213 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
30216 printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
30217 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
30218 UINT32_MAX_LT_UINTMAX_MAX=1;
30220 UINT32_MAX_LT_UINTMAX_MAX=0;
30224 if test $APPLE_UNIVERSAL_BUILD = 0; then
30226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
30227 printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
30228 if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
30230 printf %s "(cached) " >&6
30232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30233 /* end confdefs.h. */
30234 /* Work also in C++ mode. */
30235 #define __STDC_LIMIT_MACROS 1
30237 /* Work if build is not clean. */
30238 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
30240 #include <limits.h>
30242 #include <stdint.h>
30245 #if defined UINT64_MAX
30246 #define CONDITION (UINT64_MAX == ULONG_MAX)
30248 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
30250 int test[CONDITION ? 1 : -1];
30259 if ac_fn_c_try_compile "$LINENO"
30261 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
30263 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
30265 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
30268 printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
30269 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
30270 UINT64_MAX_EQ_ULONG_MAX=1;
30272 UINT64_MAX_EQ_ULONG_MAX=0;
30277 UINT64_MAX_EQ_ULONG_MAX=-1
30283 GL_M4_GNULIB_IOCTL=0
30296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
30297 printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
30298 if test ${gl_cv_header_sys_select_h_selfcontained+y}
30300 printf %s "(cached) " >&6
30303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30304 /* end confdefs.h. */
30305 #include <sys/select.h>
30314 if ac_fn_c_try_compile "$LINENO"
30316 gl_cv_header_sys_select_h_selfcontained=yes
30318 gl_cv_header_sys_select_h_selfcontained=no
30320 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30321 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
30322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30323 /* end confdefs.h. */
30324 #include <sys/select.h>
30328 int memset; int bzero;
30334 if ac_fn_c_try_compile "$LINENO"
30336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30337 /* end confdefs.h. */
30338 #include <sys/select.h>
30344 #define memset nonexistent_memset
30349 void *memset (void *, int, unsigned long);
30351 #define bzero nonexistent_bzero
30356 void bzero (void *, unsigned long);
30365 if ac_fn_c_try_link "$LINENO"
30369 gl_cv_header_sys_select_h_selfcontained=no
30371 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30372 conftest$ac_exeext conftest.$ac_ext
30375 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
30380 printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
30390 if test $gl_cv_have_include_next = yes; then
30391 gl_cv_next_sys_select_h='<'sys/select.h'>'
30393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
30394 printf %s "checking absolute name of <sys/select.h>... " >&6; }
30395 if test ${gl_cv_next_sys_select_h+y}
30397 printf %s "(cached) " >&6
30400 if test $ac_cv_header_sys_select_h = yes; then
30405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30406 /* end confdefs.h. */
30407 #include <sys/select.h>
30410 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30411 *) gl_absname_cpp="$ac_cpp" ;;
30416 gl_dirsep_regex='[/\\]'
30419 gl_dirsep_regex='\/'
30422 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30423 gl_header_literal_regex=`echo 'sys/select.h' \
30424 | sed -e "$gl_make_literal_regex_sed"`
30425 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30426 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30432 gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30433 sed -n "$gl_absolute_header_sed"`
30435 gl_header=$gl_cv_absolute_sys_select_h
30436 gl_cv_next_sys_select_h='"'$gl_header'"'
30438 gl_cv_next_sys_select_h='<'sys/select.h'>'
30443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
30444 printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
30446 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
30448 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30449 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30450 gl_next_as_first_directive='<'sys/select.h'>'
30452 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30453 gl_next_as_first_directive=$gl_cv_next_sys_select_h
30455 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
30460 if test $ac_cv_header_sys_select_h = yes; then
30461 HAVE_SYS_SELECT_H=1
30463 HAVE_SYS_SELECT_H=0
30470 if test $ac_cv_header_sys_socket_h != yes; then
30471 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
30472 if test "x$ac_cv_header_winsock2_h" = xyes
30474 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
30479 if test "$ac_cv_header_winsock2_h" = yes; then
30481 UNISTD_H_HAVE_WINSOCK2_H=1
30482 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
30496 if test $ac_cv_header_sys_socket_h != yes; then
30497 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
30498 if test "x$ac_cv_header_winsock2_h" = xyes
30500 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
30505 if test "$ac_cv_header_winsock2_h" = yes; then
30507 UNISTD_H_HAVE_WINSOCK2_H=1
30508 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
30514 if test $HAVE_WINSOCK2_H = 1; then
30515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
30516 printf %s "checking for WSAStartup... " >&6; }
30517 if test ${gl_cv_func_wsastartup+y}
30519 printf %s "(cached) " >&6
30522 gl_save_LIBS="$LIBS"
30523 LIBS="$LIBS -lws2_32"
30524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30525 /* end confdefs.h. */
30527 #ifdef HAVE_WINSOCK2_H
30528 # include <winsock2.h>
30534 WORD wVersionRequested = MAKEWORD(1, 1);
30536 int err = WSAStartup(wVersionRequested, &wsaData);
30544 if ac_fn_c_try_link "$LINENO"
30546 gl_cv_func_wsastartup=yes
30548 gl_cv_func_wsastartup=no
30550 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30551 conftest$ac_exeext conftest.$ac_ext
30552 LIBS="$gl_save_LIBS"
30555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
30556 printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
30557 if test "$gl_cv_func_wsastartup" = "yes"; then
30559 printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
30561 LIBSOCKET='-lws2_32'
30564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
30565 printf %s "checking for library containing setsockopt... " >&6; }
30566 if test ${gl_cv_lib_socket+y}
30568 printf %s "(cached) " >&6
30572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30573 /* end confdefs.h. */
30587 if ac_fn_c_try_link "$LINENO"
30591 gl_save_LIBS="$LIBS"
30592 LIBS="$gl_save_LIBS -lsocket"
30593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30594 /* end confdefs.h. */
30608 if ac_fn_c_try_link "$LINENO"
30610 gl_cv_lib_socket="-lsocket"
30612 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30613 conftest$ac_exeext conftest.$ac_ext
30614 if test -z "$gl_cv_lib_socket"; then
30615 LIBS="$gl_save_LIBS -lnetwork"
30616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30617 /* end confdefs.h. */
30631 if ac_fn_c_try_link "$LINENO"
30633 gl_cv_lib_socket="-lnetwork"
30635 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30636 conftest$ac_exeext conftest.$ac_ext
30637 if test -z "$gl_cv_lib_socket"; then
30638 LIBS="$gl_save_LIBS -lnet"
30639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30640 /* end confdefs.h. */
30654 if ac_fn_c_try_link "$LINENO"
30656 gl_cv_lib_socket="-lnet"
30658 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30659 conftest$ac_exeext conftest.$ac_ext
30662 LIBS="$gl_save_LIBS"
30665 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30666 conftest$ac_exeext conftest.$ac_ext
30667 if test -z "$gl_cv_lib_socket"; then
30668 gl_cv_lib_socket="none needed"
30672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
30673 printf "%s\n" "$gl_cv_lib_socket" >&6; }
30674 if test "$gl_cv_lib_socket" != "none needed"; then
30675 LIBSOCKET="$gl_cv_lib_socket"
30691 if test "$ac_cv_header_winsock2_h" = yes; then
30695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
30696 printf %s "checking whether select supports a 0 argument... " >&6; }
30697 if test ${gl_cv_func_select_supports0+y}
30699 printf %s "(cached) " >&6
30702 if test "$cross_compiling" = yes
30706 # Guess no on Interix.
30707 interix*) gl_cv_func_select_supports0="guessing no";;
30708 # Guess yes otherwise.
30709 *) gl_cv_func_select_supports0="guessing yes";;
30713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30714 /* end confdefs.h. */
30716 #include <sys/types.h>
30717 #include <sys/time.h>
30718 #if HAVE_SYS_SELECT_H
30719 #include <sys/select.h>
30723 struct timeval timeout;
30724 timeout.tv_sec = 0;
30725 timeout.tv_usec = 5;
30726 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
30729 if ac_fn_c_try_run "$LINENO"
30731 gl_cv_func_select_supports0=yes
30733 gl_cv_func_select_supports0=no
30735 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30736 conftest.$ac_objext conftest.beam conftest.$ac_ext
30741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
30742 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
30743 case "$gl_cv_func_select_supports0" in
30745 *) REPLACE_SELECT=1 ;;
30748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
30749 printf %s "checking whether select detects invalid fds... " >&6; }
30750 if test ${gl_cv_func_select_detects_ebadf+y}
30752 printf %s "(cached) " >&6
30755 if test "$cross_compiling" = yes
30759 # Guess yes on Linux systems.
30760 linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
30761 # Guess yes on glibc systems.
30762 *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
30763 # If we don't know, obey --enable-cross-guesses.
30764 *) gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
30768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30769 /* end confdefs.h. */
30771 #include <sys/types.h>
30772 #include <sys/time.h>
30773 #if HAVE_SYS_SELECT_H
30774 # include <sys/select.h>
30776 #include <unistd.h>
30791 struct timeval timeout;
30792 timeout.tv_sec = 0;
30793 timeout.tv_usec = 5;
30794 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
30800 if ac_fn_c_try_run "$LINENO"
30802 gl_cv_func_select_detects_ebadf=yes
30804 gl_cv_func_select_detects_ebadf=no
30806 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30807 conftest.$ac_objext conftest.beam conftest.$ac_ext
30812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
30813 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
30814 case $gl_cv_func_select_detects_ebadf in
30816 *) REPLACE_SELECT=1 ;;
30820 LIB_SELECT="$LIBSOCKET"
30821 if test $REPLACE_SELECT = 1; then
30824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30825 /* end confdefs.h. */
30827 #define WIN32_LEAN_AND_MEAN
30828 #include <windows.h>
30832 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
30836 if ac_fn_c_try_link "$LINENO"
30840 LIB_SELECT="$LIB_SELECT -luser32"
30842 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30843 conftest$ac_exeext conftest.$ac_ext
30856 if test $ac_cv_have_decl_strerror_r = no; then
30857 HAVE_DECL_STRERROR_R=0
30860 if test $ac_cv_func_strerror_r = yes; then
30861 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
30862 if test $gl_cv_func_strerror_r_posix_signature = yes; then
30863 case "$gl_cv_func_strerror_r_works" in
30864 *no) REPLACE_STRERROR_R=1 ;;
30867 REPLACE_STRERROR_R=1
30870 REPLACE_STRERROR_R=1
30876 HAVE_PTHREAD_SPINLOCK_T=1;
30877 HAVE_PTHREAD_CREATE_DETACHED=1;
30878 HAVE_PTHREAD_MUTEX_RECURSIVE=1;
30879 HAVE_PTHREAD_MUTEX_ROBUST=1;
30880 HAVE_PTHREAD_PROCESS_SHARED=1;
30881 HAVE_PTHREAD_CREATE=1;
30882 HAVE_PTHREAD_ATTR_INIT=1;
30883 HAVE_PTHREAD_ATTR_GETDETACHSTATE=1;
30884 HAVE_PTHREAD_ATTR_SETDETACHSTATE=1;
30885 HAVE_PTHREAD_ATTR_DESTROY=1;
30886 HAVE_PTHREAD_SELF=1;
30887 HAVE_PTHREAD_EQUAL=1;
30888 HAVE_PTHREAD_DETACH=1;
30889 HAVE_PTHREAD_JOIN=1;
30890 HAVE_PTHREAD_EXIT=1;
30891 HAVE_PTHREAD_ONCE=1;
30892 HAVE_PTHREAD_MUTEX_INIT=1;
30893 HAVE_PTHREAD_MUTEXATTR_INIT=1;
30894 HAVE_PTHREAD_MUTEXATTR_GETTYPE=1;
30895 HAVE_PTHREAD_MUTEXATTR_SETTYPE=1;
30896 HAVE_PTHREAD_MUTEXATTR_GETROBUST=1;
30897 HAVE_PTHREAD_MUTEXATTR_SETROBUST=1;
30898 HAVE_PTHREAD_MUTEXATTR_DESTROY=1;
30899 HAVE_PTHREAD_MUTEX_LOCK=1;
30900 HAVE_PTHREAD_MUTEX_TRYLOCK=1;
30901 HAVE_PTHREAD_MUTEX_TIMEDLOCK=1;
30902 HAVE_PTHREAD_MUTEX_UNLOCK=1;
30903 HAVE_PTHREAD_MUTEX_DESTROY=1;
30904 HAVE_PTHREAD_RWLOCK_INIT=1;
30905 HAVE_PTHREAD_RWLOCKATTR_INIT=1;
30906 HAVE_PTHREAD_RWLOCKATTR_DESTROY=1;
30907 HAVE_PTHREAD_RWLOCK_RDLOCK=1;
30908 HAVE_PTHREAD_RWLOCK_WRLOCK=1;
30909 HAVE_PTHREAD_RWLOCK_TRYRDLOCK=1;
30910 HAVE_PTHREAD_RWLOCK_TRYWRLOCK=1;
30911 HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=1;
30912 HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=1;
30913 HAVE_PTHREAD_RWLOCK_UNLOCK=1;
30914 HAVE_PTHREAD_RWLOCK_DESTROY=1;
30915 HAVE_PTHREAD_COND_INIT=1;
30916 HAVE_PTHREAD_CONDATTR_INIT=1;
30917 HAVE_PTHREAD_CONDATTR_DESTROY=1;
30918 HAVE_PTHREAD_COND_WAIT=1;
30919 HAVE_PTHREAD_COND_TIMEDWAIT=1;
30920 HAVE_PTHREAD_COND_SIGNAL=1;
30921 HAVE_PTHREAD_COND_BROADCAST=1;
30922 HAVE_PTHREAD_COND_DESTROY=1;
30923 HAVE_PTHREAD_KEY_CREATE=1;
30924 HAVE_PTHREAD_SETSPECIFIC=1;
30925 HAVE_PTHREAD_GETSPECIFIC=1;
30926 HAVE_PTHREAD_KEY_DELETE=1;
30927 HAVE_PTHREAD_SPIN_INIT=1;
30928 HAVE_PTHREAD_SPIN_LOCK=1;
30929 HAVE_PTHREAD_SPIN_TRYLOCK=1;
30930 HAVE_PTHREAD_SPIN_UNLOCK=1;
30931 HAVE_PTHREAD_SPIN_DESTROY=1;
30932 REPLACE_PTHREAD_CREATE=0;
30933 REPLACE_PTHREAD_ATTR_INIT=0;
30934 REPLACE_PTHREAD_ATTR_GETDETACHSTATE=0;
30935 REPLACE_PTHREAD_ATTR_SETDETACHSTATE=0;
30936 REPLACE_PTHREAD_ATTR_DESTROY=0;
30937 REPLACE_PTHREAD_SELF=0;
30938 REPLACE_PTHREAD_EQUAL=0;
30939 REPLACE_PTHREAD_DETACH=0;
30940 REPLACE_PTHREAD_JOIN=0;
30941 REPLACE_PTHREAD_EXIT=0;
30942 REPLACE_PTHREAD_ONCE=0;
30943 REPLACE_PTHREAD_MUTEX_INIT=0;
30944 REPLACE_PTHREAD_MUTEXATTR_INIT=0;
30945 REPLACE_PTHREAD_MUTEXATTR_GETTYPE=0;
30946 REPLACE_PTHREAD_MUTEXATTR_SETTYPE=0;
30947 REPLACE_PTHREAD_MUTEXATTR_GETROBUST=0;
30948 REPLACE_PTHREAD_MUTEXATTR_SETROBUST=0;
30949 REPLACE_PTHREAD_MUTEXATTR_DESTROY=0;
30950 REPLACE_PTHREAD_MUTEX_LOCK=0;
30951 REPLACE_PTHREAD_MUTEX_TRYLOCK=0;
30952 REPLACE_PTHREAD_MUTEX_TIMEDLOCK=0;
30953 REPLACE_PTHREAD_MUTEX_UNLOCK=0;
30954 REPLACE_PTHREAD_MUTEX_DESTROY=0;
30955 REPLACE_PTHREAD_RWLOCK_INIT=0;
30956 REPLACE_PTHREAD_RWLOCKATTR_INIT=0;
30957 REPLACE_PTHREAD_RWLOCKATTR_DESTROY=0;
30958 REPLACE_PTHREAD_RWLOCK_RDLOCK=0;
30959 REPLACE_PTHREAD_RWLOCK_WRLOCK=0;
30960 REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=0;
30961 REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=0;
30962 REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=0;
30963 REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=0;
30964 REPLACE_PTHREAD_RWLOCK_UNLOCK=0;
30965 REPLACE_PTHREAD_RWLOCK_DESTROY=0;
30966 REPLACE_PTHREAD_COND_INIT=0;
30967 REPLACE_PTHREAD_CONDATTR_INIT=0;
30968 REPLACE_PTHREAD_CONDATTR_DESTROY=0;
30969 REPLACE_PTHREAD_COND_WAIT=0;
30970 REPLACE_PTHREAD_COND_TIMEDWAIT=0;
30971 REPLACE_PTHREAD_COND_SIGNAL=0;
30972 REPLACE_PTHREAD_COND_BROADCAST=0;
30973 REPLACE_PTHREAD_COND_DESTROY=0;
30974 REPLACE_PTHREAD_KEY_CREATE=0;
30975 REPLACE_PTHREAD_SETSPECIFIC=0;
30976 REPLACE_PTHREAD_GETSPECIFIC=0;
30977 REPLACE_PTHREAD_KEY_DELETE=0;
30978 REPLACE_PTHREAD_SPIN_INIT=0;
30979 REPLACE_PTHREAD_SPIN_LOCK=0;
30980 REPLACE_PTHREAD_SPIN_TRYLOCK=0;
30981 REPLACE_PTHREAD_SPIN_UNLOCK=0;
30982 REPLACE_PTHREAD_SPIN_DESTROY=0;
30999 if test $gl_cv_have_include_next = yes; then
31000 gl_cv_next_pthread_h='<'pthread.h'>'
31002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <pthread.h>" >&5
31003 printf %s "checking absolute name of <pthread.h>... " >&6; }
31004 if test ${gl_cv_next_pthread_h+y}
31006 printf %s "(cached) " >&6
31009 if test $ac_cv_header_pthread_h = yes; then
31014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31015 /* end confdefs.h. */
31016 #include <pthread.h>
31019 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31020 *) gl_absname_cpp="$ac_cpp" ;;
31025 gl_dirsep_regex='[/\\]'
31028 gl_dirsep_regex='\/'
31031 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31032 gl_header_literal_regex=`echo 'pthread.h' \
31033 | sed -e "$gl_make_literal_regex_sed"`
31034 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31035 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31041 gl_cv_absolute_pthread_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31042 sed -n "$gl_absolute_header_sed"`
31044 gl_header=$gl_cv_absolute_pthread_h
31045 gl_cv_next_pthread_h='"'$gl_header'"'
31047 gl_cv_next_pthread_h='<'pthread.h'>'
31052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_pthread_h" >&5
31053 printf "%s\n" "$gl_cv_next_pthread_h" >&6; }
31055 NEXT_PTHREAD_H=$gl_cv_next_pthread_h
31057 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31058 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31059 gl_next_as_first_directive='<'pthread.h'>'
31061 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31062 gl_next_as_first_directive=$gl_cv_next_pthread_h
31064 NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H=$gl_next_as_first_directive
31069 if test $ac_cv_header_pthread_h = yes; then
31073 if { case "$host_os" in mingw*) true;; *) false;; esac; } \
31074 && test $gl_threads_api = windows; then
31083 ac_fn_c_check_type "$LINENO" "pthread_t" "ac_cv_type_pthread_t" "$ac_includes_default
31085 #include <pthread.h>
31088 if test "x$ac_cv_type_pthread_t" = xyes
31091 printf "%s\n" "#define HAVE_PTHREAD_T 1" >>confdefs.h
31095 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "$ac_includes_default
31097 #include <pthread.h>
31100 if test "x$ac_cv_type_pthread_spinlock_t" = xyes
31103 printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
31108 if test $ac_cv_type_pthread_t != yes; then
31111 if test $ac_cv_type_pthread_spinlock_t != yes; then
31112 HAVE_PTHREAD_SPINLOCK_T=0
31116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_CREATE_DETACHED" >&5
31117 printf %s "checking for PTHREAD_CREATE_DETACHED... " >&6; }
31118 if test ${gl_cv_const_PTHREAD_CREATE_DETACHED+y}
31120 printf %s "(cached) " >&6
31122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31123 /* end confdefs.h. */
31124 #include <pthread.h>
31125 int x = PTHREAD_CREATE_DETACHED;
31135 if ac_fn_c_try_compile "$LINENO"
31137 gl_cv_const_PTHREAD_CREATE_DETACHED=yes
31139 gl_cv_const_PTHREAD_CREATE_DETACHED=no
31141 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_CREATE_DETACHED" >&5
31145 printf "%s\n" "$gl_cv_const_PTHREAD_CREATE_DETACHED" >&6; }
31146 if test $gl_cv_const_PTHREAD_CREATE_DETACHED != yes; then
31147 HAVE_PTHREAD_CREATE_DETACHED=0
31150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_RECURSIVE" >&5
31151 printf %s "checking for PTHREAD_MUTEX_RECURSIVE... " >&6; }
31152 if test ${gl_cv_const_PTHREAD_MUTEX_RECURSIVE+y}
31154 printf %s "(cached) " >&6
31156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31157 /* end confdefs.h. */
31158 #include <pthread.h>
31159 int x = PTHREAD_MUTEX_RECURSIVE;
31169 if ac_fn_c_try_compile "$LINENO"
31171 gl_cv_const_PTHREAD_MUTEX_RECURSIVE=yes
31173 gl_cv_const_PTHREAD_MUTEX_RECURSIVE=no
31175 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&5
31179 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&6; }
31180 if test $gl_cv_const_PTHREAD_MUTEX_RECURSIVE != yes; then
31181 HAVE_PTHREAD_MUTEX_RECURSIVE=0
31184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_ROBUST" >&5
31185 printf %s "checking for PTHREAD_MUTEX_ROBUST... " >&6; }
31186 if test ${gl_cv_const_PTHREAD_MUTEX_ROBUST+y}
31188 printf %s "(cached) " >&6
31190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31191 /* end confdefs.h. */
31192 #include <pthread.h>
31193 int x = PTHREAD_MUTEX_ROBUST;
31203 if ac_fn_c_try_compile "$LINENO"
31205 gl_cv_const_PTHREAD_MUTEX_ROBUST=yes
31207 gl_cv_const_PTHREAD_MUTEX_ROBUST=no
31209 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_ROBUST" >&5
31213 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_ROBUST" >&6; }
31214 if test $gl_cv_const_PTHREAD_MUTEX_ROBUST != yes; then
31215 HAVE_PTHREAD_MUTEX_ROBUST=0
31218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PROCESS_SHARED" >&5
31219 printf %s "checking for PTHREAD_PROCESS_SHARED... " >&6; }
31220 if test ${gl_cv_const_PTHREAD_PROCESS_SHARED+y}
31222 printf %s "(cached) " >&6
31224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31225 /* end confdefs.h. */
31226 #include <pthread.h>
31227 int x = PTHREAD_PROCESS_SHARED;
31237 if ac_fn_c_try_compile "$LINENO"
31239 gl_cv_const_PTHREAD_PROCESS_SHARED=yes
31241 gl_cv_const_PTHREAD_PROCESS_SHARED=no
31243 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_PROCESS_SHARED" >&5
31247 printf "%s\n" "$gl_cv_const_PTHREAD_PROCESS_SHARED" >&6; }
31248 if test $gl_cv_const_PTHREAD_PROCESS_SHARED != yes; then
31249 HAVE_PTHREAD_PROCESS_SHARED=0
31256 LIB_PTHREAD="$LIBPMULTITHREAD"
31261 GL_M4_GNULIB_PTHREAD_THREAD=0
31265 GL_M4_GNULIB_PTHREAD_ONCE=0
31269 GL_M4_GNULIB_PTHREAD_MUTEX=0
31273 GL_M4_GNULIB_PTHREAD_RWLOCK=0
31277 GL_M4_GNULIB_PTHREAD_COND=0
31281 GL_M4_GNULIB_PTHREAD_TSS=0
31285 GL_M4_GNULIB_PTHREAD_SPIN=0
31289 GL_M4_GNULIB_PTHREAD_MUTEX_TIMEDLOCK=0
31296 GL_M4_GNULIB_PSELECT=0
31300 GL_M4_GNULIB_SELECT=0
31304 ac_fn_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
31305 if test "x$ac_cv_have_decl_setenv" = xyes
31311 printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h
31317 if test $ac_cv_have_decl_setenv = no; then
31325 ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
31326 if test "x$ac_cv_header_search_h" = xyes
31328 printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h
31332 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
31333 if test "x$ac_cv_func_tsearch" = xyes
31335 printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
31348 if test $ac_cv_header_sys_ioctl_h = yes; then
31350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
31351 printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
31352 if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
31354 printf %s "(cached) " >&6
31356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31357 /* end confdefs.h. */
31358 #include <sys/ioctl.h>
31367 if ac_fn_c_try_compile "$LINENO"
31369 gl_cv_decl_ioctl_in_sys_ioctl_h=yes
31371 gl_cv_decl_ioctl_in_sys_ioctl_h=no
31373 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
31377 printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
31391 if test $gl_cv_have_include_next = yes; then
31392 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
31394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
31395 printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
31396 if test ${gl_cv_next_sys_ioctl_h+y}
31398 printf %s "(cached) " >&6
31401 if test $ac_cv_header_sys_ioctl_h = yes; then
31406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31407 /* end confdefs.h. */
31408 #include <sys/ioctl.h>
31411 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31412 *) gl_absname_cpp="$ac_cpp" ;;
31417 gl_dirsep_regex='[/\\]'
31420 gl_dirsep_regex='\/'
31423 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31424 gl_header_literal_regex=`echo 'sys/ioctl.h' \
31425 | sed -e "$gl_make_literal_regex_sed"`
31426 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31427 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31433 gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31434 sed -n "$gl_absolute_header_sed"`
31436 gl_header=$gl_cv_absolute_sys_ioctl_h
31437 gl_cv_next_sys_ioctl_h='"'$gl_header'"'
31439 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
31444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
31445 printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
31447 NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
31449 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31450 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31451 gl_next_as_first_directive='<'sys/ioctl.h'>'
31453 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31454 gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
31456 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
31479 if test $gl_cv_have_include_next = yes; then
31480 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
31482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
31483 printf %s "checking absolute name of <sys/uio.h>... " >&6; }
31484 if test ${gl_cv_next_sys_uio_h+y}
31486 printf %s "(cached) " >&6
31489 if test $ac_cv_header_sys_uio_h = yes; then
31494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31495 /* end confdefs.h. */
31496 #include <sys/uio.h>
31499 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31500 *) gl_absname_cpp="$ac_cpp" ;;
31505 gl_dirsep_regex='[/\\]'
31508 gl_dirsep_regex='\/'
31511 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31512 gl_header_literal_regex=`echo 'sys/uio.h' \
31513 | sed -e "$gl_make_literal_regex_sed"`
31514 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31515 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31521 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31522 sed -n "$gl_absolute_header_sed"`
31524 gl_header=$gl_cv_absolute_sys_uio_h
31525 gl_cv_next_sys_uio_h='"'$gl_header'"'
31527 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
31532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
31533 printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
31535 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
31537 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31538 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31539 gl_next_as_first_directive='<'sys/uio.h'>'
31541 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31542 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
31544 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
31549 if test $ac_cv_header_sys_uio_h = yes; then
31558 ac_fn_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
31559 if test "x$ac_cv_have_decl_unsetenv" = xyes
31565 printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
31574 if test $gl_threads_api = posix; then
31575 YIELD_LIB="$LIB_SCHED_YIELD"
31583 GL_COND_LIBTOOL_TRUE=
31584 GL_COND_LIBTOOL_FALSE='#'
31586 GL_COND_LIBTOOL_TRUE='#'
31587 GL_COND_LIBTOOL_FALSE=
31590 gl_cond_libtool=false
31606 gl_source_base='lib'
31611 mingw*) REPLACE_ACCESS=1 ;;
31614 if test $REPLACE_ACCESS = 1; then
31623 M4_LIBOBJS="$M4_LIBOBJS access.$ac_objext"
31635 GL_M4_GNULIB_ACCESS=1
31641 printf "%s\n" "#define GNULIB_TEST_ACCESS 1" >>confdefs.h
31647 if test $ac_cv_func_alloca_works = no; then
31651 # Define an additional variable used in the Makefile substitution.
31652 if test $ac_cv_working_alloca_h = yes; then
31653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
31654 printf %s "checking for alloca as a compiler built-in... " >&6; }
31655 if test ${gl_cv_rpl_alloca+y}
31657 printf %s "(cached) " >&6
31660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31661 /* end confdefs.h. */
31663 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
31668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31669 $EGREP "Need own alloca" >/dev/null 2>&1
31671 gl_cv_rpl_alloca=yes
31673 gl_cv_rpl_alloca=no
31679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
31680 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
31681 if test $gl_cv_rpl_alloca = yes; then
31683 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
31693 if test -n "$ALLOCA_H"; then
31694 GL_GENERATE_ALLOCA_H_TRUE=
31695 GL_GENERATE_ALLOCA_H_FALSE='#'
31697 GL_GENERATE_ALLOCA_H_TRUE='#'
31698 GL_GENERATE_ALLOCA_H_FALSE=
31702 if test $ac_cv_working_alloca_h = yes; then
31710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
31711 printf %s "checking whether to enable assertions... " >&6; }
31712 # Check whether --enable-assert was given.
31713 if test ${enable_assert+y}
31715 enableval=$enable_assert; if test "x$enableval" = xno
31718 printf "%s\n" "#define NDEBUG 1" >>confdefs.h
31720 elif test "x$enableval" != xyes
31722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
31723 printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
31730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
31731 printf "%s\n" "$enable_assert" >&6; }
31743 if test $ac_cv_func_btowc = no; then
31750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
31751 printf %s "checking whether btowc(0) is correct... " >&6; }
31752 if test ${gl_cv_func_btowc_nul+y}
31754 printf %s "(cached) " >&6
31757 if test "$cross_compiling" = yes
31761 # Guess no on Cygwin.
31762 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
31763 # Guess yes on native Windows.
31764 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
31765 # Guess yes otherwise.
31766 *) gl_cv_func_btowc_nul="guessing yes" ;;
31770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31771 /* end confdefs.h. */
31776 if (btowc ('\0') != 0)
31781 if ac_fn_c_try_run "$LINENO"
31783 gl_cv_func_btowc_nul=yes
31785 gl_cv_func_btowc_nul=no
31787 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31788 conftest.$ac_objext conftest.beam conftest.$ac_ext
31793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
31794 printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
31796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
31797 printf %s "checking whether btowc(EOF) is correct... " >&6; }
31798 if test ${gl_cv_func_btowc_eof+y}
31800 printf %s "(cached) " >&6
31804 # Guess no on IRIX.
31805 irix*) gl_cv_func_btowc_eof="guessing no" ;;
31806 # Guess yes on native Windows.
31807 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
31808 # Guess yes otherwise.
31809 *) gl_cv_func_btowc_eof="guessing yes" ;;
31811 if test $LOCALE_FR != none; then
31812 if test "$cross_compiling" = yes
31816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31817 /* end confdefs.h. */
31819 #include <locale.h>
31824 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
31826 if (btowc (EOF) != WEOF)
31832 if ac_fn_c_try_run "$LINENO"
31834 gl_cv_func_btowc_eof=yes
31836 gl_cv_func_btowc_eof=no
31838 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31839 conftest.$ac_objext conftest.beam conftest.$ac_ext
31845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
31846 printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
31848 case "$gl_cv_func_btowc_nul" in
31850 *) REPLACE_BTOWC=1 ;;
31852 case "$gl_cv_func_btowc_eof" in
31854 *) REPLACE_BTOWC=1 ;;
31858 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
31867 M4_LIBOBJS="$M4_LIBOBJS btowc.$ac_objext"
31882 GL_M4_GNULIB_BTOWC=1
31888 printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
31893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
31894 printf %s "checking for __builtin_expect... " >&6; }
31895 if test ${gl_cv___builtin_expect+y}
31897 printf %s "(cached) " >&6
31899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31900 /* end confdefs.h. */
31903 main (int argc, char **argv)
31905 argc = __builtin_expect (argc, 100);
31906 return argv[argc != 100][0];
31909 if ac_fn_c_try_link "$LINENO"
31911 gl_cv___builtin_expect=yes
31913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31914 /* end confdefs.h. */
31916 #include <builtins.h>
31918 main (int argc, char **argv)
31920 argc = __builtin_expect (argc, 100);
31921 return argv[argc != 100][0];
31924 if ac_fn_c_try_link "$LINENO"
31926 gl_cv___builtin_expect="in <builtins.h>"
31928 gl_cv___builtin_expect=no
31930 rm -f core conftest.err conftest.$ac_objext conftest.beam \
31931 conftest$ac_exeext conftest.$ac_ext
31933 rm -f core conftest.err conftest.$ac_objext conftest.beam \
31934 conftest$ac_exeext conftest.$ac_ext
31936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
31937 printf "%s\n" "$gl_cv___builtin_expect" >&6; }
31938 if test "$gl_cv___builtin_expect" = yes; then
31939 printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
31941 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
31942 printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
31948 if test "$with_libsigsegv" = yes; then
31949 if test "$gl_cv_lib_sigsegv" = yes; then
31950 LIBCSTACK=$LIBSIGSEGV
31952 LTLIBCSTACK=$LTLIBSIGSEGV
31960 if test $REPLACE_CALLOC = 0; then
31962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether calloc (0, n) and calloc (n, 0) return nonnull" >&5
31963 printf %s "checking whether calloc (0, n) and calloc (n, 0) return nonnull... " >&6; }
31964 if test ${ac_cv_func_calloc_0_nonnull+y}
31966 printf %s "(cached) " >&6
31968 if test $cross_compiling != yes; then
31969 ac_cv_func_calloc_0_nonnull=yes
31970 if test "$cross_compiling" = yes
31972 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31973 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
31974 as_fn_error $? "cannot run test program while cross compiling
31975 See \`config.log' for more details" "$LINENO" 5; }
31977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31978 /* end confdefs.h. */
31979 $ac_includes_default
31984 char * volatile p = calloc (0, 0);
31994 if ac_fn_c_try_run "$LINENO"
31998 ac_cv_func_calloc_0_nonnull=no
32000 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32001 conftest.$ac_objext conftest.beam conftest.$ac_ext
32006 # Guess yes on glibc systems.
32007 *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
32008 # Guess yes on musl systems.
32009 *-musl*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
32010 # Guess yes on native Windows.
32011 mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
32012 # If we don't know, obey --enable-cross-guesses.
32013 *) ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
32018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
32019 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
32020 case $ac_cv_func_calloc_0_nonnull in #(
32024 REPLACE_CALLOC=1 ;;
32029 if test $REPLACE_CALLOC = 1; then
32038 M4_LIBOBJS="$M4_LIBOBJS calloc.$ac_objext"
32044 if test $REPLACE_MALLOC = 1; then
32048 if test $REPLACE_CALLOC = 1; then
32057 M4_LIBOBJS="$M4_LIBOBJS calloc.$ac_objext"
32069 GL_M4_GNULIB_CALLOC_POSIX=1
32075 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
32085 if test $ac_cv_func_canonicalize_file_name = no; then
32086 HAVE_CANONICALIZE_FILE_NAME=0
32088 case "$gl_cv_func_realpath_works" in
32090 *) REPLACE_CANONICALIZE_FILE_NAME=1 ;;
32096 printf "%s\n" "#define GNULIB_CANONICALIZE 1" >>confdefs.h
32101 printf "%s\n" "#define GNULIB_TEST_CANONICALIZE 1" >>confdefs.h
32113 GL_M4_GNULIB_CANONICALIZE_FILE_NAME=1
32119 printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
32126 if test $ac_cv_func_canonicalize_file_name = no; then
32127 HAVE_CANONICALIZE_FILE_NAME=0
32128 if test $ac_cv_func_realpath = no; then
32131 case "$gl_cv_func_realpath_works" in
32133 *) REPLACE_REALPATH=1 ;;
32137 case "$gl_cv_func_realpath_works" in
32141 REPLACE_CANONICALIZE_FILE_NAME=1
32147 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
32156 M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
32161 printf "%s\n" "#define GNULIB_CANONICALIZE_LGPL 1" >>confdefs.h
32173 GL_M4_GNULIB_CANONICALIZE_FILE_NAME=1
32179 printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
32192 GL_M4_GNULIB_REALPATH=1
32198 printf "%s\n" "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
32211 GL_M4_GNULIB_CHDIR=1
32217 printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
32223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
32224 printf %s "checking whether this system supports file names of any length... " >&6; }
32225 if test ${gl_cv_have_unlimited_file_name_length+y}
32227 printf %s "(cached) " >&6
32229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32230 /* end confdefs.h. */
32232 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
32234 # include <unistd.h>
32236 #include <limits.h>
32237 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
32238 # include <sys/param.h>
32240 #if !defined PATH_MAX && defined MAXPATHLEN
32241 # define PATH_MAX MAXPATHLEN
32245 # define PATH_MAX 1024
32247 #if defined _WIN32 && ! defined __CYGWIN__
32249 # define PATH_MAX 260
32253 have_arbitrary_file_name_length_limit
32256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32257 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1
32259 gl_cv_have_unlimited_file_name_length=no
32261 gl_cv_have_unlimited_file_name_length=yes
32266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
32267 printf "%s\n" "$gl_cv_have_unlimited_file_name_length" >&6; }
32269 if test $gl_cv_have_unlimited_file_name_length = no; then
32278 M4_LIBOBJS="$M4_LIBOBJS chdir-long.$ac_objext"
32283 printf "%s\n" "#define SIGNAL_SAFE_LIST 1" >>confdefs.h
32288 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
32289 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
32291 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
32292 # programs in the package would end up linked with that potentially-shared
32293 # library, inducing unnecessary run-time overhead.
32296 gl_saved_libs=$LIBS
32297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
32298 printf %s "checking for library containing clock_gettime... " >&6; }
32299 if test ${ac_cv_search_clock_gettime+y}
32301 printf %s "(cached) " >&6
32303 ac_func_search_save_LIBS=$LIBS
32304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32305 /* end confdefs.h. */
32307 /* Override any GCC internal prototype to avoid an error.
32308 Use char because int might match the return type of a GCC
32309 builtin and then its argument prototype would still apply. */
32310 char clock_gettime ();
32314 return clock_gettime ();
32319 for ac_lib in '' rt posix4
32321 if test -z "$ac_lib"; then
32322 ac_res="none required"
32325 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
32327 if ac_fn_c_try_link "$LINENO"
32329 ac_cv_search_clock_gettime=$ac_res
32331 rm -f core conftest.err conftest.$ac_objext conftest.beam \
32333 if test ${ac_cv_search_clock_gettime+y}
32338 if test ${ac_cv_search_clock_gettime+y}
32342 ac_cv_search_clock_gettime=no
32344 rm conftest.$ac_ext
32345 LIBS=$ac_func_search_save_LIBS
32347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
32348 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
32349 ac_res=$ac_cv_search_clock_gettime
32350 if test "$ac_res" != no
32352 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32353 test "$ac_cv_search_clock_gettime" = "none required" ||
32354 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
32357 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
32358 if test "x$ac_cv_func_clock_gettime" = xyes
32360 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
32363 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
32364 if test "x$ac_cv_func_clock_settime" = xyes
32366 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
32370 LIBS=$gl_saved_libs
32374 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
32381 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32390 if test $ac_cv_header_sys_socket_h != yes; then
32391 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
32392 if test "x$ac_cv_header_winsock2_h" = xyes
32394 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
32399 if test "$ac_cv_header_winsock2_h" = yes; then
32401 UNISTD_H_HAVE_WINSOCK2_H=1
32402 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
32408 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
32413 if test $REPLACE_CLOSE = 0; then
32417 if test $ac_cv_func_fchdir = no; then
32421 if test $HAVE_FCHDIR = 0; then
32427 if test $REPLACE_CLOSE = 1; then
32436 M4_LIBOBJS="$M4_LIBOBJS close.$ac_objext"
32448 GL_M4_GNULIB_CLOSE=1
32454 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
32460 printf "%s\n" "#define GNULIB_CLOSE_STREAM 1" >>confdefs.h
32466 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
32467 if test "x$ac_cv_func_closedir" = xyes
32469 printf "%s\n" "#define HAVE_CLOSEDIR 1" >>confdefs.h
32473 if test $ac_cv_func_closedir = no; then
32480 if test $ac_cv_func_fchdir = no; then
32484 if test $HAVE_FCHDIR = 0; then
32485 if test $HAVE_CLOSEDIR = 1; then
32490 case $host_os,$HAVE_CLOSEDIR in
32492 REPLACE_CLOSEDIR=1;;
32495 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
32504 M4_LIBOBJS="$M4_LIBOBJS closedir.$ac_objext"
32516 GL_M4_GNULIB_CLOSEDIR=1
32522 printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
32528 if test "x$lispdir" = x; then
32529 lispdir='${datarootdir}/emacs/site-lisp'
32532 if test "x$runstatedir" = x; then
32533 runstatedir='${localstatedir}/run'
32537 pkglibexecdir='${libexecdir}/${PACKAGE}'
32540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
32541 printf %s "checking for d_ino member in directory struct... " >&6; }
32542 if test ${gl_cv_struct_dirent_d_ino+y}
32544 printf %s "(cached) " >&6
32546 if test "$cross_compiling" = yes
32549 # Guess yes on glibc systems with Linux kernel.
32550 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
32551 # Guess yes on musl systems with Linux kernel.
32552 linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
32553 # Guess no on native Windows.
32554 mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
32555 # If we don't know, obey --enable-cross-guesses.
32556 *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
32560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32561 /* end confdefs.h. */
32562 #include <sys/types.h>
32563 #include <sys/stat.h>
32564 #include <dirent.h>
32569 DIR *dp = opendir (".");
32576 { closedir (dp); return 2; }
32577 if (lstat (e->d_name, &st) != 0)
32578 { closedir (dp); return 3; }
32579 if (e->d_ino != st.st_ino)
32580 { closedir (dp); return 4; }
32588 if ac_fn_c_try_run "$LINENO"
32590 gl_cv_struct_dirent_d_ino=yes
32592 gl_cv_struct_dirent_d_ino=no
32594 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32595 conftest.$ac_objext conftest.beam conftest.$ac_ext
32599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
32600 printf "%s\n" "$gl_cv_struct_dirent_d_ino" >&6; }
32601 case "$gl_cv_struct_dirent_d_ino" in
32604 printf "%s\n" "#define D_INO_IN_DIRENT 1" >>confdefs.h
32621 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
32622 if test "x$ac_cv_func_dirfd" = xyes
32624 printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
32628 ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
32629 #include <dirent.h>
32630 " "$ac_c_undeclared_builtin_options" "CFLAGS"
32631 if test "x$ac_cv_have_decl_dirfd" = xyes
32637 printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h
32639 if test $ac_cv_have_decl_dirfd = no; then
32643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
32644 printf %s "checking whether dirfd is a macro... " >&6; }
32645 if test ${gl_cv_func_dirfd_macro+y}
32647 printf %s "(cached) " >&6
32649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32650 /* end confdefs.h. */
32652 #include <sys/types.h>
32653 #include <dirent.h>
32655 dirent_header_defines_dirfd
32658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32659 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1
32661 gl_cv_func_dirfd_macro=yes
32663 gl_cv_func_dirfd_macro=no
32668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
32669 printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
32671 # Use the replacement if we have no function or macro with that name,
32672 # or if OS/2 kLIBC whose dirfd() does not work.
32673 # Replace only if the system declares dirfd already.
32674 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
32675 no,no,*,yes | *,*,os2*,yes)
32678 printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
32682 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
32683 || test $REPLACE_DIRFD = 1; then
32692 M4_LIBOBJS="$M4_LIBOBJS dirfd.$ac_objext"
32695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
32696 printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
32697 if test ${gl_cv_sys_dir_fd_member_name+y}
32699 printf %s "(cached) " >&6
32702 dirfd_save_CFLAGS=$CFLAGS
32703 for ac_expr in d_fd dd_fd; do
32705 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
32706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32707 /* end confdefs.h. */
32709 #include <sys/types.h>
32710 #include <dirent.h>
32714 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
32719 if ac_fn_c_try_compile "$LINENO"
32724 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32725 CFLAGS=$dirfd_save_CFLAGS
32726 test "$dir_fd_found" = yes && break
32728 test "$dir_fd_found" = yes || ac_expr=no_such_member
32730 gl_cv_sys_dir_fd_member_name=$ac_expr
32734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
32735 printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
32736 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
32738 printf "%s\n" "#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name" >>confdefs.h
32753 GL_M4_GNULIB_DIRFD=1
32759 printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
32765 printf "%s\n" "#define GNULIB_DIRNAME 1" >>confdefs.h
32770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
32771 printf %s "checking whether // is distinct from /... " >&6; }
32772 if test ${gl_cv_double_slash_root+y}
32774 printf %s "(cached) " >&6
32776 if test x"$cross_compiling" = xyes ; then
32777 # When cross-compiling, there is no way to tell whether // is special
32778 # short of a list of hosts. However, the only known hosts to date
32779 # that have a distinct // are Apollo DomainOS (too old to port to),
32780 # Cygwin, and z/OS. If anyone knows of another system for which // has
32781 # special semantics and is distinct from /, please report it to
32782 # <bug-gnulib@gnu.org>.
32784 *-cygwin | i370-ibm-openedition)
32785 gl_cv_double_slash_root=yes ;;
32787 # Be optimistic and assume that / and // are the same when we
32789 gl_cv_double_slash_root='unknown, assuming no' ;;
32792 set x `ls -di / // 2>/dev/null`
32793 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
32794 gl_cv_double_slash_root=no
32796 gl_cv_double_slash_root=yes
32800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
32801 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
32802 if test "$gl_cv_double_slash_root" = yes; then
32804 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
32812 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32820 if test $ac_cv_func_fchdir = no; then
32824 if test $HAVE_FCHDIR = 0; then
32828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
32829 printf %s "checking whether dup works... " >&6; }
32830 if test ${gl_cv_func_dup_works+y}
32832 printf %s "(cached) " >&6
32834 if test "$cross_compiling" = yes
32837 # Guess no on native Windows.
32838 mingw*) gl_cv_func_dup_works="guessing no" ;;
32839 *) gl_cv_func_dup_works="guessing yes" ;;
32843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32844 /* end confdefs.h. */
32845 #include <unistd.h>
32855 /* On OS/2 kLIBC, dup does not work on a directory fd. */
32856 int fd = open (".", O_RDONLY);
32857 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
32864 if ac_fn_c_try_run "$LINENO"
32866 gl_cv_func_dup_works=yes
32868 gl_cv_func_dup_works=no
32870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32871 conftest.$ac_objext conftest.beam conftest.$ac_ext
32876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
32877 printf "%s\n" "$gl_cv_func_dup_works" >&6; }
32878 case "$gl_cv_func_dup_works" in
32885 if test $REPLACE_DUP = 1; then
32894 M4_LIBOBJS="$M4_LIBOBJS dup.$ac_objext"
32913 printf "%s\n" "#define GNULIB_TEST_DUP 1" >>confdefs.h
32920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
32921 printf %s "checking whether dup2 works... " >&6; }
32922 if test ${gl_cv_func_dup2_works+y}
32924 printf %s "(cached) " >&6
32926 if test "$cross_compiling" = yes
32929 mingw*) # on this platform, dup2 always returns 0 for success
32930 gl_cv_func_dup2_works="guessing no" ;;
32931 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
32932 gl_cv_func_dup2_works="guessing no" ;;
32934 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
32936 gl_cv_func_dup2_works="guessing no" ;;
32937 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
32938 gl_cv_func_dup2_works="guessing no" ;;
32939 *-android*) # implemented using dup3(), which fails if oldfd == newfd
32940 gl_cv_func_dup2_works="guessing no" ;;
32941 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
32942 gl_cv_func_dup2_works="guessing no" ;;
32943 *) gl_cv_func_dup2_works="guessing yes" ;;
32946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32947 /* end confdefs.h. */
32951 #include <limits.h>
32952 #include <sys/resource.h>
32953 #include <unistd.h>
32958 #ifndef RLIM_SAVED_CUR
32959 # define RLIM_SAVED_CUR RLIM_INFINITY
32961 #ifndef RLIM_SAVED_MAX
32962 # define RLIM_SAVED_MAX RLIM_INFINITY
32969 int bad_fd = INT_MAX;
32970 struct rlimit rlim;
32971 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
32972 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
32973 && rlim.rlim_cur != RLIM_INFINITY
32974 && rlim.rlim_cur != RLIM_SAVED_MAX
32975 && rlim.rlim_cur != RLIM_SAVED_CUR)
32976 bad_fd = rlim.rlim_cur;
32978 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
32981 if (dup2 (1, 1) != 1)
32984 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
32988 if (dup2 (0, 0) != -1)
32990 /* Many gnulib modules require POSIX conformance of EBADF. */
32991 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
32993 /* Flush out some cygwin core dumps. */
32994 if (dup2 (2, -1) != -1 || errno != EBADF)
32998 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
33000 int fd = open (".", O_RDONLY);
33003 else if (dup2 (fd, fd + 1) == -1)
33013 if ac_fn_c_try_run "$LINENO"
33015 gl_cv_func_dup2_works=yes
33017 gl_cv_func_dup2_works=no
33019 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33020 conftest.$ac_objext conftest.beam conftest.$ac_ext
33025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
33026 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
33027 case "$gl_cv_func_dup2_works" in
33031 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
33032 if test "x$ac_cv_func_setdtablesize" = xyes
33034 printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
33044 if test $ac_cv_func_fchdir = no; then
33048 if test $HAVE_FCHDIR = 0; then
33053 if test $REPLACE_DUP2 = 1; then
33062 M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
33075 GL_M4_GNULIB_DUP2=1
33081 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
33095 GL_M4_GNULIB_ENVIRON=1
33101 printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
33107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
33108 printf %s "checking for error_at_line... " >&6; }
33109 if test ${ac_cv_lib_error_at_line+y}
33111 printf %s "(cached) " >&6
33113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33114 /* end confdefs.h. */
33119 error_at_line (0, 0, "", 0, "an error occurred");
33124 if ac_fn_c_try_link "$LINENO"
33126 ac_cv_lib_error_at_line=yes
33128 ac_cv_lib_error_at_line=no
33130 rm -f core conftest.err conftest.$ac_objext conftest.beam \
33131 conftest$ac_exeext conftest.$ac_ext
33133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
33134 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
33136 if test $ac_cv_lib_error_at_line = no; then
33145 M4_LIBOBJS="$M4_LIBOBJS error.$ac_objext"
33154 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
33158 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
33174 if test $ac_cv_have_decl_fchdir = no; then
33179 if test $HAVE_FCHDIR = 0; then
33188 M4_LIBOBJS="$M4_LIBOBJS fchdir.$ac_objext"
33192 printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h
33194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
33195 printf %s "checking whether open can visit directories... " >&6; }
33196 if test ${gl_cv_func_open_directory_works+y}
33198 printf %s "(cached) " >&6
33200 if test "$cross_compiling" = yes
33203 # Guess yes on Linux systems.
33204 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
33205 # Guess yes on glibc systems.
33206 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
33207 # Guess no on native Windows.
33208 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
33209 # If we don't know, obey --enable-cross-guesses.
33210 *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
33214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33215 /* end confdefs.h. */
33224 return open(".", O_RDONLY) < 0;
33229 if ac_fn_c_try_run "$LINENO"
33231 gl_cv_func_open_directory_works=yes
33233 gl_cv_func_open_directory_works=no
33235 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33236 conftest.$ac_objext conftest.beam conftest.$ac_ext
33240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
33241 printf "%s\n" "$gl_cv_func_open_directory_works" >&6; }
33242 case "$gl_cv_func_open_directory_works" in
33246 printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
33261 GL_M4_GNULIB_FCHDIR=1
33267 printf "%s\n" "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
33277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
33278 printf %s "checking whether fflush works on input streams... " >&6; }
33279 if test ${gl_cv_func_fflush_stdin+y}
33281 printf %s "(cached) " >&6
33283 echo hello world > conftest.txt
33284 if test "$cross_compiling" = yes
33287 # Guess no on native Windows.
33288 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
33289 *) gl_cv_func_fflush_stdin=cross ;;
33293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33294 /* end confdefs.h. */
33298 # include <unistd.h>
33299 #else /* on Windows with MSVC */
33309 FILE *f = fopen ("conftest.txt", "r");
33316 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
33317 { fclose (f); return 2; }
33318 /* For deterministic results, ensure f read a bigger buffer. */
33319 if (lseek (fd, 0, SEEK_CUR) == 5)
33320 { fclose (f); return 3; }
33321 /* POSIX requires fflush-fseek to set file offset of fd. This fails
33322 on BSD systems and on mingw. */
33323 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
33324 { fclose (f); return 4; }
33325 if (lseek (fd, 0, SEEK_CUR) != 5)
33326 { fclose (f); return 5; }
33327 /* Verify behaviour of fflush after ungetc. See
33328 <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
33329 /* Verify behaviour of fflush after a backup ungetc. This fails on
33334 if (fgetc (f) != c)
33335 { fclose (f); return 6; }
33336 /* Verify behaviour of fflush after a non-backup ungetc. This fails
33337 on glibc 2.8 and on BSD systems. */
33341 if (fgetc (f) != c)
33342 { fclose (f); return 7; }
33350 if ac_fn_c_try_run "$LINENO"
33352 gl_cv_func_fflush_stdin=yes
33354 gl_cv_func_fflush_stdin=no
33356 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33357 conftest.$ac_objext conftest.beam conftest.$ac_ext
33363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
33364 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
33365 case "$gl_cv_func_fflush_stdin" in
33366 *yes) gl_func_fflush_stdin=1 ;;
33367 *no) gl_func_fflush_stdin=0 ;;
33368 *) gl_func_fflush_stdin='(-1)' ;;
33371 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
33374 case "$gl_cv_func_fflush_stdin" in
33376 *) REPLACE_FCLOSE=1 ;;
33380 if test $REPLACE_CLOSE = 1; then
33385 openedition) REPLACE_FCLOSE=1 ;;
33388 if test $REPLACE_FCLOSE = 0; then
33391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fclose works on input streams" >&5
33392 printf %s "checking whether fclose works on input streams... " >&6; }
33393 if test ${gl_cv_func_fclose_stdin+y}
33395 printf %s "(cached) " >&6
33397 echo hello world > conftest.txt
33398 if test "$cross_compiling" = yes
33401 # Guess no on glibc systems.
33402 *-gnu* | gnu*) gl_cv_func_fclose_stdin="guessing no" ;;
33403 # Guess yes on musl systems.
33404 *-musl*) gl_cv_func_fclose_stdin="guessing yes" ;;
33405 # Guess no on native Windows.
33406 mingw*) gl_cv_func_fclose_stdin="guessing no" ;;
33407 # If we don't know, obey --enable-cross-guesses.
33408 *) gl_cv_func_fclose_stdin="$gl_cross_guess_normal" ;;
33412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33413 /* end confdefs.h. */
33417 # include <unistd.h>
33418 #else /* on Windows with MSVC */
33431 fd = open ("conftest.txt", O_RDONLY);
33434 if (lseek (fd, 1, SEEK_SET) != 1)
33439 fp = fdopen (fd2, "r");
33442 if (fgetc (fp) != 'e')
33443 { fclose (fp); return 5; }
33444 /* This fclose() call should reposition the underlying file
33446 if (fclose (fp) != 0)
33448 if (lseek (fd2, 0, SEEK_CUR) != -1) /* should fail with EBADF */
33450 /* Verify the file position. */
33451 if (lseek (fd, 0, SEEK_CUR) != 2)
33459 if ac_fn_c_try_run "$LINENO"
33461 gl_cv_func_fclose_stdin=yes
33463 gl_cv_func_fclose_stdin=no
33465 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33466 conftest.$ac_objext conftest.beam conftest.$ac_ext
33472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fclose_stdin" >&5
33473 printf "%s\n" "$gl_cv_func_fclose_stdin" >&6; }
33475 case "$gl_cv_func_fclose_stdin" in
33477 *) REPLACE_FCLOSE=1 ;;
33481 if test $REPLACE_FCLOSE = 1; then
33490 M4_LIBOBJS="$M4_LIBOBJS fclose.$ac_objext"
33502 GL_M4_GNULIB_FCLOSE=1
33508 printf "%s\n" "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
33517 if test $ac_cv_func_fcntl = no; then
33521 if test $ac_cv_func_fcntl = no; then
33528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
33529 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
33530 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
33532 printf %s "(cached) " >&6
33534 if test "$cross_compiling" = yes
33537 aix* | cygwin* | haiku*)
33538 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
33539 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
33542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33543 /* end confdefs.h. */
33546 #include <limits.h>
33547 #include <sys/resource.h>
33548 #include <unistd.h>
33553 #ifndef RLIM_SAVED_CUR
33554 # define RLIM_SAVED_CUR RLIM_INFINITY
33556 #ifndef RLIM_SAVED_MAX
33557 # define RLIM_SAVED_MAX RLIM_INFINITY
33564 int bad_fd = INT_MAX;
33565 struct rlimit rlim;
33566 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
33567 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
33568 && rlim.rlim_cur != RLIM_INFINITY
33569 && rlim.rlim_cur != RLIM_SAVED_MAX
33570 && rlim.rlim_cur != RLIM_SAVED_CUR)
33571 bad_fd = rlim.rlim_cur;
33572 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
33573 if (errno != EINVAL) result |= 2;
33574 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
33575 if (errno != EINVAL) result |= 8;
33576 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
33579 fd = open (".", O_RDONLY);
33582 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
33592 if ac_fn_c_try_run "$LINENO"
33594 gl_cv_func_fcntl_f_dupfd_works=yes
33596 gl_cv_func_fcntl_f_dupfd_works=no
33598 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33599 conftest.$ac_objext conftest.beam conftest.$ac_ext
33603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
33604 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
33605 case $gl_cv_func_fcntl_f_dupfd_works in
33610 if test $ac_cv_func_fcntl = no; then
33617 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
33621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
33622 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
33623 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
33625 printf %s "(cached) " >&6
33627 if test "$cross_compiling" = yes
33630 # Guess no on NetBSD.
33631 netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
33632 *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
33636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33637 /* end confdefs.h. */
33639 #include <unistd.h>
33640 int main (int argc, char *argv[])
33643 /* parent process */
33645 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
33647 return execl ("./conftest", "./conftest", "child", NULL);
33650 /* child process */
33651 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
33656 if ac_fn_c_try_run "$LINENO"
33658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33659 /* end confdefs.h. */
33662 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
33663 it to support the semantics on older kernels that failed with EINVAL. */
33675 if ac_fn_c_try_compile "$LINENO"
33677 gl_cv_func_fcntl_f_dupfd_cloexec=yes
33679 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
33681 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33684 gl_cv_func_fcntl_f_dupfd_cloexec=no
33686 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33687 conftest.$ac_objext conftest.beam conftest.$ac_ext
33692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
33693 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
33694 case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
33699 if test $ac_cv_func_fcntl = no; then
33712 if test $ac_cv_func_fchdir = no; then
33716 if test $HAVE_FCHDIR = 0; then
33720 if test $ac_cv_func_fcntl = no; then
33729 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
33738 M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
33750 GL_M4_GNULIB_FCNTL=1
33756 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
33768 printf "%s\n" "#define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h
33776 ac_fn_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
33777 #include <dirent.h>
33779 " "$ac_c_undeclared_builtin_options" "CFLAGS"
33780 if test "x$ac_cv_have_decl_fdopendir" = xyes
33786 printf "%s\n" "#define HAVE_DECL_FDOPENDIR $ac_have_decl" >>confdefs.h
33787 if test $ac_have_decl = 1
33791 HAVE_DECL_FDOPENDIR=0
33795 if test $ac_cv_func_fdopendir = no; then
33798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
33799 printf %s "checking whether fdopendir works... " >&6; }
33800 if test ${gl_cv_func_fdopendir_works+y}
33802 printf %s "(cached) " >&6
33804 if test "$cross_compiling" = yes
33807 # Guess yes on glibc systems.
33808 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
33809 # Guess yes on musl systems.
33810 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
33811 # If we don't know, obey --enable-cross-guesses.
33812 *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
33816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33817 /* end confdefs.h. */
33819 #include <dirent.h>
33821 #include <unistd.h>
33826 #if !HAVE_DECL_FDOPENDIR
33828 # ifdef __cplusplus
33831 DIR *fdopendir (int);
33838 int fd = open ("conftest.c", O_RDONLY);
33839 if (fd < 0) result |= 1;
33840 if (fdopendir (fd)) result |= 2;
33841 if (close (fd)) result |= 4;
33848 if ac_fn_c_try_run "$LINENO"
33850 gl_cv_func_fdopendir_works=yes
33852 gl_cv_func_fdopendir_works=no
33854 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33855 conftest.$ac_objext conftest.beam conftest.$ac_ext
33859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
33860 printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; }
33861 case "$gl_cv_func_fdopendir_works" in
33864 REPLACE_FDOPENDIR=1
33869 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
33878 M4_LIBOBJS="$M4_LIBOBJS fdopendir.$ac_objext"
33890 GL_M4_GNULIB_FDOPENDIR=1
33896 printf "%s\n" "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
33902 printf "%s\n" "#define GNULIB_FDOPENDIR 1" >>confdefs.h
33909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
33910 printf %s "checking whether fflush works on input streams... " >&6; }
33911 if test ${gl_cv_func_fflush_stdin+y}
33913 printf %s "(cached) " >&6
33915 echo hello world > conftest.txt
33916 if test "$cross_compiling" = yes
33919 # Guess no on native Windows.
33920 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
33921 *) gl_cv_func_fflush_stdin=cross ;;
33925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33926 /* end confdefs.h. */
33930 # include <unistd.h>
33931 #else /* on Windows with MSVC */
33941 FILE *f = fopen ("conftest.txt", "r");
33948 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
33949 { fclose (f); return 2; }
33950 /* For deterministic results, ensure f read a bigger buffer. */
33951 if (lseek (fd, 0, SEEK_CUR) == 5)
33952 { fclose (f); return 3; }
33953 /* POSIX requires fflush-fseek to set file offset of fd. This fails
33954 on BSD systems and on mingw. */
33955 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
33956 { fclose (f); return 4; }
33957 if (lseek (fd, 0, SEEK_CUR) != 5)
33958 { fclose (f); return 5; }
33959 /* Verify behaviour of fflush after ungetc. See
33960 <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
33961 /* Verify behaviour of fflush after a backup ungetc. This fails on
33966 if (fgetc (f) != c)
33967 { fclose (f); return 6; }
33968 /* Verify behaviour of fflush after a non-backup ungetc. This fails
33969 on glibc 2.8 and on BSD systems. */
33973 if (fgetc (f) != c)
33974 { fclose (f); return 7; }
33982 if ac_fn_c_try_run "$LINENO"
33984 gl_cv_func_fflush_stdin=yes
33986 gl_cv_func_fflush_stdin=no
33988 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33989 conftest.$ac_objext conftest.beam conftest.$ac_ext
33995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
33996 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
33997 case "$gl_cv_func_fflush_stdin" in
33998 *yes) gl_func_fflush_stdin=1 ;;
33999 *no) gl_func_fflush_stdin=0 ;;
34000 *) gl_func_fflush_stdin='(-1)' ;;
34003 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
34006 case "$gl_cv_func_fflush_stdin" in
34008 *) REPLACE_FFLUSH=1 ;;
34011 if test $REPLACE_FFLUSH = 1; then
34020 M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext"
34026 printf "%s\n" "#define GNULIB_FFLUSH 1" >>confdefs.h
34038 GL_M4_GNULIB_FFLUSH=1
34044 printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
34053 printf "%s\n" "#define GNULIB_FILENAMECAT 1" >>confdefs.h
34063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
34064 printf %s "checking for flexible array member... " >&6; }
34065 if test ${ac_cv_c_flexmember+y}
34067 printf %s "(cached) " >&6
34069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34070 /* end confdefs.h. */
34071 #include <stdlib.h>
34073 #include <stddef.h>
34074 struct m { struct m *next, **list; char name[]; };
34075 struct s { struct s *p; struct m *m; int n; double d[]; };
34079 int m = getchar ();
34080 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
34081 nbytes += sizeof (struct s) - 1;
34082 nbytes -= nbytes % sizeof (struct s);
34083 struct s *p = malloc (nbytes);
34087 return p->d != (double *) NULL;
34092 if ac_fn_c_try_compile "$LINENO"
34094 ac_cv_c_flexmember=yes
34096 ac_cv_c_flexmember=no
34098 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
34101 printf "%s\n" "$ac_cv_c_flexmember" >&6; }
34102 if test $ac_cv_c_flexmember = yes; then
34104 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
34107 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
34115 REPLACE_FLOAT_LDBL=0
34117 aix* | beos* | openbsd* | mirbsd* | irix*)
34120 freebsd* | dragonfly*)
34121 case "$host_cpu" in
34126 # On x86_64 systems, the C compiler may still be generating
34128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34129 /* end confdefs.h. */
34130 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
34137 if ac_fn_c_try_compile "$LINENO"
34143 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34148 case "$host_cpu" in
34156 aix* | freebsd* | dragonfly* | linux*)
34157 if test -n "$FLOAT_H"; then
34158 REPLACE_FLOAT_LDBL=1
34164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
34165 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
34166 if test ${gl_cv_func_itold_works+y}
34168 printf %s "(cached) " >&6
34171 if test "$cross_compiling" = yes
34175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34176 /* end confdefs.h. */
34177 #if defined __LP64__ || defined __arch64__
34184 if ac_fn_c_try_compile "$LINENO"
34186 gl_cv_func_itold_works="guessing no"
34188 gl_cv_func_itold_works="guessing yes"
34190 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34192 # Guess yes on native Windows.
34193 mingw*) gl_cv_func_itold_works="guessing yes" ;;
34194 *) gl_cv_func_itold_works="guessing yes" ;;
34198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34199 /* end confdefs.h. */
34202 volatile long double ld;
34211 if ac_fn_c_try_run "$LINENO"
34213 gl_cv_func_itold_works=yes
34215 gl_cv_func_itold_works=no
34217 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34218 conftest.$ac_objext conftest.beam conftest.$ac_ext
34223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
34224 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
34225 case "$gl_cv_func_itold_works" in
34232 if test -n "$FLOAT_H"; then
34241 if test $gl_cv_have_include_next = yes; then
34242 gl_cv_next_float_h='<'float.h'>'
34244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
34245 printf %s "checking absolute name of <float.h>... " >&6; }
34246 if test ${gl_cv_next_float_h+y}
34248 printf %s "(cached) " >&6
34253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34254 /* end confdefs.h. */
34258 aix*) gl_absname_cpp="$ac_cpp -C" ;;
34259 *) gl_absname_cpp="$ac_cpp" ;;
34264 gl_dirsep_regex='[/\\]'
34267 gl_dirsep_regex='\/'
34270 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34271 gl_header_literal_regex=`echo 'float.h' \
34272 | sed -e "$gl_make_literal_regex_sed"`
34273 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34274 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34280 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34281 sed -n "$gl_absolute_header_sed"`
34283 gl_header=$gl_cv_absolute_float_h
34284 gl_cv_next_float_h='"'$gl_header'"'
34288 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
34289 printf "%s\n" "$gl_cv_next_float_h" >&6; }
34291 NEXT_FLOAT_H=$gl_cv_next_float_h
34293 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34294 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34295 gl_next_as_first_directive='<'float.h'>'
34297 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34298 gl_next_as_first_directive=$gl_cv_next_float_h
34300 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
34307 if test -n "$FLOAT_H"; then
34308 GL_GENERATE_FLOAT_H_TRUE=
34309 GL_GENERATE_FLOAT_H_FALSE='#'
34311 GL_GENERATE_FLOAT_H_TRUE='#'
34312 GL_GENERATE_FLOAT_H_FALSE=
34317 if test $REPLACE_FLOAT_LDBL = 1; then
34326 M4_LIBOBJS="$M4_LIBOBJS float.$ac_objext"
34329 if test $REPLACE_ITOLD = 1; then
34338 M4_LIBOBJS="$M4_LIBOBJS itold.$ac_objext"
34347 gl_cv_func_fopen_slash="guessing no"
34350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
34351 printf %s "checking whether fopen recognizes a trailing slash... " >&6; }
34352 if test ${gl_cv_func_fopen_slash+y}
34354 printf %s "(cached) " >&6
34357 if test "$cross_compiling" = yes
34361 aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
34362 gl_cv_func_fopen_slash="guessing no" ;;
34364 gl_cv_func_fopen_slash="guessing yes" ;;
34368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34369 /* end confdefs.h. */
34371 #include <stddef.h>
34375 FILE *fp = fopen ("conftest.sl/", "w");
34376 int result = (fp != NULL);
34382 if ac_fn_c_try_run "$LINENO"
34384 gl_cv_func_fopen_slash=yes
34386 gl_cv_func_fopen_slash=no
34388 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34389 conftest.$ac_objext conftest.beam conftest.$ac_ext
34395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
34396 printf "%s\n" "$gl_cv_func_fopen_slash" >&6; }
34399 case "$gl_cv_func_fopen_slash" in
34402 printf "%s\n" "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
34408 if test $REPLACE_FOPEN = 1; then
34417 M4_LIBOBJS="$M4_LIBOBJS fopen.$ac_objext"
34430 GL_M4_GNULIB_FOPEN=1
34436 printf "%s\n" "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
34442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'x'" >&5
34443 printf %s "checking whether fopen supports the mode character 'x'... " >&6; }
34444 if test ${gl_cv_func_fopen_mode_x+y}
34446 printf %s "(cached) " >&6
34449 if test "$cross_compiling" = yes
34452 # Guess yes on glibc and musl systems.
34453 linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
34454 gl_cv_func_fopen_mode_x="guessing yes" ;;
34455 # If we don't know, obey --enable-cross-guesses.
34457 gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
34461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34462 /* end confdefs.h. */
34469 fp = fopen ("conftest.x", "w");
34471 fp = fopen ("conftest.x", "wx");
34475 else if (errno == EEXIST)
34482 if ac_fn_c_try_run "$LINENO"
34484 gl_cv_func_fopen_mode_x=yes
34486 gl_cv_func_fopen_mode_x=no
34488 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34489 conftest.$ac_objext conftest.beam conftest.$ac_ext
34495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_x" >&5
34496 printf "%s\n" "$gl_cv_func_fopen_mode_x" >&6; }
34497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'e'" >&5
34498 printf %s "checking whether fopen supports the mode character 'e'... " >&6; }
34499 if test ${gl_cv_func_fopen_mode_e+y}
34501 printf %s "(cached) " >&6
34503 echo foo > conftest.x
34504 if test "$cross_compiling" = yes
34507 # Guess yes on glibc and musl systems.
34508 linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
34509 gl_cv_func_fopen_mode_e="guessing yes" ;;
34510 # Guess no on native Windows.
34512 gl_cv_func_fopen_mode_e="guessing no" ;;
34513 # If we don't know, obey --enable-cross-guesses.
34515 gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
34519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34520 /* end confdefs.h. */
34531 FILE *fp = fopen ("conftest.x", "re");
34534 if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
34545 if ac_fn_c_try_run "$LINENO"
34547 gl_cv_func_fopen_mode_e=yes
34549 gl_cv_func_fopen_mode_e=no
34551 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34552 conftest.$ac_objext conftest.beam conftest.$ac_ext
34558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_e" >&5
34559 printf "%s\n" "$gl_cv_func_fopen_mode_e" >&6; }
34560 case "$gl_cv_func_fopen_mode_x" in
34561 *no) REPLACE_FOPEN=1 ;;
34563 case "$gl_cv_func_fopen_mode_e" in
34564 *no) REPLACE_FOPEN=1 ;;
34567 if test $REPLACE_FOPEN = 1; then
34576 M4_LIBOBJS="$M4_LIBOBJS fopen.$ac_objext"
34582 printf "%s\n" "#define GNULIB_FOPEN_GNU 1" >>confdefs.h
34587 printf "%s\n" "#define GNULIB_FOPEN_SAFER 1" >>confdefs.h
34594 #if HAVE_STDIO_EXT_H
34595 # include <stdio_ext.h>
34598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
34599 printf %s "checking for __fpending... " >&6; }
34600 if test ${gl_cv_func___fpending+y}
34602 printf %s "(cached) " >&6
34605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34606 /* end confdefs.h. */
34611 return ! __fpending (stdin);
34616 if ac_fn_c_try_link "$LINENO"
34618 gl_cv_func___fpending=yes
34620 gl_cv_func___fpending=no
34622 rm -f core conftest.err conftest.$ac_objext conftest.beam \
34623 conftest$ac_exeext conftest.$ac_ext
34626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
34627 printf "%s\n" "$gl_cv_func___fpending" >&6; }
34628 if test $gl_cv_func___fpending = yes; then
34629 ac_fn_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
34630 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34631 if test "x$ac_cv_have_decl___fpending" = xyes
34637 printf "%s\n" "#define HAVE_DECL___FPENDING $ac_have_decl" >>confdefs.h
34641 if test $gl_cv_func___fpending = no; then
34650 M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
34658 ac_fn_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
34659 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34660 if test "x$ac_cv_have_decl_fpurge" = xyes
34666 printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h
34668 if test "x$ac_cv_func_fpurge" = xyes; then
34670 # Detect BSD bug. Only cygwin 1.7 and musl are known to be immune.
34671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
34672 printf %s "checking whether fpurge works... " >&6; }
34673 if test ${gl_cv_func_fpurge_works+y}
34675 printf %s "(cached) " >&6
34677 if test "$cross_compiling" = yes
34680 # Guess yes on musl systems.
34681 *-musl*) gl_cv_func_fpurge_works="guessing yes" ;;
34682 # Otherwise obey --enable-cross-guesses.
34683 *) gl_cv_func_fpurge_works="$gl_cross_guess_normal" ;;
34687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34688 /* end confdefs.h. */
34694 FILE *f = fopen ("conftest.txt", "w+");
34697 if (fputc ('a', f) != 'a')
34698 { fclose (f); return 2; }
34700 if (fgetc (f) != 'a')
34701 { fclose (f); return 3; }
34702 if (fgetc (f) != EOF)
34703 { fclose (f); return 4; }
34704 if (fpurge (f) != 0)
34705 { fclose (f); return 5; }
34706 if (putc ('b', f) != 'b')
34707 { fclose (f); return 6; }
34708 if (fclose (f) != 0)
34710 if ((f = fopen ("conftest.txt", "r")) == NULL)
34712 if (fgetc (f) != 'a')
34713 { fclose (f); return 9; }
34714 if (fgetc (f) != 'b')
34715 { fclose (f); return 10; }
34716 if (fgetc (f) != EOF)
34717 { fclose (f); return 11; }
34718 if (fclose (f) != 0)
34720 if (remove ("conftest.txt") != 0)
34728 if ac_fn_c_try_run "$LINENO"
34730 gl_cv_func_fpurge_works=yes
34732 gl_cv_func_fpurge_works=no
34734 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34735 conftest.$ac_objext conftest.beam conftest.$ac_ext
34740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
34741 printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
34742 case "$gl_cv_func_fpurge_works" in
34744 *) REPLACE_FPURGE=1 ;;
34749 if test "x$ac_cv_have_decl_fpurge" = xno; then
34753 if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
34762 M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
34774 GL_M4_GNULIB_FPURGE=1
34780 printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
34787 if test $ac_cv_func___freadahead = no; then
34796 M4_LIBOBJS="$M4_LIBOBJS freadahead.$ac_objext"
34806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
34807 printf %s "checking whether free is known to preserve errno... " >&6; }
34808 if test ${gl_cv_func_free_preserves_errno+y}
34810 printf %s "(cached) " >&6
34812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34813 /* end confdefs.h. */
34814 #include <stdlib.h>
34819 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
34820 #elif defined __OpenBSD__
34821 #elif defined __sun
34823 #error "'free' is not known to preserve errno"
34830 if ac_fn_c_try_compile "$LINENO"
34832 gl_cv_func_free_preserves_errno=yes
34834 gl_cv_func_free_preserves_errno=no
34836 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
34840 printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; }
34842 case $gl_cv_func_free_preserves_errno in
34845 printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h
34848 *) REPLACE_FREE=1 ;;
34851 if test $REPLACE_FREE = 1; then
34860 M4_LIBOBJS="$M4_LIBOBJS free.$ac_objext"
34873 GL_M4_GNULIB_FREE_POSIX=1
34879 printf "%s\n" "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
34886 if test $gl_cv_func_frexp_no_libm = yes; then
34890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
34891 printf %s "checking whether frexp works... " >&6; }
34892 if test ${gl_cv_func_frexp_works+y}
34894 printf %s "(cached) " >&6
34897 if test "$cross_compiling" = yes
34900 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
34901 mingw*) # Guess yes with MSVC, no with mingw.
34902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34903 /* end confdefs.h. */
34910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34911 $EGREP "Good" >/dev/null 2>&1
34913 gl_cv_func_frexp_works="guessing yes"
34915 gl_cv_func_frexp_works="guessing no"
34920 *) gl_cv_func_frexp_works="guessing yes" ;;
34924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34925 /* end confdefs.h. */
34929 #include <string.h>
34930 #if HAVE_DECL_ALARM
34931 # include <signal.h>
34932 # include <unistd.h>
34934 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
34935 ICC 10.0 has a bug when optimizing the expression -zero.
34936 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
34937 to PowerPC on Mac OS X 10.5. */
34938 #if defined __hpux || defined __sgi || defined __ICC
34940 compute_minus_zero (void)
34942 return -DBL_MIN * DBL_MIN;
34944 # define minus_zero compute_minus_zero ()
34946 double minus_zero = -0.0;
34954 #if HAVE_DECL_ALARM
34955 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
34956 number. Let the test fail in this case. */
34957 signal (SIGALRM, SIG_DFL);
34960 /* Test on denormalized numbers. */
34961 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
34966 double y = frexp (x, &exp);
34967 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
34968 On NetBSD: y = 0.75. Correct: y = 0.5. */
34972 /* Test on infinite numbers. */
34976 double y = frexp (x, &exp);
34980 /* Test on negative zero. */
34984 double y = frexp (x, &exp);
34985 if (memcmp (&y, &x, sizeof x))
34991 if ac_fn_c_try_run "$LINENO"
34993 gl_cv_func_frexp_works=yes
34995 gl_cv_func_frexp_works=no
34997 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34998 conftest.$ac_objext conftest.beam conftest.$ac_ext
35003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
35004 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
35006 case "$gl_cv_func_frexp_works" in
35007 *yes) gl_func_frexp_no_libm=yes ;;
35008 *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
35011 gl_func_frexp_no_libm=no
35014 if test $gl_func_frexp_no_libm = yes; then
35016 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
35020 if test $gl_func_frexp_no_libm != yes; then
35029 M4_LIBOBJS="$M4_LIBOBJS frexp.$ac_objext"
35041 GL_M4_GNULIB_FREXP=1
35047 printf "%s\n" "#define GNULIB_TEST_FREXP 1" >>confdefs.h
35054 ac_fn_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
35055 " "$ac_c_undeclared_builtin_options" "CFLAGS"
35056 if test "x$ac_cv_have_decl_frexpl" = xyes
35062 if test $HAVE_DECL_FREXPL = 1; then
35064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
35065 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
35066 if test ${gl_cv_func_frexpl_no_libm+y}
35068 printf %s "(cached) " >&6
35071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35072 /* end confdefs.h. */
35078 int e; return frexpl (x, &e) > 0;
35083 if ac_fn_c_try_link "$LINENO"
35085 gl_cv_func_frexpl_no_libm=yes
35087 gl_cv_func_frexpl_no_libm=no
35089 rm -f core conftest.err conftest.$ac_objext conftest.beam \
35090 conftest$ac_exeext conftest.$ac_ext
35093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
35094 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
35096 if test $gl_cv_func_frexpl_no_libm = yes; then
35099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
35100 printf %s "checking whether frexpl works... " >&6; }
35101 if test ${gl_cv_func_frexpl_works+y}
35103 printf %s "(cached) " >&6
35106 if test "$cross_compiling" = yes
35110 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
35111 gl_cv_func_frexpl_works="guessing no";;
35112 *) gl_cv_func_frexpl_works="guessing yes";;
35116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35117 /* end confdefs.h. */
35121 /* Override the values of <float.h>, like done in float.in.h. */
35122 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
35123 # undef LDBL_MIN_EXP
35124 # define LDBL_MIN_EXP (-16381)
35126 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
35127 # undef LDBL_MIN_EXP
35128 # define LDBL_MIN_EXP (-16381)
35130 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
35131 # undef LDBL_MIN_EXP
35132 # define LDBL_MIN_EXP DBL_MIN_EXP
35134 #if defined __sgi && (LDBL_MANT_DIG >= 106)
35135 # if defined __GNUC__
35136 # undef LDBL_MIN_EXP
35137 # define LDBL_MIN_EXP DBL_MIN_EXP
35144 long double frexpl (long double, int *);
35145 long double zero = 0.0L;
35149 volatile long double x;
35150 /* Test on finite numbers that fails on AIX 5.1. */
35158 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
35159 function returns an invalid (incorrectly normalized) value: it returns
35160 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
35161 but the correct result is
35162 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
35166 long double y = frexpl (x, &exp);
35167 if (!(exp == 1 && y == 0.505L))
35170 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
35171 LDBL_MAX_EXP = 16384.
35172 In the loop end test, we test x against Infinity, rather than comparing
35173 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
35176 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
35187 /* Test on denormalized numbers. */
35190 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
35195 long double y = frexpl (x, &exp);
35196 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
35197 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
35198 if (exp != LDBL_MIN_EXP - 1)
35202 /* Test on infinite numbers. */
35203 /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */
35207 long double y = frexpl (x, &exp);
35214 if ac_fn_c_try_run "$LINENO"
35216 gl_cv_func_frexpl_works=yes
35218 gl_cv_func_frexpl_works=no
35220 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35221 conftest.$ac_objext conftest.beam conftest.$ac_ext
35226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
35227 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
35229 case "$gl_cv_func_frexpl_works" in
35230 *yes) gl_func_frexpl_no_libm=yes ;;
35231 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
35234 gl_func_frexpl_no_libm=no
35237 if test $gl_func_frexpl_no_libm = yes; then
35239 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
35244 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
35253 M4_LIBOBJS="$M4_LIBOBJS frexpl.$ac_objext"
35265 GL_M4_GNULIB_FREXPL=1
35271 printf "%s\n" "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
35278 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
35282 if test $REPLACE_FSEEK = 1; then
35291 M4_LIBOBJS="$M4_LIBOBJS fseek.$ac_objext"
35303 GL_M4_GNULIB_FSEEK=1
35309 printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
35321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
35322 printf %s "checking for fseeko... " >&6; }
35323 if test ${gl_cv_func_fseeko+y}
35325 printf %s "(cached) " >&6
35328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35329 /* end confdefs.h. */
35335 fseeko (stdin, 0, 0);
35340 if ac_fn_c_try_link "$LINENO"
35342 gl_cv_func_fseeko=yes
35344 gl_cv_func_fseeko=no
35346 rm -f core conftest.err conftest.$ac_objext conftest.beam \
35347 conftest$ac_exeext conftest.$ac_ext
35350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
35351 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
35354 if test $ac_cv_have_decl_fseeko = no; then
35358 if test $gl_cv_func_fseeko = no; then
35361 if test $WINDOWS_64_BIT_OFF_T = 1; then
35364 if test $gl_cv_var_stdin_large_offset = no; then
35370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
35371 printf %s "checking whether fflush works on input streams... " >&6; }
35372 if test ${gl_cv_func_fflush_stdin+y}
35374 printf %s "(cached) " >&6
35376 echo hello world > conftest.txt
35377 if test "$cross_compiling" = yes
35380 # Guess no on native Windows.
35381 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
35382 *) gl_cv_func_fflush_stdin=cross ;;
35386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35387 /* end confdefs.h. */
35391 # include <unistd.h>
35392 #else /* on Windows with MSVC */
35402 FILE *f = fopen ("conftest.txt", "r");
35409 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
35410 { fclose (f); return 2; }
35411 /* For deterministic results, ensure f read a bigger buffer. */
35412 if (lseek (fd, 0, SEEK_CUR) == 5)
35413 { fclose (f); return 3; }
35414 /* POSIX requires fflush-fseek to set file offset of fd. This fails
35415 on BSD systems and on mingw. */
35416 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
35417 { fclose (f); return 4; }
35418 if (lseek (fd, 0, SEEK_CUR) != 5)
35419 { fclose (f); return 5; }
35420 /* Verify behaviour of fflush after ungetc. See
35421 <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
35422 /* Verify behaviour of fflush after a backup ungetc. This fails on
35427 if (fgetc (f) != c)
35428 { fclose (f); return 6; }
35429 /* Verify behaviour of fflush after a non-backup ungetc. This fails
35430 on glibc 2.8 and on BSD systems. */
35434 if (fgetc (f) != c)
35435 { fclose (f); return 7; }
35443 if ac_fn_c_try_run "$LINENO"
35445 gl_cv_func_fflush_stdin=yes
35447 gl_cv_func_fflush_stdin=no
35449 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35450 conftest.$ac_objext conftest.beam conftest.$ac_ext
35456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
35457 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
35458 case "$gl_cv_func_fflush_stdin" in
35459 *yes) gl_func_fflush_stdin=1 ;;
35460 *no) gl_func_fflush_stdin=0 ;;
35461 *) gl_func_fflush_stdin='(-1)' ;;
35464 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
35467 case "$gl_cv_func_fflush_stdin" in
35469 *) REPLACE_FSEEKO=1 ;;
35474 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
35483 M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
35486 ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
35487 if test "x$ac_cv_func__fseeki64" = xyes
35489 printf "%s\n" "#define HAVE__FSEEKI64 1" >>confdefs.h
35493 if test $ac_cv_func__fseeki64 = yes; then
35494 ac_fn_check_decl "$LINENO" "_fseeki64" "ac_cv_have_decl__fseeki64" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
35495 if test "x$ac_cv_have_decl__fseeki64" = xyes
35501 printf "%s\n" "#define HAVE_DECL__FSEEKI64 $ac_have_decl" >>confdefs.h
35515 GL_M4_GNULIB_FSEEKO=1
35521 printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
35539 if test $ac_cv_func_fchdir = no; then
35543 if test $HAVE_FCHDIR = 0; then
35544 case "$gl_cv_func_open_directory_works" in
35553 if test $REPLACE_FSTAT = 1; then
35562 M4_LIBOBJS="$M4_LIBOBJS fstat.$ac_objext"
35574 M4_LIBOBJS="$M4_LIBOBJS stat-w32.$ac_objext"
35593 GL_M4_GNULIB_FSTAT=1
35599 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
35610 if test $ac_cv_func_fstatat = no; then
35613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
35614 printf %s "checking whether fstatat (..., 0) works... " >&6; }
35615 if test ${gl_cv_func_fstatat_zero_flag+y}
35617 printf %s "(cached) " >&6
35619 if test "$cross_compiling" = yes
35622 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
35623 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
35627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35628 /* end confdefs.h. */
35631 #include <sys/stat.h>
35636 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
35640 if ac_fn_c_try_run "$LINENO"
35642 gl_cv_func_fstatat_zero_flag=yes
35644 gl_cv_func_fstatat_zero_flag=no
35646 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35647 conftest.$ac_objext conftest.beam conftest.$ac_ext
35652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
35653 printf "%s\n" "$gl_cv_func_fstatat_zero_flag" >&6; }
35655 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
35657 *) REPLACE_FSTATAT=1 ;;
35662 REPLACE_FSTATAT=1 ;;
35665 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
35668 printf "%s\n" "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
35674 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
35683 M4_LIBOBJS="$M4_LIBOBJS fstatat.$ac_objext"
35695 GL_M4_GNULIB_FSTATAT=1
35701 printf "%s\n" "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
35708 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
35712 if test $REPLACE_FTELL = 1; then
35721 M4_LIBOBJS="$M4_LIBOBJS ftell.$ac_objext"
35733 GL_M4_GNULIB_FTELL=1
35739 printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
35752 if test $ac_cv_have_decl_ftello = no; then
35756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
35757 printf %s "checking for ftello... " >&6; }
35758 if test ${gl_cv_func_ftello+y}
35760 printf %s "(cached) " >&6
35763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35764 /* end confdefs.h. */
35774 if ac_fn_c_try_link "$LINENO"
35776 gl_cv_func_ftello=yes
35778 gl_cv_func_ftello=no
35780 rm -f core conftest.err conftest.$ac_objext conftest.beam \
35781 conftest$ac_exeext conftest.$ac_ext
35784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
35785 printf "%s\n" "$gl_cv_func_ftello" >&6; }
35786 if test $gl_cv_func_ftello = no; then
35789 if test $WINDOWS_64_BIT_OFF_T = 1; then
35792 if test $gl_cv_var_stdin_large_offset = no; then
35795 if test $REPLACE_FTELLO = 0; then
35797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
35798 printf %s "checking whether ftello works... " >&6; }
35799 if test ${gl_cv_func_ftello_works+y}
35801 printf %s "(cached) " >&6
35805 # Guess no on Solaris.
35806 solaris*) gl_cv_func_ftello_works="guessing no" ;;
35807 # Guess yes on native Windows.
35808 mingw*) gl_cv_func_ftello_works="guessing yes" ;;
35809 # Guess yes otherwise.
35810 *) gl_cv_func_ftello_works="guessing yes" ;;
35812 if test "$cross_compiling" = yes
35816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35817 /* end confdefs.h. */
35820 #include <stdlib.h>
35821 #include <string.h>
35822 #define TESTFILE "conftest.tmp"
35828 /* Create a file with some contents. */
35829 fp = fopen (TESTFILE, "w");
35832 if (fwrite ("foogarsh", 1, 8, fp) < 8)
35833 { fclose (fp); return 71; }
35837 /* The file's contents is now "foogarsh". */
35839 /* Try writing after reading to EOF. */
35840 fp = fopen (TESTFILE, "r+");
35843 if (fseek (fp, -1, SEEK_END))
35844 { fclose (fp); return 74; }
35845 if (!(getc (fp) == 'h'))
35846 { fclose (fp); return 1; }
35847 if (!(getc (fp) == EOF))
35848 { fclose (fp); return 2; }
35849 if (!(ftell (fp) == 8))
35850 { fclose (fp); return 3; }
35851 if (!(ftell (fp) == 8))
35852 { fclose (fp); return 4; }
35853 if (!(putc ('!', fp) == '!'))
35854 { fclose (fp); return 5; }
35855 if (!(ftell (fp) == 9))
35856 { fclose (fp); return 6; }
35857 if (!(fclose (fp) == 0))
35859 fp = fopen (TESTFILE, "r");
35864 if (!(fread (buf, 1, 10, fp) == 9))
35865 { fclose (fp); return 10; }
35866 if (!(memcmp (buf, "foogarsh!", 9) == 0))
35867 { fclose (fp); return 11; }
35869 if (!(fclose (fp) == 0))
35872 /* The file's contents is now "foogarsh!". */
35877 if ac_fn_c_try_run "$LINENO"
35879 gl_cv_func_ftello_works=yes
35881 gl_cv_func_ftello_works=no
35883 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35884 conftest.$ac_objext conftest.beam conftest.$ac_ext
35889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
35890 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
35891 case "$gl_cv_func_ftello_works" in
35896 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
35901 if test $REPLACE_FTELLO = 0; then
35903 if test $gl_ftello_broken_after_ungetc = yes; then
35906 printf "%s\n" "#define FTELLO_BROKEN_AFTER_UNGETC 1" >>confdefs.h
35912 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
35921 M4_LIBOBJS="$M4_LIBOBJS ftello.$ac_objext"
35924 ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
35925 if test "x$ac_cv_func__ftelli64" = xyes
35927 printf "%s\n" "#define HAVE__FTELLI64 1" >>confdefs.h
35942 GL_M4_GNULIB_FTELLO=1
35948 printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
35960 gl_cv_func_getcwd_path_max=yes
35968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
35969 printf %s "checking whether getcwd handles long file names properly... " >&6; }
35970 if test ${gl_cv_func_getcwd_path_max+y}
35972 printf %s "(cached) " >&6
35974 # Arrange for deletion of the temporary directory this test creates.
35975 ac_clean_files="$ac_clean_files confdir3"
35976 if test "$cross_compiling" = yes
35978 # Cross-compilation guesses:
35980 aix*) # On AIX, it has the AIX bug.
35981 gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
35982 gnu*) # On Hurd, it is 'yes'.
35983 gl_cv_func_getcwd_path_max='guessing yes' ;;
35984 linux* | kfreebsd*)
35985 # On older Linux+glibc it's 'no, but it is partly working',
35986 # on newer Linux+glibc it's 'yes'.
35987 # On Linux+musl libc, it's 'no, but it is partly working'.
35988 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
35989 gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
35990 *) # If we don't know, obey --enable-cross-guesses.
35991 gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
35995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35996 /* end confdefs.h. */
35999 #include <stdlib.h>
36001 # include <unistd.h>
36003 # include <direct.h>
36005 #include <string.h>
36006 #include <limits.h>
36007 #include <sys/stat.h>
36008 #include <sys/types.h>
36012 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
36014 # include <unistd.h>
36016 #include <limits.h>
36017 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
36018 # include <sys/param.h>
36020 #if !defined PATH_MAX && defined MAXPATHLEN
36021 # define PATH_MAX MAXPATHLEN
36025 # define PATH_MAX 1024
36027 #if defined _WIN32 && ! defined __CYGWIN__
36029 # define PATH_MAX 260
36034 # define AT_FDCWD 0
36036 #ifdef ENAMETOOLONG
36037 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
36039 # define is_ENAMETOOLONG(x) 0
36042 /* Use the getcwd function, not any macro. */
36051 # define S_IRWXU 0700
36054 /* The length of this name must be 8. */
36055 #define DIR_NAME "confdir3"
36056 #define DIR_NAME_LEN 8
36057 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
36059 /* The length of "../". */
36060 #define DOTDOTSLASH_LEN 3
36062 /* Leftover bytes in the buffer, to work around library or OS bugs. */
36063 #define BUF_SLOP 20
36069 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
36070 at least not on a local file system. And if we were to start worrying
36071 about remote file systems, we'd have to enable the wrapper function
36072 all of the time, just to be safe. That's not worth the cost. */
36074 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
36075 - DIR_NAME_SIZE - BUF_SLOP) \
36077 /* FIXME: Assuming there's a system for which this is true,
36078 this should be done in a compile test. */
36081 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
36082 + DIR_NAME_SIZE + BUF_SLOP];
36083 char *cwd = getcwd (buf, PATH_MAX);
36084 size_t initial_cwd_len;
36087 size_t n_chdirs = 0;
36092 cwd_len = initial_cwd_len = strlen (cwd);
36096 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
36099 cwd_len += DIR_NAME_SIZE;
36100 /* If mkdir or chdir fails, it could be that this system cannot create
36101 any file with an absolute name longer than PATH_MAX, such as cygwin.
36102 If so, leave fail as 0, because the current working directory can't
36103 be too long for getcwd if it can't even be created. On Linux with
36104 the 9p file system, mkdir fails with error EINVAL when cwd_len gets
36105 too long; ignore this failure because the getcwd() system call
36106 produces good results whereas the gnulib substitute calls getdents64
36107 which fails with error EPROTO.
36108 For other errors, be pessimistic and consider that as a failure,
36110 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
36112 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
36114 if (! (errno == EINVAL))
36120 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
36124 c = getcwd (buf, PATH_MAX);
36125 if (!c && errno == ENOENT)
36135 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
36141 /* Our replacement needs to be able to stat() long ../../paths,
36142 so generate a path larger than PATH_MAX to check,
36143 avoiding the replacement if we can't stat(). */
36144 c = getcwd (buf, cwd_len + 1);
36145 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
36152 if (dotdot_max <= cwd_len - initial_cwd_len)
36154 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
36156 c = getcwd (buf, cwd_len + 1);
36159 if (! (errno == ERANGE || errno == ENOENT
36160 || is_ENAMETOOLONG (errno)))
36165 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
36173 if (c && strlen (c) != cwd_len)
36181 /* Leaving behind such a deep directory is not polite.
36182 So clean up here, right away, even though the driving
36183 shell script would also clean up. */
36187 /* Try rmdir first, in case the chdir failed. */
36189 for (i = 0; i <= n_chdirs; i++)
36191 if (chdir ("..") < 0)
36193 if (rmdir (DIR_NAME) != 0)
36203 if ac_fn_c_try_run "$LINENO"
36205 gl_cv_func_getcwd_path_max=yes
36208 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
36209 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
36210 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
36211 *) gl_cv_func_getcwd_path_max=no;;
36214 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36215 conftest.$ac_objext conftest.beam conftest.$ac_ext
36220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
36221 printf "%s\n" "$gl_cv_func_getcwd_path_max" >&6; }
36223 case "$gl_cv_func_getcwd_null" in
36231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
36232 printf %s "checking for getpagesize... " >&6; }
36233 if test ${gl_cv_func_getpagesize+y}
36235 printf %s "(cached) " >&6
36237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36238 /* end confdefs.h. */
36239 #include <unistd.h>
36243 return getpagesize();
36249 if ac_fn_c_try_link "$LINENO"
36251 gl_cv_func_getpagesize=yes
36253 gl_cv_func_getpagesize=no
36255 rm -f core conftest.err conftest.$ac_objext conftest.beam \
36256 conftest$ac_exeext conftest.$ac_ext
36259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
36260 printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
36262 if test $gl_cv_func_getpagesize = yes; then
36264 printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h
36268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
36269 printf %s "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
36270 if test ${gl_cv_func_getcwd_succeeds_beyond_4k+y}
36272 printf %s "(cached) " >&6
36274 # Remove any remnants of a previous test.
36275 rm -rf confdir-14B---
36276 # Arrange for deletion of the temporary directory this test creates.
36277 ac_clean_files="$ac_clean_files confdir-14B---"
36278 if test "$cross_compiling" = yes
36281 # Guess no otherwise, even on glibc systems and musl systems.
36282 *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
36286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36287 /* end confdefs.h. */
36290 #include <stdlib.h>
36292 # include <unistd.h>
36293 #else /* on Windows with MSVC */
36294 # include <direct.h>
36296 #include <string.h>
36297 #include <sys/stat.h>
36300 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
36302 # include <unistd.h>
36304 #include <limits.h>
36305 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
36306 # include <sys/param.h>
36308 #if !defined PATH_MAX && defined MAXPATHLEN
36309 # define PATH_MAX MAXPATHLEN
36313 # define PATH_MAX 1024
36315 #if defined _WIN32 && ! defined __CYGWIN__
36317 # define PATH_MAX 260
36326 # define S_IRWXU 0700
36329 /* FIXME: skip the run-test altogether on systems without getpagesize. */
36330 #if ! HAVE_GETPAGESIZE
36331 # define getpagesize() 0
36334 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
36335 the 16kB pagesize on ia64 linux. Those conditions make the code below
36336 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
36337 #define TARGET_LEN (5 * 1024)
36343 size_t initial_cwd_len;
36346 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
36347 this relatively expensive and invasive test if that's not true. */
36349 int bug_possible = PATH_MAX < getpagesize ();
36351 int bug_possible = 0;
36353 if (! bug_possible)
36356 cwd = getcwd (NULL, 0);
36360 initial_cwd_len = strlen (cwd);
36365 static char const dir_name[] = "confdir-14B---";
36366 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
36367 / sizeof dir_name);
36369 for (d = 0; d < desired_depth; d++)
36371 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
36373 if (! (errno == ERANGE || errno == ENAMETOOLONG
36374 || errno == ENOENT))
36375 fail = 3; /* Unable to construct deep hierarchy. */
36380 /* If libc has the bug in question, this invocation of getcwd
36381 results in a failed assertion. */
36382 cwd = getcwd (NULL, 0);
36384 fail = 4; /* getcwd didn't assert, but it failed for a long name
36385 where the answer could have been learned. */
36388 /* Call rmdir first, in case the above chdir failed. */
36392 if (chdir ("..") < 0)
36405 if ac_fn_c_try_run "$LINENO"
36407 gl_cv_func_getcwd_succeeds_beyond_4k=yes
36410 if test $ret -ge 128 || test $ret = 4; then
36411 gl_cv_func_getcwd_succeeds_beyond_4k=no
36413 gl_cv_func_getcwd_succeeds_beyond_4k=yes
36417 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36418 conftest.$ac_objext conftest.beam conftest.$ac_ext
36423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
36424 printf "%s\n" "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
36425 case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
36438 case "$gl_cv_func_getcwd_path_max" in
36439 *"no" | *"no, it has the AIX bug") ;;
36442 printf "%s\n" "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
36446 case "$gl_cv_func_getcwd_path_max" in
36447 *"no, but it is partly working")
36449 printf "%s\n" "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
36452 *"yes, but with shorter paths")
36454 printf "%s\n" "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
36459 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
36460 || test $gl_cv_func_getcwd_posix_signature != yes \
36461 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
36462 || test $gl_abort_bug = yes; then
36466 if test $REPLACE_GETCWD = 1; then
36475 M4_LIBOBJS="$M4_LIBOBJS getcwd.$ac_objext"
36485 printf "%s\n" "#define GNULIB_GETCWD 1" >>confdefs.h
36497 GL_M4_GNULIB_GETCWD=1
36503 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
36512 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
36519 if test $REPLACE_GETCWD = 1; then
36528 M4_LIBOBJS="$M4_LIBOBJS getcwd-lgpl.$ac_objext"
36540 GL_M4_GNULIB_GETCWD=1
36546 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
36555 if test $ac_cv_func_getdtablesize = yes &&
36556 test $ac_cv_have_decl_getdtablesize = yes; then
36557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
36558 printf %s "checking whether getdtablesize works... " >&6; }
36559 if test ${gl_cv_func_getdtablesize_works+y}
36561 printf %s "(cached) " >&6
36564 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
36566 if test "$cross_compiling" = yes
36569 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
36570 gl_cv_func_getdtablesize_works="guessing no" ;;
36571 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
36575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36576 /* end confdefs.h. */
36578 #include <unistd.h>
36587 int size = getdtablesize();
36588 if (dup2 (0, getdtablesize()) != -1)
36590 if (size != getdtablesize())
36597 if ac_fn_c_try_run "$LINENO"
36599 gl_cv_func_getdtablesize_works=yes
36601 gl_cv_func_getdtablesize_works=no
36603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36604 conftest.$ac_objext conftest.beam conftest.$ac_ext
36611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
36612 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
36613 case "$gl_cv_func_getdtablesize_works" in
36614 *yes | "no (limitation)") ;;
36615 *) REPLACE_GETDTABLESIZE=1 ;;
36618 HAVE_GETDTABLESIZE=0
36621 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
36630 M4_LIBOBJS="$M4_LIBOBJS getdtablesize.$ac_objext"
36643 GL_M4_GNULIB_GETDTABLESIZE=1
36649 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
36663 if test -n "$gl_replace_getopt"; then
36667 if test $REPLACE_GETOPT = 1; then
36670 if test $ac_cv_header_sys_cdefs_h = yes; then
36678 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
36681 GETOPT_CDEFS_H=getopt-cdefs.h
36687 if test $REPLACE_GETOPT = 1; then
36696 M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
36706 M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
36708 GNULIB_GL_M4_UNISTD_H_GETOPT=1
36720 GL_M4_GNULIB_GETOPT_POSIX=1
36726 printf "%s\n" "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h
36734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
36735 printf %s "checking for getpagesize... " >&6; }
36736 if test ${gl_cv_func_getpagesize+y}
36738 printf %s "(cached) " >&6
36740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36741 /* end confdefs.h. */
36742 #include <unistd.h>
36746 return getpagesize();
36752 if ac_fn_c_try_link "$LINENO"
36754 gl_cv_func_getpagesize=yes
36756 gl_cv_func_getpagesize=no
36758 rm -f core conftest.err conftest.$ac_objext conftest.beam \
36759 conftest$ac_exeext conftest.$ac_ext
36762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
36763 printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
36765 if test $gl_cv_func_getpagesize = no; then
36767 ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
36768 if test "x$ac_cv_header_OS_h" = xyes
36770 printf "%s\n" "#define HAVE_OS_H 1" >>confdefs.h
36774 if test $ac_cv_header_OS_h = yes; then
36777 ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
36778 if test "x$ac_cv_header_sys_param_h" = xyes
36780 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
36784 if test $ac_cv_header_sys_param_h = yes; then
36790 REPLACE_GETPAGESIZE=1
36793 ac_fn_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
36794 if test "x$ac_cv_have_decl_getpagesize" = xyes
36798 HAVE_DECL_GETPAGESIZE=0
36801 if test $REPLACE_GETPAGESIZE = 1; then
36810 M4_LIBOBJS="$M4_LIBOBJS getpagesize.$ac_objext"
36822 GL_M4_GNULIB_GETPAGESIZE=1
36828 printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
36836 ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
36837 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36838 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
36844 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
36845 if test $ac_have_decl = 1
36850 ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
36851 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36852 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
36858 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
36859 if test $ac_have_decl = 1
36864 ac_fn_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
36865 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36866 if test "x$ac_cv_have_decl___argv" = xyes
36872 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
36873 if test $ac_have_decl = 1
36879 # Incur the cost of this test only if none of the above worked.
36880 if test $ac_found = 0; then
36881 # On OpenBSD 5.1, using the global __progname variable appears to be
36882 # the only way to implement getprogname.
36883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
36884 printf %s "checking whether __progname is defined in default libraries... " >&6; }
36885 if test ${gl_cv_var___progname+y}
36887 printf %s "(cached) " >&6
36890 gl_cv_var___progname=
36891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36892 /* end confdefs.h. */
36893 extern char *__progname;
36897 return *__progname;
36903 if ac_fn_c_try_link "$LINENO"
36905 gl_cv_var___progname=yes
36908 rm -f core conftest.err conftest.$ac_objext conftest.beam \
36909 conftest$ac_exeext conftest.$ac_ext
36913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
36914 printf "%s\n" "$gl_cv_var___progname" >&6; }
36915 if test "$gl_cv_var___progname" = yes; then
36917 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
36926 if test "$ac_cv_func_getrandom" != yes; then
36929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
36930 printf %s "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
36931 if test ${gl_cv_func_getrandom_ok+y}
36933 printf %s "(cached) " >&6
36935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36936 /* end confdefs.h. */
36937 /* Additional includes are needed before <sys/random.h> on uClibc
36939 #include <sys/types.h>
36940 #include <stdlib.h>
36941 #include <sys/random.h>
36942 ssize_t getrandom (void *, size_t, unsigned int);
36953 if ac_fn_c_try_compile "$LINENO"
36955 gl_cv_func_getrandom_ok=yes
36957 gl_cv_func_getrandom_ok=no
36959 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
36962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
36963 printf "%s\n" "$gl_cv_func_getrandom_ok" >&6; }
36964 if test $gl_cv_func_getrandom_ok = no; then
36965 REPLACE_GETRANDOM=1
36971 ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
36974 if test "x$ac_cv_header_bcrypt_h" = xyes
36976 printf "%s\n" "#define HAVE_BCRYPT_H 1" >>confdefs.h
36980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
36981 printf %s "checking whether the bcrypt library is guaranteed to be present... " >&6; }
36982 if test ${gl_cv_lib_assume_bcrypt+y}
36984 printf %s "(cached) " >&6
36986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36987 /* end confdefs.h. */
36988 #include <windows.h>
36992 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
37001 if ac_fn_c_try_compile "$LINENO"
37003 gl_cv_lib_assume_bcrypt=yes
37005 gl_cv_lib_assume_bcrypt=no
37007 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
37011 printf "%s\n" "$gl_cv_lib_assume_bcrypt" >&6; }
37012 if test $gl_cv_lib_assume_bcrypt = yes; then
37014 printf "%s\n" "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
37016 LIB_GETRANDOM='-lbcrypt'
37018 LIB_GETRANDOM='-ladvapi32'
37026 if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
37035 M4_LIBOBJS="$M4_LIBOBJS getrandom.$ac_objext"
37047 GL_M4_GNULIB_GETRANDOM=1
37053 printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
37059 # Autoconf 2.61a.99 and earlier don't support linking a file only
37060 # in VPATH builds. But since GNUmakefile is for maintainer use
37061 # only, it does not matter if we skip the link with older autoconf.
37062 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
37063 # builds, so use a shell variable to bypass this.
37064 GNUmakefile=GNUmakefile
37065 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
37068 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
37082 GL_M4_GNULIB_ICONV=1
37097 if test "$am_cv_func_iconv" = yes; then
37105 if test -n "$ICONV_H"; then
37106 GL_GENERATE_ICONV_H_TRUE=
37107 GL_GENERATE_ICONV_H_FALSE='#'
37109 GL_GENERATE_ICONV_H_TRUE='#'
37110 GL_GENERATE_ICONV_H_FALSE=
37114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37115 /* end confdefs.h. */
37118 #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
37123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37124 $EGREP "gnu_iconv" >/dev/null 2>&1
37126 gl_func_iconv_gnu=yes
37128 gl_func_iconv_gnu=no
37132 if test $gl_func_iconv_gnu = no; then
37135 aix*) iconv_flavor=ICONV_FLAVOR_AIX ;;
37136 irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
37137 hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
37138 osf*) iconv_flavor=ICONV_FLAVOR_OSF ;;
37139 solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
37140 openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;;
37142 if test -n "$iconv_flavor"; then
37144 printf "%s\n" "#define ICONV_FLAVOR $iconv_flavor" >>confdefs.h
37154 if test -n "$ICONV_H"; then
37155 GL_GENERATE_ICONV_H_TRUE=
37156 GL_GENERATE_ICONV_H_FALSE='#'
37158 GL_GENERATE_ICONV_H_TRUE='#'
37159 GL_GENERATE_ICONV_H_FALSE=
37163 REPLACE_ICONV_OPEN=1
37170 if test $REPLACE_ICONV_OPEN = 1; then
37179 M4_LIBOBJS="$M4_LIBOBJS iconv_open.$ac_objext"
37182 if test $REPLACE_ICONV = 1; then
37191 M4_LIBOBJS="$M4_LIBOBJS iconv.$ac_objext"
37201 M4_LIBOBJS="$M4_LIBOBJS iconv_close.$ac_objext"
37206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
37207 printf %s "checking whether the compiler generally respects inline... " >&6; }
37208 if test ${gl_cv_c_inline_effective+y}
37210 printf %s "(cached) " >&6
37212 if test $ac_cv_c_inline = no; then
37213 gl_cv_c_inline_effective=no
37215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37216 /* end confdefs.h. */
37221 #ifdef __NO_INLINE__
37222 #error "inline is not effective"
37228 if ac_fn_c_try_compile "$LINENO"
37230 gl_cv_c_inline_effective=yes
37232 gl_cv_c_inline_effective=no
37234 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
37239 printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
37240 if test $gl_cv_c_inline_effective = yes; then
37242 printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
37254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
37255 printf %s "checking whether isnan(double) can be used without linking with libm... " >&6; }
37256 if test ${gl_cv_func_isnand_no_libm+y}
37258 printf %s "(cached) " >&6
37261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37262 /* end confdefs.h. */
37264 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
37266 # define isnand(x) __builtin_isnan ((double)(x))
37269 # define isnand(x) isnan ((double)(x))
37280 if ac_fn_c_try_link "$LINENO"
37282 gl_cv_func_isnand_no_libm=yes
37284 gl_cv_func_isnand_no_libm=no
37286 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37287 conftest$ac_exeext conftest.$ac_ext
37290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
37291 printf "%s\n" "$gl_cv_func_isnand_no_libm" >&6; }
37293 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
37294 if test $gl_cv_func_isnand_no_libm = yes; then
37296 printf "%s\n" "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
37300 if test $gl_func_isnand_no_libm != yes; then
37309 M4_LIBOBJS="$M4_LIBOBJS isnand.$ac_objext"
37317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
37318 printf %s "checking whether isnan(float) can be used without linking with libm... " >&6; }
37319 if test ${gl_cv_func_isnanf_no_libm+y}
37321 printf %s "(cached) " >&6
37324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37325 /* end confdefs.h. */
37327 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
37329 # define isnanf(x) __builtin_isnan ((float)(x))
37330 #elif defined isnan
37332 # define isnanf(x) isnan ((float)(x))
37343 if ac_fn_c_try_link "$LINENO"
37345 gl_cv_func_isnanf_no_libm=yes
37347 gl_cv_func_isnanf_no_libm=no
37349 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37350 conftest$ac_exeext conftest.$ac_ext
37353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
37354 printf "%s\n" "$gl_cv_func_isnanf_no_libm" >&6; }
37356 if test $gl_cv_func_isnanf_no_libm = yes; then
37360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
37361 printf %s "checking whether isnan(float) works... " >&6; }
37362 if test ${gl_cv_func_isnanf_works+y}
37364 printf %s "(cached) " >&6
37367 if test "$cross_compiling" = yes
37370 irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
37371 mingw*) # Guess yes on mingw, no on MSVC.
37372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37373 /* end confdefs.h. */
37380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37381 $EGREP "Known" >/dev/null 2>&1
37383 gl_cv_func_isnanf_works="guessing yes"
37385 gl_cv_func_isnanf_works="guessing no"
37390 *) gl_cv_func_isnanf_works="guessing yes" ;;
37394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37395 /* end confdefs.h. */
37398 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
37400 # define isnanf(x) __builtin_isnan ((float)(x))
37401 #elif defined isnan
37403 # define isnanf(x) isnan ((float)(x))
37405 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
37410 static float zero = 0.0f;
37411 return zero / zero;
37414 # define NaN() (0.0f / 0.0f)
37417 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
37418 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
37423 if (isnanf (1.0f / 0.0f))
37426 if (!isnanf (NaN ()))
37429 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
37430 /* The isnanf function should be immune against changes in the sign bit and
37431 in the mantissa bits. The xor operation twiddles a bit that can only be
37432 a sign bit or a mantissa bit. */
37433 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
37438 /* Set the bits below the exponent to 01111...111. */
37439 m.word[0] &= -1U << FLT_EXPBIT0_BIT;
37440 m.word[0] |= (1U << (FLT_EXPBIT0_BIT - 1)) - 1;
37441 if (!isnanf (m.value))
37449 if ac_fn_c_try_run "$LINENO"
37451 gl_cv_func_isnanf_works=yes
37453 gl_cv_func_isnanf_works=no
37455 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37456 conftest.$ac_objext conftest.beam conftest.$ac_ext
37461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
37462 printf "%s\n" "$gl_cv_func_isnanf_works" >&6; }
37465 if test $gl_cv_func_isnanf_no_libm = yes \
37466 && { case "$gl_cv_func_isnanf_works" in
37471 gl_func_isnanf_no_libm=yes
37473 printf "%s\n" "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
37476 gl_func_isnanf_no_libm=no
37479 if test $gl_func_isnanf_no_libm != yes; then
37488 M4_LIBOBJS="$M4_LIBOBJS isnanf.$ac_objext"
37492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
37493 printf %s "checking where to find the exponent in a 'float'... " >&6; }
37494 if test ${gl_cv_cc_float_expbit0+y}
37496 printf %s "(cached) " >&6
37499 if test "$cross_compiling" = yes
37501 gl_cv_cc_float_expbit0="word 0 bit 23"
37503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37504 /* end confdefs.h. */
37507 #include <stddef.h>
37509 #include <string.h>
37511 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
37512 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
37513 static unsigned int ored_words[NWORDS];
37514 static unsigned int anded_words[NWORDS];
37515 static void add_to_ored_words (float x)
37519 /* Clear it first, in case
37520 sizeof (float) < sizeof (memory_float). */
37521 memset (&m, 0, sizeof (memory_float));
37523 for (i = 0; i < NWORDS; i++)
37525 ored_words[i] |= m.word[i];
37526 anded_words[i] &= m.word[i];
37532 FILE *fp = fopen ("conftest.out", "w");
37535 for (j = 0; j < NWORDS; j++)
37536 anded_words[j] = ~ (unsigned int) 0;
37537 add_to_ored_words (0.25f);
37538 add_to_ored_words (0.5f);
37539 add_to_ored_words (1.0f);
37540 add_to_ored_words (2.0f);
37541 add_to_ored_words (4.0f);
37542 /* Remove bits that are common (e.g. if representation of the first mantissa
37543 bit is explicit). */
37544 for (j = 0; j < NWORDS; j++)
37545 ored_words[j] &= ~anded_words[j];
37546 /* Now find the nonzero word. */
37547 for (j = 0; j < NWORDS; j++)
37548 if (ored_words[j] != 0)
37553 for (i = j + 1; i < NWORDS; i++)
37554 if (ored_words[i] != 0)
37556 fprintf (fp, "unknown");
37557 return (fclose (fp) != 0);
37560 if ((ored_words[j] >> i) & 1)
37562 fprintf (fp, "word %d bit %d", (int) j, (int) i);
37563 return (fclose (fp) != 0);
37566 fprintf (fp, "unknown");
37567 return (fclose (fp) != 0);
37571 if ac_fn_c_try_run "$LINENO"
37573 gl_cv_cc_float_expbit0=`cat conftest.out`
37575 gl_cv_cc_float_expbit0="unknown"
37577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37578 conftest.$ac_objext conftest.beam conftest.$ac_ext
37584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
37585 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
37586 case "$gl_cv_cc_float_expbit0" in
37588 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
37589 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
37591 printf "%s\n" "#define FLT_EXPBIT0_WORD $word" >>confdefs.h
37594 printf "%s\n" "#define FLT_EXPBIT0_BIT $bit" >>confdefs.h
37603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
37604 printf %s "checking whether isnan(long double) can be used without linking with libm... " >&6; }
37605 if test ${gl_cv_func_isnanl_no_libm+y}
37607 printf %s "(cached) " >&6
37610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37611 /* end confdefs.h. */
37613 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
37615 # define isnanl(x) __builtin_isnan ((long double)(x))
37616 #elif defined isnan
37618 # define isnanl(x) isnan ((long double)(x))
37629 if ac_fn_c_try_link "$LINENO"
37631 gl_cv_func_isnanl_no_libm=yes
37633 gl_cv_func_isnanl_no_libm=no
37635 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37636 conftest$ac_exeext conftest.$ac_ext
37639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
37640 printf "%s\n" "$gl_cv_func_isnanl_no_libm" >&6; }
37642 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
37643 if test $gl_func_isnanl_no_libm = yes; then
37648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
37649 printf %s "checking whether isnanl works... " >&6; }
37650 if test ${gl_cv_func_isnanl_works+y}
37652 printf %s "(cached) " >&6
37655 if test "$cross_compiling" = yes
37658 mingw*) # Guess yes on mingw, no on MSVC.
37659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37660 /* end confdefs.h. */
37667 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37668 $EGREP "Known" >/dev/null 2>&1
37670 gl_cv_func_isnanl_works="guessing yes"
37672 gl_cv_func_isnanl_works="guessing no"
37677 *) gl_cv_func_isnanl_works="guessing yes" ;;
37681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37682 /* end confdefs.h. */
37685 #include <limits.h>
37687 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
37689 # define isnanl(x) __builtin_isnan ((long double)(x))
37690 #elif defined isnan
37692 # define isnanl(x) isnan ((long double)(x))
37695 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
37696 typedef union { unsigned int word[NWORDS]; long double value; }
37697 memory_long_double;
37698 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
37699 runtime type conversion. */
37701 static long double NaNl ()
37704 return zero / zero;
37707 # define NaNl() (0.0L / 0.0L)
37713 if (!isnanl (NaNl ()))
37717 memory_long_double m;
37720 /* The isnanl function should be immune against changes in the sign bit and
37721 in the mantissa bits. The xor operation twiddles a bit that can only be
37722 a sign bit or a mantissa bit (since the exponent never extends to
37725 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
37726 for (i = 0; i < NWORDS; i++)
37728 if (!isnanl (m.value))
37732 #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
37733 /* Representation of an 80-bit 'long double' as an initializer for a sequence
37734 of 'unsigned int' words. */
37735 # ifdef WORDS_BIGENDIAN
37736 # define LDBL80_WORDS(exponent,manthi,mantlo) \
37737 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
37738 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
37739 (unsigned int) (mantlo) << 16 \
37742 # define LDBL80_WORDS(exponent,manthi,mantlo) \
37743 { mantlo, manthi, exponent }
37746 static memory_long_double x =
37747 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
37748 if (!isnanl (x.value))
37752 /* Signalling NaN. */
37753 static memory_long_double x =
37754 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
37755 if (!isnanl (x.value))
37758 /* isnanl should return something even for noncanonical values. */
37759 { /* Pseudo-NaN. */
37760 static memory_long_double x =
37761 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
37762 if (isnanl (x.value) && !isnanl (x.value))
37765 { /* Pseudo-Infinity. */
37766 static memory_long_double x =
37767 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
37768 if (isnanl (x.value) && !isnanl (x.value))
37771 { /* Pseudo-Zero. */
37772 static memory_long_double x =
37773 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
37774 if (isnanl (x.value) && !isnanl (x.value))
37777 { /* Unnormalized number. */
37778 static memory_long_double x =
37779 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
37780 if (isnanl (x.value) && !isnanl (x.value))
37783 { /* Pseudo-Denormal. */
37784 static memory_long_double x =
37785 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
37786 if (isnanl (x.value) && !isnanl (x.value))
37794 if ac_fn_c_try_run "$LINENO"
37796 gl_cv_func_isnanl_works=yes
37798 gl_cv_func_isnanl_works=no
37800 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37801 conftest.$ac_objext conftest.beam conftest.$ac_ext
37806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
37807 printf "%s\n" "$gl_cv_func_isnanl_works" >&6; }
37809 case "$gl_cv_func_isnanl_works" in
37811 *) gl_func_isnanl_no_libm=no ;;
37814 if test $gl_func_isnanl_no_libm = yes; then
37816 printf "%s\n" "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
37820 if test $gl_func_isnanl_no_libm != yes; then
37829 M4_LIBOBJS="$M4_LIBOBJS isnanl.$ac_objext"
37834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
37835 printf %s "checking where to find the exponent in a 'long double'... " >&6; }
37836 if test ${gl_cv_cc_long_double_expbit0+y}
37838 printf %s "(cached) " >&6
37841 if test "$cross_compiling" = yes
37844 gl_cv_cc_long_double_expbit0="unknown"
37846 mingw*) # On native Windows (little-endian), we know the result
37847 # in two cases: mingw, MSVC.
37848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37849 /* end confdefs.h. */
37856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37857 $EGREP "Known" >/dev/null 2>&1
37859 gl_cv_cc_long_double_expbit0="word 2 bit 0"
37863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37864 /* end confdefs.h. */
37871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37872 $EGREP "Known" >/dev/null 2>&1
37874 gl_cv_cc_long_double_expbit0="word 1 bit 20"
37882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37883 /* end confdefs.h. */
37886 #include <stddef.h>
37888 #include <string.h>
37890 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
37891 typedef union { long double value; unsigned int word[NWORDS]; }
37892 memory_long_double;
37893 static unsigned int ored_words[NWORDS];
37894 static unsigned int anded_words[NWORDS];
37895 static void add_to_ored_words (long double *x)
37897 memory_long_double m;
37899 /* Clear it first, in case
37900 sizeof (long double) < sizeof (memory_long_double). */
37901 memset (&m, 0, sizeof (memory_long_double));
37903 for (i = 0; i < NWORDS; i++)
37905 ored_words[i] |= m.word[i];
37906 anded_words[i] &= m.word[i];
37911 static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
37913 FILE *fp = fopen ("conftest.out", "w");
37916 for (j = 0; j < NWORDS; j++)
37917 anded_words[j] = ~ (unsigned int) 0;
37918 for (j = 0; j < 5; j++)
37919 add_to_ored_words (&samples[j]);
37920 /* Remove bits that are common (e.g. if representation of the first mantissa
37921 bit is explicit). */
37922 for (j = 0; j < NWORDS; j++)
37923 ored_words[j] &= ~anded_words[j];
37924 /* Now find the nonzero word. */
37925 for (j = 0; j < NWORDS; j++)
37926 if (ored_words[j] != 0)
37931 for (i = j + 1; i < NWORDS; i++)
37932 if (ored_words[i] != 0)
37934 fprintf (fp, "unknown");
37935 return (fclose (fp) != 0);
37938 if ((ored_words[j] >> i) & 1)
37940 fprintf (fp, "word %d bit %d", (int) j, (int) i);
37941 return (fclose (fp) != 0);
37944 fprintf (fp, "unknown");
37945 return (fclose (fp) != 0);
37949 if ac_fn_c_try_run "$LINENO"
37951 gl_cv_cc_long_double_expbit0=`cat conftest.out`
37953 gl_cv_cc_long_double_expbit0="unknown"
37955 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37956 conftest.$ac_objext conftest.beam conftest.$ac_ext
37962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
37963 printf "%s\n" "$gl_cv_cc_long_double_expbit0" >&6; }
37964 case "$gl_cv_cc_long_double_expbit0" in
37966 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
37967 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
37969 printf "%s\n" "#define LDBL_EXPBIT0_WORD $word" >>confdefs.h
37972 printf "%s\n" "#define LDBL_EXPBIT0_BIT $bit" >>confdefs.h
37985 ac_fn_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
37987 #include <wctype.h>
37989 " "$ac_c_undeclared_builtin_options" "CFLAGS"
37990 if test "x$ac_cv_have_decl_iswblank" = xyes
37996 printf "%s\n" "#define HAVE_DECL_ISWBLANK $ac_have_decl" >>confdefs.h
37998 if test $ac_cv_func_iswblank = no; then
38000 if test $ac_cv_have_decl_iswblank = yes; then
38004 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38007 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
38013 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38016 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
38025 M4_LIBOBJS="$M4_LIBOBJS iswblank.$ac_objext"
38038 GL_M4_GNULIB_ISWBLANK=1
38044 printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
38056 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38057 REPLACE_ISWDIGIT="$REPLACE_ISWCNTRL"
38059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswdigit is ISO C compliant" >&5
38060 printf %s "checking whether iswdigit is ISO C compliant... " >&6; }
38061 if test ${gl_cv_func_iswdigit_works+y}
38063 printf %s "(cached) " >&6
38067 # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
38068 freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
38069 gl_cv_func_iswdigit_works="guessing no" ;;
38070 # Guess yes otherwise.
38071 *) gl_cv_func_iswdigit_works="guessing yes" ;;
38073 if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
38074 if test "$cross_compiling" = yes
38078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38079 /* end confdefs.h. */
38081 #include <locale.h>
38082 #include <stdlib.h>
38083 #include <string.h>
38085 #include <wctype.h>
38087 /* Returns the value of iswdigit for the multibyte character s[0..n-1]. */
38089 for_character (const char *s, size_t n)
38095 memset (&state, '\0', sizeof (mbstate_t));
38096 wc = (wchar_t) 0xBADFACE;
38097 ret = mbrtowc (&wc, s, n, &state);
38101 return iswdigit (wc);
38105 main (int argc, char *argv[])
38110 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
38112 /* This fails on mingw, MSVC 14. */
38113 /* U+00B2 SUPERSCRIPT TWO */
38114 is = for_character ("\262", 1);
38118 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
38120 /* This fails on NetBSD 8.0. */
38121 /* U+FF11 FULLWIDTH DIGIT ONE */
38122 is = for_character ("\243\261", 2);
38126 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
38128 /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14. */
38129 /* U+0663 ARABIC-INDIC DIGIT THREE */
38130 is = for_character ("\331\243", 2);
38133 /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14. */
38134 /* U+FF11 FULLWIDTH DIGIT ONE */
38135 is = for_character ("\357\274\221", 3);
38139 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
38141 /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4. */
38142 /* U+FF11 FULLWIDTH DIGIT ONE */
38143 is = for_character ("\243\261", 2);
38150 if ac_fn_c_try_run "$LINENO"
38152 gl_cv_func_iswdigit_works=yes
38154 gl_cv_func_iswdigit_works=no
38156 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38157 conftest.$ac_objext conftest.beam conftest.$ac_ext
38163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswdigit_works" >&5
38164 printf "%s\n" "$gl_cv_func_iswdigit_works" >&6; }
38165 case "$gl_cv_func_iswdigit_works" in
38167 *) REPLACE_ISWDIGIT=1 ;;
38171 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38174 if test $REPLACE_ISWDIGIT = 1; then
38183 M4_LIBOBJS="$M4_LIBOBJS iswdigit.$ac_objext"
38196 GL_M4_GNULIB_ISWDIGIT=1
38202 printf "%s\n" "#define GNULIB_TEST_ISWDIGIT 1" >>confdefs.h
38213 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38214 REPLACE_ISWXDIGIT="$REPLACE_ISWCNTRL"
38216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswxdigit is ISO C compliant" >&5
38217 printf %s "checking whether iswxdigit is ISO C compliant... " >&6; }
38218 if test ${gl_cv_func_iswxdigit_works+y}
38220 printf %s "(cached) " >&6
38224 # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
38225 freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
38226 gl_cv_func_iswxdigit_works="guessing no" ;;
38227 # Guess yes otherwise.
38228 *) gl_cv_func_iswxdigit_works="guessing yes" ;;
38230 if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
38231 if test "$cross_compiling" = yes
38235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38236 /* end confdefs.h. */
38238 #include <locale.h>
38239 #include <stdlib.h>
38240 #include <string.h>
38242 #include <wctype.h>
38244 /* Returns the value of iswxdigit for the multibyte character s[0..n-1]. */
38246 for_character (const char *s, size_t n)
38252 memset (&state, '\0', sizeof (mbstate_t));
38253 wc = (wchar_t) 0xBADFACE;
38254 ret = mbrtowc (&wc, s, n, &state);
38258 return iswxdigit (wc);
38262 main (int argc, char *argv[])
38267 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
38269 /* This fails on NetBSD 8.0. */
38270 /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
38271 is = for_character ("\243\301", 2);
38275 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
38277 /* This fails on FreeBSD 13.0. */
38278 /* U+0663 ARABIC-INDIC DIGIT THREE */
38279 is = for_character ("\331\243", 2);
38282 /* This fails on MSVC 14. */
38283 /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
38284 is = for_character ("\357\274\241", 3);
38288 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
38290 /* This fails on Solaris 10, Solaris 11.4. */
38291 /* U+FF11 FULLWIDTH DIGIT ONE */
38292 is = for_character ("\243\261", 2);
38299 if ac_fn_c_try_run "$LINENO"
38301 gl_cv_func_iswxdigit_works=yes
38303 gl_cv_func_iswxdigit_works=no
38305 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38306 conftest.$ac_objext conftest.beam conftest.$ac_ext
38312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswxdigit_works" >&5
38313 printf "%s\n" "$gl_cv_func_iswxdigit_works" >&6; }
38314 case "$gl_cv_func_iswxdigit_works" in
38316 *) REPLACE_ISWXDIGIT=1 ;;
38320 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
38323 if test $REPLACE_ISWXDIGIT = 1; then
38332 M4_LIBOBJS="$M4_LIBOBJS iswxdigit.$ac_objext"
38345 GL_M4_GNULIB_ISWXDIGIT=1
38351 printf "%s\n" "#define GNULIB_TEST_ISWXDIGIT 1" >>confdefs.h
38363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
38364 printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
38365 if test ${gl_cv_c___inline+y}
38367 printf %s "(cached) " >&6
38369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38370 /* end confdefs.h. */
38372 static __inline foo_t foo (void) { return 0; }
38381 if ac_fn_c_try_compile "$LINENO"
38383 gl_cv_c___inline=yes
38385 gl_cv_c___inline=no
38387 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
38390 printf "%s\n" "$gl_cv_c___inline" >&6; }
38391 if test $gl_cv_c___inline = yes; then
38393 printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
38401 LOCALCHARSET_TESTS_ENVIRONMENT=
38413 if test $REPLACE_STRUCT_LCONV = 1; then
38414 REPLACE_LOCALECONV=1
38417 if test $REPLACE_LOCALECONV = 1; then
38426 M4_LIBOBJS="$M4_LIBOBJS localeconv.$ac_objext"
38429 ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
38431 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
38434 printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
38450 GL_M4_GNULIB_LOCALECONV=1
38456 printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
38467 if test $HAVE_LOCALE_T = 1; then
38469 gl_func_newlocale="$ac_cv_func_newlocale"
38470 gl_func_duplocale="$ac_cv_func_duplocale"
38471 gl_func_freelocale="$ac_cv_func_freelocale"
38473 gl_func_newlocale=no
38474 gl_func_duplocale=no
38475 gl_func_freelocale=no
38477 if test $gl_func_newlocale != yes; then
38480 if test $gl_func_duplocale != yes; then
38483 if test $gl_func_freelocale != yes; then
38486 if test $gt_localename_enhances_locale_funcs = yes; then
38487 REPLACE_NEWLOCALE=1
38488 REPLACE_DUPLOCALE=1
38489 REPLACE_FREELOCALE=1
38501 GL_M4_GNULIB_LOCALENAME=1
38507 printf "%s\n" "#define GNULIB_TEST_LOCALENAME 1" >>confdefs.h
38513 if test "$gl_threads_api" = posix; then
38514 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
38515 # pthread_rwlock_* functions.
38517 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
38519 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
38523 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
38527 if $has_rwlock; then
38530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
38531 printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
38532 if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
38534 printf %s "(cached) " >&6
38537 LIBS="$LIBS $LIBMULTITHREAD"
38538 if test "$cross_compiling" = yes
38541 # Guess no on glibc systems.
38542 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
38543 # Guess no on musl systems.
38544 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
38545 # Guess no on bionic systems.
38546 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
38547 # Guess yes on native Windows with the mingw-w64 winpthreads library.
38548 # Guess no on native Windows with the gnulib windows-rwlock module.
38549 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
38550 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
38552 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
38555 # If we don't know, obey --enable-cross-guesses.
38556 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
38560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38561 /* end confdefs.h. */
38564 #include <pthread.h>
38565 #include <stdlib.h>
38566 #include <unistd.h>
38568 #define SUCCEED() exit (0)
38569 #define FAILURE() exit (1)
38570 #define UNEXPECTED(n) (exit (10 + (n)))
38572 /* The main thread creates the waiting writer and the requesting reader threads
38573 in the default way; this guarantees that they have the same priority.
38574 We can reuse the main thread as first reader thread. */
38576 static pthread_rwlock_t lock;
38577 static pthread_t reader1;
38578 static pthread_t writer;
38579 static pthread_t reader2;
38580 static pthread_t timer;
38581 /* Used to pass control from writer to reader2 and from reader2 to timer,
38582 as in a relay race.
38583 Passing control from one running thread to another running thread
38584 is most likely faster than to create the second thread. */
38585 static pthread_mutex_t baton;
38588 timer_func (void *ignored)
38590 /* Step 13 (can be before or after step 12):
38591 The timer thread takes the baton, then waits a moment to make sure
38592 it can tell whether the second reader thread is blocked at step 12. */
38593 if (pthread_mutex_lock (&baton))
38596 /* By the time we get here, it's clear that the second reader thread is
38597 blocked at step 12. This is the desired behaviour. */
38602 reader2_func (void *ignored)
38606 /* Step 8 (can be before or after step 7):
38607 The second reader thread takes the baton, then waits a moment to make sure
38608 the writer thread has reached step 7. */
38609 if (pthread_mutex_lock (&baton))
38612 /* Step 9: The second reader thread requests the lock. */
38613 err = pthread_rwlock_tryrdlock (&lock);
38616 else if (err != EBUSY)
38618 /* Step 10: Launch a timer, to test whether the next call blocks. */
38619 if (pthread_create (&timer, NULL, timer_func, NULL))
38621 /* Step 11: Release the baton. */
38622 if (pthread_mutex_unlock (&baton))
38624 /* Step 12: The second reader thread requests the lock. */
38625 err = pthread_rwlock_rdlock (&lock);
38633 writer_func (void *ignored)
38635 /* Step 4: Take the baton, so that the second reader thread does not go ahead
38637 if (pthread_mutex_lock (&baton))
38639 /* Step 5: Create the second reader thread. */
38640 if (pthread_create (&reader2, NULL, reader2_func, NULL))
38642 /* Step 6: Release the baton. */
38643 if (pthread_mutex_unlock (&baton))
38645 /* Step 7: The writer thread requests the lock. */
38646 if (pthread_rwlock_wrlock (&lock))
38654 reader1 = pthread_self ();
38656 /* Step 1: The main thread initializes the lock and the baton. */
38657 if (pthread_rwlock_init (&lock, NULL))
38659 if (pthread_mutex_init (&baton, NULL))
38661 /* Step 2: The main thread acquires the lock as a reader. */
38662 if (pthread_rwlock_rdlock (&lock))
38664 /* Step 3: Create the writer thread. */
38665 if (pthread_create (&writer, NULL, writer_func, NULL))
38667 /* Job done. Go to sleep. */
38675 if ac_fn_c_try_run "$LINENO"
38677 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
38679 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
38681 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38682 conftest.$ac_objext conftest.beam conftest.$ac_ext
38688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
38689 printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
38690 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
38693 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
38699 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
38700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38701 /* end confdefs.h. */
38703 #include <pthread.h>
38708 #if __FreeBSD__ == 4
38709 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
38710 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
38711 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
38712 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
38714 int x = (int)PTHREAD_MUTEX_RECURSIVE;
38722 if ac_fn_c_try_compile "$LINENO"
38725 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
38728 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38734 printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
38743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
38744 printf %s "checking whether lseek detects pipes... " >&6; }
38745 if test ${gl_cv_func_lseek_pipe+y}
38747 printf %s "(cached) " >&6
38751 gl_cv_func_lseek_pipe=no
38754 if test $cross_compiling = no; then
38755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38756 /* end confdefs.h. */
38758 #include <sys/types.h> /* for off_t */
38759 #include <stdio.h> /* for SEEK_CUR */
38761 # include <unistd.h>
38762 #else /* on Windows with MSVC */
38773 /* Exit with success only if stdin is seekable. */
38774 return lseek (0, (off_t)0, SEEK_CUR) < 0;
38780 if ac_fn_c_try_link "$LINENO"
38782 if test -s conftest$ac_exeext \
38783 && ./conftest$ac_exeext < conftest.$ac_ext \
38784 && test 1 = "`echo hi \
38785 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
38786 gl_cv_func_lseek_pipe=yes
38788 gl_cv_func_lseek_pipe=no
38792 gl_cv_func_lseek_pipe=no
38794 rm -f core conftest.err conftest.$ac_objext conftest.beam \
38795 conftest$ac_exeext conftest.$ac_ext
38797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38798 /* end confdefs.h. */
38800 #if defined __BEOS__
38801 /* BeOS mistakenly return 0 when trying to seek on pipes. */
38805 if ac_fn_c_try_compile "$LINENO"
38807 gl_cv_func_lseek_pipe=yes
38809 gl_cv_func_lseek_pipe=no
38811 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
38818 printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
38819 if test $gl_cv_func_lseek_pipe = no; then
38822 printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
38827 if test $WINDOWS_64_BIT_OFF_T = 1; then
38831 if test $REPLACE_LSEEK = 1; then
38840 M4_LIBOBJS="$M4_LIBOBJS lseek.$ac_objext"
38852 GL_M4_GNULIB_LSEEK=1
38858 printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
38866 if test $ac_cv_func_lstat = yes; then
38868 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
38877 if test $REPLACE_LSTAT = 1; then
38886 M4_LIBOBJS="$M4_LIBOBJS lstat.$ac_objext"
38899 GL_M4_GNULIB_LSTAT=1
38905 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
38915 if test $REPLACE_MALLOC = 0; then
38917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
38918 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
38919 if test ${ac_cv_func_malloc_0_nonnull+y}
38921 printf %s "(cached) " >&6
38923 if test "$cross_compiling" = yes
38926 # Guess yes on platforms where we know the result.
38927 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
38928 | gnu* | *-musl* | midnightbsd* \
38929 | hpux* | solaris* | cygwin* | mingw* | msys* )
38930 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
38931 # If we don't know, obey --enable-cross-guesses.
38932 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
38936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38937 /* end confdefs.h. */
38938 #include <stdlib.h>
38943 void *p = malloc (0);
38952 if ac_fn_c_try_run "$LINENO"
38954 ac_cv_func_malloc_0_nonnull=yes
38956 ac_cv_func_malloc_0_nonnull=no
38958 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38959 conftest.$ac_objext conftest.beam conftest.$ac_ext
38964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
38965 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
38966 case $ac_cv_func_malloc_0_nonnull in #(
38970 REPLACE_MALLOC=1 ;;
38975 if test $REPLACE_MALLOC = 1; then
38984 M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
38988 if test $REPLACE_MALLOC = 1; then
38997 M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
39009 GL_M4_GNULIB_MALLOC_POSIX=1
39015 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
39048 if case "$host_os" in
39050 *) test $ac_cv_func_mbsinit = yes ;;
39052 && test $ac_cv_func_mbrtowc = yes; then
39057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
39058 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
39059 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
39061 printf %s "(cached) " >&6
39065 # Guess no on AIX and OSF/1.
39066 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
39067 # Guess yes otherwise.
39068 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
39070 if test $LOCALE_JA != none; then
39071 if test "$cross_compiling" = yes
39075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39076 /* end confdefs.h. */
39078 #include <locale.h>
39079 #include <string.h>
39083 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
39085 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
39089 memset (&state, '\0', sizeof (mbstate_t));
39090 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
39091 if (mbsinit (&state))
39097 if ac_fn_c_try_run "$LINENO"
39099 gl_cv_func_mbrtowc_incomplete_state=yes
39101 gl_cv_func_mbrtowc_incomplete_state=no
39103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39104 conftest.$ac_objext conftest.beam conftest.$ac_ext
39108 if test $LOCALE_FR_UTF8 != none; then
39109 if test "$cross_compiling" = yes
39113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39114 /* end confdefs.h. */
39116 #include <locale.h>
39117 #include <string.h>
39121 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
39123 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
39127 memset (&state, '\0', sizeof (mbstate_t));
39128 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
39129 if (mbsinit (&state))
39135 if ac_fn_c_try_run "$LINENO"
39137 gl_cv_func_mbrtowc_incomplete_state=yes
39139 gl_cv_func_mbrtowc_incomplete_state=no
39141 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39142 conftest.$ac_objext conftest.beam conftest.$ac_ext
39149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
39150 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
39155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
39156 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
39157 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
39159 printf %s "(cached) " >&6
39163 # Guess no on Solaris 8.
39164 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
39165 # Guess yes otherwise.
39166 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
39168 if test $LOCALE_ZH_CN != none; then
39169 if test "$cross_compiling" = yes
39173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39174 /* end confdefs.h. */
39176 #include <locale.h>
39177 #include <stdlib.h>
39178 #include <string.h>
39182 /* This fails on Solaris 8:
39183 mbrtowc returns 2, and sets wc to 0x00F0.
39184 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
39185 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
39187 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
39191 memset (&state, '\0', sizeof (mbstate_t));
39192 if (mbrtowc (&wc, input + 3, 6, &state) != 4
39193 && mbtowc (&wc, input + 3, 6) == 4)
39199 if ac_fn_c_try_run "$LINENO"
39201 gl_cv_func_mbrtowc_sanitycheck=yes
39203 gl_cv_func_mbrtowc_sanitycheck=no
39205 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39206 conftest.$ac_objext conftest.beam conftest.$ac_ext
39212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
39213 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
39215 REPLACE_MBSTATE_T=0
39216 case "$gl_cv_func_mbrtowc_incomplete_state" in
39218 *) REPLACE_MBSTATE_T=1 ;;
39220 case "$gl_cv_func_mbrtowc_sanitycheck" in
39222 *) REPLACE_MBSTATE_T=1 ;;
39225 REPLACE_MBSTATE_T=1
39230 if test $ac_cv_func_mbrtowc = no; then
39232 ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
39235 " "$ac_c_undeclared_builtin_options" "CFLAGS"
39236 if test "x$ac_cv_have_decl_mbrtowc" = xyes
39242 printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
39244 if test $ac_cv_have_decl_mbrtowc = yes; then
39248 if test $REPLACE_MBSTATE_T = 1; then
39254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
39255 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
39256 if test ${gl_cv_func_mbrtowc_null_arg1+y}
39258 printf %s "(cached) " >&6
39262 # Guess no on Solaris.
39263 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
39264 # Guess yes otherwise.
39265 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
39267 if test $LOCALE_FR_UTF8 != none; then
39268 if test "$cross_compiling" = yes
39272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39273 /* end confdefs.h. */
39275 #include <locale.h>
39276 #include <stdlib.h>
39277 #include <string.h>
39283 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
39285 char input[] = "\303\237er";
39290 memset (&state, '\0', sizeof (mbstate_t));
39291 wc = (wchar_t) 0xBADFACE;
39292 ret = mbrtowc (&wc, input, 5, &state);
39295 if (!mbsinit (&state))
39298 memset (&state, '\0', sizeof (mbstate_t));
39299 ret = mbrtowc (NULL, input, 5, &state);
39300 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
39302 if (!mbsinit (&state))
39308 if ac_fn_c_try_run "$LINENO"
39310 gl_cv_func_mbrtowc_null_arg1=yes
39312 gl_cv_func_mbrtowc_null_arg1=no
39314 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39315 conftest.$ac_objext conftest.beam conftest.$ac_ext
39321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
39322 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
39327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
39328 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
39329 if test ${gl_cv_func_mbrtowc_null_arg2+y}
39331 printf %s "(cached) " >&6
39335 # Guess no on OSF/1.
39336 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
39337 # Guess yes otherwise.
39338 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
39340 if test $LOCALE_FR_UTF8 != none; then
39341 if test "$cross_compiling" = yes
39345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39346 /* end confdefs.h. */
39348 #include <locale.h>
39349 #include <string.h>
39353 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
39359 memset (&state, '\0', sizeof (mbstate_t));
39360 wc = (wchar_t) 0xBADFACE;
39361 mbrtowc (&wc, NULL, 5, &state);
39362 /* Check that wc was not modified. */
39363 if (wc != (wchar_t) 0xBADFACE)
39369 if ac_fn_c_try_run "$LINENO"
39371 gl_cv_func_mbrtowc_null_arg2=yes
39373 gl_cv_func_mbrtowc_null_arg2=no
39375 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39376 conftest.$ac_objext conftest.beam conftest.$ac_ext
39382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
39383 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
39390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
39391 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
39392 if test ${gl_cv_func_mbrtowc_retval+y}
39394 printf %s "(cached) " >&6
39398 # Guess no on HP-UX, Solaris, native Windows.
39399 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
39400 # Guess yes otherwise.
39401 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
39403 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
39404 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
39405 if test "$cross_compiling" = yes
39409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39410 /* end confdefs.h. */
39412 #include <locale.h>
39413 #include <string.h>
39418 int found_some_locale = 0;
39419 /* This fails on Solaris. */
39420 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
39422 char input[] = "B\303\274\303\237er"; /* "Büßer" */
39426 memset (&state, '\0', sizeof (mbstate_t));
39427 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
39430 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
39433 found_some_locale = 1;
39435 /* This fails on HP-UX 11.11. */
39436 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
39438 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
39442 memset (&state, '\0', sizeof (mbstate_t));
39443 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
39446 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
39449 found_some_locale = 1;
39451 /* This fails on native Windows. */
39452 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
39454 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
39458 memset (&state, '\0', sizeof (mbstate_t));
39459 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
39462 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
39465 found_some_locale = 1;
39467 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
39469 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
39473 memset (&state, '\0', sizeof (mbstate_t));
39474 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
39477 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
39480 found_some_locale = 1;
39482 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
39484 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
39488 memset (&state, '\0', sizeof (mbstate_t));
39489 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
39492 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
39495 found_some_locale = 1;
39497 return (found_some_locale ? result : 77);
39500 if ac_fn_c_try_run "$LINENO"
39502 gl_cv_func_mbrtowc_retval=yes
39504 if test $? != 77; then
39505 gl_cv_func_mbrtowc_retval=no
39509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39510 conftest.$ac_objext conftest.beam conftest.$ac_ext
39516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
39517 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
39522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
39523 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
39524 if test ${gl_cv_func_mbrtowc_nul_retval+y}
39526 printf %s "(cached) " >&6
39530 # Guess no on Solaris 8 and 9.
39531 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
39532 # Guess yes otherwise.
39533 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
39535 if test $LOCALE_ZH_CN != none; then
39536 if test "$cross_compiling" = yes
39540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39541 /* end confdefs.h. */
39543 #include <locale.h>
39544 #include <string.h>
39548 /* This fails on Solaris 8 and 9. */
39549 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
39554 memset (&state, '\0', sizeof (mbstate_t));
39555 if (mbrtowc (&wc, "", 1, &state) != 0)
39561 if ac_fn_c_try_run "$LINENO"
39563 gl_cv_func_mbrtowc_nul_retval=yes
39565 gl_cv_func_mbrtowc_nul_retval=no
39567 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39568 conftest.$ac_objext conftest.beam conftest.$ac_ext
39574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
39575 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
39579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
39580 printf %s "checking whether mbrtowc stores incomplete characters... " >&6; }
39581 if test ${gl_cv_func_mbrtowc_stores_incomplete+y}
39583 printf %s "(cached) " >&6
39587 # Guess yes on native Windows.
39588 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
39589 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
39593 if test "$cross_compiling" = yes
39597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39598 /* end confdefs.h. */
39600 #include <locale.h>
39601 #include <string.h>
39606 if (setlocale (LC_ALL, "French_France.65001") != NULL)
39608 wchar_t wc = (wchar_t) 0xBADFACE;
39611 memset (&state, '\0', sizeof (mbstate_t));
39612 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
39613 && wc != (wchar_t) 0xBADFACE)
39616 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
39618 wchar_t wc = (wchar_t) 0xBADFACE;
39621 memset (&state, '\0', sizeof (mbstate_t));
39622 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
39623 && wc != (wchar_t) 0xBADFACE)
39626 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
39628 wchar_t wc = (wchar_t) 0xBADFACE;
39631 memset (&state, '\0', sizeof (mbstate_t));
39632 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
39633 && wc != (wchar_t) 0xBADFACE)
39636 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
39638 wchar_t wc = (wchar_t) 0xBADFACE;
39641 memset (&state, '\0', sizeof (mbstate_t));
39642 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
39643 && wc != (wchar_t) 0xBADFACE)
39649 if ac_fn_c_try_run "$LINENO"
39651 gl_cv_func_mbrtowc_stores_incomplete=no
39653 gl_cv_func_mbrtowc_stores_incomplete=yes
39655 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39656 conftest.$ac_objext conftest.beam conftest.$ac_ext
39662 if test $LOCALE_FR_UTF8 != none; then
39663 if test "$cross_compiling" = yes
39667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39668 /* end confdefs.h. */
39670 #include <locale.h>
39671 #include <string.h>
39675 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
39677 wchar_t wc = (wchar_t) 0xBADFACE;
39680 memset (&state, '\0', sizeof (mbstate_t));
39681 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
39682 && wc != (wchar_t) 0xBADFACE)
39688 if ac_fn_c_try_run "$LINENO"
39690 gl_cv_func_mbrtowc_stores_incomplete=no
39692 gl_cv_func_mbrtowc_stores_incomplete=yes
39694 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39695 conftest.$ac_objext conftest.beam conftest.$ac_ext
39703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
39704 printf "%s\n" "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
39708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
39709 printf %s "checking whether mbrtowc works on empty input... " >&6; }
39710 if test ${gl_cv_func_mbrtowc_empty_input+y}
39712 printf %s "(cached) " >&6
39716 # Guess no on AIX and glibc systems.
39717 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
39718 # Guess yes on native Windows.
39719 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
39720 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
39722 if test "$cross_compiling" = yes
39726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39727 /* end confdefs.h. */
39731 static mbstate_t mbs;
39735 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
39738 if ac_fn_c_try_run "$LINENO"
39740 gl_cv_func_mbrtowc_empty_input=yes
39742 gl_cv_func_mbrtowc_empty_input=no
39744 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39745 conftest.$ac_objext conftest.beam conftest.$ac_ext
39750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
39751 printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
39754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
39755 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
39756 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
39758 printf %s "(cached) " >&6
39761 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
39763 if test "$cross_compiling" = yes
39766 # Guess yes on native Windows.
39767 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
39771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39772 /* end confdefs.h. */
39773 #include <limits.h>
39774 #include <locale.h>
39782 char *locale = setlocale (LC_ALL, "C");
39785 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
39789 mbstate_t mbs = { 0, };
39790 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
39800 if ac_fn_c_try_run "$LINENO"
39802 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
39804 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
39806 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39807 conftest.$ac_objext conftest.beam conftest.$ac_ext
39812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
39813 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
39815 case "$gl_cv_func_mbrtowc_null_arg1" in
39818 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
39823 case "$gl_cv_func_mbrtowc_null_arg2" in
39826 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
39831 case "$gl_cv_func_mbrtowc_retval" in
39834 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
39839 case "$gl_cv_func_mbrtowc_nul_retval" in
39842 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
39847 case "$gl_cv_func_mbrtowc_stores_incomplete" in
39850 printf "%s\n" "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
39855 case "$gl_cv_func_mbrtowc_empty_input" in
39858 printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
39863 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
39866 printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
39873 if test $REPLACE_MBSTATE_T = 1; then
39875 mingw*) LIB_MBRTOWC= ;;
39879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
39880 printf %s "checking whether imported symbols can be declared weak... " >&6; }
39881 if test ${gl_cv_have_weak+y}
39883 printf %s "(cached) " >&6
39886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39887 /* end confdefs.h. */
39888 extern void xyzzy ();
39898 if ac_fn_c_try_link "$LINENO"
39900 gl_cv_have_weak=maybe
39902 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39903 conftest$ac_exeext conftest.$ac_ext
39904 if test $gl_cv_have_weak = maybe; then
39905 if test "$cross_compiling" = yes
39907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39908 /* end confdefs.h. */
39910 Extensible Linking Format
39914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39915 $EGREP "Extensible Linking Format" >/dev/null 2>&1
39917 gl_cv_have_weak="guessing yes"
39919 gl_cv_have_weak="guessing no"
39925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39926 /* end confdefs.h. */
39932 return (fputs == NULL);
39935 if ac_fn_c_try_run "$LINENO"
39937 gl_cv_have_weak=yes
39941 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39942 conftest.$ac_objext conftest.beam conftest.$ac_ext
39946 case " $LDFLAGS " in
39947 *" -static "*) gl_cv_have_weak=no ;;
39949 case "$gl_cv_have_weak" in
39952 freebsd* | dragonfly* | midnightbsd*)
39954 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
39955 cat <<EOF > conftest2.c
39956 #include <pthread.h>
39957 #pragma weak pthread_mutexattr_gettype
39960 return (pthread_mutexattr_gettype != NULL);
39963 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
39964 || gl_cv_have_weak=no
39965 rm -f conftest1.c libempty.so conftest2.c conftest
39972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
39973 printf "%s\n" "$gl_cv_have_weak" >&6; }
39974 case "$gl_cv_have_weak" in
39977 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
39982 case "$gl_cv_have_weak" in
39983 *yes) LIB_MBRTOWC= ;;
39984 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
39993 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
40002 M4_LIBOBJS="$M4_LIBOBJS mbrtowc.$ac_objext"
40004 if test $REPLACE_MBSTATE_T = 1; then
40013 M4_LIBOBJS="$M4_LIBOBJS lc-charset-dispatch.$ac_objext"
40023 M4_LIBOBJS="$M4_LIBOBJS mbtowc-lock.$ac_objext"
40030 if test -n "$GCC"; then
40031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
40032 printf %s "checking whether the -Werror option is usable... " >&6; }
40033 if test ${gl_cv_cc_vis_werror+y}
40035 printf %s "(cached) " >&6
40037 gl_save_CFLAGS="$CFLAGS"
40038 CFLAGS="$CFLAGS -Werror"
40039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40040 /* end confdefs.h. */
40050 if ac_fn_c_try_compile "$LINENO"
40052 gl_cv_cc_vis_werror=yes
40054 gl_cv_cc_vis_werror=no
40056 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40057 CFLAGS="$gl_save_CFLAGS"
40060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
40061 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
40062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
40063 printf %s "checking for simple visibility declarations... " >&6; }
40064 if test ${gl_cv_cc_visibility+y}
40066 printf %s "(cached) " >&6
40068 gl_save_CFLAGS="$CFLAGS"
40069 CFLAGS="$CFLAGS -fvisibility=hidden"
40070 if test $gl_cv_cc_vis_werror = yes; then
40071 CFLAGS="$CFLAGS -Werror"
40073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40074 /* end confdefs.h. */
40075 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
40076 extern __attribute__((__visibility__("default"))) int exportedvar;
40077 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
40078 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
40079 void dummyfunc (void);
40080 void dummyfunc (void) {}
40090 if ac_fn_c_try_compile "$LINENO"
40092 gl_cv_cc_visibility=yes
40094 gl_cv_cc_visibility=no
40096 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40097 CFLAGS="$gl_save_CFLAGS"
40100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
40101 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
40102 if test $gl_cv_cc_visibility = yes; then
40103 CFLAG_VISIBILITY="-fvisibility=hidden"
40110 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
40129 GL_M4_GNULIB_MBRTOWC=1
40135 printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
40151 if case "$host_os" in
40153 *) test $ac_cv_func_mbsinit = yes ;;
40155 && test $ac_cv_func_mbrtowc = yes; then
40160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
40161 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
40162 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
40164 printf %s "(cached) " >&6
40168 # Guess no on AIX and OSF/1.
40169 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
40170 # Guess yes otherwise.
40171 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
40173 if test $LOCALE_JA != none; then
40174 if test "$cross_compiling" = yes
40178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40179 /* end confdefs.h. */
40181 #include <locale.h>
40182 #include <string.h>
40186 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
40188 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
40192 memset (&state, '\0', sizeof (mbstate_t));
40193 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
40194 if (mbsinit (&state))
40200 if ac_fn_c_try_run "$LINENO"
40202 gl_cv_func_mbrtowc_incomplete_state=yes
40204 gl_cv_func_mbrtowc_incomplete_state=no
40206 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40207 conftest.$ac_objext conftest.beam conftest.$ac_ext
40211 if test $LOCALE_FR_UTF8 != none; then
40212 if test "$cross_compiling" = yes
40216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40217 /* end confdefs.h. */
40219 #include <locale.h>
40220 #include <string.h>
40224 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
40226 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
40230 memset (&state, '\0', sizeof (mbstate_t));
40231 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
40232 if (mbsinit (&state))
40238 if ac_fn_c_try_run "$LINENO"
40240 gl_cv_func_mbrtowc_incomplete_state=yes
40242 gl_cv_func_mbrtowc_incomplete_state=no
40244 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40245 conftest.$ac_objext conftest.beam conftest.$ac_ext
40252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
40253 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
40258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
40259 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
40260 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
40262 printf %s "(cached) " >&6
40266 # Guess no on Solaris 8.
40267 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
40268 # Guess yes otherwise.
40269 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
40271 if test $LOCALE_ZH_CN != none; then
40272 if test "$cross_compiling" = yes
40276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40277 /* end confdefs.h. */
40279 #include <locale.h>
40280 #include <stdlib.h>
40281 #include <string.h>
40285 /* This fails on Solaris 8:
40286 mbrtowc returns 2, and sets wc to 0x00F0.
40287 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
40288 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
40290 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
40294 memset (&state, '\0', sizeof (mbstate_t));
40295 if (mbrtowc (&wc, input + 3, 6, &state) != 4
40296 && mbtowc (&wc, input + 3, 6) == 4)
40302 if ac_fn_c_try_run "$LINENO"
40304 gl_cv_func_mbrtowc_sanitycheck=yes
40306 gl_cv_func_mbrtowc_sanitycheck=no
40308 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40309 conftest.$ac_objext conftest.beam conftest.$ac_ext
40315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
40316 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
40318 REPLACE_MBSTATE_T=0
40319 case "$gl_cv_func_mbrtowc_incomplete_state" in
40321 *) REPLACE_MBSTATE_T=1 ;;
40323 case "$gl_cv_func_mbrtowc_sanitycheck" in
40325 *) REPLACE_MBSTATE_T=1 ;;
40328 REPLACE_MBSTATE_T=1
40333 if test $ac_cv_func_mbsinit = no; then
40335 ac_fn_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
40338 " "$ac_c_undeclared_builtin_options" "CFLAGS"
40339 if test "x$ac_cv_have_decl_mbsinit" = xyes
40345 printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
40347 if test $ac_cv_have_decl_mbsinit = yes; then
40351 if test $REPLACE_MBSTATE_T = 1; then
40355 mingw*) REPLACE_MBSINIT=1 ;;
40360 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
40369 M4_LIBOBJS="$M4_LIBOBJS mbsinit.$ac_objext"
40384 GL_M4_GNULIB_MBSINIT=1
40390 printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
40397 if test $ac_cv_func_mbslen = yes; then
40412 GL_M4_GNULIB_MBSLEN=1
40418 printf "%s\n" "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
40431 GL_M4_GNULIB_MBSSTR=1
40437 printf "%s\n" "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
40444 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
40445 if test "x$ac_cv_func_mbtowc" = xyes
40447 printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
40451 if test $ac_cv_func_mbtowc = no; then
40459 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
40468 M4_LIBOBJS="$M4_LIBOBJS mbtowc.$ac_objext"
40483 GL_M4_GNULIB_MBTOWC=1
40489 printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
40498 if test $REPLACE_MEMCHR = 1; then
40507 M4_LIBOBJS="$M4_LIBOBJS memchr.$ac_objext"
40510 ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
40511 if test "x$ac_cv_header_bp_sym_h" = xyes
40513 printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
40528 GL_M4_GNULIB_MEMCHR=1
40534 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
40544 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
40545 if test "x$ac_cv_func_mempcpy" = xyes
40547 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
40551 if test $ac_cv_func_mempcpy = no; then
40555 if test $HAVE_MEMPCPY = 0; then
40564 M4_LIBOBJS="$M4_LIBOBJS mempcpy.$ac_objext"
40579 GL_M4_GNULIB_MEMPCPY=1
40585 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
40594 if test $ac_cv_have_decl_memrchr = no; then
40595 HAVE_DECL_MEMRCHR=0
40598 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
40599 if test "x$ac_cv_func_memrchr" = xyes
40601 printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
40606 if test $ac_cv_func_memrchr = no; then
40615 M4_LIBOBJS="$M4_LIBOBJS memrchr.$ac_objext"
40628 GL_M4_GNULIB_MEMRCHR=1
40634 printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
40643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
40644 printf %s "checking whether mkdir handles trailing slash... " >&6; }
40645 if test ${gl_cv_func_mkdir_trailing_slash_works+y}
40647 printf %s "(cached) " >&6
40649 rm -rf conftest.dir
40650 if test "$cross_compiling" = yes
40653 # Guess yes on Linux systems.
40654 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
40655 # Guess yes on glibc systems.
40656 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
40657 # Guess yes on MSVC, no on mingw.
40658 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40659 /* end confdefs.h. */
40666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40667 $EGREP "Known" >/dev/null 2>&1
40669 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
40671 gl_cv_func_mkdir_trailing_slash_works="guessing no"
40676 # If we don't know, obey --enable-cross-guesses.
40677 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
40681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40682 /* end confdefs.h. */
40684 #include <sys/types.h>
40685 #include <sys/stat.h>
40693 return mkdir ("conftest.dir/", 0700);
40698 if ac_fn_c_try_run "$LINENO"
40700 gl_cv_func_mkdir_trailing_slash_works=yes
40702 gl_cv_func_mkdir_trailing_slash_works=no
40704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40705 conftest.$ac_objext conftest.beam conftest.$ac_ext
40708 rm -rf conftest.dir
40711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
40712 printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
40713 case "$gl_cv_func_mkdir_trailing_slash_works" in
40720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
40721 printf %s "checking whether mkdir handles trailing dot... " >&6; }
40722 if test ${gl_cv_func_mkdir_trailing_dot_works+y}
40724 printf %s "(cached) " >&6
40726 rm -rf conftest.dir
40727 if test "$cross_compiling" = yes
40730 # Guess yes on glibc systems.
40731 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
40732 # Guess yes on musl systems.
40733 *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
40734 # Guess no on native Windows.
40735 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
40736 # If we don't know, obey --enable-cross-guesses.
40737 *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
40741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40742 /* end confdefs.h. */
40744 #include <sys/types.h>
40745 #include <sys/stat.h>
40753 return !mkdir ("conftest.dir/./", 0700);
40758 if ac_fn_c_try_run "$LINENO"
40760 gl_cv_func_mkdir_trailing_dot_works=yes
40762 gl_cv_func_mkdir_trailing_dot_works=no
40764 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40765 conftest.$ac_objext conftest.beam conftest.$ac_ext
40768 rm -rf conftest.dir
40772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
40773 printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
40774 case "$gl_cv_func_mkdir_trailing_dot_works" in
40779 printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
40784 if test $REPLACE_MKDIR = 1; then
40793 M4_LIBOBJS="$M4_LIBOBJS mkdir.$ac_objext"
40805 GL_M4_GNULIB_MKDIR=1
40811 printf "%s\n" "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
40817 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
40818 if test "x$ac_cv_func_mkdtemp" = xyes
40820 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
40824 if test $ac_cv_func_mkdtemp = no; then
40828 if test $HAVE_MKDTEMP = 0; then
40837 M4_LIBOBJS="$M4_LIBOBJS mkdtemp.$ac_objext"
40851 GL_M4_GNULIB_MKDTEMP=1
40857 printf "%s\n" "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
40865 if test $ac_cv_func_mkstemp = yes; then
40866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
40867 printf %s "checking for working mkstemp... " >&6; }
40868 if test ${gl_cv_func_working_mkstemp+y}
40870 printf %s "(cached) " >&6
40873 mkdir conftest.mkstemp
40874 if test "$cross_compiling" = yes
40877 # Guess yes on glibc systems.
40878 *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
40879 # Guess yes on musl systems.
40880 *-musl*) gl_cv_func_working_mkstemp="guessing yes" ;;
40881 # Guess no on native Windows.
40882 mingw*) gl_cv_func_working_mkstemp="guessing no" ;;
40883 # If we don't know, obey --enable-cross-guesses.
40884 *) gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
40888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40889 /* end confdefs.h. */
40890 $ac_includes_default
40900 off_t large = (off_t) 4294967295u;
40902 large = 2147483647;
40904 for (i = 0; i < 70; i++)
40906 char templ[] = "conftest.mkstemp/coXXXXXX";
40907 int (*mkstemp_function) (char *) = mkstemp;
40908 int fd = mkstemp_function (templ);
40914 if (lseek (fd, large, SEEK_SET) != large)
40916 if (fstat (fd, &st) < 0)
40918 else if (st.st_mode & 0077)
40929 if ac_fn_c_try_run "$LINENO"
40931 gl_cv_func_working_mkstemp=yes
40933 gl_cv_func_working_mkstemp=no
40935 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40936 conftest.$ac_objext conftest.beam conftest.$ac_ext
40939 rm -rf conftest.mkstemp
40942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
40943 printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
40944 case "$gl_cv_func_working_mkstemp" in
40954 if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
40963 M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext"
40977 GL_M4_GNULIB_MKSTEMP=1
40983 printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
40988 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
40997 M4_LIBOBJS="$M4_LIBOBJS msvc-inval.$ac_objext"
41001 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
41010 M4_LIBOBJS="$M4_LIBOBJS msvc-nothrow.$ac_objext"
41015 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
41027 if test $ac_cv_func_nl_langinfo = yes; then
41028 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
41029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
41030 printf %s "checking whether YESEXPR works... " >&6; }
41031 if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
41033 printf %s "(cached) " >&6
41035 if test "$cross_compiling" = yes
41039 # Guess no on irix systems.
41040 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
41041 # Guess yes elsewhere.
41042 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
41046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41047 /* end confdefs.h. */
41048 #include <langinfo.h>
41053 return !*nl_langinfo(YESEXPR);
41059 if ac_fn_c_try_run "$LINENO"
41061 gl_cv_func_nl_langinfo_yesexpr_works=yes
41063 gl_cv_func_nl_langinfo_yesexpr_works=no
41065 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41066 conftest.$ac_objext conftest.beam conftest.$ac_ext
41071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
41072 printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
41073 case $gl_cv_func_nl_langinfo_yesexpr_works in
41074 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
41075 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
41078 printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
41080 # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
41082 solaris*) NL_LANGINFO_MTSAFE=0 ;;
41083 *) NL_LANGINFO_MTSAFE=1 ;;
41086 printf "%s\n" "#define NL_LANGINFO_MTSAFE $NL_LANGINFO_MTSAFE" >>confdefs.h
41088 if test $HAVE_LANGINFO_CODESET = 1 \
41089 && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
41090 && test $HAVE_LANGINFO_ALTMON = 1 \
41091 && test $HAVE_LANGINFO_ERA = 1 \
41092 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
41093 && test $NL_LANGINFO_MTSAFE = 1; then
41096 REPLACE_NL_LANGINFO=1
41098 printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
41104 if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
41105 LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
41111 if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
41120 M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
41123 if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
41132 M4_LIBOBJS="$M4_LIBOBJS nl_langinfo-lock.$ac_objext"
41139 if test -n "$GCC"; then
41140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
41141 printf %s "checking whether the -Werror option is usable... " >&6; }
41142 if test ${gl_cv_cc_vis_werror+y}
41144 printf %s "(cached) " >&6
41146 gl_save_CFLAGS="$CFLAGS"
41147 CFLAGS="$CFLAGS -Werror"
41148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41149 /* end confdefs.h. */
41159 if ac_fn_c_try_compile "$LINENO"
41161 gl_cv_cc_vis_werror=yes
41163 gl_cv_cc_vis_werror=no
41165 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41166 CFLAGS="$gl_save_CFLAGS"
41169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
41170 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
41171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
41172 printf %s "checking for simple visibility declarations... " >&6; }
41173 if test ${gl_cv_cc_visibility+y}
41175 printf %s "(cached) " >&6
41177 gl_save_CFLAGS="$CFLAGS"
41178 CFLAGS="$CFLAGS -fvisibility=hidden"
41179 if test $gl_cv_cc_vis_werror = yes; then
41180 CFLAGS="$CFLAGS -Werror"
41182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41183 /* end confdefs.h. */
41184 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
41185 extern __attribute__((__visibility__("default"))) int exportedvar;
41186 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
41187 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
41188 void dummyfunc (void);
41189 void dummyfunc (void) {}
41199 if ac_fn_c_try_compile "$LINENO"
41201 gl_cv_cc_visibility=yes
41203 gl_cv_cc_visibility=no
41205 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41206 CFLAGS="$gl_save_CFLAGS"
41209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
41210 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
41211 if test $gl_cv_cc_visibility = yes; then
41212 CFLAG_VISIBILITY="-fvisibility=hidden"
41219 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
41233 GL_M4_GNULIB_NL_LANGINFO=1
41239 printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
41255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5
41256 printf %s "checking for obstacks that work with any size object... " >&6; }
41257 if test ${ac_cv_func_obstack+y}
41259 printf %s "(cached) " >&6
41261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41262 /* end confdefs.h. */
41263 #include "obstack.h"
41264 void *obstack_chunk_alloc (size_t n) { return 0; }
41265 void obstack_chunk_free (void *p) { }
41266 /* Check that an internal function returns size_t, not int. */
41267 size_t _obstack_memory_used (struct obstack *);
41272 struct obstack mem;
41273 obstack_init (&mem);
41274 obstack_free (&mem, 0);
41280 if ac_fn_c_try_link "$LINENO"
41282 ac_cv_func_obstack=yes
41284 ac_cv_func_obstack=no
41286 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41287 conftest$ac_exeext conftest.$ac_ext
41289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
41290 printf "%s\n" "$ac_cv_func_obstack" >&6; }
41291 if test "$ac_cv_func_obstack" = yes; then
41293 printf "%s\n" "#define HAVE_OBSTACK 1" >>confdefs.h
41304 M4_LIBOBJS="$M4_LIBOBJS obstack.$ac_objext"
41317 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
41322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
41323 printf %s "checking whether open recognizes a trailing slash... " >&6; }
41324 if test ${gl_cv_func_open_slash+y}
41326 printf %s "(cached) " >&6
41328 # Assume that if we have lstat, we can also check symlinks.
41329 if test $ac_cv_func_lstat = yes; then
41331 ln -s conftest.tmp conftest.lnk
41333 if test "$cross_compiling" = yes
41337 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
41338 gl_cv_func_open_slash="guessing no" ;;
41340 gl_cv_func_open_slash="guessing yes" ;;
41344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41345 /* end confdefs.h. */
41349 # include <unistd.h>
41359 if (open ("conftest.lnk/", O_RDONLY) != -1)
41362 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
41367 if ac_fn_c_try_run "$LINENO"
41369 gl_cv_func_open_slash=yes
41371 gl_cv_func_open_slash=no
41373 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41374 conftest.$ac_objext conftest.beam conftest.$ac_ext
41377 rm -f conftest.sl conftest.tmp conftest.lnk
41380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
41381 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
41382 case "$gl_cv_func_open_slash" in
41385 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
41390 case "$gl_cv_func_open_slash" in
41398 if test $REPLACE_OPEN = 0; then
41402 if test $ac_cv_func_fchdir = no; then
41406 if test $HAVE_FCHDIR = 0; then
41413 if test $REPLACE_OPEN = 1; then
41422 M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
41438 GL_M4_GNULIB_OPEN=1
41444 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
41454 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
41458 # Solaris 10 lacks O_CLOEXEC.
41459 # Solaris 9 has *at functions, but uniformly mishandles trailing
41460 # slash in all of them.
41468 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
41477 M4_LIBOBJS="$M4_LIBOBJS openat.$ac_objext"
41486 printf "%s\n" "#define GNULIB_OPENAT 1" >>confdefs.h
41497 GL_M4_GNULIB_OPENAT=1
41503 printf "%s\n" "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
41510 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
41511 if test "x$ac_cv_func_opendir" = xyes
41513 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
41517 if test $ac_cv_func_opendir = no; then
41524 if test $ac_cv_func_fchdir = no; then
41528 if test $HAVE_FCHDIR = 0; then
41529 if test $HAVE_OPENDIR = 1; then
41534 case $host_os,$HAVE_OPENDIR in
41536 REPLACE_OPENDIR=1;;
41539 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
41548 M4_LIBOBJS="$M4_LIBOBJS opendir.$ac_objext"
41560 GL_M4_GNULIB_OPENDIR=1
41566 printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
41577 if test $ac_cv_func_pipe != yes; then
41581 if test $HAVE_PIPE = 0; then
41590 M4_LIBOBJS="$M4_LIBOBJS pipe.$ac_objext"
41602 GL_M4_GNULIB_PIPE=1
41608 printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
41618 if test $ac_cv_func_pipe2 != yes; then
41631 GL_M4_GNULIB_PIPE2=1
41637 printf "%s\n" "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
41643 printf "%s\n" "#define GNULIB_PIPE2_SAFER 1" >>confdefs.h
41649 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
41658 M4_LIBOBJS="$M4_LIBOBJS spawn.$ac_objext"
41670 GL_M4_GNULIB_POSIX_SPAWN=1
41676 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN 1" >>confdefs.h
41683 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
41692 M4_LIBOBJS="$M4_LIBOBJS spawni.$ac_objext"
41695 ac_fn_c_check_header_compile "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
41696 if test "x$ac_cv_header_paths_h" = xyes
41698 printf "%s\n" "#define HAVE_PATHS_H 1" >>confdefs.h
41702 ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr"
41703 if test "x$ac_cv_func_confstr" = xyes
41705 printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h
41708 ac_fn_c_check_func "$LINENO" "sched_setparam" "ac_cv_func_sched_setparam"
41709 if test "x$ac_cv_func_sched_setparam" = xyes
41711 printf "%s\n" "#define HAVE_SCHED_SETPARAM 1" >>confdefs.h
41714 ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
41715 if test "x$ac_cv_func_sched_setscheduler" = xyes
41717 printf "%s\n" "#define HAVE_SCHED_SETSCHEDULER 1" >>confdefs.h
41720 ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid"
41721 if test "x$ac_cv_func_setegid" = xyes
41723 printf "%s\n" "#define HAVE_SETEGID 1" >>confdefs.h
41726 ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid"
41727 if test "x$ac_cv_func_seteuid" = xyes
41729 printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h
41732 ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork"
41733 if test "x$ac_cv_func_vfork" = xyes
41735 printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h
41748 if test $ac_cv_func_posix_spawn_file_actions_addchdir = yes; then
41749 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1
41751 HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0
41754 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR = 1; then
41763 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addchdir.$ac_objext"
41775 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1
41781 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR 1" >>confdefs.h
41791 if test $REPLACE_POSIX_SPAWN = 1; then
41792 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
41794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
41795 printf %s "checking whether posix_spawn_file_actions_addclose works... " >&6; }
41796 if test ${gl_cv_func_posix_spawn_file_actions_addclose_works+y}
41798 printf %s "(cached) " >&6
41800 if test "$cross_compiling" = yes
41802 # Guess no on musl libc and Solaris, yes otherwise.
41804 *-musl*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
41805 solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
41806 # Guess no on native Windows.
41807 mingw*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
41808 *) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes" ;;
41812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41813 /* end confdefs.h. */
41818 posix_spawn_file_actions_t actions;
41819 if (posix_spawn_file_actions_init (&actions) != 0)
41821 if (posix_spawn_file_actions_addclose (&actions, -5) == 0)
41826 if ac_fn_c_try_run "$LINENO"
41828 gl_cv_func_posix_spawn_file_actions_addclose_works=yes
41830 gl_cv_func_posix_spawn_file_actions_addclose_works=no
41832 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41833 conftest.$ac_objext conftest.beam conftest.$ac_ext
41838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5
41839 printf "%s\n" "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
41840 case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
41842 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
41846 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
41855 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addclose.$ac_objext"
41867 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
41873 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
41883 if test $REPLACE_POSIX_SPAWN = 1; then
41884 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
41886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
41887 printf %s "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
41888 if test ${gl_cv_func_posix_spawn_file_actions_adddup2_works+y}
41890 printf %s "(cached) " >&6
41892 if test "$cross_compiling" = yes
41894 # Guess no on musl libc and Solaris, yes otherwise.
41896 *-musl*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
41897 solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
41898 # Guess no on native Windows.
41899 mingw*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no" ;;
41900 *) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
41904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41905 /* end confdefs.h. */
41910 posix_spawn_file_actions_t actions;
41911 if (posix_spawn_file_actions_init (&actions) != 0)
41913 if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
41918 if ac_fn_c_try_run "$LINENO"
41920 gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
41922 gl_cv_func_posix_spawn_file_actions_adddup2_works=no
41924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41925 conftest.$ac_objext conftest.beam conftest.$ac_ext
41930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5
41931 printf "%s\n" "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
41932 case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
41934 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
41938 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
41947 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_adddup2.$ac_objext"
41959 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
41965 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
41975 if test $REPLACE_POSIX_SPAWN = 1; then
41976 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
41978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
41979 printf %s "checking whether posix_spawn_file_actions_addopen works... " >&6; }
41980 if test ${gl_cv_func_posix_spawn_file_actions_addopen_works+y}
41982 printf %s "(cached) " >&6
41984 if test "$cross_compiling" = yes
41986 # Guess no on musl libc and Solaris, yes otherwise.
41988 *-musl*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
41989 solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
41990 # Guess no on native Windows.
41991 mingw*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no" ;;
41992 *) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
41996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41997 /* end confdefs.h. */
42003 posix_spawn_file_actions_t actions;
42004 if (posix_spawn_file_actions_init (&actions) != 0)
42006 if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
42012 if ac_fn_c_try_run "$LINENO"
42014 gl_cv_func_posix_spawn_file_actions_addopen_works=yes
42016 gl_cv_func_posix_spawn_file_actions_addopen_works=no
42018 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42019 conftest.$ac_objext conftest.beam conftest.$ac_ext
42024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5
42025 printf "%s\n" "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
42026 case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
42028 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
42032 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
42041 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addopen.$ac_objext"
42053 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
42059 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
42066 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42075 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_destroy.$ac_objext"
42087 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
42093 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
42100 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42109 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_init.$ac_objext"
42121 GL_M4_GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
42127 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
42134 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42143 M4_LIBOBJS="$M4_LIBOBJS spawnattr_destroy.$ac_objext"
42155 GL_M4_GNULIB_POSIX_SPAWNATTR_DESTROY=1
42161 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
42168 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42177 M4_LIBOBJS="$M4_LIBOBJS spawnattr_init.$ac_objext"
42189 GL_M4_GNULIB_POSIX_SPAWNATTR_INIT=1
42195 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
42202 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42211 M4_LIBOBJS="$M4_LIBOBJS spawnattr_setflags.$ac_objext"
42223 GL_M4_GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
42229 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
42236 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42245 M4_LIBOBJS="$M4_LIBOBJS spawnattr_setpgroup.$ac_objext"
42257 GL_M4_GNULIB_POSIX_SPAWNATTR_SETPGROUP=1
42263 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_SETPGROUP 1" >>confdefs.h
42270 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42279 M4_LIBOBJS="$M4_LIBOBJS spawnattr_setsigmask.$ac_objext"
42291 GL_M4_GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
42297 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
42304 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
42313 M4_LIBOBJS="$M4_LIBOBJS spawnp.$ac_objext"
42325 GL_M4_GNULIB_POSIX_SPAWNP=1
42331 printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
42337 if test $gl_cv_func_frexp_no_libm = yes; then
42341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
42342 printf %s "checking whether frexp works... " >&6; }
42343 if test ${gl_cv_func_frexp_works+y}
42345 printf %s "(cached) " >&6
42348 if test "$cross_compiling" = yes
42351 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
42352 mingw*) # Guess yes with MSVC, no with mingw.
42353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42354 /* end confdefs.h. */
42361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42362 $EGREP "Good" >/dev/null 2>&1
42364 gl_cv_func_frexp_works="guessing yes"
42366 gl_cv_func_frexp_works="guessing no"
42371 *) gl_cv_func_frexp_works="guessing yes" ;;
42375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42376 /* end confdefs.h. */
42380 #include <string.h>
42381 #if HAVE_DECL_ALARM
42382 # include <signal.h>
42383 # include <unistd.h>
42385 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
42386 ICC 10.0 has a bug when optimizing the expression -zero.
42387 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
42388 to PowerPC on Mac OS X 10.5. */
42389 #if defined __hpux || defined __sgi || defined __ICC
42391 compute_minus_zero (void)
42393 return -DBL_MIN * DBL_MIN;
42395 # define minus_zero compute_minus_zero ()
42397 double minus_zero = -0.0;
42405 #if HAVE_DECL_ALARM
42406 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
42407 number. Let the test fail in this case. */
42408 signal (SIGALRM, SIG_DFL);
42411 /* Test on denormalized numbers. */
42412 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
42417 double y = frexp (x, &exp);
42418 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
42419 On NetBSD: y = 0.75. Correct: y = 0.5. */
42423 /* Test on infinite numbers. */
42427 double y = frexp (x, &exp);
42431 /* Test on negative zero. */
42435 double y = frexp (x, &exp);
42436 if (memcmp (&y, &x, sizeof x))
42442 if ac_fn_c_try_run "$LINENO"
42444 gl_cv_func_frexp_works=yes
42446 gl_cv_func_frexp_works=no
42448 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42449 conftest.$ac_objext conftest.beam conftest.$ac_ext
42454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
42455 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
42457 case "$gl_cv_func_frexp_works" in
42460 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
42466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
42467 printf %s "checking whether ldexp can be used without linking with libm... " >&6; }
42468 if test ${gl_cv_func_ldexp_no_libm+y}
42470 printf %s "(cached) " >&6
42473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42474 /* end confdefs.h. */
42481 return ldexp (x, y) < 1;
42486 if ac_fn_c_try_link "$LINENO"
42488 gl_cv_func_ldexp_no_libm=yes
42490 gl_cv_func_ldexp_no_libm=no
42492 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42493 conftest$ac_exeext conftest.$ac_ext
42496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
42497 printf "%s\n" "$gl_cv_func_ldexp_no_libm" >&6; }
42498 if test $gl_cv_func_ldexp_no_libm = yes; then
42500 printf "%s\n" "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
42509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
42510 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
42511 if test ${gl_cv_func_frexpl_no_libm+y}
42513 printf %s "(cached) " >&6
42516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42517 /* end confdefs.h. */
42523 int e; return frexpl (x, &e) > 0;
42528 if ac_fn_c_try_link "$LINENO"
42530 gl_cv_func_frexpl_no_libm=yes
42532 gl_cv_func_frexpl_no_libm=no
42534 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42535 conftest$ac_exeext conftest.$ac_ext
42538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
42539 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
42541 if test $gl_cv_func_frexpl_no_libm = yes; then
42544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
42545 printf %s "checking whether frexpl works... " >&6; }
42546 if test ${gl_cv_func_frexpl_works+y}
42548 printf %s "(cached) " >&6
42551 if test "$cross_compiling" = yes
42555 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
42556 gl_cv_func_frexpl_works="guessing no";;
42557 *) gl_cv_func_frexpl_works="guessing yes";;
42561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42562 /* end confdefs.h. */
42566 /* Override the values of <float.h>, like done in float.in.h. */
42567 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
42568 # undef LDBL_MIN_EXP
42569 # define LDBL_MIN_EXP (-16381)
42571 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
42572 # undef LDBL_MIN_EXP
42573 # define LDBL_MIN_EXP (-16381)
42575 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
42576 # undef LDBL_MIN_EXP
42577 # define LDBL_MIN_EXP DBL_MIN_EXP
42579 #if defined __sgi && (LDBL_MANT_DIG >= 106)
42580 # if defined __GNUC__
42581 # undef LDBL_MIN_EXP
42582 # define LDBL_MIN_EXP DBL_MIN_EXP
42589 long double frexpl (long double, int *);
42590 long double zero = 0.0L;
42594 volatile long double x;
42595 /* Test on finite numbers that fails on AIX 5.1. */
42603 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
42604 function returns an invalid (incorrectly normalized) value: it returns
42605 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
42606 but the correct result is
42607 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
42611 long double y = frexpl (x, &exp);
42612 if (!(exp == 1 && y == 0.505L))
42615 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
42616 LDBL_MAX_EXP = 16384.
42617 In the loop end test, we test x against Infinity, rather than comparing
42618 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
42621 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
42632 /* Test on denormalized numbers. */
42635 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
42640 long double y = frexpl (x, &exp);
42641 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
42642 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
42643 if (exp != LDBL_MIN_EXP - 1)
42647 /* Test on infinite numbers. */
42648 /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */
42652 long double y = frexpl (x, &exp);
42659 if ac_fn_c_try_run "$LINENO"
42661 gl_cv_func_frexpl_works=yes
42663 gl_cv_func_frexpl_works=no
42665 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42666 conftest.$ac_objext conftest.beam conftest.$ac_ext
42671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
42672 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
42674 case "$gl_cv_func_frexpl_works" in
42675 *yes) gl_func_frexpl_no_libm=yes ;;
42676 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
42679 gl_func_frexpl_no_libm=no
42682 if test $gl_func_frexpl_no_libm = yes; then
42684 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
42686 ac_fn_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
42687 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42688 if test "x$ac_cv_have_decl_frexpl" = xyes
42697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
42698 printf %s "checking whether ldexpl() can be used without linking with libm... " >&6; }
42699 if test ${gl_cv_func_ldexpl_no_libm+y}
42701 printf %s "(cached) " >&6
42704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42705 /* end confdefs.h. */
42711 return ldexpl (x, -1) > 0;
42716 if ac_fn_c_try_link "$LINENO"
42718 gl_cv_func_ldexpl_no_libm=yes
42720 gl_cv_func_ldexpl_no_libm=no
42722 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42723 conftest$ac_exeext conftest.$ac_ext
42726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
42727 printf "%s\n" "$gl_cv_func_ldexpl_no_libm" >&6; }
42729 if test $gl_cv_func_ldexpl_no_libm = yes; then
42732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
42733 printf %s "checking whether ldexpl works... " >&6; }
42734 if test ${gl_cv_func_ldexpl_works+y}
42736 printf %s "(cached) " >&6
42739 if test "$cross_compiling" = yes
42743 aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;;
42744 # Guess yes on native Windows.
42745 mingw*) gl_cv_func_ldexpl_works="guessing yes" ;;
42746 *) gl_cv_func_ldexpl_works="guessing yes" ;;
42750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42751 /* end confdefs.h. */
42758 long double ldexpl (long double, int);
42763 volatile long double x = 1.0;
42764 volatile long double y = ldexpl (x, -1);
42769 volatile long double x = 1.73205L;
42770 volatile long double y = ldexpl (x, 0);
42777 if ac_fn_c_try_run "$LINENO"
42779 gl_cv_func_ldexpl_works=yes
42781 gl_cv_func_ldexpl_works=no
42783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42784 conftest.$ac_objext conftest.beam conftest.$ac_ext
42789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
42790 printf "%s\n" "$gl_cv_func_ldexpl_works" >&6; }
42792 case "$gl_cv_func_ldexpl_works" in
42795 printf "%s\n" "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
42797 ac_fn_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
42798 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42799 if test "x$ac_cv_have_decl_ldexpl" = xyes
42810 ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
42811 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42812 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
42818 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
42820 ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
42821 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42822 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
42828 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
42832 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
42836 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
42845 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
42846 if test "x$ac_cv_func_raise" = xyes
42848 printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
42852 if test $ac_cv_func_raise = no; then
42857 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
42865 HAVE_POSIX_SIGNALBLOCKING=0
42866 if test "$gl_cv_type_sigset_t" = yes; then
42867 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
42868 if test "x$ac_cv_func_sigprocmask" = xyes
42870 HAVE_POSIX_SIGNALBLOCKING=1
42875 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
42880 if test $gl_cv_header_signal_h_SIGPIPE != yes; then
42888 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
42897 M4_LIBOBJS="$M4_LIBOBJS raise.$ac_objext"
42910 GL_M4_GNULIB_RAISE=1
42916 printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
42924 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
42925 if test "x$ac_cv_func_rawmemchr" = xyes
42927 printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
42931 if test $ac_cv_func_rawmemchr = no; then
42935 if test $HAVE_RAWMEMCHR = 0; then
42944 M4_LIBOBJS="$M4_LIBOBJS rawmemchr.$ac_objext"
42957 GL_M4_GNULIB_RAWMEMCHR=1
42963 printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
42970 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
42971 if test "x$ac_cv_func_readdir" = xyes
42973 printf "%s\n" "#define HAVE_READDIR 1" >>confdefs.h
42977 if test $ac_cv_func_readdir = no; then
42981 if test $HAVE_READDIR = 0; then
42990 M4_LIBOBJS="$M4_LIBOBJS readdir.$ac_objext"
43002 GL_M4_GNULIB_READDIR=1
43008 printf "%s\n" "#define GNULIB_TEST_READDIR 1" >>confdefs.h
43015 if test $ac_cv_func_readlink = no; then
43018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
43019 printf %s "checking whether readlink signature is correct... " >&6; }
43020 if test ${gl_cv_decl_readlink_works+y}
43022 printf %s "(cached) " >&6
43024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43025 /* end confdefs.h. */
43026 #include <unistd.h>
43027 /* Cause compilation failure if original declaration has wrong type. */
43028 ssize_t readlink (const char *, char *, size_t);
43037 if ac_fn_c_try_compile "$LINENO"
43039 gl_cv_decl_readlink_works=yes
43041 gl_cv_decl_readlink_works=no
43043 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
43045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
43046 printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
43047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
43048 printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
43049 if test ${gl_cv_func_readlink_trailing_slash+y}
43051 printf %s "(cached) " >&6
43053 # We have readlink, so assume ln -s works.
43054 ln -s conftest.no-such conftest.link
43055 ln -s conftest.link conftest.lnk2
43056 if test "$cross_compiling" = yes
43059 # Guess yes on Linux or glibc systems.
43060 linux-* | linux | *-gnu* | gnu*)
43061 gl_cv_func_readlink_trailing_slash="guessing yes" ;;
43062 # Guess no on AIX or HP-UX.
43064 gl_cv_func_readlink_trailing_slash="guessing no" ;;
43065 # If we don't know, obey --enable-cross-guesses.
43067 gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
43071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43072 /* end confdefs.h. */
43073 #include <unistd.h>
43079 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
43084 if ac_fn_c_try_run "$LINENO"
43086 gl_cv_func_readlink_trailing_slash=yes
43088 gl_cv_func_readlink_trailing_slash=no
43090 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43091 conftest.$ac_objext conftest.beam conftest.$ac_ext
43094 rm -f conftest.link conftest.lnk2
43096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
43097 printf "%s\n" "$gl_cv_func_readlink_trailing_slash" >&6; }
43098 case "$gl_cv_func_readlink_trailing_slash" in
43100 if test "$gl_cv_decl_readlink_works" != yes; then
43106 printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
43112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
43113 printf %s "checking whether readlink truncates results correctly... " >&6; }
43114 if test ${gl_cv_func_readlink_truncate+y}
43116 printf %s "(cached) " >&6
43118 # We have readlink, so assume ln -s works.
43119 ln -s ab conftest.link
43120 if test "$cross_compiling" = yes
43123 # Guess yes on Linux or glibc systems.
43124 linux-* | linux | *-gnu* | gnu*)
43125 gl_cv_func_readlink_truncate="guessing yes" ;;
43126 # Guess no on AIX or HP-UX.
43128 gl_cv_func_readlink_truncate="guessing no" ;;
43129 # If we don't know, obey --enable-cross-guesses.
43131 gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
43135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43136 /* end confdefs.h. */
43137 #include <unistd.h>
43143 return readlink ("conftest.link", &c, 1) != 1;
43148 if ac_fn_c_try_run "$LINENO"
43150 gl_cv_func_readlink_truncate=yes
43152 gl_cv_func_readlink_truncate=no
43154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43155 conftest.$ac_objext conftest.beam conftest.$ac_ext
43158 rm -f conftest.link conftest.lnk2
43160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
43161 printf "%s\n" "$gl_cv_func_readlink_truncate" >&6; }
43162 case $gl_cv_func_readlink_truncate in
43164 if test "$gl_cv_decl_readlink_works" != yes; then
43170 printf "%s\n" "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
43177 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
43186 M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
43201 GL_M4_GNULIB_READLINK=1
43207 printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
43214 if test $REPLACE_REALLOC = 0; then
43216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realloc (0, 0) returns nonnull" >&5
43217 printf %s "checking whether realloc (0, 0) returns nonnull... " >&6; }
43218 if test ${ac_cv_func_realloc_0_nonnull+y}
43220 printf %s "(cached) " >&6
43222 if test "$cross_compiling" = yes
43225 # Guess yes on platforms where we know the result.
43226 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
43227 | gnu* | *-musl* | midnightbsd* \
43228 | hpux* | solaris* | cygwin* | mingw* | msys* )
43229 ac_cv_func_realloc_0_nonnull="guessing yes" ;;
43230 # If we don't know, obey --enable-cross-guesses.
43231 *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
43235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43236 /* end confdefs.h. */
43237 #include <stdlib.h>
43242 void *p = realloc (0, 0);
43251 if ac_fn_c_try_run "$LINENO"
43253 ac_cv_func_realloc_0_nonnull=yes
43255 ac_cv_func_realloc_0_nonnull=no
43257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43258 conftest.$ac_objext conftest.beam conftest.$ac_ext
43263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
43264 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
43265 case $ac_cv_func_realloc_0_nonnull in #(
43269 REPLACE_REALLOC=1 ;;
43274 if test $REPLACE_REALLOC = 1; then
43283 M4_LIBOBJS="$M4_LIBOBJS realloc.$ac_objext"
43289 if test $REPLACE_MALLOC = 1; then
43293 if test $REPLACE_REALLOC = 1; then
43302 M4_LIBOBJS="$M4_LIBOBJS realloc.$ac_objext"
43314 GL_M4_GNULIB_REALLOC_POSIX=1
43320 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
43329 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
43330 if test "x$ac_cv_func_reallocarray" = xyes
43332 printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
43336 if test "$ac_cv_func_reallocarray" = no; then
43337 HAVE_REALLOCARRAY=0
43338 elif test "$gl_cv_malloc_ptrdiff" = no; then
43339 REPLACE_REALLOCARRAY=1
43342 if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then
43351 M4_LIBOBJS="$M4_LIBOBJS reallocarray.$ac_objext"
43357 printf "%s\n" "#define GNULIB_REALLOCARRAY 1" >>confdefs.h
43369 GL_M4_GNULIB_REALLOCARRAY=1
43375 printf "%s\n" "#define GNULIB_TEST_REALLOCARRAY 1" >>confdefs.h
43381 # Check whether --with-included-regex was given.
43382 if test ${with_included_regex+y}
43384 withval=$with_included_regex;
43388 case $with_included_regex in #(
43389 yes|no) ac_use_included_regex=$with_included_regex
43392 # If the system regex support is good enough that it passes the
43393 # following run test, then default to *not* using the included regex.c.
43394 # If cross compiling, assume the test would fail and use the included
43398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
43399 printf %s "checking for working re_compile_pattern... " >&6; }
43400 if test ${gl_cv_func_re_compile_pattern_working+y}
43402 printf %s "(cached) " >&6
43404 if test "$cross_compiling" = yes
43407 # Guess no on native Windows.
43408 mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
43409 # Otherwise obey --enable-cross-guesses.
43410 *) gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
43414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43415 /* end confdefs.h. */
43418 #include <locale.h>
43419 #include <limits.h>
43420 #include <string.h>
43422 #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
43423 # include <signal.h>
43424 # include <unistd.h>
43428 # include <malloc.h>
43431 #ifdef M_CHECK_ACTION
43432 /* Exit with distinguishable exit code. */
43433 static void sigabrt_no_core (int sig) { raise (SIGTERM); }
43440 static struct re_pattern_buffer regex;
43441 unsigned char folded_chars[UCHAR_MAX + 1];
43444 struct re_registers regs;
43446 /* Some builds of glibc go into an infinite loop on this
43447 test. Use alarm to force death, and mallopt to avoid
43448 malloc recursion in diagnosing the corrupted heap. */
43449 #if HAVE_DECL_ALARM
43450 signal (SIGALRM, SIG_DFL);
43453 #ifdef M_CHECK_ACTION
43454 signal (SIGABRT, sigabrt_no_core);
43455 mallopt (M_CHECK_ACTION, 2);
43458 if (setlocale (LC_ALL, "en_US.UTF-8"))
43461 /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
43462 This test needs valgrind to catch the bug on Debian
43463 GNU/Linux 3.1 x86, but it might catch the bug better
43464 on other platforms and it shouldn't hurt to try the
43466 static char const pat[] = "insert into";
43467 static char const data[] =
43468 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
43469 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
43471 memset (®ex, 0, sizeof regex);
43472 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
43477 if (re_search (®ex, data, sizeof data - 1,
43478 0, sizeof data - 1, ®s)
43486 /* This test is from glibc bug 15078.
43487 The test case is from Andreas Schwab in
43488 <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
43490 static char const pat[] = "[^x]x";
43491 static char const data[] =
43492 /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
43503 memset (®ex, 0, sizeof regex);
43504 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
43509 i = re_search (®ex, data, sizeof data - 1,
43510 0, sizeof data - 1, 0);
43511 if (i != 0 && i != 21)
43517 if (! setlocale (LC_ALL, "C"))
43521 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
43522 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
43523 memset (®ex, 0, sizeof regex);
43524 s = re_compile_pattern ("a[^x]b", 6, ®ex);
43529 /* This should fail, but succeeds for glibc-2.5. */
43530 if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1)
43535 /* This regular expression is from Spencer ere test number 75
43537 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
43538 memset (®ex, 0, sizeof regex);
43539 for (i = 0; i <= UCHAR_MAX; i++)
43540 folded_chars[i] = i;
43541 regex.translate = folded_chars;
43542 s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex);
43543 /* This should fail with _Invalid character class name_ error. */
43550 /* Ensure that [b-a] is diagnosed as invalid, when
43551 using RE_NO_EMPTY_RANGES. */
43552 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
43553 memset (®ex, 0, sizeof regex);
43554 s = re_compile_pattern ("a[b-a]", 6, ®ex);
43561 /* This should succeed, but does not for glibc-2.1.3. */
43562 memset (®ex, 0, sizeof regex);
43563 s = re_compile_pattern ("{1", 2, ®ex);
43569 /* The following example is derived from a problem report
43570 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
43571 memset (®ex, 0, sizeof regex);
43572 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
43577 /* This should match, but does not for glibc-2.2.1. */
43578 if (re_match (®ex, "an", 2, 0, ®s) != 2)
43588 memset (®ex, 0, sizeof regex);
43589 s = re_compile_pattern ("x", 1, ®ex);
43594 /* glibc-2.2.93 does not work with a negative RANGE argument. */
43595 if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
43605 /* The version of regex.c in older versions of gnulib
43606 ignored RE_ICASE. Detect that problem too. */
43607 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
43608 memset (®ex, 0, sizeof regex);
43609 s = re_compile_pattern ("x", 1, ®ex);
43614 if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0)
43624 /* Catch a bug reported by Vin Shelton in
43625 https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
43627 re_set_syntax (RE_SYNTAX_POSIX_BASIC
43628 & ~RE_CONTEXT_INVALID_DUP
43629 & ~RE_NO_EMPTY_RANGES);
43630 memset (®ex, 0, sizeof regex);
43631 s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex);
43637 /* REG_STARTEND was added to glibc on 2004-01-15.
43638 Reject older versions. */
43639 if (! REG_STARTEND)
43642 /* Matching with the compiled form of this regexp would provoke
43643 an assertion failure prior to glibc-2.28:
43644 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
43645 With glibc-2.28, compilation fails and reports the invalid
43647 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
43648 memset (®ex, 0, sizeof regex);
43649 s = re_compile_pattern ("0|()0|\\1|0", 10, ®ex);
43654 if (strcmp (s, "Invalid back reference"))
43660 /* It would be nice to reject hosts whose regoff_t values are too
43661 narrow (including glibc on hosts with 64-bit ptrdiff_t and
43662 32-bit int), but we should wait until glibc implements this
43663 feature. Otherwise, support for equivalence classes and
43664 multibyte collation symbols would always be broken except
43665 when compiling --without-included-regex. */
43666 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
43667 || sizeof (regoff_t) < sizeof (ssize_t))
43677 if ac_fn_c_try_run "$LINENO"
43679 gl_cv_func_re_compile_pattern_working=yes
43681 gl_cv_func_re_compile_pattern_working=no
43683 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43684 conftest.$ac_objext conftest.beam conftest.$ac_ext
43689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
43690 printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
43691 case "$gl_cv_func_re_compile_pattern_working" in #(
43692 *yes) ac_use_included_regex=no;; #(
43693 *no) ac_use_included_regex=yes;;
43696 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
43700 if test $ac_use_included_regex = yes; then
43702 printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
43705 printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
43708 printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
43711 printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
43714 printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
43717 printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
43720 printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
43723 printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
43726 printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
43729 printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
43732 printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
43735 printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
43738 printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
43741 printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
43744 printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
43747 printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
43750 printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
43754 if test $ac_use_included_regex = yes; then
43763 M4_LIBOBJS="$M4_LIBOBJS regex.$ac_objext"
43771 ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
43772 if test "x$ac_cv_header_libintl_h" = xyes
43774 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
43779 ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
43780 " "$ac_c_undeclared_builtin_options" "CFLAGS"
43781 if test "x$ac_cv_have_decl_isblank" = xyes
43787 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
43796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
43797 printf %s "checking whether rename honors trailing slash on destination... " >&6; }
43798 if test ${gl_cv_func_rename_slash_dst_works+y}
43800 printf %s "(cached) " >&6
43802 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
43803 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
43804 as_fn_error $? "cannot create temporary files" "$LINENO" 5
43805 # Assume that if we have lstat, we can also check symlinks.
43806 if test $ac_cv_func_lstat = yes; then
43807 ln -s conftest.f conftest.lnk
43809 if test "$cross_compiling" = yes
43812 # Guess yes on Linux systems.
43813 linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
43814 # Guess yes on glibc systems.
43815 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
43816 # Guess no on native Windows.
43817 mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
43818 # If we don't know, obey --enable-cross-guesses.
43819 *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
43823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43824 /* end confdefs.h. */
43826 # include <stdio.h>
43827 # include <stdlib.h>
43833 if (rename ("conftest.f1", "conftest.f2/") == 0)
43835 if (rename ("conftest.d1", "conftest.d2/") != 0)
43838 if (rename ("conftest.f", "conftest.lnk/") == 0)
43847 if ac_fn_c_try_run "$LINENO"
43849 gl_cv_func_rename_slash_dst_works=yes
43851 gl_cv_func_rename_slash_dst_works=no
43853 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43854 conftest.$ac_objext conftest.beam conftest.$ac_ext
43857 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
43860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
43861 printf "%s\n" "$gl_cv_func_rename_slash_dst_works" >&6; }
43862 case "$gl_cv_func_rename_slash_dst_works" in
43867 printf "%s\n" "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
43872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
43873 printf %s "checking whether rename honors trailing slash on source... " >&6; }
43874 if test ${gl_cv_func_rename_slash_src_works+y}
43876 printf %s "(cached) " >&6
43878 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
43879 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
43880 as_fn_error $? "cannot create temporary files" "$LINENO" 5
43881 # Assume that if we have lstat, we can also check symlinks.
43882 if test $ac_cv_func_lstat = yes; then
43883 ln -s conftest.f conftest.lnk
43885 if test "$cross_compiling" = yes
43888 # Guess yes on Linux systems.
43889 linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
43890 # Guess yes on glibc systems.
43891 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
43892 # Guess yes on native Windows.
43893 mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
43894 # If we don't know, obey --enable-cross-guesses.
43895 *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
43899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43900 /* end confdefs.h. */
43902 # include <stdio.h>
43903 # include <stdlib.h>
43909 if (rename ("conftest.f1/", "conftest.d3") == 0)
43911 if (rename ("conftest.d1/", "conftest.d2") != 0)
43914 if (rename ("conftest.lnk/", "conftest.f") == 0)
43923 if ac_fn_c_try_run "$LINENO"
43925 gl_cv_func_rename_slash_src_works=yes
43927 gl_cv_func_rename_slash_src_works=no
43929 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43930 conftest.$ac_objext conftest.beam conftest.$ac_ext
43933 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
43936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
43937 printf "%s\n" "$gl_cv_func_rename_slash_src_works" >&6; }
43938 case "$gl_cv_func_rename_slash_src_works" in
43943 printf "%s\n" "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
43949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
43950 printf %s "checking whether rename manages hard links correctly... " >&6; }
43951 if test ${gl_cv_func_rename_link_works+y}
43953 printf %s "(cached) " >&6
43955 if test $ac_cv_func_link = yes; then
43956 if test $cross_compiling != yes; then
43957 rm -rf conftest.f conftest.f1 conftest.f2
43958 if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
43959 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
43960 if test "$cross_compiling" = yes
43965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43966 /* end confdefs.h. */
43968 # include <errno.h>
43969 # include <stdio.h>
43970 # include <stdlib.h>
43971 # include <unistd.h>
43980 if (rename ("conftest.f", "conftest.f1"))
43982 if (unlink ("conftest.f1"))
43985 /* Allow either the POSIX-required behavior, where the
43986 previous rename kept conftest.f, or the (better) NetBSD
43987 behavior, where it removed conftest.f. */
43988 if (rename ("conftest.f", "conftest.f") != 0
43989 && errno != ENOENT)
43992 if (rename ("conftest.f1", "conftest.f1") == 0)
43994 if (rename ("conftest.f2", "conftest.f2") != 0)
44002 if ac_fn_c_try_run "$LINENO"
44004 gl_cv_func_rename_link_works=yes
44006 gl_cv_func_rename_link_works=no
44008 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44009 conftest.$ac_objext conftest.beam conftest.$ac_ext
44013 gl_cv_func_rename_link_works="guessing no"
44015 rm -rf conftest.f conftest.f1 conftest.f2
44018 # Guess yes on Linux systems.
44019 linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
44020 # Guess yes on glibc systems.
44021 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
44022 # Guess yes on native Windows.
44023 mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
44024 # If we don't know, obey --enable-cross-guesses.
44025 *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
44029 gl_cv_func_rename_link_works=yes
44033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
44034 printf "%s\n" "$gl_cv_func_rename_link_works" >&6; }
44035 case "$gl_cv_func_rename_link_works" in
44040 printf "%s\n" "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
44045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
44046 printf %s "checking whether rename manages existing destinations correctly... " >&6; }
44047 if test ${gl_cv_func_rename_dest_works+y}
44049 printf %s "(cached) " >&6
44051 rm -rf conftest.f conftest.d1 conftest.d2
44052 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
44053 as_fn_error $? "cannot create temporary files" "$LINENO" 5
44054 if test "$cross_compiling" = yes
44057 # Guess yes on Linux systems.
44058 linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
44059 # Guess yes on glibc systems.
44060 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
44061 # Guess no on native Windows.
44062 mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
44063 # If we don't know, obey --enable-cross-guesses.
44064 *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
44068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44069 /* end confdefs.h. */
44071 # include <stdio.h>
44072 # include <stdlib.h>
44078 if (rename ("conftest.d1", "conftest.d2") != 0)
44080 if (rename ("conftest.d2", "conftest.f") == 0)
44088 if ac_fn_c_try_run "$LINENO"
44090 gl_cv_func_rename_dest_works=yes
44092 gl_cv_func_rename_dest_works=no
44094 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44095 conftest.$ac_objext conftest.beam conftest.$ac_ext
44098 rm -rf conftest.f conftest.d1 conftest.d2
44101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
44102 printf "%s\n" "$gl_cv_func_rename_dest_works" >&6; }
44103 case "$gl_cv_func_rename_dest_works" in
44108 printf "%s\n" "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
44113 if test $REPLACE_RENAME = 1; then
44122 M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
44134 GL_M4_GNULIB_RENAME=1
44140 printf "%s\n" "#define GNULIB_TEST_RENAME 1" >>confdefs.h
44147 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
44148 if test "x$ac_cv_func_rewinddir" = xyes
44150 printf "%s\n" "#define HAVE_REWINDDIR 1" >>confdefs.h
44154 if test $ac_cv_func_rewinddir = no; then
44158 if test $HAVE_REWINDDIR = 0; then
44167 M4_LIBOBJS="$M4_LIBOBJS rewinddir.$ac_objext"
44179 GL_M4_GNULIB_REWINDDIR=1
44185 printf "%s\n" "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
44192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
44193 printf %s "checking whether rmdir works... " >&6; }
44194 if test ${gl_cv_func_rmdir_works+y}
44196 printf %s "(cached) " >&6
44199 touch conftest.file
44200 if test "$cross_compiling" = yes
44203 # Guess yes on Linux systems.
44204 linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
44205 # Guess yes on glibc systems.
44206 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
44207 # Guess no on native Windows.
44208 mingw*) gl_cv_func_rmdir_works="guessing no" ;;
44209 # If we don't know, obey --enable-cross-guesses.
44210 *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
44214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44215 /* end confdefs.h. */
44219 # include <unistd.h>
44220 #else /* on Windows with MSVC */
44221 # include <direct.h>
44231 if (!rmdir ("conftest.file/"))
44233 else if (errno != ENOTDIR)
44235 if (!rmdir ("conftest.dir/./"))
44243 if ac_fn_c_try_run "$LINENO"
44245 gl_cv_func_rmdir_works=yes
44247 gl_cv_func_rmdir_works=no
44249 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44250 conftest.$ac_objext conftest.beam conftest.$ac_ext
44253 rm -rf conftest.dir conftest.file
44255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
44256 printf "%s\n" "$gl_cv_func_rmdir_works" >&6; }
44257 case "$gl_cv_func_rmdir_works" in
44264 if test $REPLACE_RMDIR = 1; then
44273 M4_LIBOBJS="$M4_LIBOBJS rmdir.$ac_objext"
44285 GL_M4_GNULIB_RMDIR=1
44291 printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
44309 if test $ac_cv_func_secure_getenv = no; then
44310 HAVE_SECURE_GETENV=0
44313 if test $HAVE_SECURE_GETENV = 0; then
44322 M4_LIBOBJS="$M4_LIBOBJS secure_getenv.$ac_objext"
44325 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
44326 if test "x$ac_cv_func___secure_getenv" = xyes
44328 printf "%s\n" "#define HAVE___SECURE_GETENV 1" >>confdefs.h
44332 if test $ac_cv_func___secure_getenv = no; then
44333 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
44334 if test "x$ac_cv_func_issetugid" = xyes
44336 printf "%s\n" "#define HAVE_ISSETUGID 1" >>confdefs.h
44353 GL_M4_GNULIB_SECURE_GETENV=1
44359 printf "%s\n" "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
44368 NEED_SETLOCALE_IMPROVED=0
44370 mingw*) NEED_SETLOCALE_IMPROVED=1 ;;
44373 1.5.*) NEED_SETLOCALE_IMPROVED=1 ;;
44377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale supports the C locale" >&5
44378 printf %s "checking whether setlocale supports the C locale... " >&6; }
44379 if test ${gl_cv_func_setlocale_works+y}
44381 printf %s "(cached) " >&6
44383 if test "$cross_compiling" = yes
44386 # Guess no on Android.
44387 linux*-android*) gl_cv_func_setlocale_works="guessing no";;
44388 # Guess yes otherwise.
44389 *) gl_cv_func_setlocale_works="guessing yes";;
44393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44394 /* end confdefs.h. */
44396 #include <locale.h>
44399 return setlocale (LC_ALL, "C") == NULL;
44402 if ac_fn_c_try_run "$LINENO"
44404 gl_cv_func_setlocale_works=yes
44406 gl_cv_func_setlocale_works=no
44408 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44409 conftest.$ac_objext conftest.beam conftest.$ac_ext
44414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_works" >&5
44415 printf "%s\n" "$gl_cv_func_setlocale_works" >&6; }
44416 case "$gl_cv_func_setlocale_works" in
44418 *) NEED_SETLOCALE_IMPROVED=1 ;;
44423 printf "%s\n" "#define NEED_SETLOCALE_IMPROVED $NEED_SETLOCALE_IMPROVED" >>confdefs.h
44426 NEED_SETLOCALE_MTSAFE=0
44427 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
44428 NEED_SETLOCALE_MTSAFE=1
44431 printf "%s\n" "#define NEED_SETLOCALE_MTSAFE $NEED_SETLOCALE_MTSAFE" >>confdefs.h
44434 if test $NEED_SETLOCALE_IMPROVED = 1 || test $NEED_SETLOCALE_MTSAFE = 1; then
44435 REPLACE_SETLOCALE=1
44438 if test $NEED_SETLOCALE_MTSAFE = 1; then
44439 LIB_SETLOCALE="$LIB_SETLOCALE_NULL"
44445 if test $REPLACE_SETLOCALE = 1; then
44454 M4_LIBOBJS="$M4_LIBOBJS setlocale.$ac_objext"
44469 GL_M4_GNULIB_SETLOCALE=1
44475 printf "%s\n" "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
44484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
44485 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
44486 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
44488 printf %s "(cached) " >&6
44491 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
44492 *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
44493 gl_cv_func_setlocale_null_all_mtsafe=no ;;
44494 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
44495 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
44496 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
44497 # If we don't know, obey --enable-cross-guesses.
44499 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
44503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
44504 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
44508 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
44509 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
44513 case "$gl_cv_func_setlocale_null_all_mtsafe" in
44514 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
44515 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
44518 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
44521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
44522 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
44523 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
44525 printf %s "(cached) " >&6
44528 # Guess no on OpenBSD, AIX.
44530 gl_cv_func_setlocale_null_one_mtsafe=no ;;
44531 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
44532 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
44533 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
44534 # If we don't know, obey --enable-cross-guesses.
44536 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
44540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
44541 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
44545 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
44546 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
44550 case "$gl_cv_func_setlocale_null_one_mtsafe" in
44551 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
44552 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
44555 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
44558 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
44560 mingw*) LIB_SETLOCALE_NULL= ;;
44564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
44565 printf %s "checking whether imported symbols can be declared weak... " >&6; }
44566 if test ${gl_cv_have_weak+y}
44568 printf %s "(cached) " >&6
44571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44572 /* end confdefs.h. */
44573 extern void xyzzy ();
44583 if ac_fn_c_try_link "$LINENO"
44585 gl_cv_have_weak=maybe
44587 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44588 conftest$ac_exeext conftest.$ac_ext
44589 if test $gl_cv_have_weak = maybe; then
44590 if test "$cross_compiling" = yes
44592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44593 /* end confdefs.h. */
44595 Extensible Linking Format
44599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44600 $EGREP "Extensible Linking Format" >/dev/null 2>&1
44602 gl_cv_have_weak="guessing yes"
44604 gl_cv_have_weak="guessing no"
44610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44611 /* end confdefs.h. */
44617 return (fputs == NULL);
44620 if ac_fn_c_try_run "$LINENO"
44622 gl_cv_have_weak=yes
44626 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44627 conftest.$ac_objext conftest.beam conftest.$ac_ext
44631 case " $LDFLAGS " in
44632 *" -static "*) gl_cv_have_weak=no ;;
44634 case "$gl_cv_have_weak" in
44637 freebsd* | dragonfly* | midnightbsd*)
44639 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
44640 cat <<EOF > conftest2.c
44641 #include <pthread.h>
44642 #pragma weak pthread_mutexattr_gettype
44645 return (pthread_mutexattr_gettype != NULL);
44648 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
44649 || gl_cv_have_weak=no
44650 rm -f conftest1.c libempty.so conftest2.c conftest
44657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
44658 printf "%s\n" "$gl_cv_have_weak" >&6; }
44659 case "$gl_cv_have_weak" in
44662 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
44667 case "$gl_cv_have_weak" in
44668 *yes) LIB_SETLOCALE_NULL= ;;
44669 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
44674 LIB_SETLOCALE_NULL=
44678 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
44687 M4_LIBOBJS="$M4_LIBOBJS setlocale-lock.$ac_objext"
44694 if test -n "$GCC"; then
44695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
44696 printf %s "checking whether the -Werror option is usable... " >&6; }
44697 if test ${gl_cv_cc_vis_werror+y}
44699 printf %s "(cached) " >&6
44701 gl_save_CFLAGS="$CFLAGS"
44702 CFLAGS="$CFLAGS -Werror"
44703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44704 /* end confdefs.h. */
44714 if ac_fn_c_try_compile "$LINENO"
44716 gl_cv_cc_vis_werror=yes
44718 gl_cv_cc_vis_werror=no
44720 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
44721 CFLAGS="$gl_save_CFLAGS"
44724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
44725 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
44726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
44727 printf %s "checking for simple visibility declarations... " >&6; }
44728 if test ${gl_cv_cc_visibility+y}
44730 printf %s "(cached) " >&6
44732 gl_save_CFLAGS="$CFLAGS"
44733 CFLAGS="$CFLAGS -fvisibility=hidden"
44734 if test $gl_cv_cc_vis_werror = yes; then
44735 CFLAGS="$CFLAGS -Werror"
44737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44738 /* end confdefs.h. */
44739 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
44740 extern __attribute__((__visibility__("default"))) int exportedvar;
44741 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
44742 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
44743 void dummyfunc (void);
44744 void dummyfunc (void) {}
44754 if ac_fn_c_try_compile "$LINENO"
44756 gl_cv_cc_visibility=yes
44758 gl_cv_cc_visibility=no
44760 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
44761 CFLAGS="$gl_save_CFLAGS"
44764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
44765 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
44766 if test $gl_cv_cc_visibility = yes; then
44767 CFLAG_VISIBILITY="-fvisibility=hidden"
44774 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
44788 GL_M4_GNULIB_SETLOCALE_NULL=1
44794 printf "%s\n" "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
44804 if test $ac_cv_func_sigaction = yes; then
44805 ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
44807 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes
44810 printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h
44815 if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
44816 HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
44822 if test $HAVE_SIGACTION = 0; then
44831 M4_LIBOBJS="$M4_LIBOBJS sigaction.$ac_objext"
44839 ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
44840 #include <signal.h>
44843 if test "x$ac_cv_type_siginfo_t" = xyes
44846 printf "%s\n" "#define HAVE_SIGINFO_T 1" >>confdefs.h
44851 if test $ac_cv_type_siginfo_t = no; then
44865 GL_M4_GNULIB_SIGACTION=1
44871 printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
44884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
44885 printf %s "checking for signbit macro... " >&6; }
44886 if test ${gl_cv_func_signbit+y}
44888 printf %s "(cached) " >&6
44891 if test "$cross_compiling" = yes
44894 # Guess yes on glibc systems.
44895 *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
44896 # Guess yes on musl systems.
44897 *-musl*) gl_cv_func_signbit="guessing yes" ;;
44898 # Guess yes on native Windows.
44899 mingw*) gl_cv_func_signbit="guessing yes" ;;
44900 # If we don't know, obey --enable-cross-guesses.
44901 *) gl_cv_func_signbit="$gl_cross_guess_normal" ;;
44905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44906 /* end confdefs.h. */
44909 /* If signbit is defined as a function, don't use it, since calling it for
44910 'float' or 'long double' arguments would involve conversions.
44911 If signbit is not declared at all but exists as a library function, don't
44912 use it, since the prototype may not match.
44913 If signbit is not declared at all but exists as a compiler built-in, don't
44914 use it, since it's preferable to use __builtin_signbit* (no warnings,
44915 no conversions). */
44917 # error "signbit should be a macro"
44919 #include <string.h>
44921 /* Global variables.
44922 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
44923 but cannot constant-fold __builtin_signbitl (variable). */
44929 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
44930 So we use -p0f and -p0d instead. */
44935 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
44936 So we use another constant expression instead.
44937 But that expression does not work on other platforms, such as when
44938 cross-compiling to PowerPC on Mac OS X 10.5. */
44939 long double p0l = 0.0L;
44940 #if defined __hpux || defined __sgi
44941 long double m0l = -LDBL_MIN * LDBL_MIN;
44943 long double m0l = -p0l;
44946 if (signbit (vf)) /* link check */
44949 float plus_inf = 1.0f / p0f;
44950 float minus_inf = -1.0f / p0f;
44951 if (!(!signbit (255.0f)
44952 && signbit (-255.0f)
44954 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
44955 && !signbit (plus_inf)
44956 && signbit (minus_inf)))
44959 if (signbit (vd)) /* link check */
44962 double plus_inf = 1.0 / p0d;
44963 double minus_inf = -1.0 / p0d;
44964 if (!(!signbit (255.0)
44965 && signbit (-255.0)
44967 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
44968 && !signbit (plus_inf)
44969 && signbit (minus_inf)))
44972 if (signbit (vl)) /* link check */
44975 long double plus_inf = 1.0L / p0l;
44976 long double minus_inf = -1.0L / p0l;
44977 if (signbit (255.0L))
44979 if (!signbit (-255.0L))
44983 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
44985 if (signbit (plus_inf))
44987 if (!signbit (minus_inf))
44995 if ac_fn_c_try_run "$LINENO"
44997 gl_cv_func_signbit=yes
44999 gl_cv_func_signbit=no
45001 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45002 conftest.$ac_objext conftest.beam conftest.$ac_ext
45007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
45008 printf "%s\n" "$gl_cv_func_signbit" >&6; }
45009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
45010 printf %s "checking for signbit compiler built-ins... " >&6; }
45011 if test ${gl_cv_func_signbit_builtins+y}
45013 printf %s "(cached) " >&6
45016 if test "$cross_compiling" = yes
45019 # Guess yes on glibc systems.
45020 *-gnu* | gnu*) gl_cv_func_signbit_builtins="guessing yes" ;;
45021 # Guess yes on musl systems.
45022 *-musl*) gl_cv_func_signbit_builtins="guessing yes" ;;
45023 # Guess yes on mingw, no on MSVC.
45024 mingw*) if test -n "$GCC"; then
45025 gl_cv_func_signbit_builtins="guessing yes"
45027 gl_cv_func_signbit_builtins="guessing no"
45030 # If we don't know, obey --enable-cross-guesses.
45031 *) gl_cv_func_signbit_builtins="$gl_cross_guess_normal" ;;
45035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45036 /* end confdefs.h. */
45038 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
45039 # define signbit(x) \
45040 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
45041 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
45042 __builtin_signbitf (x))
45044 # error "signbit should be three compiler built-ins"
45046 #include <string.h>
45048 /* Global variables.
45049 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
45050 but cannot constant-fold __builtin_signbitl (variable). */
45056 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
45057 So we use -p0f and -p0d instead. */
45062 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
45063 So we use another constant expression instead.
45064 But that expression does not work on other platforms, such as when
45065 cross-compiling to PowerPC on Mac OS X 10.5. */
45066 long double p0l = 0.0L;
45067 #if defined __hpux || defined __sgi
45068 long double m0l = -LDBL_MIN * LDBL_MIN;
45070 long double m0l = -p0l;
45073 if (signbit (vf)) /* link check */
45076 float plus_inf = 1.0f / p0f;
45077 float minus_inf = -1.0f / p0f;
45078 if (!(!signbit (255.0f)
45079 && signbit (-255.0f)
45081 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
45082 && !signbit (plus_inf)
45083 && signbit (minus_inf)))
45086 if (signbit (vd)) /* link check */
45089 double plus_inf = 1.0 / p0d;
45090 double minus_inf = -1.0 / p0d;
45091 if (!(!signbit (255.0)
45092 && signbit (-255.0)
45094 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
45095 && !signbit (plus_inf)
45096 && signbit (minus_inf)))
45099 if (signbit (vl)) /* link check */
45102 long double plus_inf = 1.0L / p0l;
45103 long double minus_inf = -1.0L / p0l;
45104 if (signbit (255.0L))
45106 if (!signbit (-255.0L))
45110 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
45112 if (signbit (plus_inf))
45114 if (!signbit (minus_inf))
45122 if ac_fn_c_try_run "$LINENO"
45124 gl_cv_func_signbit_builtins=yes
45126 gl_cv_func_signbit_builtins=no
45128 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45129 conftest.$ac_objext conftest.beam conftest.$ac_ext
45134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_builtins" >&5
45135 printf "%s\n" "$gl_cv_func_signbit_builtins" >&6; }
45136 case "$gl_cv_func_signbit_builtins" in
45138 REPLACE_SIGNBIT_USING_BUILTINS=1
45141 case "$gl_cv_func_signbit" in
45154 if test $REPLACE_SIGNBIT = 1; then
45157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
45158 printf %s "checking where to find the sign bit in a 'float'... " >&6; }
45159 if test ${gl_cv_cc_float_signbit+y}
45161 printf %s "(cached) " >&6
45164 if test "$cross_compiling" = yes
45167 gl_cv_cc_float_signbit="unknown"
45170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45171 /* end confdefs.h. */
45173 #include <stddef.h>
45176 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
45177 typedef union { float value; unsigned int word[NWORDS]; }
45179 static memory_float plus = { 1.0f };
45180 static memory_float minus = { -1.0f };
45185 FILE *fp = fopen ("conftest.out", "w");
45188 /* Find the different bit. */
45190 for (j = 0; j < NWORDS; j++)
45192 unsigned int x = plus.word[j] ^ minus.word[j];
45193 if ((x & (x - 1)) || (x && m))
45195 /* More than one bit difference. */
45196 fprintf (fp, "unknown");
45208 /* No difference. */
45209 fprintf (fp, "unknown");
45213 /* Now m = plus.word[k] ^ ~minus.word[k]. */
45214 if (plus.word[k] & ~minus.word[k])
45216 /* Oh? The sign bit is set in the positive and cleared in the negative
45218 fprintf (fp, "unknown");
45225 fprintf (fp, "word %d bit %d", (int) k, (int) i);
45226 if (fclose (fp) != 0)
45232 if ac_fn_c_try_run "$LINENO"
45234 gl_cv_cc_float_signbit=`cat conftest.out`
45236 gl_cv_cc_float_signbit="unknown"
45238 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45239 conftest.$ac_objext conftest.beam conftest.$ac_ext
45245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
45246 printf "%s\n" "$gl_cv_cc_float_signbit" >&6; }
45247 case "$gl_cv_cc_float_signbit" in
45249 word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
45250 bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
45252 printf "%s\n" "#define FLT_SIGNBIT_WORD $word" >>confdefs.h
45255 printf "%s\n" "#define FLT_SIGNBIT_BIT $bit" >>confdefs.h
45263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
45264 printf %s "checking where to find the sign bit in a 'double'... " >&6; }
45265 if test ${gl_cv_cc_double_signbit+y}
45267 printf %s "(cached) " >&6
45270 if test "$cross_compiling" = yes
45273 gl_cv_cc_double_signbit="unknown"
45276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45277 /* end confdefs.h. */
45279 #include <stddef.h>
45282 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
45283 typedef union { double value; unsigned int word[NWORDS]; }
45285 static memory_float plus = { 1.0 };
45286 static memory_float minus = { -1.0 };
45291 FILE *fp = fopen ("conftest.out", "w");
45294 /* Find the different bit. */
45296 for (j = 0; j < NWORDS; j++)
45298 unsigned int x = plus.word[j] ^ minus.word[j];
45299 if ((x & (x - 1)) || (x && m))
45301 /* More than one bit difference. */
45302 fprintf (fp, "unknown");
45314 /* No difference. */
45315 fprintf (fp, "unknown");
45319 /* Now m = plus.word[k] ^ ~minus.word[k]. */
45320 if (plus.word[k] & ~minus.word[k])
45322 /* Oh? The sign bit is set in the positive and cleared in the negative
45324 fprintf (fp, "unknown");
45331 fprintf (fp, "word %d bit %d", (int) k, (int) i);
45332 if (fclose (fp) != 0)
45338 if ac_fn_c_try_run "$LINENO"
45340 gl_cv_cc_double_signbit=`cat conftest.out`
45342 gl_cv_cc_double_signbit="unknown"
45344 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45345 conftest.$ac_objext conftest.beam conftest.$ac_ext
45351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
45352 printf "%s\n" "$gl_cv_cc_double_signbit" >&6; }
45353 case "$gl_cv_cc_double_signbit" in
45355 word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
45356 bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
45358 printf "%s\n" "#define DBL_SIGNBIT_WORD $word" >>confdefs.h
45361 printf "%s\n" "#define DBL_SIGNBIT_BIT $bit" >>confdefs.h
45369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
45370 printf %s "checking where to find the sign bit in a 'long double'... " >&6; }
45371 if test ${gl_cv_cc_long_double_signbit+y}
45373 printf %s "(cached) " >&6
45376 if test "$cross_compiling" = yes
45379 gl_cv_cc_long_double_signbit="unknown"
45382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45383 /* end confdefs.h. */
45385 #include <stddef.h>
45388 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
45389 typedef union { long double value; unsigned int word[NWORDS]; }
45391 static memory_float plus = { 1.0L };
45392 static memory_float minus = { -1.0L };
45397 FILE *fp = fopen ("conftest.out", "w");
45400 /* Find the different bit. */
45402 for (j = 0; j < NWORDS; j++)
45404 unsigned int x = plus.word[j] ^ minus.word[j];
45405 if ((x & (x - 1)) || (x && m))
45407 /* More than one bit difference. */
45408 fprintf (fp, "unknown");
45420 /* No difference. */
45421 fprintf (fp, "unknown");
45425 /* Now m = plus.word[k] ^ ~minus.word[k]. */
45426 if (plus.word[k] & ~minus.word[k])
45428 /* Oh? The sign bit is set in the positive and cleared in the negative
45430 fprintf (fp, "unknown");
45437 fprintf (fp, "word %d bit %d", (int) k, (int) i);
45438 if (fclose (fp) != 0)
45444 if ac_fn_c_try_run "$LINENO"
45446 gl_cv_cc_long_double_signbit=`cat conftest.out`
45448 gl_cv_cc_long_double_signbit="unknown"
45450 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45451 conftest.$ac_objext conftest.beam conftest.$ac_ext
45457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
45458 printf "%s\n" "$gl_cv_cc_long_double_signbit" >&6; }
45459 case "$gl_cv_cc_long_double_signbit" in
45461 word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
45462 bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
45464 printf "%s\n" "#define LDBL_SIGNBIT_WORD $word" >>confdefs.h
45467 printf "%s\n" "#define LDBL_SIGNBIT_BIT $bit" >>confdefs.h
45473 if test "$gl_cv_cc_float_signbit" = unknown; then
45474 ac_fn_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
45475 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45476 if test "x$ac_cv_have_decl_copysignf" = xyes
45482 printf "%s\n" "#define HAVE_DECL_COPYSIGNF $ac_have_decl" >>confdefs.h
45484 if test "$ac_cv_have_decl_copysignf" = yes; then
45485 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
45486 printf %s "checking whether copysignf can be used without linking with libm... " >&6; }
45487 if test ${gl_cv_func_copysignf_no_libm+y}
45489 printf %s "(cached) " >&6
45492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45493 /* end confdefs.h. */
45499 return copysignf (x, y) < 0;
45504 if ac_fn_c_try_link "$LINENO"
45506 gl_cv_func_copysignf_no_libm=yes
45508 gl_cv_func_copysignf_no_libm=no
45510 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45511 conftest$ac_exeext conftest.$ac_ext
45514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
45515 printf "%s\n" "$gl_cv_func_copysignf_no_libm" >&6; }
45516 if test $gl_cv_func_copysignf_no_libm = yes; then
45518 printf "%s\n" "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
45523 if test "$gl_cv_cc_double_signbit" = unknown; then
45524 ac_fn_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
45525 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45526 if test "x$ac_cv_have_decl_copysign" = xyes
45532 printf "%s\n" "#define HAVE_DECL_COPYSIGN $ac_have_decl" >>confdefs.h
45534 if test "$ac_cv_have_decl_copysign" = yes; then
45535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
45536 printf %s "checking whether copysign can be used without linking with libm... " >&6; }
45537 if test ${gl_cv_func_copysign_no_libm+y}
45539 printf %s "(cached) " >&6
45542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45543 /* end confdefs.h. */
45549 return copysign (x, y) < 0;
45554 if ac_fn_c_try_link "$LINENO"
45556 gl_cv_func_copysign_no_libm=yes
45558 gl_cv_func_copysign_no_libm=no
45560 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45561 conftest$ac_exeext conftest.$ac_ext
45564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
45565 printf "%s\n" "$gl_cv_func_copysign_no_libm" >&6; }
45566 if test $gl_cv_func_copysign_no_libm = yes; then
45568 printf "%s\n" "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
45573 if test "$gl_cv_cc_long_double_signbit" = unknown; then
45574 ac_fn_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
45575 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45576 if test "x$ac_cv_have_decl_copysignl" = xyes
45582 printf "%s\n" "#define HAVE_DECL_COPYSIGNL $ac_have_decl" >>confdefs.h
45584 if test "$ac_cv_have_decl_copysignl" = yes; then
45585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
45586 printf %s "checking whether copysignl can be used without linking with libm... " >&6; }
45587 if test ${gl_cv_func_copysignl_no_libm+y}
45589 printf %s "(cached) " >&6
45592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45593 /* end confdefs.h. */
45599 return copysignl (x, y) < 0;
45604 if ac_fn_c_try_link "$LINENO"
45606 gl_cv_func_copysignl_no_libm=yes
45608 gl_cv_func_copysignl_no_libm=no
45610 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45611 conftest$ac_exeext conftest.$ac_ext
45614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
45615 printf "%s\n" "$gl_cv_func_copysignl_no_libm" >&6; }
45616 if test $gl_cv_func_copysignl_no_libm = yes; then
45618 printf "%s\n" "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
45625 if test $REPLACE_SIGNBIT = 1; then
45634 M4_LIBOBJS="$M4_LIBOBJS signbitf.$ac_objext"
45644 M4_LIBOBJS="$M4_LIBOBJS signbitd.$ac_objext"
45654 M4_LIBOBJS="$M4_LIBOBJS signbitl.$ac_objext"
45666 GL_M4_GNULIB_SIGNBIT=1
45672 printf "%s\n" "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
45681 printf "%s\n" "#define GNULIB_SIGPIPE 1" >>confdefs.h
45690 GL_M4_GNULIB_SIGNAL_H_SIGPIPE=1
45700 GL_M4_GNULIB_STDIO_H_SIGPIPE=1
45709 GL_M4_GNULIB_UNISTD_H_SIGPIPE=1
45715 HAVE_POSIX_SIGNALBLOCKING=0
45716 if test "$gl_cv_type_sigset_t" = yes; then
45717 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
45718 if test "x$ac_cv_func_sigprocmask" = xyes
45720 HAVE_POSIX_SIGNALBLOCKING=1
45725 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
45734 M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext"
45747 GL_M4_GNULIB_SIGPROCMASK=1
45753 printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
45758 # Check whether --with-libsigsegv was given.
45759 if test ${with_libsigsegv+y}
45761 withval=$with_libsigsegv;
45764 SIGSEGV_H=sigsegv.h
45765 if test "$with_libsigsegv" = yes; then
45781 acl_save_prefix="$prefix"
45782 prefix="$acl_final_prefix"
45783 acl_save_exec_prefix="$exec_prefix"
45784 exec_prefix="$acl_final_exec_prefix"
45786 eval additional_includedir=\"$includedir\"
45787 eval additional_libdir=\"$libdir\"
45788 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
45789 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
45791 exec_prefix="$acl_save_exec_prefix"
45792 prefix="$acl_save_prefix"
45795 # Check whether --with-libsigsegv-prefix was given.
45796 if test ${with_libsigsegv_prefix+y}
45798 withval=$with_libsigsegv_prefix;
45799 if test "X$withval" = "Xno"; then
45802 if test "X$withval" = "X"; then
45804 acl_save_prefix="$prefix"
45805 prefix="$acl_final_prefix"
45806 acl_save_exec_prefix="$exec_prefix"
45807 exec_prefix="$acl_final_exec_prefix"
45809 eval additional_includedir=\"$includedir\"
45810 eval additional_libdir=\"$libdir\"
45811 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
45812 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
45814 exec_prefix="$acl_save_exec_prefix"
45815 prefix="$acl_save_prefix"
45818 additional_includedir="$withval/include"
45819 additional_libdir="$withval/$acl_libdirstem"
45820 additional_libdir2="$withval/$acl_libdirstem2"
45821 additional_libdir3="$withval/$acl_libdirstem3"
45827 if test "X$additional_libdir2" = "X$additional_libdir"; then
45828 additional_libdir2=
45830 if test "X$additional_libdir3" = "X$additional_libdir"; then
45831 additional_libdir3=
45840 names_already_handled=
45841 names_next_round='sigsegv '
45842 while test -n "$names_next_round"; do
45843 names_this_round="$names_next_round"
45845 for name in $names_this_round; do
45847 for n in $names_already_handled; do
45848 if test "$n" = "$name"; then
45849 already_handled=yes
45853 if test -z "$already_handled"; then
45854 names_already_handled="$names_already_handled $name"
45855 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
45856 eval value=\"\$HAVE_LIB$uppername\"
45857 if test -n "$value"; then
45858 if test "$value" = yes; then
45859 eval value=\"\$LIB$uppername\"
45860 test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
45861 eval value=\"\$LTLIB$uppername\"
45862 test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
45871 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
45872 if test -n "$acl_shlibext"; then
45873 shrext=".$acl_shlibext" # typically: shrext=.so
45877 if test $use_additional = yes; then
45878 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
45879 if test "X$found_dir" = "X"; then
45880 eval dir=\$$additional_libdir_variable
45881 if test -n "$dir"; then
45882 if test -n "$acl_shlibext"; then
45883 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
45885 found_so="$dir/$libname$shrext"
45887 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
45888 ver=`(cd "$dir" && \
45889 for f in "$libname$shrext".*; do echo "$f"; done \
45890 | sed -e "s,^$libname$shrext\\\\.,," \
45891 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
45892 | sed 1q ) 2>/dev/null`
45893 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
45895 found_so="$dir/$libname$shrext.$ver"
45898 eval library_names=\"$acl_library_names_spec\"
45899 for f in $library_names; do
45900 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
45909 if test "X$found_dir" = "X"; then
45910 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
45912 found_a="$dir/$libname.$acl_libext"
45915 if test "X$found_dir" != "X"; then
45916 if test -f "$dir/$libname.la"; then
45917 found_la="$dir/$libname.la"
45924 if test "X$found_dir" = "X"; then
45925 for x in $LDFLAGS $LTLIBSIGSEGV; do
45927 acl_save_prefix="$prefix"
45928 prefix="$acl_final_prefix"
45929 acl_save_exec_prefix="$exec_prefix"
45930 exec_prefix="$acl_final_exec_prefix"
45932 exec_prefix="$acl_save_exec_prefix"
45933 prefix="$acl_save_prefix"
45937 dir=`echo "X$x" | sed -e 's/^X-L//'`
45938 if test -n "$acl_shlibext"; then
45939 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
45941 found_so="$dir/$libname$shrext"
45943 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
45944 ver=`(cd "$dir" && \
45945 for f in "$libname$shrext".*; do echo "$f"; done \
45946 | sed -e "s,^$libname$shrext\\\\.,," \
45947 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
45948 | sed 1q ) 2>/dev/null`
45949 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
45951 found_so="$dir/$libname$shrext.$ver"
45954 eval library_names=\"$acl_library_names_spec\"
45955 for f in $library_names; do
45956 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
45965 if test "X$found_dir" = "X"; then
45966 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
45968 found_a="$dir/$libname.$acl_libext"
45971 if test "X$found_dir" != "X"; then
45972 if test -f "$dir/$libname.la"; then
45973 found_la="$dir/$libname.la"
45978 if test "X$found_dir" != "X"; then
45983 if test "X$found_dir" != "X"; then
45984 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
45985 if test "X$found_so" != "X"; then
45986 if test "$enable_rpath" = no \
45987 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
45988 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
45989 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
45990 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
45993 for x in $ltrpathdirs; do
45994 if test "X$x" = "X$found_dir"; then
45999 if test -z "$haveit"; then
46000 ltrpathdirs="$ltrpathdirs $found_dir"
46002 if test "$acl_hardcode_direct" = yes; then
46003 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
46005 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
46006 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
46008 for x in $rpathdirs; do
46009 if test "X$x" = "X$found_dir"; then
46014 if test -z "$haveit"; then
46015 rpathdirs="$rpathdirs $found_dir"
46019 for x in $LDFLAGS $LIBSIGSEGV; do
46021 acl_save_prefix="$prefix"
46022 prefix="$acl_final_prefix"
46023 acl_save_exec_prefix="$exec_prefix"
46024 exec_prefix="$acl_final_exec_prefix"
46026 exec_prefix="$acl_save_exec_prefix"
46027 prefix="$acl_save_prefix"
46029 if test "X$x" = "X-L$found_dir"; then
46034 if test -z "$haveit"; then
46035 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
46037 if test "$acl_hardcode_minus_L" != no; then
46038 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
46040 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
46046 if test "X$found_a" != "X"; then
46047 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
46049 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
46052 additional_includedir=
46053 case "$found_dir" in
46054 */$acl_libdirstem | */$acl_libdirstem/)
46055 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
46056 if test "$name" = 'sigsegv'; then
46057 LIBSIGSEGV_PREFIX="$basedir"
46059 additional_includedir="$basedir/include"
46061 */$acl_libdirstem2 | */$acl_libdirstem2/)
46062 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
46063 if test "$name" = 'sigsegv'; then
46064 LIBSIGSEGV_PREFIX="$basedir"
46066 additional_includedir="$basedir/include"
46068 */$acl_libdirstem3 | */$acl_libdirstem3/)
46069 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
46070 if test "$name" = 'sigsegv'; then
46071 LIBSIGSEGV_PREFIX="$basedir"
46073 additional_includedir="$basedir/include"
46076 if test "X$additional_includedir" != "X"; then
46077 if test "X$additional_includedir" != "X/usr/include"; then
46079 if test "X$additional_includedir" = "X/usr/local/include"; then
46080 if test -n "$GCC"; then
46082 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
46086 if test -z "$haveit"; then
46087 for x in $CPPFLAGS $INCSIGSEGV; do
46089 acl_save_prefix="$prefix"
46090 prefix="$acl_final_prefix"
46091 acl_save_exec_prefix="$exec_prefix"
46092 exec_prefix="$acl_final_exec_prefix"
46094 exec_prefix="$acl_save_exec_prefix"
46095 prefix="$acl_save_prefix"
46097 if test "X$x" = "X-I$additional_includedir"; then
46102 if test -z "$haveit"; then
46103 if test -d "$additional_includedir"; then
46104 INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
46110 if test -n "$found_la"; then
46111 save_libdir="$libdir"
46112 case "$found_la" in
46113 */* | *\\*) . "$found_la" ;;
46114 *) . "./$found_la" ;;
46116 libdir="$save_libdir"
46117 for dep in $dependency_libs; do
46120 dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
46121 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
46122 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
46123 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
46125 if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
46126 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
46127 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
46128 if test -n "$GCC"; then
46130 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
46134 if test -z "$haveit"; then
46136 for x in $LDFLAGS $LIBSIGSEGV; do
46138 acl_save_prefix="$prefix"
46139 prefix="$acl_final_prefix"
46140 acl_save_exec_prefix="$exec_prefix"
46141 exec_prefix="$acl_final_exec_prefix"
46143 exec_prefix="$acl_save_exec_prefix"
46144 prefix="$acl_save_prefix"
46146 if test "X$x" = "X-L$dependency_libdir"; then
46151 if test -z "$haveit"; then
46152 if test -d "$dependency_libdir"; then
46153 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$dependency_libdir"
46157 for x in $LDFLAGS $LTLIBSIGSEGV; do
46159 acl_save_prefix="$prefix"
46160 prefix="$acl_final_prefix"
46161 acl_save_exec_prefix="$exec_prefix"
46162 exec_prefix="$acl_final_exec_prefix"
46164 exec_prefix="$acl_save_exec_prefix"
46165 prefix="$acl_save_prefix"
46167 if test "X$x" = "X-L$dependency_libdir"; then
46172 if test -z "$haveit"; then
46173 if test -d "$dependency_libdir"; then
46174 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$dependency_libdir"
46181 dir=`echo "X$dep" | sed -e 's/^X-R//'`
46182 if test "$enable_rpath" != no; then
46184 for x in $rpathdirs; do
46185 if test "X$x" = "X$dir"; then
46190 if test -z "$haveit"; then
46191 rpathdirs="$rpathdirs $dir"
46194 for x in $ltrpathdirs; do
46195 if test "X$x" = "X$dir"; then
46200 if test -z "$haveit"; then
46201 ltrpathdirs="$ltrpathdirs $dir"
46206 dep=`echo "X$dep" | sed -e 's/^X-l//'`
46207 if test "X$dep" != Xc \
46208 || case $host_os in
46209 linux* | gnu* | k*bsd*-gnu) false ;;
46212 names_next_round="$names_next_round $dep"
46216 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
46219 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
46220 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
46226 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
46227 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
46233 if test "X$rpathdirs" != "X"; then
46234 if test -n "$acl_hardcode_libdir_separator"; then
46236 for found_dir in $rpathdirs; do
46237 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
46239 acl_save_libdir="$libdir"
46241 eval flag=\"$acl_hardcode_libdir_flag_spec\"
46242 libdir="$acl_save_libdir"
46243 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
46245 for found_dir in $rpathdirs; do
46246 acl_save_libdir="$libdir"
46247 libdir="$found_dir"
46248 eval flag=\"$acl_hardcode_libdir_flag_spec\"
46249 libdir="$acl_save_libdir"
46250 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
46254 if test "X$ltrpathdirs" != "X"; then
46255 for found_dir in $ltrpathdirs; do
46256 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
46265 ac_save_CPPFLAGS="$CPPFLAGS"
46267 for element in $INCSIGSEGV; do
46269 for x in $CPPFLAGS; do
46271 acl_save_prefix="$prefix"
46272 prefix="$acl_final_prefix"
46273 acl_save_exec_prefix="$exec_prefix"
46274 exec_prefix="$acl_final_exec_prefix"
46276 exec_prefix="$acl_save_exec_prefix"
46277 prefix="$acl_save_prefix"
46279 if test "X$x" = "X$element"; then
46284 if test -z "$haveit"; then
46285 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
46290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
46291 printf %s "checking for libsigsegv... " >&6; }
46292 if test ${ac_cv_libsigsegv+y}
46294 printf %s "(cached) " >&6
46297 ac_save_LIBS="$LIBS"
46298 case " $LIBSIGSEGV" in
46299 *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
46300 *) LIBS="$LIBSIGSEGV $LIBS" ;;
46302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46303 /* end confdefs.h. */
46304 #include <sigsegv.h>
46308 sigsegv_deinstall_handler();
46313 if ac_fn_c_try_link "$LINENO"
46315 ac_cv_libsigsegv=yes
46317 ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
46319 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46320 conftest$ac_exeext conftest.$ac_ext
46321 LIBS="$ac_save_LIBS"
46324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
46325 printf "%s\n" "$ac_cv_libsigsegv" >&6; }
46326 if test "$ac_cv_libsigsegv" = yes; then
46327 HAVE_LIBSIGSEGV=yes
46329 printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
46331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
46332 printf %s "checking how to link with libsigsegv... " >&6; }
46333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
46334 printf "%s\n" "$LIBSIGSEGV" >&6; }
46337 CPPFLAGS="$ac_save_CPPFLAGS"
46349 gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
46351 if test "$gl_cv_lib_sigsegv" = yes; then
46356 if test -n "$SIGSEGV_H"; then
46357 GL_GENERATE_SIGSEGV_H_TRUE=
46358 GL_GENERATE_SIGSEGV_H_FALSE='#'
46360 GL_GENERATE_SIGSEGV_H_TRUE='#'
46361 GL_GENERATE_SIGSEGV_H_FALSE=
46364 if test -n "$SIGSEGV_H"; then
46370 printf "%s\n" "#define SOLARIS11 1" >>confdefs.h
46377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack direction" >&5
46378 printf %s "checking for stack direction... " >&6; }
46379 if test ${sv_cv_stack_direction_msg+y}
46381 printf %s "(cached) " >&6
46384 case "$host_cpu" in
46389 arm* | strongarm* | xscale* | \
46392 c1 | c2 | c32 | c34 | c38 | \
46416 powerpc* | rs6000 | \
46425 sv_cv_stack_direction=-1 ;;
46429 hppa* | parisc* | \
46432 sv_cv_stack_direction=1 ;;
46434 if test $cross_compiling = no; then
46435 cat > conftest.c <<EOF
46438 find_stack_direction (int *addr, int depth)
46440 int dir, dummy = 0;
46443 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
46444 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
46445 return dir + dummy;
46448 main (int argc, char *argv)
46450 printf ("%d\n", find_stack_direction (NULL, argc + 20));
46454 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46455 (eval $ac_link) 2>&5
46457 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46458 test $ac_status = 0; }
46459 sv_cv_stack_direction=`./conftest`
46461 sv_cv_stack_direction=0
46465 case $sv_cv_stack_direction in
46466 1) sv_cv_stack_direction_msg="grows up";;
46467 -1) sv_cv_stack_direction_msg="grows down";;
46468 *) sv_cv_stack_direction_msg="unknown";;
46472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_stack_direction_msg" >&5
46473 printf "%s\n" "$sv_cv_stack_direction_msg" >&6; }
46475 printf "%s\n" "#define STACK_DIRECTION $sv_cv_stack_direction" >>confdefs.h
46484 if test "$ac_cv_func_sigaltstack" = yes; then
46485 ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "
46486 #include <signal.h>
46487 #if HAVE_SYS_SIGNAL_H
46488 # include <sys/signal.h>
46492 if test "x$ac_cv_type_stack_t" = xyes
46497 printf "%s\n" "#define stack_t struct sigaltstack" >>confdefs.h
46504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sigaltstack" >&5
46505 printf %s "checking for working sigaltstack... " >&6; }
46506 if test ${sv_cv_sigaltstack+y}
46508 printf %s "(cached) " >&6
46511 if test "$ac_cv_func_sigaltstack" = yes; then
46513 macos* | darwin[6-9]* | darwin[1-9][0-9]*)
46514 # On MacOS X 10.2 or newer, just assume that if it compiles, it will
46515 # work. If we were to perform the real test, 1 Crash Report dialog
46516 # window would pop up.
46517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46518 /* end confdefs.h. */
46520 #include <signal.h>
46524 int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
46529 if ac_fn_c_try_link "$LINENO"
46531 sv_cv_sigaltstack="guessing yes"
46533 sv_cv_sigaltstack=no
46535 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46536 conftest$ac_exeext conftest.$ac_ext
46539 if test "$cross_compiling" = yes
46544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46545 /* end confdefs.h. */
46547 #include <signal.h>
46551 int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
46556 if ac_fn_c_try_link "$LINENO"
46558 sv_cv_sigaltstack="guessing yes"
46560 sv_cv_sigaltstack=no
46562 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46563 conftest$ac_exeext conftest.$ac_ext
46568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46569 /* end confdefs.h. */
46572 #include <stdlib.h>
46573 #include <signal.h>
46574 #if HAVE_SYS_SIGNAL_H
46575 # include <sys/signal.h>
46578 # include <sys/types.h>
46579 # include <sys/time.h>
46580 # include <sys/resource.h>
46582 void stackoverflow_handler (int sig)
46584 /* If we get here, the stack overflow was caught. */
46587 volatile int * recurse_1 (volatile int n, volatile int *p)
46590 *recurse_1 (n + 1, p) += n;
46593 int recurse (volatile int n)
46596 return *recurse_1 (n, &sum);
46598 char mystack[2 * (1 << 24)];
46602 struct sigaction action;
46603 #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK
46604 /* Before starting the endless recursion, try to be friendly to the user's
46605 machine. On some Linux 2.2.x systems, there is no stack limit for user
46606 processes at all. We don't want to kill such systems. */
46608 rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
46609 setrlimit (RLIMIT_STACK, &rl);
46611 /* Install the alternate stack. Use the midpoint of mystack, to guard
46612 against a buggy interpretation of ss_sp on IRIX. */
46614 if (sizeof mystack / 2 < SIGSTKSZ)
46617 altstack.ss_sp = mystack + sizeof mystack / 2;
46618 altstack.ss_size = sizeof mystack / 2;
46619 altstack.ss_flags = 0; /* no SS_DISABLE */
46620 if (sigaltstack (&altstack, NULL) < 0)
46622 /* Install the SIGSEGV handler. */
46623 sigemptyset (&action.sa_mask);
46624 action.sa_handler = &stackoverflow_handler;
46625 action.sa_flags = SA_ONSTACK;
46626 sigaction (SIGSEGV, &action, (struct sigaction *) NULL);
46627 sigaction (SIGBUS, &action, (struct sigaction *) NULL);
46628 /* Provoke a stack overflow. */
46633 if ac_fn_c_try_run "$LINENO"
46635 sv_cv_sigaltstack=yes
46637 sv_cv_sigaltstack=no
46639 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46640 conftest.$ac_objext conftest.beam conftest.$ac_ext
46646 sv_cv_sigaltstack=no
46650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack" >&5
46651 printf "%s\n" "$sv_cv_sigaltstack" >&6; }
46652 if test "$sv_cv_sigaltstack" != no; then
46654 printf "%s\n" "#define HAVE_WORKING_SIGALTSTACK 1" >>confdefs.h
46657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
46658 printf %s "checking for correct stack_t interpretation... " >&6; }
46659 if test ${sv_cv_sigaltstack_low_base+y}
46661 printf %s "(cached) " >&6
46664 if test "$cross_compiling" = yes
46668 irix5*) sv_cv_sigaltstack_low_base="no" ;;
46669 *) sv_cv_sigaltstack_low_base="guessing yes" ;;
46673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46674 /* end confdefs.h. */
46677 #include <stdlib.h>
46678 #include <signal.h>
46679 #if HAVE_SYS_SIGNAL_H
46680 # include <sys/signal.h>
46682 volatile char *stack_lower_bound;
46683 volatile char *stack_upper_bound;
46684 static void check_stack_location (volatile char *addr)
46686 if (addr >= stack_lower_bound && addr <= stack_upper_bound)
46691 static void stackoverflow_handler (int sig)
46694 check_stack_location (&dummy);
46696 char mystack[2 * (1 << 24)];
46700 struct sigaction action;
46701 /* Install the alternate stack. */
46702 altstack.ss_sp = mystack + sizeof mystack / 2;
46703 altstack.ss_size = sizeof mystack / 2;
46704 stack_lower_bound = (char *) altstack.ss_sp;
46705 stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
46706 altstack.ss_flags = 0; /* no SS_DISABLE */
46707 if (sigaltstack (&altstack, NULL) < 0)
46709 /* Install the SIGSEGV handler. */
46710 sigemptyset (&action.sa_mask);
46711 action.sa_handler = &stackoverflow_handler;
46712 action.sa_flags = SA_ONSTACK;
46713 if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
46715 /* Provoke a SIGSEGV. */
46720 if ac_fn_c_try_run "$LINENO"
46722 sv_cv_sigaltstack_low_base=yes
46724 sv_cv_sigaltstack_low_base=no
46726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46727 conftest.$ac_objext conftest.beam conftest.$ac_ext
46732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack_low_base" >&5
46733 printf "%s\n" "$sv_cv_sigaltstack_low_base" >&6; }
46734 if test "$sv_cv_sigaltstack_low_base" = no; then
46736 printf "%s\n" "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
46744 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
46745 if test "x$ac_cv_header_stdint_h" = xyes
46747 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
46751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
46752 printf %s "checking for SIZE_MAX... " >&6; }
46753 if test ${gl_cv_size_max+y}
46755 printf %s "(cached) " >&6
46759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46760 /* end confdefs.h. */
46762 #include <limits.h>
46764 #include <stdint.h>
46771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46772 $EGREP "Found it" >/dev/null 2>&1
46778 if test $gl_cv_size_max != yes; then
46779 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
46780 #include <limits.h>"
46784 size_t_bits_minus_1=
46787 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"
46794 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
46795 if test $fits_in_uint = 1; then
46796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46797 /* end confdefs.h. */
46798 #include <stddef.h>
46800 extern unsigned long foo;
46810 if ac_fn_c_try_compile "$LINENO"
46814 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46816 if test $fits_in_uint = 1; then
46817 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
46819 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
46822 gl_cv_size_max='((size_t)~(size_t)0)'
46827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
46828 printf "%s\n" "$gl_cv_size_max" >&6; }
46829 if test "$gl_cv_size_max" != yes; then
46831 printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
46838 gl_cv_func_snprintf_usable=no
46839 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
46840 if test "x$ac_cv_func_snprintf" = xyes
46842 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
46846 if test $ac_cv_func_snprintf = yes; then
46850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
46851 printf %s "checking whether snprintf respects a size of 1... " >&6; }
46852 if test ${gl_cv_func_snprintf_size1+y}
46854 printf %s "(cached) " >&6
46857 if test "$cross_compiling" = yes
46860 # Guess yes on Android.
46861 linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
46862 # Guess yes on native Windows.
46863 mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
46864 *) gl_cv_func_snprintf_size1="guessing yes" ;;
46868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46869 /* end confdefs.h. */
46873 # define my_snprintf snprintf
46875 # include <stdarg.h>
46876 static int my_snprintf (char *buf, int size, const char *format, ...)
46880 va_start (args, format);
46881 ret = vsnprintf (buf, size, format, args);
46888 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
46889 my_snprintf (buf, 1, "%d", 12345);
46890 return buf[1] != 'E';
46893 if ac_fn_c_try_run "$LINENO"
46895 gl_cv_func_snprintf_size1=yes
46897 gl_cv_func_snprintf_size1=no
46899 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46900 conftest.$ac_objext conftest.beam conftest.$ac_ext
46905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
46906 printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
46908 case "$gl_cv_func_snprintf_size1" in
46911 case "$gl_cv_func_snprintf_retval_c99" in
46915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
46916 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
46917 if test ${gl_cv_func_printf_positions+y}
46919 printf %s "(cached) " >&6
46922 if test "$cross_compiling" = yes
46926 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
46927 gl_cv_func_printf_positions="guessing no";;
46928 beos*) gl_cv_func_printf_positions="guessing no";;
46929 # Guess yes on Android.
46930 linux*-android*) gl_cv_func_printf_positions="guessing yes";;
46931 # Guess no on native Windows.
46932 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
46933 *) gl_cv_func_printf_positions="guessing yes";;
46937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46938 /* end confdefs.h. */
46941 #include <string.h>
46942 /* The string "%2$d %1$d", with dollar characters protected from the shell's
46943 dollar expansion (possibly an autoconf bug). */
46944 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
46945 static char buf[100];
46948 sprintf (buf, format, 33, 55);
46949 return (strcmp (buf, "55 33") != 0);
46952 if ac_fn_c_try_run "$LINENO"
46954 gl_cv_func_printf_positions=yes
46956 gl_cv_func_printf_positions=no
46958 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46959 conftest.$ac_objext conftest.beam conftest.$ac_ext
46964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
46965 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
46967 case "$gl_cv_func_printf_positions" in
46969 gl_cv_func_snprintf_usable=yes
46977 if test $gl_cv_func_snprintf_usable = no; then
46988 M4_LIBOBJS="$M4_LIBOBJS snprintf.$ac_objext"
46990 if test $ac_cv_func_snprintf = yes; then
46994 if test $ac_cv_have_decl_snprintf = yes; then
47002 if test $ac_cv_have_decl_snprintf = no; then
47003 HAVE_DECL_SNPRINTF=0
47015 GL_M4_GNULIB_SNPRINTF=1
47021 printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
47027 printf "%s\n" "#define GNULIB_SNPRINTF 1" >>confdefs.h
47050 M4_LIBOBJS="$M4_LIBOBJS os2-spawn.$ac_objext"
47055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
47056 printf %s "checking for ssize_t... " >&6; }
47057 if test ${gt_cv_ssize_t+y}
47059 printf %s "(cached) " >&6
47061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47062 /* end confdefs.h. */
47063 #include <sys/types.h>
47067 int x = sizeof (ssize_t *) + sizeof (ssize_t);
47073 if ac_fn_c_try_compile "$LINENO"
47079 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
47082 printf "%s\n" "$gt_cv_ssize_t" >&6; }
47083 if test $gt_cv_ssize_t = no; then
47085 printf "%s\n" "#define ssize_t int" >>confdefs.h
47098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
47099 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
47100 if test ${gl_cv_func_stat_file_slash+y}
47102 printf %s "(cached) " >&6
47105 # Assume that if we have lstat, we can also check symlinks.
47106 if test $ac_cv_func_lstat = yes; then
47107 ln -s conftest.tmp conftest.lnk
47109 if test "$cross_compiling" = yes
47112 # Guess yes on Linux systems.
47113 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
47114 # Guess yes on glibc systems.
47115 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
47116 # If we don't know, obey --enable-cross-guesses.
47117 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
47121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47122 /* end confdefs.h. */
47123 #include <sys/stat.h>
47130 if (!stat ("conftest.tmp/", &st))
47133 if (!stat ("conftest.lnk/", &st))
47142 if ac_fn_c_try_run "$LINENO"
47144 gl_cv_func_stat_file_slash=yes
47146 gl_cv_func_stat_file_slash=no
47148 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47149 conftest.$ac_objext conftest.beam conftest.$ac_ext
47152 rm -f conftest.tmp conftest.lnk
47154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
47155 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
47156 case $gl_cv_func_stat_file_slash in
47160 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
47170 if test $REPLACE_STAT = 1; then
47179 M4_LIBOBJS="$M4_LIBOBJS stat.$ac_objext"
47191 M4_LIBOBJS="$M4_LIBOBJS stat-w32.$ac_objext"
47210 GL_M4_GNULIB_STAT=1
47216 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
47224 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
47225 #include <sys/stat.h>
47227 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
47230 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
47232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
47233 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
47234 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
47236 printf %s "(cached) " >&6
47238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47239 /* end confdefs.h. */
47241 #include <sys/types.h>
47242 #include <sys/stat.h>
47243 #if HAVE_SYS_TIME_H
47244 # include <sys/time.h>
47247 struct timespec ts;
47260 if ac_fn_c_try_compile "$LINENO"
47262 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
47264 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
47266 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
47269 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
47270 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
47272 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
47276 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
47277 #include <sys/stat.h>
47279 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
47282 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
47286 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
47287 #include <sys/stat.h>
47289 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
47292 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
47296 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
47297 #include <sys/stat.h>
47299 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
47302 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
47317 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
47318 #include <sys/stat.h>
47320 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
47323 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
47327 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
47328 #include <sys/stat.h>
47330 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
47333 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
47337 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
47338 #include <sys/stat.h>
47340 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
47343 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
47354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
47355 printf %s "checking for working stdalign.h... " >&6; }
47356 if test ${gl_cv_header_working_stdalign_h+y}
47358 printf %s "(cached) " >&6
47360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47361 /* end confdefs.h. */
47362 #include <stdint.h>
47363 #include <stdalign.h>
47364 #include <stddef.h>
47366 /* Test that alignof yields a result consistent with offsetof.
47367 This catches GCC bug 52023
47368 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
47370 template <class t> struct alignof_helper { char a; t b; };
47371 # define ao(type) offsetof (alignof_helper<type>, b)
47373 # define ao(type) offsetof (struct { char a; type b; }, b)
47375 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
47376 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
47377 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
47379 /* Test _Alignas only on platforms where gnulib can help. */
47381 ((defined __cplusplus && 201103 <= __cplusplus) \
47382 || (__TINYC__ && defined __attribute__) \
47383 || (defined __APPLE__ && defined __MACH__ \
47384 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
47386 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
47387 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
47388 || 1300 <= _MSC_VER)
47389 struct alignas_test { char c; char alignas (8) alignas_8; };
47390 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
47402 if ac_fn_c_try_compile "$LINENO"
47404 gl_cv_header_working_stdalign_h=yes
47406 gl_cv_header_working_stdalign_h=no
47408 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
47411 printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
47413 if test $gl_cv_header_working_stdalign_h = yes; then
47416 STDALIGN_H='stdalign.h'
47420 if test -n "$STDALIGN_H"; then
47421 GL_GENERATE_STDALIGN_H_TRUE=
47422 GL_GENERATE_STDALIGN_H_FALSE='#'
47424 GL_GENERATE_STDALIGN_H_TRUE='#'
47425 GL_GENERATE_STDALIGN_H_FALSE=
47431 NEXT_STDARG_H='<stdarg.h>'
47432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
47433 printf %s "checking for va_copy... " >&6; }
47434 if test ${gl_cv_func_va_copy+y}
47436 printf %s "(cached) " >&6
47438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47439 /* end confdefs.h. */
47440 #include <stdarg.h>
47446 void (*func) (va_list, va_list) = va_copy;
47453 if ac_fn_c_try_compile "$LINENO"
47455 gl_cv_func_va_copy=yes
47457 gl_cv_func_va_copy=no
47459 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
47463 printf "%s\n" "$gl_cv_func_va_copy" >&6; }
47464 if test $gl_cv_func_va_copy = no; then
47465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47466 /* end confdefs.h. */
47467 #if defined _AIX && !defined __GNUC__
47472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47473 $EGREP "vaccine" >/dev/null 2>&1
47481 if test $gl_aixcc = yes; then
47491 if test $gl_cv_have_include_next = yes; then
47492 gl_cv_next_stdarg_h='<'stdarg.h'>'
47494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
47495 printf %s "checking absolute name of <stdarg.h>... " >&6; }
47496 if test ${gl_cv_next_stdarg_h+y}
47498 printf %s "(cached) " >&6
47503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47504 /* end confdefs.h. */
47505 #include <stdarg.h>
47508 aix*) gl_absname_cpp="$ac_cpp -C" ;;
47509 *) gl_absname_cpp="$ac_cpp" ;;
47514 gl_dirsep_regex='[/\\]'
47517 gl_dirsep_regex='\/'
47520 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
47521 gl_header_literal_regex=`echo 'stdarg.h' \
47522 | sed -e "$gl_make_literal_regex_sed"`
47523 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
47524 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
47530 gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
47531 sed -n "$gl_absolute_header_sed"`
47533 gl_header=$gl_cv_absolute_stdarg_h
47534 gl_cv_next_stdarg_h='"'$gl_header'"'
47538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
47539 printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
47541 NEXT_STDARG_H=$gl_cv_next_stdarg_h
47543 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
47544 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
47545 gl_next_as_first_directive='<'stdarg.h'>'
47547 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
47548 gl_next_as_first_directive=$gl_cv_next_stdarg_h
47550 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
47555 if test "$gl_cv_next_stdarg_h" = '""'; then
47556 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
47557 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
47562 exec 9>&6 6>/dev/null
47564 if test ${gl_cv_func___va_copy+y}
47566 printf %s "(cached) " >&6
47569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47570 /* end confdefs.h. */
47571 #include <stdarg.h>
47584 if ac_fn_c_try_compile "$LINENO"
47586 gl_cv_func___va_copy=yes
47588 gl_cv_func___va_copy=no
47590 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47597 if test $gl_cv_func___va_copy = yes; then
47599 printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
47604 printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
47610 if test -n "$STDARG_H"; then
47611 GL_GENERATE_STDARG_H_TRUE=
47612 GL_GENERATE_STDARG_H_FALSE='#'
47614 GL_GENERATE_STDARG_H_TRUE='#'
47615 GL_GENERATE_STDARG_H_FALSE=
47624 if test "$ac_cv_header_stdbool_h" = yes; then
47627 if test -z "$GCC"; then
47628 STDBOOL_H='stdbool.h'
47638 STDBOOL_H='stdbool.h'
47641 if test -n "$STDBOOL_H"; then
47642 GL_GENERATE_STDBOOL_H_TRUE=
47643 GL_GENERATE_STDBOOL_H_FALSE='#'
47645 GL_GENERATE_STDBOOL_H_TRUE='#'
47646 GL_GENERATE_STDBOOL_H_FALSE=
47650 if test "$ac_cv_type__Bool" = yes; then
47679 GL_M4_GNULIB_FSCANF=1
47685 printf "%s\n" "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
47691 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
47703 GL_M4_GNULIB_SCANF=1
47709 printf "%s\n" "#define GNULIB_TEST_SCANF 1" >>confdefs.h
47715 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
47727 GL_M4_GNULIB_FGETC=1
47733 printf "%s\n" "#define GNULIB_TEST_FGETC 1" >>confdefs.h
47746 GL_M4_GNULIB_GETC=1
47752 printf "%s\n" "#define GNULIB_TEST_GETC 1" >>confdefs.h
47765 GL_M4_GNULIB_GETCHAR=1
47771 printf "%s\n" "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
47784 GL_M4_GNULIB_FGETS=1
47790 printf "%s\n" "#define GNULIB_TEST_FGETS 1" >>confdefs.h
47803 GL_M4_GNULIB_FREAD=1
47809 printf "%s\n" "#define GNULIB_TEST_FREAD 1" >>confdefs.h
47822 GL_M4_GNULIB_FPRINTF=1
47828 printf "%s\n" "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
47841 GL_M4_GNULIB_PRINTF=1
47847 printf "%s\n" "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
47860 GL_M4_GNULIB_VFPRINTF=1
47866 printf "%s\n" "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
47879 GL_M4_GNULIB_VPRINTF=1
47885 printf "%s\n" "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
47898 GL_M4_GNULIB_FPUTC=1
47904 printf "%s\n" "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
47917 GL_M4_GNULIB_PUTC=1
47923 printf "%s\n" "#define GNULIB_TEST_PUTC 1" >>confdefs.h
47936 GL_M4_GNULIB_PUTCHAR=1
47942 printf "%s\n" "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
47955 GL_M4_GNULIB_FPUTS=1
47961 printf "%s\n" "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
47974 GL_M4_GNULIB_PUTS=1
47980 printf "%s\n" "#define GNULIB_TEST_PUTS 1" >>confdefs.h
47993 GL_M4_GNULIB_FWRITE=1
47999 printf "%s\n" "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
48015 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
48016 if test "x$ac_cv_func_stpcpy" = xyes
48018 printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
48022 if test $ac_cv_func_stpcpy = no; then
48026 if test $HAVE_STPCPY = 0; then
48035 M4_LIBOBJS="$M4_LIBOBJS stpcpy.$ac_objext"
48050 GL_M4_GNULIB_STPCPY=1
48056 printf "%s\n" "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
48064 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
48065 if test "x$ac_cv_func_strchrnul" = xyes
48067 printf "%s\n" "#define HAVE_STRCHRNUL 1" >>confdefs.h
48071 if test $ac_cv_func_strchrnul = no; then
48074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
48075 printf %s "checking whether strchrnul works... " >&6; }
48076 if test ${gl_cv_func_strchrnul_works+y}
48078 printf %s "(cached) " >&6
48080 if test "$cross_compiling" = yes
48082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48083 /* end confdefs.h. */
48085 #if defined __CYGWIN__
48086 #include <cygwin/version.h>
48087 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
48095 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48096 $EGREP "Lucky user" >/dev/null 2>&1
48098 gl_cv_func_strchrnul_works="guessing yes"
48100 gl_cv_func_strchrnul_works="guessing no"
48106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48107 /* end confdefs.h. */
48109 #include <string.h> /* for strchrnul */
48114 const char *buf = "a";
48115 return strchrnul (buf, 'b') != buf + 1;
48121 if ac_fn_c_try_run "$LINENO"
48123 gl_cv_func_strchrnul_works=yes
48125 gl_cv_func_strchrnul_works=no
48127 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48128 conftest.$ac_objext conftest.beam conftest.$ac_ext
48133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
48134 printf "%s\n" "$gl_cv_func_strchrnul_works" >&6; }
48135 case "$gl_cv_func_strchrnul_works" in
48137 *) REPLACE_STRCHRNUL=1 ;;
48141 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
48150 M4_LIBOBJS="$M4_LIBOBJS strchrnul.$ac_objext"
48163 GL_M4_GNULIB_STRCHRNUL=1
48169 printf "%s\n" "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
48176 if test $gl_cv_func_malloc_posix != yes; then
48180 if test $ac_cv_have_decl_strdup = no; then
48184 if test $REPLACE_STRDUP = 1; then
48193 M4_LIBOBJS="$M4_LIBOBJS strdup.$ac_objext"
48206 GL_M4_GNULIB_STRDUP=1
48212 printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
48223 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
48224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
48225 printf %s "checking for working strerror function... " >&6; }
48226 if test ${gl_cv_func_working_strerror+y}
48228 printf %s "(cached) " >&6
48230 if test "$cross_compiling" = yes
48233 # Guess yes on glibc systems.
48234 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
48235 # Guess yes on musl systems.
48236 *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
48237 # If we don't know, obey --enable-cross-guesses.
48238 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
48242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48243 /* end confdefs.h. */
48244 #include <string.h>
48249 if (!*strerror (-2)) return 1;
48254 if ac_fn_c_try_run "$LINENO"
48256 gl_cv_func_working_strerror=yes
48258 gl_cv_func_working_strerror=no
48260 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48261 conftest.$ac_objext conftest.beam conftest.$ac_ext
48266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
48267 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
48268 case "$gl_cv_func_working_strerror" in
48275 case "$gl_cv_func_strerror_r_works" in
48276 *no) REPLACE_STRERROR=1 ;;
48283 if test $REPLACE_STRERROR = 1; then
48292 M4_LIBOBJS="$M4_LIBOBJS strerror.$ac_objext"
48297 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
48309 GL_M4_GNULIB_STRERROR=1
48315 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
48321 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
48330 M4_LIBOBJS="$M4_LIBOBJS strerror-override.$ac_objext"
48336 if test $ac_cv_header_sys_socket_h != yes; then
48337 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
48338 if test "x$ac_cv_header_winsock2_h" = xyes
48340 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
48345 if test "$ac_cv_header_winsock2_h" = yes; then
48347 UNISTD_H_HAVE_WINSOCK2_H=1
48348 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
48355 if test $gl_cond_libtool = false; then
48356 gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
48357 gl_libdeps="$gl_libdeps $LIBICONV"
48371 if test $ac_cv_have_decl_strndup = no; then
48372 HAVE_DECL_STRNDUP=0
48375 if test $ac_cv_func_strndup = yes; then
48377 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
48378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
48379 printf %s "checking for working strndup... " >&6; }
48380 if test ${gl_cv_func_strndup_works+y}
48382 printf %s "(cached) " >&6
48384 if test "$cross_compiling" = yes
48388 aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
48389 *) gl_cv_func_strndup_works="guessing yes";;
48393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48394 /* end confdefs.h. */
48396 #include <string.h>
48397 #include <stdlib.h>
48402 #if !HAVE_DECL_STRNDUP
48407 char *strndup (const char *, size_t);
48411 s = strndup ("some longer string", 15);
48413 s = strndup ("shorter string", 13);
48414 result = s[13] != '\0';
48421 if ac_fn_c_try_run "$LINENO"
48423 gl_cv_func_strndup_works=yes
48425 gl_cv_func_strndup_works=no
48427 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48428 conftest.$ac_objext conftest.beam conftest.$ac_ext
48432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
48433 printf "%s\n" "$gl_cv_func_strndup_works" >&6; }
48434 case $gl_cv_func_strndup_works in
48435 *no) REPLACE_STRNDUP=1 ;;
48441 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
48450 M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
48462 GL_M4_GNULIB_STRNDUP=1
48468 printf "%s\n" "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
48478 if test $ac_cv_have_decl_strnlen = no; then
48479 HAVE_DECL_STRNLEN=0
48482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
48483 printf %s "checking for working strnlen... " >&6; }
48484 if test ${ac_cv_func_strnlen_working+y}
48486 printf %s "(cached) " >&6
48488 if test "$cross_compiling" = yes
48490 # Guess no on AIX systems, yes otherwise.
48492 aix*) ac_cv_func_strnlen_working=no;;
48493 *) ac_cv_func_strnlen_working=yes;;
48496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48497 /* end confdefs.h. */
48498 $ac_includes_default
48504 #define S_LEN (sizeof S - 1)
48506 /* At least one implementation is buggy: that of AIX 4.3 would
48507 give strnlen (S, 1) == 3. */
48510 for (i = 0; i < S_LEN + 1; ++i)
48512 int expected = i <= S_LEN ? i : S_LEN;
48513 if (strnlen (S, i) != expected)
48522 if ac_fn_c_try_run "$LINENO"
48524 ac_cv_func_strnlen_working=yes
48526 ac_cv_func_strnlen_working=no
48528 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48529 conftest.$ac_objext conftest.beam conftest.$ac_ext
48533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
48534 printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
48535 test $ac_cv_func_strnlen_working = no && :
48538 if test $ac_cv_func_strnlen_working = no; then
48543 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
48552 M4_LIBOBJS="$M4_LIBOBJS strnlen.$ac_objext"
48565 GL_M4_GNULIB_STRNLEN=1
48571 printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
48581 if test $ac_cv_have_decl_strsignal = no; then
48582 HAVE_DECL_STRSIGNAL=0
48585 ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
48586 if test "x$ac_cv_func_strsignal" = xyes
48588 printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
48592 if test $ac_cv_func_strsignal = yes; then
48594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strsignal always returns a string" >&5
48595 printf %s "checking whether strsignal always returns a string... " >&6; }
48596 if test ${gl_cv_func_working_strsignal+y}
48598 printf %s "(cached) " >&6
48600 if test "$cross_compiling" = yes
48603 solaris* | aix*) gl_cv_func_working_strsignal=no;;
48604 *) gl_cv_func_working_strsignal="guessing yes";;
48607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48608 /* end confdefs.h. */
48609 #include <string.h>
48610 #include <unistd.h> /* NetBSD 5.0 declares it in wrong header. */
48616 char *s = strsignal (-1);
48617 if (s == (char *) 0)
48619 if (s == (char *) -1)
48627 if ac_fn_c_try_run "$LINENO"
48629 gl_cv_func_working_strsignal=yes
48631 gl_cv_func_working_strsignal=no
48633 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48634 conftest.$ac_objext conftest.beam conftest.$ac_ext
48638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strsignal" >&5
48639 printf "%s\n" "$gl_cv_func_working_strsignal" >&6; }
48640 if test "$gl_cv_func_working_strsignal" = no; then
48641 REPLACE_STRSIGNAL=1
48647 if test $HAVE_STRSIGNAL = 0 || test $REPLACE_STRSIGNAL = 1; then
48656 M4_LIBOBJS="$M4_LIBOBJS strsignal.$ac_objext"
48660 ac_fn_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
48661 " "$ac_c_undeclared_builtin_options" "CFLAGS"
48662 if test "x$ac_cv_have_decl_sys_siglist" = xyes
48668 printf "%s\n" "#define HAVE_DECL_SYS_SIGLIST $ac_have_decl" >>confdefs.h
48670 ac_fn_check_decl "$LINENO" "_sys_siglist" "ac_cv_have_decl__sys_siglist" "#include <signal.h>
48671 " "$ac_c_undeclared_builtin_options" "CFLAGS"
48672 if test "x$ac_cv_have_decl__sys_siglist" = xyes
48678 printf "%s\n" "#define HAVE_DECL__SYS_SIGLIST $ac_have_decl" >>confdefs.h
48691 GL_M4_GNULIB_STRSIGNAL=1
48697 printf "%s\n" "#define GNULIB_TEST_STRSIGNAL 1" >>confdefs.h
48703 if test $REPLACE_STRSTR = 0; then
48704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
48705 printf %s "checking whether strstr works in linear time... " >&6; }
48706 if test ${gl_cv_func_strstr_linear+y}
48708 printf %s "(cached) " >&6
48710 if test "$cross_compiling" = yes
48712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48713 /* end confdefs.h. */
48715 #include <features.h>
48716 #ifdef __GNU_LIBRARY__
48717 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
48718 && !(defined __i386__ || defined __x86_64__) \
48719 && !defined __UCLIBC__
48724 #include <cygwin/version.h>
48725 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
48731 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48732 $EGREP "Lucky user" >/dev/null 2>&1
48734 gl_cv_func_strstr_linear="guessing yes"
48736 gl_cv_func_strstr_linear="$gl_cross_guess_normal"
48742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48743 /* end confdefs.h. */
48746 /* z/OS does not deliver signals while strstr() is running (thanks to
48747 restrictions on its LE runtime), which prevents us from limiting the
48748 running time of this test. */
48749 # error "This test does not work properly on z/OS"
48751 #include <signal.h> /* for signal */
48752 #include <string.h> /* for strstr */
48753 #include <stdlib.h> /* for malloc */
48754 #include <unistd.h> /* for alarm */
48755 static void quit (int sig) { _exit (sig + 128); }
48762 size_t m = 1000000;
48763 char *haystack = (char *) malloc (2 * m + 2);
48764 char *needle = (char *) malloc (m + 2);
48765 /* Failure to compile this test due to missing alarm is okay,
48766 since all such platforms (mingw) also have quadratic strstr. */
48767 signal (SIGALRM, quit);
48769 /* Check for quadratic performance. */
48770 if (haystack && needle)
48772 memset (haystack, 'A', 2 * m);
48773 haystack[2 * m] = 'B';
48774 haystack[2 * m + 1] = 0;
48775 memset (needle, 'A', m);
48778 if (!strstr (haystack, needle))
48781 /* Free allocated memory, in case some sanitizer is watching. */
48790 if ac_fn_c_try_run "$LINENO"
48792 gl_cv_func_strstr_linear=yes
48794 gl_cv_func_strstr_linear=no
48796 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48797 conftest.$ac_objext conftest.beam conftest.$ac_ext
48802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
48803 printf "%s\n" "$gl_cv_func_strstr_linear" >&6; }
48804 case "$gl_cv_func_strstr_linear" in
48812 if test $REPLACE_STRSTR = 1; then
48821 M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
48827 if test $REPLACE_MEMCHR = 1; then
48830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
48831 printf %s "checking whether strstr works... " >&6; }
48832 if test ${gl_cv_func_strstr_works_always+y}
48834 printf %s "(cached) " >&6
48836 if test "$cross_compiling" = yes
48838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48839 /* end confdefs.h. */
48841 #ifdef __GNU_LIBRARY__
48842 #include <features.h>
48843 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
48844 || defined __UCLIBC__
48847 #elif defined __CYGWIN__
48848 #include <cygwin/version.h>
48849 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
48857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48858 $EGREP "Lucky user" >/dev/null 2>&1
48860 gl_cv_func_strstr_works_always="guessing yes"
48862 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
48868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48869 /* end confdefs.h. */
48871 #include <string.h> /* for strstr */
48872 #ifdef __GNU_LIBRARY__
48873 #include <features.h>
48874 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
48878 #define P "_EF_BF_BD"
48879 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
48880 #define NEEDLE P P P P P
48885 return !!strstr (HAYSTACK, NEEDLE);
48891 if ac_fn_c_try_run "$LINENO"
48893 gl_cv_func_strstr_works_always=yes
48895 gl_cv_func_strstr_works_always=no
48897 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48898 conftest.$ac_objext conftest.beam conftest.$ac_ext
48903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
48904 printf "%s\n" "$gl_cv_func_strstr_works_always" >&6; }
48905 case "$gl_cv_func_strstr_works_always" in
48913 if test $REPLACE_STRSTR = 1; then
48922 M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
48934 GL_M4_GNULIB_STRSTR=1
48940 printf "%s\n" "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
48947 if test $HAVE_STRTOD = 1; then
48948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtod obeys C99" >&5
48949 printf %s "checking whether strtod obeys C99... " >&6; }
48950 if test ${gl_cv_func_strtod_works+y}
48952 printf %s "(cached) " >&6
48954 if test "$cross_compiling" = yes
48956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48957 /* end confdefs.h. */
48959 #include <features.h>
48960 #ifdef __GNU_LIBRARY__
48961 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) || (__GLIBC__ > 2)) \
48962 && !defined __UCLIBC__
48968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48969 $EGREP "Lucky user" >/dev/null 2>&1
48971 gl_cv_func_strtod_works="guessing yes"
48974 # Guess yes on musl systems.
48975 *-musl*) gl_cv_func_strtod_works="guessing yes" ;;
48976 # Guess yes on native Windows.
48977 mingw*) gl_cv_func_strtod_works="guessing yes" ;;
48978 *) gl_cv_func_strtod_works="$gl_cross_guess_normal" ;;
48986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48987 /* end confdefs.h. */
48989 #include <stdlib.h>
48992 /* Compare two numbers with ==.
48993 This is a separate function because IRIX 6.5 "cc -O" miscompiles an
48996 numeric_equal (double x, double y)
49007 /* In some old versions of Linux (2000 or before), strtod mis-parses
49008 strings with leading '+'. */
49009 const char *string = " +69";
49011 double value = strtod (string, &term);
49012 if (value != 69 || term != (string + 4))
49016 /* Under Solaris 2.4, strtod returns the wrong value for the
49017 terminating character under some conditions. */
49018 const char *string = "NaN";
49020 strtod (string, &term);
49021 if (term != string && *(term - 1) == 0)
49025 /* Older glibc and Cygwin mis-parse "-0x". */
49026 const char *string = "-0x";
49028 double value = strtod (string, &term);
49030 if (1.0 / value != -1.0 / zero || term != (string + 2))
49034 /* Many platforms do not parse hex floats. */
49035 const char *string = "0XaP+1";
49037 double value = strtod (string, &term);
49038 if (value != 20.0 || term != (string + 6))
49042 /* Many platforms do not parse infinities. HP-UX 11.31 parses inf,
49043 but mistakenly sets errno. */
49044 const char *string = "inf";
49048 value = strtod (string, &term);
49049 if (value != HUGE_VAL || term != (string + 3) || errno)
49053 /* glibc 2.7 and cygwin 1.5.24 misparse "nan()". */
49054 const char *string = "nan()";
49056 double value = strtod (string, &term);
49057 if (numeric_equal (value, value) || term != (string + 5))
49061 /* darwin 10.6.1 misparses "nan(". */
49062 const char *string = "nan(";
49064 double value = strtod (string, &term);
49065 if (numeric_equal (value, value) || term != (string + 3))
49074 if ac_fn_c_try_run "$LINENO"
49076 gl_cv_func_strtod_works=yes
49078 gl_cv_func_strtod_works=no
49080 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49081 conftest.$ac_objext conftest.beam conftest.$ac_ext
49086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtod_works" >&5
49087 printf "%s\n" "$gl_cv_func_strtod_works" >&6; }
49088 case "$gl_cv_func_strtod_works" in
49096 if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
49105 M4_LIBOBJS="$M4_LIBOBJS strtod.$ac_objext"
49109 if test $gl_cv_func_ldexp_no_libm = yes; then
49111 printf "%s\n" "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
49114 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
49115 if test "x$ac_cv_func_nl_langinfo" = xyes
49117 printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
49132 GL_M4_GNULIB_STRTOD=1
49138 printf "%s\n" "#define GNULIB_TEST_STRTOD 1" >>confdefs.h
49177 printf "%s\n" "#define GNULIB_TEMPNAME 1" >>confdefs.h
49180 ac_fn_c_check_header_compile "$LINENO" "sys/single_threaded.h" "ac_cv_header_sys_single_threaded_h" "$ac_includes_default"
49181 if test "x$ac_cv_header_sys_single_threaded_h" = xyes
49183 printf "%s\n" "#define HAVE_SYS_SINGLE_THREADED_H 1" >>confdefs.h
49209 if { test "$HAVE_LIBUNISTRING" != yes \
49214 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
49215 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
49216 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
49217 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
49218 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
49228 LIBUNISTRING_UNISTR_H='unistr.h'
49230 LIBUNISTRING_UNISTR_H=
49236 printf "%s\n" "#define GNULIB_UNISTR_U8_MBTOUCR 1" >>confdefs.h
49241 if { test "$HAVE_LIBUNISTRING" != yes \
49246 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
49247 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
49248 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
49249 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
49250 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
49260 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
49261 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
49263 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
49264 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
49270 printf "%s\n" "#define GNULIB_UNISTR_U8_UCTOMB 1" >>confdefs.h
49275 if { test "$HAVE_LIBUNISTRING" != yes \
49280 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
49281 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
49282 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
49283 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
49284 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
49294 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
49295 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
49297 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
49298 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
49304 if { test "$HAVE_LIBUNISTRING" != yes \
49309 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
49310 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
49311 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
49312 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
49313 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
49323 LIBUNISTRING_UNITYPES_H='unitypes.h'
49325 LIBUNISTRING_UNITYPES_H=
49331 if { test "$HAVE_LIBUNISTRING" != yes \
49336 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
49337 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
49338 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
49339 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
49340 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
49350 LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
49352 LIBUNISTRING_UNIWIDTH_H=
49358 if { test "$HAVE_LIBUNISTRING" != yes \
49363 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
49364 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
49365 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
49366 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
49367 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
49377 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
49378 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
49380 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
49381 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
49386 printf "%s\n" "#define GNULIB_STDIO_SINGLE_THREAD 1" >>confdefs.h
49389 printf "%s\n" "#define USE_UNLOCKED_IO GNULIB_STDIO_SINGLE_THREAD" >>confdefs.h
49411 if test $ac_cv_func_vasnprintf = no; then
49422 M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
49432 M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
49442 M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
49452 M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
49454 if test $ac_cv_func_vasnprintf = yes; then
49456 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
49468 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
49469 if test "x$ac_cv_type_ptrdiff_t" = xyes
49474 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
49488 ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
49489 if test "x$ac_cv_func_vasprintf" = xyes
49491 printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
49495 if test $ac_cv_func_vasprintf = no; then
49505 M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
49515 M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
49518 if test $ac_cv_func_vasprintf = yes; then
49519 REPLACE_VASPRINTF=1
49542 GL_M4_GNULIB_VASPRINTF=1
49548 printf "%s\n" "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
49554 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
49558 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
49575 gl_cv_func_vasprintf_posix=no
49576 ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
49577 if test "x$ac_cv_func_vasprintf" = xyes
49579 printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
49583 case "$gl_cv_func_printf_sizes_c99" in
49585 case "$gl_cv_func_printf_long_double" in
49587 case "$gl_cv_func_printf_infinite" in
49589 case "$gl_cv_func_printf_infinite_long_double" in
49591 case "$gl_cv_func_printf_directive_a" in
49593 case "$gl_cv_func_printf_directive_f" in
49595 case "$gl_cv_func_printf_directive_n" in
49597 case "$gl_cv_func_printf_directive_ls" in
49599 case "$gl_cv_func_printf_positions" in
49601 case "$gl_cv_func_printf_flag_grouping" in
49603 case "$gl_cv_func_printf_flag_leftadjust" in
49605 case "$gl_cv_func_printf_flag_zero" in
49607 case "$gl_cv_func_printf_precision" in
49609 case "$gl_cv_func_printf_enomem" in
49611 if test $ac_cv_func_vasprintf = yes; then
49612 # vasprintf exists and is
49613 # already POSIX compliant.
49614 gl_cv_func_vasprintf_posix=yes
49644 if test $gl_cv_func_vasprintf_posix = no; then
49648 case "$gl_cv_func_printf_infinite" in
49653 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
49661 case "$gl_cv_func_printf_long_double" in
49663 case "$gl_cv_func_printf_infinite_long_double" in
49668 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
49677 case "$gl_cv_func_printf_directive_a" in
49682 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
49684 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
49685 if test "x$ac_cv_func_nl_langinfo" = xyes
49687 printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
49696 case "$gl_cv_func_printf_directive_f" in
49701 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
49708 case "$gl_cv_func_printf_directive_ls" in
49713 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
49720 case "$gl_cv_func_printf_flag_grouping" in
49725 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
49732 case "$gl_cv_func_printf_flag_leftadjust" in
49737 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
49744 case "$gl_cv_func_printf_flag_zero" in
49749 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
49756 case "$gl_cv_func_printf_precision" in
49761 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
49764 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
49767 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
49774 case "$gl_cv_func_printf_enomem" in
49779 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
49782 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
49785 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
49800 M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
49810 M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
49820 M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
49830 M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
49832 if test $ac_cv_func_vasnprintf = yes; then
49834 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
49846 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
49847 if test "x$ac_cv_type_ptrdiff_t" = xyes
49852 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
49872 M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
49882 M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
49885 if test $ac_cv_func_vasprintf = yes; then
49886 REPLACE_VASPRINTF=1
49902 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror:3:c-format"
49906 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror_at_line:5:c-format"
49909 # Check whether --with-packager was given.
49910 if test ${with_packager+y}
49912 withval=$with_packager; case $withval in
49915 printf "%s\n" "#define PACKAGE_PACKAGER \"$withval\"" >>confdefs.h
49923 # Check whether --with-packager-version was given.
49924 if test ${with_packager_version+y}
49926 withval=$with_packager_version; case $withval in
49929 printf "%s\n" "#define PACKAGE_PACKAGER_VERSION \"$withval\"" >>confdefs.h
49937 # Check whether --with-packager-bug-reports was given.
49938 if test ${with_packager_bug_reports+y}
49940 withval=$with_packager_bug_reports; case $withval in
49943 printf "%s\n" "#define PACKAGE_PACKAGER_BUG_REPORTS \"$withval\"" >>confdefs.h
49950 if test "X$with_packager" = "X" && \
49951 test "X$with_packager_version$with_packager_bug_reports" != "X"
49953 as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
49958 ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
49959 if test "x$ac_cv_func_waitid" = xyes
49961 printf "%s\n" "#define HAVE_WAITID 1" >>confdefs.h
49970 mingw*) HAVE_WAITPID=0 ;;
49973 if test $HAVE_WAITPID = 0; then
49982 M4_LIBOBJS="$M4_LIBOBJS waitpid.$ac_objext"
49994 GL_M4_GNULIB_WAITPID=1
50000 printf "%s\n" "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
50021 if case "$host_os" in
50023 *) test $ac_cv_func_mbsinit = yes ;;
50025 && test $ac_cv_func_mbrtowc = yes; then
50030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
50031 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
50032 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
50034 printf %s "(cached) " >&6
50038 # Guess no on AIX and OSF/1.
50039 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
50040 # Guess yes otherwise.
50041 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
50043 if test $LOCALE_JA != none; then
50044 if test "$cross_compiling" = yes
50048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50049 /* end confdefs.h. */
50051 #include <locale.h>
50052 #include <string.h>
50056 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
50058 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
50062 memset (&state, '\0', sizeof (mbstate_t));
50063 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
50064 if (mbsinit (&state))
50070 if ac_fn_c_try_run "$LINENO"
50072 gl_cv_func_mbrtowc_incomplete_state=yes
50074 gl_cv_func_mbrtowc_incomplete_state=no
50076 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50077 conftest.$ac_objext conftest.beam conftest.$ac_ext
50081 if test $LOCALE_FR_UTF8 != none; then
50082 if test "$cross_compiling" = yes
50086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50087 /* end confdefs.h. */
50089 #include <locale.h>
50090 #include <string.h>
50094 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
50096 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
50100 memset (&state, '\0', sizeof (mbstate_t));
50101 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
50102 if (mbsinit (&state))
50108 if ac_fn_c_try_run "$LINENO"
50110 gl_cv_func_mbrtowc_incomplete_state=yes
50112 gl_cv_func_mbrtowc_incomplete_state=no
50114 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50115 conftest.$ac_objext conftest.beam conftest.$ac_ext
50122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
50123 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
50128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
50129 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
50130 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
50132 printf %s "(cached) " >&6
50136 # Guess no on Solaris 8.
50137 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
50138 # Guess yes otherwise.
50139 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
50141 if test $LOCALE_ZH_CN != none; then
50142 if test "$cross_compiling" = yes
50146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50147 /* end confdefs.h. */
50149 #include <locale.h>
50150 #include <stdlib.h>
50151 #include <string.h>
50155 /* This fails on Solaris 8:
50156 mbrtowc returns 2, and sets wc to 0x00F0.
50157 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
50158 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
50160 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
50164 memset (&state, '\0', sizeof (mbstate_t));
50165 if (mbrtowc (&wc, input + 3, 6, &state) != 4
50166 && mbtowc (&wc, input + 3, 6) == 4)
50172 if ac_fn_c_try_run "$LINENO"
50174 gl_cv_func_mbrtowc_sanitycheck=yes
50176 gl_cv_func_mbrtowc_sanitycheck=no
50178 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50179 conftest.$ac_objext conftest.beam conftest.$ac_ext
50185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
50186 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
50188 REPLACE_MBSTATE_T=0
50189 case "$gl_cv_func_mbrtowc_incomplete_state" in
50191 *) REPLACE_MBSTATE_T=1 ;;
50193 case "$gl_cv_func_mbrtowc_sanitycheck" in
50195 *) REPLACE_MBSTATE_T=1 ;;
50198 REPLACE_MBSTATE_T=1
50203 if test $ac_cv_func_wcrtomb = no; then
50205 ac_fn_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
50208 " "$ac_c_undeclared_builtin_options" "CFLAGS"
50209 if test "x$ac_cv_have_decl_wcrtomb" = xyes
50215 printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
50217 if test $ac_cv_have_decl_wcrtomb = yes; then
50221 if test $REPLACE_WCRTOMB = 0; then
50227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
50228 printf %s "checking whether wcrtomb works in the C locale... " >&6; }
50229 if test ${gl_cv_func_wcrtomb_works+y}
50231 printf %s "(cached) " >&6
50233 if test "$cross_compiling" = yes
50236 # Guess no on Android.
50237 linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
50238 # Guess yes otherwise.
50239 *) gl_cv_func_wcrtomb_works="guessing yes";;
50243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50244 /* end confdefs.h. */
50246 #include <string.h>
50247 #include <stdlib.h>
50254 memset (&state, 0, sizeof (state));
50256 count = wcrtomb (out, L'a', &state);
50257 return !(count == 1 && out[0] == 'a');
50260 if ac_fn_c_try_run "$LINENO"
50262 gl_cv_func_wcrtomb_works=yes
50264 gl_cv_func_wcrtomb_works=no
50266 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50267 conftest.$ac_objext conftest.beam conftest.$ac_ext
50272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
50273 printf "%s\n" "$gl_cv_func_wcrtomb_works" >&6; }
50274 case "$gl_cv_func_wcrtomb_works" in
50277 printf "%s\n" "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
50279 REPLACE_WCRTOMB=1 ;;
50282 if test $REPLACE_WCRTOMB = 0; then
50283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
50284 printf %s "checking whether wcrtomb return value is correct... " >&6; }
50285 if test ${gl_cv_func_wcrtomb_retval+y}
50287 printf %s "(cached) " >&6
50291 # Guess no on AIX 4, OSF/1, Solaris, native Windows.
50292 aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
50293 # Guess yes otherwise.
50294 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
50296 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
50297 if test "$cross_compiling" = yes
50301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50302 /* end confdefs.h. */
50304 #include <locale.h>
50305 #include <string.h>
50307 #include <stdlib.h>
50311 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
50313 if (wcrtomb (NULL, 0, NULL) != 1)
50316 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
50318 if (wcrtomb (NULL, 0, NULL) != 1)
50321 wchar_t wc = (wchar_t) 0xBADFACE;
50322 if (mbtowc (&wc, "\303\274", 2) == 2)
50323 if (wcrtomb (NULL, wc, NULL) != 1)
50327 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
50329 if (wcrtomb (NULL, 0, NULL) != 1)
50332 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
50334 if (wcrtomb (NULL, 0, NULL) != 1)
50340 if ac_fn_c_try_run "$LINENO"
50342 gl_cv_func_wcrtomb_retval=yes
50344 gl_cv_func_wcrtomb_retval=no
50346 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50347 conftest.$ac_objext conftest.beam conftest.$ac_ext
50353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
50354 printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
50355 case "$gl_cv_func_wcrtomb_retval" in
50358 printf "%s\n" "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
50360 REPLACE_WCRTOMB=1 ;;
50365 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
50374 M4_LIBOBJS="$M4_LIBOBJS wcrtomb.$ac_objext"
50389 GL_M4_GNULIB_WCRTOMB=1
50395 printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
50416 ac_fn_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
50419 " "$ac_c_undeclared_builtin_options" "CFLAGS"
50420 if test "x$ac_cv_have_decl_wcwidth" = xyes
50426 printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
50428 if test $ac_cv_have_decl_wcwidth != yes; then
50429 HAVE_DECL_WCWIDTH=0
50432 if test $ac_cv_func_wcwidth != yes; then
50433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
50434 printf %s "checking whether wcwidth is a macro... " >&6; }
50435 if test ${gl_cv_func_wcwidth_macro+y}
50437 printf %s "(cached) " >&6
50439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50440 /* end confdefs.h. */
50444 wchar_header_defines_wcwidth
50447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50448 $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1
50450 gl_cv_func_wcwidth_macro=yes
50452 gl_cv_func_wcwidth_macro=no
50458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
50459 printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
50462 if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
50464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
50465 printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
50466 if test ${gl_cv_func_wcwidth_works+y}
50468 printf %s "(cached) " >&6
50471 if test "$cross_compiling" = yes
50475 # Guess yes on glibc systems.
50476 *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
50477 # Guess yes on musl systems.
50478 *-musl*) gl_cv_func_wcwidth_works="guessing yes";;
50479 # Guess yes on AIX 7 systems.
50480 aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
50481 *) gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
50485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50486 /* end confdefs.h. */
50488 #include <locale.h>
50490 #if !HAVE_DECL_WCWIDTH
50492 # ifdef __cplusplus
50500 if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
50502 if (wcwidth (0x0301) > 0)
50504 if (wcwidth (0x05B0) > 0)
50506 if (wcwidth (0x200B) > 0)
50508 if (wcwidth (0xFF1A) == 0)
50510 if (wcwidth (0x2202) > 1)
50516 if ac_fn_c_try_run "$LINENO"
50518 gl_cv_func_wcwidth_works=yes
50520 gl_cv_func_wcwidth_works=no
50522 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50523 conftest.$ac_objext conftest.beam conftest.$ac_ext
50528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
50529 printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
50530 case "$gl_cv_func_wcwidth_works" in
50532 *no) REPLACE_WCWIDTH=1 ;;
50538 if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
50547 M4_LIBOBJS="$M4_LIBOBJS wcwidth.$ac_objext"
50563 GL_M4_GNULIB_WCWIDTH=1
50569 printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
50584 M4_LIBOBJS="$M4_LIBOBJS windows-mutex.$ac_objext"
50599 M4_LIBOBJS="$M4_LIBOBJS windows-once.$ac_objext"
50614 M4_LIBOBJS="$M4_LIBOBJS windows-recmutex.$ac_objext"
50629 M4_LIBOBJS="$M4_LIBOBJS windows-rwlock.$ac_objext"
50644 M4_LIBOBJS="$M4_LIBOBJS windows-spawn.$ac_objext"
50659 M4_LIBOBJS="$M4_LIBOBJS windows-spin.$ac_objext"
50674 M4_LIBOBJS="$M4_LIBOBJS windows-tls.$ac_objext"
50681 printf "%s\n" "#define GNULIB_XALLOC 1" >>confdefs.h
50686 printf "%s\n" "#define GNULIB_XALLOC_DIE 1" >>confdefs.h
50691 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xprintf:1:c-format"
50695 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvprintf:1:c-format"
50699 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xfprintf:2:c-format"
50703 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvfprintf:2:c-format"
50707 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
50708 if test "x$ac_cv_header_stdint_h" = xyes
50710 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
50723 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
50725 # End of code from modules
50751 gl_source_base='tests'
50752 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
50754 gl_module_indicator_condition=$M4tests_WITNESS
50757 if test "$ac_cv_header_winsock2_h" = yes; then
50766 M4tests_LIBOBJS="$M4tests_LIBOBJS accept.$ac_objext"
50778 if test "$GL_M4_GNULIB_ACCEPT" != 1; then
50779 if test "$GL_M4_GNULIB_ACCEPT" = 0; then
50780 GL_M4_GNULIB_ACCEPT=$gl_module_indicator_condition
50782 GL_M4_GNULIB_ACCEPT="($GL_M4_GNULIB_ACCEPT || $gl_module_indicator_condition)"
50790 printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
50806 if test "$ac_cv_header_winsock2_h" = yes; then
50815 M4tests_LIBOBJS="$M4tests_LIBOBJS bind.$ac_objext"
50827 if test "$GL_M4_GNULIB_BIND" != 1; then
50828 if test "$GL_M4_GNULIB_BIND" = 0; then
50829 GL_M4_GNULIB_BIND=$gl_module_indicator_condition
50831 GL_M4_GNULIB_BIND="($GL_M4_GNULIB_BIND || $gl_module_indicator_condition)"
50839 printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
50846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
50847 printf %s "checking for a traditional french locale... " >&6; }
50848 if test ${gt_cv_locale_fr+y}
50850 printf %s "(cached) " >&6
50853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50854 /* end confdefs.h. */
50856 #include <locale.h>
50858 #if HAVE_LANGINFO_CODESET
50859 # include <langinfo.h>
50861 #include <stdlib.h>
50862 #include <string.h>
50866 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
50867 imitates locale dependent behaviour by looking at the environment
50868 variables, and all locales use the UTF-8 encoding. */
50869 #if defined __BEOS__ || defined __HAIKU__
50872 /* Check whether the given locale name is recognized by the system. */
50873 # if defined _WIN32 && !defined __CYGWIN__
50874 /* On native Windows, setlocale(category, "") looks at the system settings,
50875 not at the environment variables. Also, when an encoding suffix such
50876 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
50877 category of the locale to "C". */
50878 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
50879 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
50882 if (setlocale (LC_ALL, "") == NULL) return 1;
50884 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
50885 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
50886 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
50887 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
50888 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
50889 some unit tests fail.
50890 On MirBSD 10, when an unsupported locale is specified, setlocale()
50891 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
50892 # if HAVE_LANGINFO_CODESET
50894 const char *cs = nl_langinfo (CODESET);
50895 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
50896 || strcmp (cs, "UTF-8") == 0)
50901 /* On Cygwin, avoid locale names without encoding suffix, because the
50902 locale_charset() function relies on the encoding suffix. Note that
50903 LC_ALL is set on the command line. */
50904 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
50906 /* Check whether in the abbreviation of the second month, the second
50907 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
50908 one byte long. This excludes the UTF-8 encoding. */
50909 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
50910 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
50911 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
50912 /* Check whether the decimal separator is a comma.
50913 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
50914 are nl_langinfo(RADIXCHAR) are both ".". */
50915 if (localeconv () ->decimal_point[0] != ',') return 1;
50922 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
50923 (eval $ac_link) 2>&5
50925 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50926 test $ac_status = 0; } && test -s conftest$ac_exeext; then
50928 # Handle native Windows specially, because there setlocale() interprets
50929 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
50930 # "fr" or "fra" as "French" or "French_France.1252",
50931 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
50932 # "ja" as "Japanese" or "Japanese_Japan.932",
50935 # Test for the native Windows locale name.
50936 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50937 gt_cv_locale_fr=French_France.1252
50940 gt_cv_locale_fr=none
50944 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
50945 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
50946 # configure script would override the LC_ALL setting. Likewise for
50947 # LC_CTYPE, which is also set at the beginning of the configure script.
50948 # Test for the usual locale name.
50949 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50950 gt_cv_locale_fr=fr_FR
50952 # Test for the locale name with explicit encoding suffix.
50953 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50954 gt_cv_locale_fr=fr_FR.ISO-8859-1
50956 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
50957 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50958 gt_cv_locale_fr=fr_FR.ISO8859-1
50960 # Test for the HP-UX locale name.
50961 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50962 gt_cv_locale_fr=fr_FR.iso88591
50964 # Test for the Solaris 7 locale name.
50965 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
50969 gt_cv_locale_fr=none
50981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
50982 printf "%s\n" "$gt_cv_locale_fr" >&6; }
50983 LOCALE_FR=$gt_cv_locale_fr
50988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
50989 printf %s "checking for a french Unicode locale... " >&6; }
50990 if test ${gt_cv_locale_fr_utf8+y}
50992 printf %s "(cached) " >&6
50995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50996 /* end confdefs.h. */
50998 #include <locale.h>
51000 #if HAVE_LANGINFO_CODESET
51001 # include <langinfo.h>
51003 #include <stdlib.h>
51004 #include <string.h>
51008 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
51009 imitates locale dependent behaviour by looking at the environment
51010 variables, and all locales use the UTF-8 encoding. */
51011 #if !(defined __BEOS__ || defined __HAIKU__)
51012 /* Check whether the given locale name is recognized by the system. */
51013 # if defined _WIN32 && !defined __CYGWIN__
51014 /* On native Windows, setlocale(category, "") looks at the system settings,
51015 not at the environment variables. Also, when an encoding suffix such
51016 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51017 category of the locale to "C". */
51018 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51019 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51022 if (setlocale (LC_ALL, "") == NULL) return 1;
51024 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51025 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
51026 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51027 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51028 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51029 some unit tests fail. */
51030 # if HAVE_LANGINFO_CODESET
51032 const char *cs = nl_langinfo (CODESET);
51033 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
51038 /* On Cygwin, avoid locale names without encoding suffix, because the
51039 locale_charset() function relies on the encoding suffix. Note that
51040 LC_ALL is set on the command line. */
51041 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
51043 /* Check whether in the abbreviation of the second month, the second
51044 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
51045 two bytes long, with UTF-8 encoding. */
51046 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
51047 if (strftime (buf, sizeof (buf), "%b", &t) < 4
51048 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
51051 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
51052 /* Check whether the decimal separator is a comma.
51053 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
51054 are nl_langinfo(RADIXCHAR) are both ".". */
51055 if (localeconv () ->decimal_point[0] != ',') return 1;
51061 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
51062 (eval $ac_link) 2>&5
51064 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51065 test $ac_status = 0; } && test -s conftest$ac_exeext; then
51067 # Handle native Windows specially, because there setlocale() interprets
51068 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
51069 # "fr" or "fra" as "French" or "French_France.1252",
51070 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
51071 # "ja" as "Japanese" or "Japanese_Japan.932",
51074 # Test for the hypothetical native Windows locale name.
51075 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51076 gt_cv_locale_fr_utf8=French_France.65001
51079 gt_cv_locale_fr_utf8=none
51083 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51084 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51085 # configure script would override the LC_ALL setting. Likewise for
51086 # LC_CTYPE, which is also set at the beginning of the configure script.
51087 # Test for the usual locale name.
51088 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51089 gt_cv_locale_fr_utf8=fr_FR
51091 # Test for the locale name with explicit encoding suffix.
51092 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51093 gt_cv_locale_fr_utf8=fr_FR.UTF-8
51095 # Test for the Solaris 7 locale name.
51096 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51097 gt_cv_locale_fr_utf8=fr.UTF-8
51100 gt_cv_locale_fr_utf8=none
51110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
51111 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
51112 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
51118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
51119 printf %s "checking for a traditional french locale... " >&6; }
51120 if test ${gt_cv_locale_fr+y}
51122 printf %s "(cached) " >&6
51125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51126 /* end confdefs.h. */
51128 #include <locale.h>
51130 #if HAVE_LANGINFO_CODESET
51131 # include <langinfo.h>
51133 #include <stdlib.h>
51134 #include <string.h>
51138 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
51139 imitates locale dependent behaviour by looking at the environment
51140 variables, and all locales use the UTF-8 encoding. */
51141 #if defined __BEOS__ || defined __HAIKU__
51144 /* Check whether the given locale name is recognized by the system. */
51145 # if defined _WIN32 && !defined __CYGWIN__
51146 /* On native Windows, setlocale(category, "") looks at the system settings,
51147 not at the environment variables. Also, when an encoding suffix such
51148 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51149 category of the locale to "C". */
51150 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51151 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51154 if (setlocale (LC_ALL, "") == NULL) return 1;
51156 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51157 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
51158 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51159 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51160 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51161 some unit tests fail.
51162 On MirBSD 10, when an unsupported locale is specified, setlocale()
51163 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
51164 # if HAVE_LANGINFO_CODESET
51166 const char *cs = nl_langinfo (CODESET);
51167 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
51168 || strcmp (cs, "UTF-8") == 0)
51173 /* On Cygwin, avoid locale names without encoding suffix, because the
51174 locale_charset() function relies on the encoding suffix. Note that
51175 LC_ALL is set on the command line. */
51176 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
51178 /* Check whether in the abbreviation of the second month, the second
51179 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
51180 one byte long. This excludes the UTF-8 encoding. */
51181 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
51182 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
51183 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
51184 /* Check whether the decimal separator is a comma.
51185 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
51186 are nl_langinfo(RADIXCHAR) are both ".". */
51187 if (localeconv () ->decimal_point[0] != ',') return 1;
51194 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
51195 (eval $ac_link) 2>&5
51197 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51198 test $ac_status = 0; } && test -s conftest$ac_exeext; then
51200 # Handle native Windows specially, because there setlocale() interprets
51201 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
51202 # "fr" or "fra" as "French" or "French_France.1252",
51203 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
51204 # "ja" as "Japanese" or "Japanese_Japan.932",
51207 # Test for the native Windows locale name.
51208 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51209 gt_cv_locale_fr=French_France.1252
51212 gt_cv_locale_fr=none
51216 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51217 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51218 # configure script would override the LC_ALL setting. Likewise for
51219 # LC_CTYPE, which is also set at the beginning of the configure script.
51220 # Test for the usual locale name.
51221 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51222 gt_cv_locale_fr=fr_FR
51224 # Test for the locale name with explicit encoding suffix.
51225 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51226 gt_cv_locale_fr=fr_FR.ISO-8859-1
51228 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
51229 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51230 gt_cv_locale_fr=fr_FR.ISO8859-1
51232 # Test for the HP-UX locale name.
51233 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51234 gt_cv_locale_fr=fr_FR.iso88591
51236 # Test for the Solaris 7 locale name.
51237 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51241 gt_cv_locale_fr=none
51253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
51254 printf "%s\n" "$gt_cv_locale_fr" >&6; }
51255 LOCALE_FR=$gt_cv_locale_fr
51261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
51262 printf %s "checking for a turkish Unicode locale... " >&6; }
51263 if test ${gt_cv_locale_tr_utf8+y}
51265 printf %s "(cached) " >&6
51268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51269 /* end confdefs.h. */
51271 #include <locale.h>
51273 #if HAVE_LANGINFO_CODESET
51274 # include <langinfo.h>
51276 #include <stdlib.h>
51277 #include <string.h>
51278 #include <wctype.h>
51282 /* On BeOS, locales are not implemented in libc. Rather, libintl
51283 imitates locale dependent behaviour by looking at the environment
51284 variables, and all locales use the UTF-8 encoding. But BeOS does not
51285 implement the Turkish upper-/lowercase mappings. Therefore, let this
51286 program return 1 on BeOS. */
51287 /* Check whether the given locale name is recognized by the system. */
51288 #if defined _WIN32 && !defined __CYGWIN__
51289 /* On native Windows, setlocale(category, "") looks at the system settings,
51290 not at the environment variables. Also, when an encoding suffix such
51291 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
51292 category of the locale to "C". */
51293 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
51294 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
51297 if (setlocale (LC_ALL, "") == NULL) return 1;
51299 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51300 On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
51301 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51302 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51303 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51304 some unit tests fail. */
51305 #if HAVE_LANGINFO_CODESET
51307 const char *cs = nl_langinfo (CODESET);
51308 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
51313 /* On Cygwin, avoid locale names without encoding suffix, because the
51314 locale_charset() function relies on the encoding suffix. Note that
51315 LC_ALL is set on the command line. */
51316 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
51318 /* Check whether in the abbreviation of the eighth month, the second
51319 character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
51320 two bytes long, with UTF-8 encoding. */
51321 t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
51322 if (strftime (buf, sizeof (buf), "%b", &t) < 4
51323 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
51325 /* Check whether the upper-/lowercase mappings are as expected for
51327 if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
51328 || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
51334 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
51335 (eval $ac_link) 2>&5
51337 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51338 test $ac_status = 0; } && test -s conftest$ac_exeext; then
51340 # Handle native Windows specially, because there setlocale() interprets
51341 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
51342 # "fr" or "fra" as "French" or "French_France.1252",
51343 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
51344 # "ja" as "Japanese" or "Japanese_Japan.932",
51347 # Test for the hypothetical native Windows locale name.
51348 if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51349 gt_cv_locale_tr_utf8=Turkish_Turkey.65001
51352 gt_cv_locale_tr_utf8=none
51356 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51357 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
51358 # configure script would override the LC_ALL setting. Likewise for
51359 # LC_CTYPE, which is also set at the beginning of the configure script.
51360 # Test for the usual locale name.
51361 if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51362 gt_cv_locale_tr_utf8=tr_TR
51364 # Test for the locale name with explicit encoding suffix.
51365 if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51366 gt_cv_locale_tr_utf8=tr_TR.UTF-8
51368 # Test for the Solaris 7 locale name.
51369 if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51370 gt_cv_locale_tr_utf8=tr.UTF-8
51373 gt_cv_locale_tr_utf8=none
51380 gt_cv_locale_tr_utf8=none
51385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
51386 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
51387 LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
51391 if test "$ac_cv_header_winsock2_h" = yes; then
51400 M4tests_LIBOBJS="$M4tests_LIBOBJS connect.$ac_objext"
51412 if test "$GL_M4_GNULIB_CONNECT" != 1; then
51413 if test "$GL_M4_GNULIB_CONNECT" = 0; then
51414 GL_M4_GNULIB_CONNECT=$gl_module_indicator_condition
51416 GL_M4_GNULIB_CONNECT="($GL_M4_GNULIB_CONNECT || $gl_module_indicator_condition)"
51424 printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
51437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
51438 printf %s "checking whether open recognizes a trailing slash... " >&6; }
51439 if test ${gl_cv_func_open_slash+y}
51441 printf %s "(cached) " >&6
51443 # Assume that if we have lstat, we can also check symlinks.
51444 if test $ac_cv_func_lstat = yes; then
51446 ln -s conftest.tmp conftest.lnk
51448 if test "$cross_compiling" = yes
51452 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
51453 gl_cv_func_open_slash="guessing no" ;;
51455 gl_cv_func_open_slash="guessing yes" ;;
51459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51460 /* end confdefs.h. */
51464 # include <unistd.h>
51474 if (open ("conftest.lnk/", O_RDONLY) != -1)
51477 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
51482 if ac_fn_c_try_run "$LINENO"
51484 gl_cv_func_open_slash=yes
51486 gl_cv_func_open_slash=no
51488 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51489 conftest.$ac_objext conftest.beam conftest.$ac_ext
51492 rm -f conftest.sl conftest.tmp conftest.lnk
51495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
51496 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
51497 case "$gl_cv_func_open_slash" in
51500 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
51505 case "$gl_cv_func_open_slash" in
51513 if test $REPLACE_CREAT = 1; then
51522 M4tests_LIBOBJS="$M4tests_LIBOBJS creat.$ac_objext"
51534 if test "$GL_M4_GNULIB_CREAT" != 1; then
51535 if test "$GL_M4_GNULIB_CREAT" = 0; then
51536 GL_M4_GNULIB_CREAT=$gl_module_indicator_condition
51538 GL_M4_GNULIB_CREAT="($GL_M4_GNULIB_CREAT || $gl_module_indicator_condition)"
51546 printf "%s\n" "#define GNULIB_TEST_CREAT 1" >>confdefs.h
51556 ac_fn_c_check_func "$LINENO" "close_range" "ac_cv_func_close_range"
51557 if test "x$ac_cv_func_close_range" = xyes
51559 printf "%s\n" "#define HAVE_CLOSE_RANGE 1" >>confdefs.h
51569 if test $ac_cv_func_explicit_bzero = no; then
51570 HAVE_EXPLICIT_BZERO=0
51573 if test $HAVE_EXPLICIT_BZERO = 0; then
51582 M4tests_LIBOBJS="$M4tests_LIBOBJS explicit_bzero.$ac_objext"
51585 ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset"
51586 if test "x$ac_cv_func_explicit_memset" = xyes
51588 printf "%s\n" "#define HAVE_EXPLICIT_MEMSET 1" >>confdefs.h
51604 if test "$GL_M4_GNULIB_EXPLICIT_BZERO" != 1; then
51605 if test "$GL_M4_GNULIB_EXPLICIT_BZERO" = 0; then
51606 GL_M4_GNULIB_EXPLICIT_BZERO=$gl_module_indicator_condition
51608 GL_M4_GNULIB_EXPLICIT_BZERO="($GL_M4_GNULIB_EXPLICIT_BZERO || $gl_module_indicator_condition)"
51616 printf "%s\n" "#define GNULIB_TEST_EXPLICIT_BZERO 1" >>confdefs.h
51624 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
51628 if test $REPLACE_FDOPEN = 0; then
51629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
51630 printf %s "checking whether fdopen sets errno... " >&6; }
51631 if test ${gl_cv_func_fdopen_works+y}
51633 printf %s "(cached) " >&6
51636 if test "$cross_compiling" = yes
51639 mingw*) gl_cv_func_fdopen_works="guessing no" ;;
51640 *) gl_cv_func_fdopen_works="guessing yes" ;;
51644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51645 /* end confdefs.h. */
51658 fp = fdopen (-1, "r");
51659 if (fp == NULL && errno == 0)
51664 if ac_fn_c_try_run "$LINENO"
51666 gl_cv_func_fdopen_works=yes
51668 gl_cv_func_fdopen_works=no
51670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51671 conftest.$ac_objext conftest.beam conftest.$ac_ext
51676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
51677 printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
51678 case "$gl_cv_func_fdopen_works" in
51679 *no) REPLACE_FDOPEN=1 ;;
51683 if test $REPLACE_FDOPEN = 1; then
51692 M4tests_LIBOBJS="$M4tests_LIBOBJS fdopen.$ac_objext"
51705 if test "$GL_M4_GNULIB_FDOPEN" != 1; then
51706 if test "$GL_M4_GNULIB_FDOPEN" = 0; then
51707 GL_M4_GNULIB_FDOPEN=$gl_module_indicator_condition
51709 GL_M4_GNULIB_FDOPEN="($GL_M4_GNULIB_FDOPEN || $gl_module_indicator_condition)"
51717 printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
51728 mingw* | pw* | os2*)
51732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether freopen works on closed fds" >&5
51733 printf %s "checking whether freopen works on closed fds... " >&6; }
51734 if test ${gl_cv_func_freopen_works_on_closed+y}
51736 printf %s "(cached) " >&6
51738 if test "$cross_compiling" = yes
51741 *gnu*) gl_cv_func_freopen_works_on_closed="guessing no" ;;
51742 *) gl_cv_func_freopen_works_on_closed="guessing yes";;
51745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51746 /* end confdefs.h. */
51748 #include <unistd.h>
51757 return !(freopen ("/dev/null", "r", stdin)
51758 && getchar () == EOF
51759 && !ferror (stdin) && feof (stdin));
51764 if ac_fn_c_try_run "$LINENO"
51766 gl_cv_func_freopen_works_on_closed=yes
51768 gl_cv_func_freopen_works_on_closed=no
51770 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51771 conftest.$ac_objext conftest.beam conftest.$ac_ext
51775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_freopen_works_on_closed" >&5
51776 printf "%s\n" "$gl_cv_func_freopen_works_on_closed" >&6; }
51777 case $gl_cv_func_freopen_works_on_closed in
51778 *no) REPLACE_FREOPEN=1;;
51782 if test $REPLACE_FREOPEN = 1; then
51791 M4tests_LIBOBJS="$M4tests_LIBOBJS freopen.$ac_objext"
51804 if test "$GL_M4_GNULIB_FREOPEN" != 1; then
51805 if test "$GL_M4_GNULIB_FREOPEN" = 0; then
51806 GL_M4_GNULIB_FREOPEN=$gl_module_indicator_condition
51808 GL_M4_GNULIB_FREOPEN="($GL_M4_GNULIB_FREOPEN || $gl_module_indicator_condition)"
51816 printf "%s\n" "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h
51827 if test $ac_cv_func_ftruncate = yes; then
51832 REPLACE_FTRUNCATE=1
51840 if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
51849 M4tests_LIBOBJS="$M4tests_LIBOBJS ftruncate.$ac_objext"
51852 ac_fn_c_check_func "$LINENO" "_chsize" "ac_cv_func__chsize"
51853 if test "x$ac_cv_func__chsize" = xyes
51855 printf "%s\n" "#define HAVE__CHSIZE 1" >>confdefs.h
51870 if test "$GL_M4_GNULIB_FTRUNCATE" != 1; then
51871 if test "$GL_M4_GNULIB_FTRUNCATE" = 0; then
51872 GL_M4_GNULIB_FTRUNCATE=$gl_module_indicator_condition
51874 GL_M4_GNULIB_FTRUNCATE="($GL_M4_GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
51882 printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
51893 gl_gettimeofday_timezone=void
51894 if test $ac_cv_func_gettimeofday != yes; then
51895 HAVE_GETTIMEOFDAY=0
51897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
51898 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
51899 if test ${gl_cv_func_gettimeofday_posix_signature+y}
51901 printf %s "(cached) " >&6
51903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51904 /* end confdefs.h. */
51905 #include <sys/time.h>
51907 int gettimeofday (struct timeval *restrict, void *restrict);
51912 /* glibc uses struct timezone * rather than the POSIX void *
51913 if _GNU_SOURCE is defined. However, since the only portable
51914 use of gettimeofday uses NULL as the second parameter, and
51915 since the glibc definition is actually more typesafe, it is
51916 not worth wrapping this to get a compliant signature. */
51917 int (*f) (struct timeval *restrict, void *restrict)
51920 return !(x | c.tv_sec | c.tv_usec);
51926 if ac_fn_c_try_compile "$LINENO"
51928 gl_cv_func_gettimeofday_posix_signature=yes
51930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51931 /* end confdefs.h. */
51932 #include <sys/time.h>
51933 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
51943 if ac_fn_c_try_compile "$LINENO"
51945 gl_cv_func_gettimeofday_posix_signature=almost
51947 gl_cv_func_gettimeofday_posix_signature=no
51949 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
51951 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
51953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
51954 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
51955 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
51956 gl_gettimeofday_timezone='struct timezone'
51957 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
51958 REPLACE_GETTIMEOFDAY=1
51960 if test $REPLACE_STRUCT_TIMEVAL = 1; then
51961 REPLACE_GETTIMEOFDAY=1
51964 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
51968 printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
51971 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
51980 M4tests_LIBOBJS="$M4tests_LIBOBJS gettimeofday.$ac_objext"
51993 if test "$GL_M4_GNULIB_GETTIMEOFDAY" != 1; then
51994 if test "$GL_M4_GNULIB_GETTIMEOFDAY" = 0; then
51995 GL_M4_GNULIB_GETTIMEOFDAY=$gl_module_indicator_condition
51997 GL_M4_GNULIB_GETTIMEOFDAY="($GL_M4_GNULIB_GETTIMEOFDAY || $gl_module_indicator_condition)"
52005 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
52024 if test $ac_cv_header_sys_socket_h != yes; then
52025 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
52026 if test "x$ac_cv_header_winsock2_h" = xyes
52028 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
52033 if test "$ac_cv_header_winsock2_h" = yes; then
52035 UNISTD_H_HAVE_WINSOCK2_H=1
52036 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
52042 if test $HAVE_WINSOCK2_H = 1; then
52043 REPLACE_INET_PTON=1
52044 ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
52045 " "$ac_c_undeclared_builtin_options" "CFLAGS"
52046 if test "x$ac_cv_have_decl_inet_pton" = xyes
52052 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
52054 if test $ac_cv_have_decl_inet_pton = yes; then
52055 INET_PTON_LIB="-lws2_32"
52057 HAVE_DECL_INET_PTON=0
52061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
52062 printf %s "checking for library containing inet_pton... " >&6; }
52063 if test ${ac_cv_search_inet_pton+y}
52065 printf %s "(cached) " >&6
52067 ac_func_search_save_LIBS=$LIBS
52068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52069 /* end confdefs.h. */
52071 /* Override any GCC internal prototype to avoid an error.
52072 Use char because int might match the return type of a GCC
52073 builtin and then its argument prototype would still apply. */
52078 return inet_pton ();
52083 for ac_lib in '' nsl resolv network
52085 if test -z "$ac_lib"; then
52086 ac_res="none required"
52089 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
52091 if ac_fn_c_try_link "$LINENO"
52093 ac_cv_search_inet_pton=$ac_res
52095 rm -f core conftest.err conftest.$ac_objext conftest.beam \
52097 if test ${ac_cv_search_inet_pton+y}
52102 if test ${ac_cv_search_inet_pton+y}
52106 ac_cv_search_inet_pton=no
52108 rm conftest.$ac_ext
52109 LIBS=$ac_func_search_save_LIBS
52111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
52112 printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
52113 ac_res=$ac_cv_search_inet_pton
52114 if test "$ac_res" != no
52116 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
52119 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
52120 if test "x$ac_cv_func_inet_pton" = xyes
52122 printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
52126 if test $ac_cv_func_inet_pton = no; then
52134 if test "$ac_cv_search_inet_pton" != "no" \
52135 && test "$ac_cv_search_inet_pton" != "none required"; then
52136 INET_PTON_LIB="$ac_cv_search_inet_pton"
52140 ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
52142 # include <netdb.h>
52145 " "$ac_c_undeclared_builtin_options" "CFLAGS"
52146 if test "x$ac_cv_have_decl_inet_pton" = xyes
52152 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
52154 if test $ac_cv_have_decl_inet_pton = no; then
52155 HAVE_DECL_INET_PTON=0
52160 if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1; then
52169 M4tests_LIBOBJS="$M4tests_LIBOBJS inet_pton.$ac_objext"
52184 if test "$GL_M4_GNULIB_INET_PTON" != 1; then
52185 if test "$GL_M4_GNULIB_INET_PTON" = 0; then
52186 GL_M4_GNULIB_INET_PTON=$gl_module_indicator_condition
52188 GL_M4_GNULIB_INET_PTON="($GL_M4_GNULIB_INET_PTON || $gl_module_indicator_condition)"
52195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
52196 printf %s "checking whether byte ordering is bigendian... " >&6; }
52197 if test ${ac_cv_c_bigendian+y}
52199 printf %s "(cached) " >&6
52201 ac_cv_c_bigendian=unknown
52202 # See if we're dealing with a universal compiler.
52203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52204 /* end confdefs.h. */
52205 #ifndef __APPLE_CC__
52206 not a universal capable compiler
52211 if ac_fn_c_try_compile "$LINENO"
52214 # Check for potential -arch flags. It is not universal unless
52215 # there are at least two -arch flags with different values.
52218 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
52219 if test -n "$ac_prev"; then
52221 i?86 | x86_64 | ppc | ppc64)
52222 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
52225 ac_cv_c_bigendian=universal
52231 elif test "x$ac_word" = "x-arch"; then
52236 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52237 if test $ac_cv_c_bigendian = unknown; then
52238 # See if sys/param.h defines the BYTE_ORDER macro.
52239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52240 /* end confdefs.h. */
52241 #include <sys/types.h>
52242 #include <sys/param.h>
52247 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
52248 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
52250 bogus endian macros
52257 if ac_fn_c_try_compile "$LINENO"
52259 # It does; now see whether it defined to BIG_ENDIAN or not.
52260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52261 /* end confdefs.h. */
52262 #include <sys/types.h>
52263 #include <sys/param.h>
52268 #if BYTE_ORDER != BIG_ENDIAN
52276 if ac_fn_c_try_compile "$LINENO"
52278 ac_cv_c_bigendian=yes
52280 ac_cv_c_bigendian=no
52282 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52284 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52286 if test $ac_cv_c_bigendian = unknown; then
52287 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
52288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52289 /* end confdefs.h. */
52290 #include <limits.h>
52295 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
52296 bogus endian macros
52303 if ac_fn_c_try_compile "$LINENO"
52305 # It does; now see whether it defined to _BIG_ENDIAN or not.
52306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52307 /* end confdefs.h. */
52308 #include <limits.h>
52313 #ifndef _BIG_ENDIAN
52321 if ac_fn_c_try_compile "$LINENO"
52323 ac_cv_c_bigendian=yes
52325 ac_cv_c_bigendian=no
52327 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52329 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52331 if test $ac_cv_c_bigendian = unknown; then
52332 # Compile a test program.
52333 if test "$cross_compiling" = yes
52335 # Try to guess by grepping values from an object file.
52336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52337 /* end confdefs.h. */
52338 unsigned short int ascii_mm[] =
52339 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
52340 unsigned short int ascii_ii[] =
52341 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
52342 int use_ascii (int i) {
52343 return ascii_mm[i] + ascii_ii[i];
52345 unsigned short int ebcdic_ii[] =
52346 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
52347 unsigned short int ebcdic_mm[] =
52348 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
52349 int use_ebcdic (int i) {
52350 return ebcdic_mm[i] + ebcdic_ii[i];
52357 return use_ascii (foo) == use_ebcdic (foo);
52362 if ac_fn_c_try_compile "$LINENO"
52364 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
52365 ac_cv_c_bigendian=yes
52367 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
52368 if test "$ac_cv_c_bigendian" = unknown; then
52369 ac_cv_c_bigendian=no
52371 # finding both strings is unlikely to happen, but who knows?
52372 ac_cv_c_bigendian=unknown
52376 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52379 /* end confdefs.h. */
52380 $ac_includes_default
52385 /* Are we little or big endian? From Harbison&Steele. */
52389 char c[sizeof (long int)];
52392 return u.c[sizeof (long int) - 1] == 1;
52398 if ac_fn_c_try_run "$LINENO"
52400 ac_cv_c_bigendian=no
52402 ac_cv_c_bigendian=yes
52404 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52405 conftest.$ac_objext conftest.beam conftest.$ac_ext
52410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
52411 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
52412 case $ac_cv_c_bigendian in #(
52414 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
52420 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
52424 as_fn_error $? "unknown endianness
52425 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
52443 if test "$ac_cv_header_winsock2_h" = yes; then
52446 ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
52447 if test "x$ac_cv_func_ioctl" = xyes
52449 printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
52453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
52454 printf %s "checking for ioctl with POSIX signature... " >&6; }
52455 if test ${gl_cv_func_ioctl_posix_signature+y}
52457 printf %s "(cached) " >&6
52459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52460 /* end confdefs.h. */
52461 #include <sys/ioctl.h>
52462 /* On some platforms, ioctl() is declared in <unistd.h>. */
52463 #include <unistd.h>
52472 int ioctl (int, int, ...);
52479 if ac_fn_c_try_compile "$LINENO"
52481 gl_cv_func_ioctl_posix_signature=yes
52483 gl_cv_func_ioctl_posix_signature=no
52485 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
52489 printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
52490 if test $gl_cv_func_ioctl_posix_signature != yes; then
52495 if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
52504 M4tests_LIBOBJS="$M4tests_LIBOBJS ioctl.$ac_objext"
52516 if test "$GL_M4_GNULIB_IOCTL" != 1; then
52517 if test "$GL_M4_GNULIB_IOCTL" = 0; then
52518 GL_M4_GNULIB_IOCTL=$gl_module_indicator_condition
52520 GL_M4_GNULIB_IOCTL="($GL_M4_GNULIB_IOCTL || $gl_module_indicator_condition)"
52528 printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
52537 if test $ac_cv_func_isblank = no; then
52541 if test $HAVE_ISBLANK = 0; then
52550 M4tests_LIBOBJS="$M4tests_LIBOBJS isblank.$ac_objext"
52555 printf "%s\n" "#define GNULIB_ISBLANK $gl_module_indicator_condition" >>confdefs.h
52567 if test "$GL_M4_GNULIB_ISBLANK" != 1; then
52568 if test "$GL_M4_GNULIB_ISBLANK" = 0; then
52569 GL_M4_GNULIB_ISBLANK=$gl_module_indicator_condition
52571 GL_M4_GNULIB_ISBLANK="($GL_M4_GNULIB_ISBLANK || $gl_module_indicator_condition)"
52579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
52580 printf %s "checking where to find the exponent in a 'double'... " >&6; }
52581 if test ${gl_cv_cc_double_expbit0+y}
52583 printf %s "(cached) " >&6
52586 if test "$cross_compiling" = yes
52589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52590 /* end confdefs.h. */
52592 #if defined arm || defined __arm || defined __arm__
52597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52598 $EGREP "mixed_endianness" >/dev/null 2>&1
52600 gl_cv_cc_double_expbit0="unknown"
52604 if test ${ac_cv_c_bigendian+y}
52606 printf %s "(cached) " >&6
52608 ac_cv_c_bigendian=unknown
52609 # See if we're dealing with a universal compiler.
52610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52611 /* end confdefs.h. */
52612 #ifndef __APPLE_CC__
52613 not a universal capable compiler
52618 if ac_fn_c_try_compile "$LINENO"
52621 # Check for potential -arch flags. It is not universal unless
52622 # there are at least two -arch flags with different values.
52625 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
52626 if test -n "$ac_prev"; then
52628 i?86 | x86_64 | ppc | ppc64)
52629 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
52632 ac_cv_c_bigendian=universal
52638 elif test "x$ac_word" = "x-arch"; then
52643 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52644 if test $ac_cv_c_bigendian = unknown; then
52645 # See if sys/param.h defines the BYTE_ORDER macro.
52646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52647 /* end confdefs.h. */
52648 #include <sys/types.h>
52649 #include <sys/param.h>
52654 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
52655 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
52657 bogus endian macros
52664 if ac_fn_c_try_compile "$LINENO"
52666 # It does; now see whether it defined to BIG_ENDIAN or not.
52667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52668 /* end confdefs.h. */
52669 #include <sys/types.h>
52670 #include <sys/param.h>
52675 #if BYTE_ORDER != BIG_ENDIAN
52683 if ac_fn_c_try_compile "$LINENO"
52685 ac_cv_c_bigendian=yes
52687 ac_cv_c_bigendian=no
52689 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52691 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52693 if test $ac_cv_c_bigendian = unknown; then
52694 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
52695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52696 /* end confdefs.h. */
52697 #include <limits.h>
52702 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
52703 bogus endian macros
52710 if ac_fn_c_try_compile "$LINENO"
52712 # It does; now see whether it defined to _BIG_ENDIAN or not.
52713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52714 /* end confdefs.h. */
52715 #include <limits.h>
52720 #ifndef _BIG_ENDIAN
52728 if ac_fn_c_try_compile "$LINENO"
52730 ac_cv_c_bigendian=yes
52732 ac_cv_c_bigendian=no
52734 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52736 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52738 if test $ac_cv_c_bigendian = unknown; then
52739 # Compile a test program.
52740 if test "$cross_compiling" = yes
52742 # Try to guess by grepping values from an object file.
52743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52744 /* end confdefs.h. */
52745 unsigned short int ascii_mm[] =
52746 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
52747 unsigned short int ascii_ii[] =
52748 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
52749 int use_ascii (int i) {
52750 return ascii_mm[i] + ascii_ii[i];
52752 unsigned short int ebcdic_ii[] =
52753 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
52754 unsigned short int ebcdic_mm[] =
52755 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
52756 int use_ebcdic (int i) {
52757 return ebcdic_mm[i] + ebcdic_ii[i];
52764 return use_ascii (foo) == use_ebcdic (foo);
52769 if ac_fn_c_try_compile "$LINENO"
52771 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
52772 ac_cv_c_bigendian=yes
52774 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
52775 if test "$ac_cv_c_bigendian" = unknown; then
52776 ac_cv_c_bigendian=no
52778 # finding both strings is unlikely to happen, but who knows?
52779 ac_cv_c_bigendian=unknown
52783 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52786 /* end confdefs.h. */
52787 $ac_includes_default
52792 /* Are we little or big endian? From Harbison&Steele. */
52796 char c[sizeof (long int)];
52799 return u.c[sizeof (long int) - 1] == 1;
52805 if ac_fn_c_try_run "$LINENO"
52807 ac_cv_c_bigendian=no
52809 ac_cv_c_bigendian=yes
52811 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52812 conftest.$ac_objext conftest.beam conftest.$ac_ext
52818 case $ac_cv_c_bigendian in #(
52820 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
52822 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
52825 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
52829 gl_cv_cc_double_expbit0="unknown" ;;
52838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52839 /* end confdefs.h. */
52842 #include <stddef.h>
52844 #include <string.h>
52846 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
52847 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
52848 static unsigned int ored_words[NWORDS];
52849 static unsigned int anded_words[NWORDS];
52850 static void add_to_ored_words (double x)
52854 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
52855 memset (&m, 0, sizeof (memory_double));
52857 for (i = 0; i < NWORDS; i++)
52859 ored_words[i] |= m.word[i];
52860 anded_words[i] &= m.word[i];
52866 FILE *fp = fopen ("conftest.out", "w");
52869 for (j = 0; j < NWORDS; j++)
52870 anded_words[j] = ~ (unsigned int) 0;
52871 add_to_ored_words (0.25);
52872 add_to_ored_words (0.5);
52873 add_to_ored_words (1.0);
52874 add_to_ored_words (2.0);
52875 add_to_ored_words (4.0);
52876 /* Remove bits that are common (e.g. if representation of the first mantissa
52877 bit is explicit). */
52878 for (j = 0; j < NWORDS; j++)
52879 ored_words[j] &= ~anded_words[j];
52880 /* Now find the nonzero word. */
52881 for (j = 0; j < NWORDS; j++)
52882 if (ored_words[j] != 0)
52887 for (i = j + 1; i < NWORDS; i++)
52888 if (ored_words[i] != 0)
52890 fprintf (fp, "unknown");
52891 return (fclose (fp) != 0);
52894 if ((ored_words[j] >> i) & 1)
52896 fprintf (fp, "word %d bit %d", (int) j, (int) i);
52897 return (fclose (fp) != 0);
52900 fprintf (fp, "unknown");
52901 return (fclose (fp) != 0);
52905 if ac_fn_c_try_run "$LINENO"
52907 gl_cv_cc_double_expbit0=`cat conftest.out`
52909 gl_cv_cc_double_expbit0="unknown"
52911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52912 conftest.$ac_objext conftest.beam conftest.$ac_ext
52918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
52919 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
52920 case "$gl_cv_cc_double_expbit0" in
52922 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
52923 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
52925 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
52928 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
52934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
52935 printf %s "checking where to find the exponent in a 'float'... " >&6; }
52936 if test ${gl_cv_cc_float_expbit0+y}
52938 printf %s "(cached) " >&6
52941 if test "$cross_compiling" = yes
52943 gl_cv_cc_float_expbit0="word 0 bit 23"
52945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52946 /* end confdefs.h. */
52949 #include <stddef.h>
52951 #include <string.h>
52953 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
52954 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
52955 static unsigned int ored_words[NWORDS];
52956 static unsigned int anded_words[NWORDS];
52957 static void add_to_ored_words (float x)
52961 /* Clear it first, in case
52962 sizeof (float) < sizeof (memory_float). */
52963 memset (&m, 0, sizeof (memory_float));
52965 for (i = 0; i < NWORDS; i++)
52967 ored_words[i] |= m.word[i];
52968 anded_words[i] &= m.word[i];
52974 FILE *fp = fopen ("conftest.out", "w");
52977 for (j = 0; j < NWORDS; j++)
52978 anded_words[j] = ~ (unsigned int) 0;
52979 add_to_ored_words (0.25f);
52980 add_to_ored_words (0.5f);
52981 add_to_ored_words (1.0f);
52982 add_to_ored_words (2.0f);
52983 add_to_ored_words (4.0f);
52984 /* Remove bits that are common (e.g. if representation of the first mantissa
52985 bit is explicit). */
52986 for (j = 0; j < NWORDS; j++)
52987 ored_words[j] &= ~anded_words[j];
52988 /* Now find the nonzero word. */
52989 for (j = 0; j < NWORDS; j++)
52990 if (ored_words[j] != 0)
52995 for (i = j + 1; i < NWORDS; i++)
52996 if (ored_words[i] != 0)
52998 fprintf (fp, "unknown");
52999 return (fclose (fp) != 0);
53002 if ((ored_words[j] >> i) & 1)
53004 fprintf (fp, "word %d bit %d", (int) j, (int) i);
53005 return (fclose (fp) != 0);
53008 fprintf (fp, "unknown");
53009 return (fclose (fp) != 0);
53013 if ac_fn_c_try_run "$LINENO"
53015 gl_cv_cc_float_expbit0=`cat conftest.out`
53017 gl_cv_cc_float_expbit0="unknown"
53019 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53020 conftest.$ac_objext conftest.beam conftest.$ac_ext
53026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
53027 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
53028 case "$gl_cv_cc_float_expbit0" in
53030 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
53031 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
53033 printf "%s\n" "#define FLT_EXPBIT0_WORD $word" >>confdefs.h
53036 printf "%s\n" "#define FLT_EXPBIT0_BIT $bit" >>confdefs.h
53043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
53044 printf %s "checking where to find the exponent in a 'long double'... " >&6; }
53045 if test ${gl_cv_cc_long_double_expbit0+y}
53047 printf %s "(cached) " >&6
53050 if test "$cross_compiling" = yes
53053 gl_cv_cc_long_double_expbit0="unknown"
53055 mingw*) # On native Windows (little-endian), we know the result
53056 # in two cases: mingw, MSVC.
53057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53058 /* end confdefs.h. */
53065 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
53066 $EGREP "Known" >/dev/null 2>&1
53068 gl_cv_cc_long_double_expbit0="word 2 bit 0"
53072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53073 /* end confdefs.h. */
53080 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
53081 $EGREP "Known" >/dev/null 2>&1
53083 gl_cv_cc_long_double_expbit0="word 1 bit 20"
53091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53092 /* end confdefs.h. */
53095 #include <stddef.h>
53097 #include <string.h>
53099 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
53100 typedef union { long double value; unsigned int word[NWORDS]; }
53101 memory_long_double;
53102 static unsigned int ored_words[NWORDS];
53103 static unsigned int anded_words[NWORDS];
53104 static void add_to_ored_words (long double *x)
53106 memory_long_double m;
53108 /* Clear it first, in case
53109 sizeof (long double) < sizeof (memory_long_double). */
53110 memset (&m, 0, sizeof (memory_long_double));
53112 for (i = 0; i < NWORDS; i++)
53114 ored_words[i] |= m.word[i];
53115 anded_words[i] &= m.word[i];
53120 static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
53122 FILE *fp = fopen ("conftest.out", "w");
53125 for (j = 0; j < NWORDS; j++)
53126 anded_words[j] = ~ (unsigned int) 0;
53127 for (j = 0; j < 5; j++)
53128 add_to_ored_words (&samples[j]);
53129 /* Remove bits that are common (e.g. if representation of the first mantissa
53130 bit is explicit). */
53131 for (j = 0; j < NWORDS; j++)
53132 ored_words[j] &= ~anded_words[j];
53133 /* Now find the nonzero word. */
53134 for (j = 0; j < NWORDS; j++)
53135 if (ored_words[j] != 0)
53140 for (i = j + 1; i < NWORDS; i++)
53141 if (ored_words[i] != 0)
53143 fprintf (fp, "unknown");
53144 return (fclose (fp) != 0);
53147 if ((ored_words[j] >> i) & 1)
53149 fprintf (fp, "word %d bit %d", (int) j, (int) i);
53150 return (fclose (fp) != 0);
53153 fprintf (fp, "unknown");
53154 return (fclose (fp) != 0);
53158 if ac_fn_c_try_run "$LINENO"
53160 gl_cv_cc_long_double_expbit0=`cat conftest.out`
53162 gl_cv_cc_long_double_expbit0="unknown"
53164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53165 conftest.$ac_objext conftest.beam conftest.$ac_ext
53171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
53172 printf "%s\n" "$gl_cv_cc_long_double_expbit0" >&6; }
53173 case "$gl_cv_cc_long_double_expbit0" in
53175 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
53176 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
53178 printf "%s\n" "#define LDBL_EXPBIT0_WORD $word" >>confdefs.h
53181 printf "%s\n" "#define LDBL_EXPBIT0_BIT $bit" >>confdefs.h
53190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
53191 printf %s "checking for a traditional french locale... " >&6; }
53192 if test ${gt_cv_locale_fr+y}
53194 printf %s "(cached) " >&6
53197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53198 /* end confdefs.h. */
53200 #include <locale.h>
53202 #if HAVE_LANGINFO_CODESET
53203 # include <langinfo.h>
53205 #include <stdlib.h>
53206 #include <string.h>
53210 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
53211 imitates locale dependent behaviour by looking at the environment
53212 variables, and all locales use the UTF-8 encoding. */
53213 #if defined __BEOS__ || defined __HAIKU__
53216 /* Check whether the given locale name is recognized by the system. */
53217 # if defined _WIN32 && !defined __CYGWIN__
53218 /* On native Windows, setlocale(category, "") looks at the system settings,
53219 not at the environment variables. Also, when an encoding suffix such
53220 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53221 category of the locale to "C". */
53222 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53223 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53226 if (setlocale (LC_ALL, "") == NULL) return 1;
53228 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53229 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53230 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53231 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53232 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53233 some unit tests fail.
53234 On MirBSD 10, when an unsupported locale is specified, setlocale()
53235 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
53236 # if HAVE_LANGINFO_CODESET
53238 const char *cs = nl_langinfo (CODESET);
53239 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
53240 || strcmp (cs, "UTF-8") == 0)
53245 /* On Cygwin, avoid locale names without encoding suffix, because the
53246 locale_charset() function relies on the encoding suffix. Note that
53247 LC_ALL is set on the command line. */
53248 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
53250 /* Check whether in the abbreviation of the second month, the second
53251 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
53252 one byte long. This excludes the UTF-8 encoding. */
53253 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53254 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
53255 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
53256 /* Check whether the decimal separator is a comma.
53257 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
53258 are nl_langinfo(RADIXCHAR) are both ".". */
53259 if (localeconv () ->decimal_point[0] != ',') return 1;
53266 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
53267 (eval $ac_link) 2>&5
53269 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53270 test $ac_status = 0; } && test -s conftest$ac_exeext; then
53272 # Handle native Windows specially, because there setlocale() interprets
53273 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
53274 # "fr" or "fra" as "French" or "French_France.1252",
53275 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
53276 # "ja" as "Japanese" or "Japanese_Japan.932",
53279 # Test for the native Windows locale name.
53280 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53281 gt_cv_locale_fr=French_France.1252
53284 gt_cv_locale_fr=none
53288 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53289 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53290 # configure script would override the LC_ALL setting. Likewise for
53291 # LC_CTYPE, which is also set at the beginning of the configure script.
53292 # Test for the usual locale name.
53293 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53294 gt_cv_locale_fr=fr_FR
53296 # Test for the locale name with explicit encoding suffix.
53297 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53298 gt_cv_locale_fr=fr_FR.ISO-8859-1
53300 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
53301 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53302 gt_cv_locale_fr=fr_FR.ISO8859-1
53304 # Test for the HP-UX locale name.
53305 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53306 gt_cv_locale_fr=fr_FR.iso88591
53308 # Test for the Solaris 7 locale name.
53309 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53313 gt_cv_locale_fr=none
53325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
53326 printf "%s\n" "$gt_cv_locale_fr" >&6; }
53327 LOCALE_FR=$gt_cv_locale_fr
53332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
53333 printf %s "checking for a french Unicode locale... " >&6; }
53334 if test ${gt_cv_locale_fr_utf8+y}
53336 printf %s "(cached) " >&6
53339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53340 /* end confdefs.h. */
53342 #include <locale.h>
53344 #if HAVE_LANGINFO_CODESET
53345 # include <langinfo.h>
53347 #include <stdlib.h>
53348 #include <string.h>
53352 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
53353 imitates locale dependent behaviour by looking at the environment
53354 variables, and all locales use the UTF-8 encoding. */
53355 #if !(defined __BEOS__ || defined __HAIKU__)
53356 /* Check whether the given locale name is recognized by the system. */
53357 # if defined _WIN32 && !defined __CYGWIN__
53358 /* On native Windows, setlocale(category, "") looks at the system settings,
53359 not at the environment variables. Also, when an encoding suffix such
53360 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53361 category of the locale to "C". */
53362 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53363 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53366 if (setlocale (LC_ALL, "") == NULL) return 1;
53368 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53369 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53370 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53371 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53372 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53373 some unit tests fail. */
53374 # if HAVE_LANGINFO_CODESET
53376 const char *cs = nl_langinfo (CODESET);
53377 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
53382 /* On Cygwin, avoid locale names without encoding suffix, because the
53383 locale_charset() function relies on the encoding suffix. Note that
53384 LC_ALL is set on the command line. */
53385 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
53387 /* Check whether in the abbreviation of the second month, the second
53388 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
53389 two bytes long, with UTF-8 encoding. */
53390 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53391 if (strftime (buf, sizeof (buf), "%b", &t) < 4
53392 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
53395 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
53396 /* Check whether the decimal separator is a comma.
53397 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
53398 are nl_langinfo(RADIXCHAR) are both ".". */
53399 if (localeconv () ->decimal_point[0] != ',') return 1;
53405 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
53406 (eval $ac_link) 2>&5
53408 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53409 test $ac_status = 0; } && test -s conftest$ac_exeext; then
53411 # Handle native Windows specially, because there setlocale() interprets
53412 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
53413 # "fr" or "fra" as "French" or "French_France.1252",
53414 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
53415 # "ja" as "Japanese" or "Japanese_Japan.932",
53418 # Test for the hypothetical native Windows locale name.
53419 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53420 gt_cv_locale_fr_utf8=French_France.65001
53423 gt_cv_locale_fr_utf8=none
53427 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53428 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53429 # configure script would override the LC_ALL setting. Likewise for
53430 # LC_CTYPE, which is also set at the beginning of the configure script.
53431 # Test for the usual locale name.
53432 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53433 gt_cv_locale_fr_utf8=fr_FR
53435 # Test for the locale name with explicit encoding suffix.
53436 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53437 gt_cv_locale_fr_utf8=fr_FR.UTF-8
53439 # Test for the Solaris 7 locale name.
53440 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53441 gt_cv_locale_fr_utf8=fr.UTF-8
53444 gt_cv_locale_fr_utf8=none
53454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
53455 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
53456 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
53462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
53463 printf %s "checking for a traditional japanese locale... " >&6; }
53464 if test ${gt_cv_locale_ja+y}
53466 printf %s "(cached) " >&6
53469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53470 /* end confdefs.h. */
53472 #include <locale.h>
53474 #if HAVE_LANGINFO_CODESET
53475 # include <langinfo.h>
53477 #include <stdlib.h>
53478 #include <string.h>
53483 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
53484 imitates locale dependent behaviour by looking at the environment
53485 variables, and all locales use the UTF-8 encoding. */
53486 #if defined __BEOS__ || defined __HAIKU__
53489 /* Check whether the given locale name is recognized by the system. */
53490 # if defined _WIN32 && !defined __CYGWIN__
53491 /* On native Windows, setlocale(category, "") looks at the system settings,
53492 not at the environment variables. Also, when an encoding suffix such
53493 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53494 category of the locale to "C". */
53495 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53496 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53499 if (setlocale (LC_ALL, "") == NULL) return 1;
53501 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53502 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53503 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53504 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53505 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53506 some unit tests fail.
53507 On MirBSD 10, when an unsupported locale is specified, setlocale()
53508 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
53509 # if HAVE_LANGINFO_CODESET
53511 const char *cs = nl_langinfo (CODESET);
53512 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
53513 || strcmp (cs, "UTF-8") == 0)
53518 /* On Cygwin, avoid locale names without encoding suffix, because the
53519 locale_charset() function relies on the encoding suffix. Note that
53520 LC_ALL is set on the command line. */
53521 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
53523 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
53524 on Cygwin 1.5.x. */
53525 if (MB_CUR_MAX == 1)
53527 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
53528 This excludes the UTF-8 encoding (except on MirBSD). */
53531 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53532 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
53533 for (p = buf; *p != '\0'; p++)
53534 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
53542 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
53543 (eval $ac_link) 2>&5
53545 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53546 test $ac_status = 0; } && test -s conftest$ac_exeext; then
53548 # Handle native Windows specially, because there setlocale() interprets
53549 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
53550 # "fr" or "fra" as "French" or "French_France.1252",
53551 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
53552 # "ja" as "Japanese" or "Japanese_Japan.932",
53555 # Note that on native Windows, the Japanese locale is
53556 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
53557 # cannot use it here.
53558 gt_cv_locale_ja=none
53561 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53562 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53563 # configure script would override the LC_ALL setting. Likewise for
53564 # LC_CTYPE, which is also set at the beginning of the configure script.
53565 # Test for the AIX locale name.
53566 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53567 gt_cv_locale_ja=ja_JP
53569 # Test for the locale name with explicit encoding suffix.
53570 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53571 gt_cv_locale_ja=ja_JP.EUC-JP
53573 # Test for the HP-UX, OSF/1, NetBSD locale name.
53574 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53575 gt_cv_locale_ja=ja_JP.eucJP
53577 # Test for the IRIX, FreeBSD locale name.
53578 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53579 gt_cv_locale_ja=ja_JP.EUC
53581 # Test for the Solaris 7 locale name.
53582 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53585 # Special test for NetBSD 1.6.
53586 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
53587 gt_cv_locale_ja=ja_JP.eucJP
53590 gt_cv_locale_ja=none
53603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
53604 printf "%s\n" "$gt_cv_locale_ja" >&6; }
53605 LOCALE_JA=$gt_cv_locale_ja
53611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
53612 printf %s "checking for a transitional chinese locale... " >&6; }
53613 if test ${gt_cv_locale_zh_CN+y}
53615 printf %s "(cached) " >&6
53618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53619 /* end confdefs.h. */
53621 #include <locale.h>
53622 #include <stdlib.h>
53624 #if HAVE_LANGINFO_CODESET
53625 # include <langinfo.h>
53627 #include <stdlib.h>
53628 #include <string.h>
53633 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
53634 imitates locale dependent behaviour by looking at the environment
53635 variables, and all locales use the UTF-8 encoding. */
53636 #if defined __BEOS__ || defined __HAIKU__
53639 /* Check whether the given locale name is recognized by the system. */
53640 # if defined _WIN32 && !defined __CYGWIN__
53641 /* On native Windows, setlocale(category, "") looks at the system settings,
53642 not at the environment variables. Also, when an encoding suffix such
53643 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53644 category of the locale to "C". */
53645 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53646 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53649 if (setlocale (LC_ALL, "") == NULL) return 1;
53651 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53652 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53653 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53654 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53655 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53656 some unit tests fail.
53657 On MirBSD 10, when an unsupported locale is specified, setlocale()
53658 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
53659 # if HAVE_LANGINFO_CODESET
53661 const char *cs = nl_langinfo (CODESET);
53662 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
53663 || strcmp (cs, "UTF-8") == 0)
53668 /* On Cygwin, avoid locale names without encoding suffix, because the
53669 locale_charset() function relies on the encoding suffix. Note that
53670 LC_ALL is set on the command line. */
53671 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
53673 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
53674 This excludes the UTF-8 encoding (except on MirBSD). */
53677 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53678 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
53679 for (p = buf; *p != '\0'; p++)
53680 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
53683 /* Check whether a typical GB18030 multibyte sequence is recognized as a
53684 single wide character. This excludes the GB2312 and GBK encodings. */
53685 if (mblen ("\203\062\332\066", 5) != 4)
53692 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
53693 (eval $ac_link) 2>&5
53695 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53696 test $ac_status = 0; } && test -s conftest$ac_exeext; then
53698 # Handle native Windows specially, because there setlocale() interprets
53699 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
53700 # "fr" or "fra" as "French" or "French_France.1252",
53701 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
53702 # "ja" as "Japanese" or "Japanese_Japan.932",
53705 # Test for the hypothetical native Windows locale name.
53706 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53707 gt_cv_locale_zh_CN=Chinese_China.54936
53710 gt_cv_locale_zh_CN=none
53714 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
53715 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
53716 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
53717 gt_cv_locale_zh_CN=none
53720 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53721 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53722 # configure script would override the LC_ALL setting. Likewise for
53723 # LC_CTYPE, which is also set at the beginning of the configure script.
53724 # Test for the locale name without encoding suffix.
53725 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53726 gt_cv_locale_zh_CN=zh_CN
53728 # Test for the locale name with explicit encoding suffix.
53729 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53730 gt_cv_locale_zh_CN=zh_CN.GB18030
53733 gt_cv_locale_zh_CN=none
53739 # If there was a link error, due to mblen(), the system is so old that
53740 # it certainly doesn't have a chinese locale.
53741 gt_cv_locale_zh_CN=none
53746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
53747 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
53748 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
53754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
53755 printf %s "checking for a traditional french locale... " >&6; }
53756 if test ${gt_cv_locale_fr+y}
53758 printf %s "(cached) " >&6
53761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53762 /* end confdefs.h. */
53764 #include <locale.h>
53766 #if HAVE_LANGINFO_CODESET
53767 # include <langinfo.h>
53769 #include <stdlib.h>
53770 #include <string.h>
53774 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
53775 imitates locale dependent behaviour by looking at the environment
53776 variables, and all locales use the UTF-8 encoding. */
53777 #if defined __BEOS__ || defined __HAIKU__
53780 /* Check whether the given locale name is recognized by the system. */
53781 # if defined _WIN32 && !defined __CYGWIN__
53782 /* On native Windows, setlocale(category, "") looks at the system settings,
53783 not at the environment variables. Also, when an encoding suffix such
53784 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53785 category of the locale to "C". */
53786 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53787 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53790 if (setlocale (LC_ALL, "") == NULL) return 1;
53792 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53793 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53794 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53795 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53796 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53797 some unit tests fail.
53798 On MirBSD 10, when an unsupported locale is specified, setlocale()
53799 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
53800 # if HAVE_LANGINFO_CODESET
53802 const char *cs = nl_langinfo (CODESET);
53803 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
53804 || strcmp (cs, "UTF-8") == 0)
53809 /* On Cygwin, avoid locale names without encoding suffix, because the
53810 locale_charset() function relies on the encoding suffix. Note that
53811 LC_ALL is set on the command line. */
53812 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
53814 /* Check whether in the abbreviation of the second month, the second
53815 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
53816 one byte long. This excludes the UTF-8 encoding. */
53817 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53818 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
53819 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
53820 /* Check whether the decimal separator is a comma.
53821 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
53822 are nl_langinfo(RADIXCHAR) are both ".". */
53823 if (localeconv () ->decimal_point[0] != ',') return 1;
53830 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
53831 (eval $ac_link) 2>&5
53833 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53834 test $ac_status = 0; } && test -s conftest$ac_exeext; then
53836 # Handle native Windows specially, because there setlocale() interprets
53837 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
53838 # "fr" or "fra" as "French" or "French_France.1252",
53839 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
53840 # "ja" as "Japanese" or "Japanese_Japan.932",
53843 # Test for the native Windows locale name.
53844 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53845 gt_cv_locale_fr=French_France.1252
53848 gt_cv_locale_fr=none
53852 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53853 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53854 # configure script would override the LC_ALL setting. Likewise for
53855 # LC_CTYPE, which is also set at the beginning of the configure script.
53856 # Test for the usual locale name.
53857 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53858 gt_cv_locale_fr=fr_FR
53860 # Test for the locale name with explicit encoding suffix.
53861 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53862 gt_cv_locale_fr=fr_FR.ISO-8859-1
53864 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
53865 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53866 gt_cv_locale_fr=fr_FR.ISO8859-1
53868 # Test for the HP-UX locale name.
53869 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53870 gt_cv_locale_fr=fr_FR.iso88591
53872 # Test for the Solaris 7 locale name.
53873 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53877 gt_cv_locale_fr=none
53889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
53890 printf "%s\n" "$gt_cv_locale_fr" >&6; }
53891 LOCALE_FR=$gt_cv_locale_fr
53896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
53897 printf %s "checking for a french Unicode locale... " >&6; }
53898 if test ${gt_cv_locale_fr_utf8+y}
53900 printf %s "(cached) " >&6
53903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53904 /* end confdefs.h. */
53906 #include <locale.h>
53908 #if HAVE_LANGINFO_CODESET
53909 # include <langinfo.h>
53911 #include <stdlib.h>
53912 #include <string.h>
53916 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
53917 imitates locale dependent behaviour by looking at the environment
53918 variables, and all locales use the UTF-8 encoding. */
53919 #if !(defined __BEOS__ || defined __HAIKU__)
53920 /* Check whether the given locale name is recognized by the system. */
53921 # if defined _WIN32 && !defined __CYGWIN__
53922 /* On native Windows, setlocale(category, "") looks at the system settings,
53923 not at the environment variables. Also, when an encoding suffix such
53924 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
53925 category of the locale to "C". */
53926 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
53927 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
53930 if (setlocale (LC_ALL, "") == NULL) return 1;
53932 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
53933 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
53934 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
53935 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
53936 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
53937 some unit tests fail. */
53938 # if HAVE_LANGINFO_CODESET
53940 const char *cs = nl_langinfo (CODESET);
53941 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
53946 /* On Cygwin, avoid locale names without encoding suffix, because the
53947 locale_charset() function relies on the encoding suffix. Note that
53948 LC_ALL is set on the command line. */
53949 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
53951 /* Check whether in the abbreviation of the second month, the second
53952 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
53953 two bytes long, with UTF-8 encoding. */
53954 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
53955 if (strftime (buf, sizeof (buf), "%b", &t) < 4
53956 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
53959 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
53960 /* Check whether the decimal separator is a comma.
53961 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
53962 are nl_langinfo(RADIXCHAR) are both ".". */
53963 if (localeconv () ->decimal_point[0] != ',') return 1;
53969 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
53970 (eval $ac_link) 2>&5
53972 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53973 test $ac_status = 0; } && test -s conftest$ac_exeext; then
53975 # Handle native Windows specially, because there setlocale() interprets
53976 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
53977 # "fr" or "fra" as "French" or "French_France.1252",
53978 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
53979 # "ja" as "Japanese" or "Japanese_Japan.932",
53982 # Test for the hypothetical native Windows locale name.
53983 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53984 gt_cv_locale_fr_utf8=French_France.65001
53987 gt_cv_locale_fr_utf8=none
53991 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
53992 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
53993 # configure script would override the LC_ALL setting. Likewise for
53994 # LC_CTYPE, which is also set at the beginning of the configure script.
53995 # Test for the usual locale name.
53996 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
53997 gt_cv_locale_fr_utf8=fr_FR
53999 # Test for the locale name with explicit encoding suffix.
54000 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54001 gt_cv_locale_fr_utf8=fr_FR.UTF-8
54003 # Test for the Solaris 7 locale name.
54004 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54005 gt_cv_locale_fr_utf8=fr.UTF-8
54008 gt_cv_locale_fr_utf8=none
54018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
54019 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
54020 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
54026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
54027 printf %s "checking for a traditional japanese locale... " >&6; }
54028 if test ${gt_cv_locale_ja+y}
54030 printf %s "(cached) " >&6
54033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54034 /* end confdefs.h. */
54036 #include <locale.h>
54038 #if HAVE_LANGINFO_CODESET
54039 # include <langinfo.h>
54041 #include <stdlib.h>
54042 #include <string.h>
54047 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
54048 imitates locale dependent behaviour by looking at the environment
54049 variables, and all locales use the UTF-8 encoding. */
54050 #if defined __BEOS__ || defined __HAIKU__
54053 /* Check whether the given locale name is recognized by the system. */
54054 # if defined _WIN32 && !defined __CYGWIN__
54055 /* On native Windows, setlocale(category, "") looks at the system settings,
54056 not at the environment variables. Also, when an encoding suffix such
54057 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54058 category of the locale to "C". */
54059 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54060 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54063 if (setlocale (LC_ALL, "") == NULL) return 1;
54065 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54066 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54067 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54068 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54069 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54070 some unit tests fail.
54071 On MirBSD 10, when an unsupported locale is specified, setlocale()
54072 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
54073 # if HAVE_LANGINFO_CODESET
54075 const char *cs = nl_langinfo (CODESET);
54076 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
54077 || strcmp (cs, "UTF-8") == 0)
54082 /* On Cygwin, avoid locale names without encoding suffix, because the
54083 locale_charset() function relies on the encoding suffix. Note that
54084 LC_ALL is set on the command line. */
54085 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
54087 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
54088 on Cygwin 1.5.x. */
54089 if (MB_CUR_MAX == 1)
54091 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
54092 This excludes the UTF-8 encoding (except on MirBSD). */
54095 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54096 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
54097 for (p = buf; *p != '\0'; p++)
54098 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
54106 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54107 (eval $ac_link) 2>&5
54109 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54110 test $ac_status = 0; } && test -s conftest$ac_exeext; then
54112 # Handle native Windows specially, because there setlocale() interprets
54113 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
54114 # "fr" or "fra" as "French" or "French_France.1252",
54115 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
54116 # "ja" as "Japanese" or "Japanese_Japan.932",
54119 # Note that on native Windows, the Japanese locale is
54120 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
54121 # cannot use it here.
54122 gt_cv_locale_ja=none
54125 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54126 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54127 # configure script would override the LC_ALL setting. Likewise for
54128 # LC_CTYPE, which is also set at the beginning of the configure script.
54129 # Test for the AIX locale name.
54130 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54131 gt_cv_locale_ja=ja_JP
54133 # Test for the locale name with explicit encoding suffix.
54134 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54135 gt_cv_locale_ja=ja_JP.EUC-JP
54137 # Test for the HP-UX, OSF/1, NetBSD locale name.
54138 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54139 gt_cv_locale_ja=ja_JP.eucJP
54141 # Test for the IRIX, FreeBSD locale name.
54142 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54143 gt_cv_locale_ja=ja_JP.EUC
54145 # Test for the Solaris 7 locale name.
54146 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54149 # Special test for NetBSD 1.6.
54150 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
54151 gt_cv_locale_ja=ja_JP.eucJP
54154 gt_cv_locale_ja=none
54167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
54168 printf "%s\n" "$gt_cv_locale_ja" >&6; }
54169 LOCALE_JA=$gt_cv_locale_ja
54175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
54176 printf %s "checking for a transitional chinese locale... " >&6; }
54177 if test ${gt_cv_locale_zh_CN+y}
54179 printf %s "(cached) " >&6
54182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54183 /* end confdefs.h. */
54185 #include <locale.h>
54186 #include <stdlib.h>
54188 #if HAVE_LANGINFO_CODESET
54189 # include <langinfo.h>
54191 #include <stdlib.h>
54192 #include <string.h>
54197 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
54198 imitates locale dependent behaviour by looking at the environment
54199 variables, and all locales use the UTF-8 encoding. */
54200 #if defined __BEOS__ || defined __HAIKU__
54203 /* Check whether the given locale name is recognized by the system. */
54204 # if defined _WIN32 && !defined __CYGWIN__
54205 /* On native Windows, setlocale(category, "") looks at the system settings,
54206 not at the environment variables. Also, when an encoding suffix such
54207 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54208 category of the locale to "C". */
54209 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54210 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54213 if (setlocale (LC_ALL, "") == NULL) return 1;
54215 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54216 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54217 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54218 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54219 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54220 some unit tests fail.
54221 On MirBSD 10, when an unsupported locale is specified, setlocale()
54222 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
54223 # if HAVE_LANGINFO_CODESET
54225 const char *cs = nl_langinfo (CODESET);
54226 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
54227 || strcmp (cs, "UTF-8") == 0)
54232 /* On Cygwin, avoid locale names without encoding suffix, because the
54233 locale_charset() function relies on the encoding suffix. Note that
54234 LC_ALL is set on the command line. */
54235 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
54237 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
54238 This excludes the UTF-8 encoding (except on MirBSD). */
54241 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54242 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
54243 for (p = buf; *p != '\0'; p++)
54244 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
54247 /* Check whether a typical GB18030 multibyte sequence is recognized as a
54248 single wide character. This excludes the GB2312 and GBK encodings. */
54249 if (mblen ("\203\062\332\066", 5) != 4)
54256 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54257 (eval $ac_link) 2>&5
54259 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54260 test $ac_status = 0; } && test -s conftest$ac_exeext; then
54262 # Handle native Windows specially, because there setlocale() interprets
54263 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
54264 # "fr" or "fra" as "French" or "French_France.1252",
54265 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
54266 # "ja" as "Japanese" or "Japanese_Japan.932",
54269 # Test for the hypothetical native Windows locale name.
54270 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54271 gt_cv_locale_zh_CN=Chinese_China.54936
54274 gt_cv_locale_zh_CN=none
54278 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
54279 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
54280 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
54281 gt_cv_locale_zh_CN=none
54284 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54285 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54286 # configure script would override the LC_ALL setting. Likewise for
54287 # LC_CTYPE, which is also set at the beginning of the configure script.
54288 # Test for the locale name without encoding suffix.
54289 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54290 gt_cv_locale_zh_CN=zh_CN
54292 # Test for the locale name with explicit encoding suffix.
54293 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54294 gt_cv_locale_zh_CN=zh_CN.GB18030
54297 gt_cv_locale_zh_CN=none
54303 # If there was a link error, due to mblen(), the system is so old that
54304 # it certainly doesn't have a chinese locale.
54305 gt_cv_locale_zh_CN=none
54310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
54311 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
54312 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
54318 if test $ac_cv_func_link = no; then
54321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
54322 printf %s "checking whether link obeys POSIX... " >&6; }
54323 if test ${gl_cv_func_link_works+y}
54325 printf %s "(cached) " >&6
54328 # Assume that if we have lstat, we can also check symlinks.
54329 if test $ac_cv_func_lstat = yes; then
54330 ln -s conftest.a conftest.lnk
54332 if test "$cross_compiling" = yes
54335 # Guess yes on Linux systems.
54336 linux-* | linux) gl_cv_func_link_works="guessing yes" ;;
54337 # Guess yes on glibc systems.
54338 *-gnu* | gnu*) gl_cv_func_link_works="guessing yes" ;;
54339 # If we don't know, obey --enable-cross-guesses.
54340 *) gl_cv_func_link_works="$gl_cross_guess_normal" ;;
54344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54345 /* end confdefs.h. */
54346 #include <unistd.h>
54353 if (!link ("conftest.a", "conftest.b/"))
54356 if (!link ("conftest.lnk/", "conftest.b"))
54358 if (rename ("conftest.a", "conftest.b"))
54360 if (!link ("conftest.b", "conftest.lnk"))
54369 if ac_fn_c_try_run "$LINENO"
54371 gl_cv_func_link_works=yes
54373 gl_cv_func_link_works=no
54375 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
54376 conftest.$ac_objext conftest.beam conftest.$ac_ext
54379 rm -f conftest.a conftest.b conftest.lnk
54381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
54382 printf "%s\n" "$gl_cv_func_link_works" >&6; }
54383 case "$gl_cv_func_link_works" in
54391 if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
54400 M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
54412 if test "$GL_M4_GNULIB_LINK" != 1; then
54413 if test "$GL_M4_GNULIB_LINK" = 0; then
54414 GL_M4_GNULIB_LINK=$gl_module_indicator_condition
54416 GL_M4_GNULIB_LINK="($GL_M4_GNULIB_LINK || $gl_module_indicator_condition)"
54424 printf "%s\n" "#define GNULIB_TEST_LINK 1" >>confdefs.h
54429 if test "$ac_cv_header_winsock2_h" = yes; then
54438 M4tests_LIBOBJS="$M4tests_LIBOBJS listen.$ac_objext"
54450 if test "$GL_M4_GNULIB_LISTEN" != 1; then
54451 if test "$GL_M4_GNULIB_LISTEN" = 0; then
54452 GL_M4_GNULIB_LISTEN=$gl_module_indicator_condition
54454 GL_M4_GNULIB_LISTEN="($GL_M4_GNULIB_LISTEN || $gl_module_indicator_condition)"
54462 printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
54471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
54472 printf %s "checking for a traditional french locale... " >&6; }
54473 if test ${gt_cv_locale_fr+y}
54475 printf %s "(cached) " >&6
54478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54479 /* end confdefs.h. */
54481 #include <locale.h>
54483 #if HAVE_LANGINFO_CODESET
54484 # include <langinfo.h>
54486 #include <stdlib.h>
54487 #include <string.h>
54491 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
54492 imitates locale dependent behaviour by looking at the environment
54493 variables, and all locales use the UTF-8 encoding. */
54494 #if defined __BEOS__ || defined __HAIKU__
54497 /* Check whether the given locale name is recognized by the system. */
54498 # if defined _WIN32 && !defined __CYGWIN__
54499 /* On native Windows, setlocale(category, "") looks at the system settings,
54500 not at the environment variables. Also, when an encoding suffix such
54501 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54502 category of the locale to "C". */
54503 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54504 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54507 if (setlocale (LC_ALL, "") == NULL) return 1;
54509 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54510 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54511 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54512 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54513 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54514 some unit tests fail.
54515 On MirBSD 10, when an unsupported locale is specified, setlocale()
54516 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
54517 # if HAVE_LANGINFO_CODESET
54519 const char *cs = nl_langinfo (CODESET);
54520 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
54521 || strcmp (cs, "UTF-8") == 0)
54526 /* On Cygwin, avoid locale names without encoding suffix, because the
54527 locale_charset() function relies on the encoding suffix. Note that
54528 LC_ALL is set on the command line. */
54529 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
54531 /* Check whether in the abbreviation of the second month, the second
54532 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
54533 one byte long. This excludes the UTF-8 encoding. */
54534 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54535 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
54536 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
54537 /* Check whether the decimal separator is a comma.
54538 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
54539 are nl_langinfo(RADIXCHAR) are both ".". */
54540 if (localeconv () ->decimal_point[0] != ',') return 1;
54547 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54548 (eval $ac_link) 2>&5
54550 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54551 test $ac_status = 0; } && test -s conftest$ac_exeext; then
54553 # Handle native Windows specially, because there setlocale() interprets
54554 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
54555 # "fr" or "fra" as "French" or "French_France.1252",
54556 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
54557 # "ja" as "Japanese" or "Japanese_Japan.932",
54560 # Test for the native Windows locale name.
54561 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54562 gt_cv_locale_fr=French_France.1252
54565 gt_cv_locale_fr=none
54569 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54570 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54571 # configure script would override the LC_ALL setting. Likewise for
54572 # LC_CTYPE, which is also set at the beginning of the configure script.
54573 # Test for the usual locale name.
54574 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54575 gt_cv_locale_fr=fr_FR
54577 # Test for the locale name with explicit encoding suffix.
54578 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54579 gt_cv_locale_fr=fr_FR.ISO-8859-1
54581 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
54582 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54583 gt_cv_locale_fr=fr_FR.ISO8859-1
54585 # Test for the HP-UX locale name.
54586 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54587 gt_cv_locale_fr=fr_FR.iso88591
54589 # Test for the Solaris 7 locale name.
54590 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54594 gt_cv_locale_fr=none
54606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
54607 printf "%s\n" "$gt_cv_locale_fr" >&6; }
54608 LOCALE_FR=$gt_cv_locale_fr
54613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
54614 printf %s "checking for a french Unicode locale... " >&6; }
54615 if test ${gt_cv_locale_fr_utf8+y}
54617 printf %s "(cached) " >&6
54620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54621 /* end confdefs.h. */
54623 #include <locale.h>
54625 #if HAVE_LANGINFO_CODESET
54626 # include <langinfo.h>
54628 #include <stdlib.h>
54629 #include <string.h>
54633 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
54634 imitates locale dependent behaviour by looking at the environment
54635 variables, and all locales use the UTF-8 encoding. */
54636 #if !(defined __BEOS__ || defined __HAIKU__)
54637 /* Check whether the given locale name is recognized by the system. */
54638 # if defined _WIN32 && !defined __CYGWIN__
54639 /* On native Windows, setlocale(category, "") looks at the system settings,
54640 not at the environment variables. Also, when an encoding suffix such
54641 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54642 category of the locale to "C". */
54643 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54644 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54647 if (setlocale (LC_ALL, "") == NULL) return 1;
54649 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54650 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54651 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54652 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54653 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54654 some unit tests fail. */
54655 # if HAVE_LANGINFO_CODESET
54657 const char *cs = nl_langinfo (CODESET);
54658 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
54663 /* On Cygwin, avoid locale names without encoding suffix, because the
54664 locale_charset() function relies on the encoding suffix. Note that
54665 LC_ALL is set on the command line. */
54666 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
54668 /* Check whether in the abbreviation of the second month, the second
54669 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
54670 two bytes long, with UTF-8 encoding. */
54671 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54672 if (strftime (buf, sizeof (buf), "%b", &t) < 4
54673 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
54676 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
54677 /* Check whether the decimal separator is a comma.
54678 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
54679 are nl_langinfo(RADIXCHAR) are both ".". */
54680 if (localeconv () ->decimal_point[0] != ',') return 1;
54686 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54687 (eval $ac_link) 2>&5
54689 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54690 test $ac_status = 0; } && test -s conftest$ac_exeext; then
54692 # Handle native Windows specially, because there setlocale() interprets
54693 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
54694 # "fr" or "fra" as "French" or "French_France.1252",
54695 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
54696 # "ja" as "Japanese" or "Japanese_Japan.932",
54699 # Test for the hypothetical native Windows locale name.
54700 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54701 gt_cv_locale_fr_utf8=French_France.65001
54704 gt_cv_locale_fr_utf8=none
54708 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54709 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54710 # configure script would override the LC_ALL setting. Likewise for
54711 # LC_CTYPE, which is also set at the beginning of the configure script.
54712 # Test for the usual locale name.
54713 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54714 gt_cv_locale_fr_utf8=fr_FR
54716 # Test for the locale name with explicit encoding suffix.
54717 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54718 gt_cv_locale_fr_utf8=fr_FR.UTF-8
54720 # Test for the Solaris 7 locale name.
54721 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54722 gt_cv_locale_fr_utf8=fr.UTF-8
54725 gt_cv_locale_fr_utf8=none
54735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
54736 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
54737 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
54743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
54744 printf %s "checking for a traditional japanese locale... " >&6; }
54745 if test ${gt_cv_locale_ja+y}
54747 printf %s "(cached) " >&6
54750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54751 /* end confdefs.h. */
54753 #include <locale.h>
54755 #if HAVE_LANGINFO_CODESET
54756 # include <langinfo.h>
54758 #include <stdlib.h>
54759 #include <string.h>
54764 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
54765 imitates locale dependent behaviour by looking at the environment
54766 variables, and all locales use the UTF-8 encoding. */
54767 #if defined __BEOS__ || defined __HAIKU__
54770 /* Check whether the given locale name is recognized by the system. */
54771 # if defined _WIN32 && !defined __CYGWIN__
54772 /* On native Windows, setlocale(category, "") looks at the system settings,
54773 not at the environment variables. Also, when an encoding suffix such
54774 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54775 category of the locale to "C". */
54776 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54777 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54780 if (setlocale (LC_ALL, "") == NULL) return 1;
54782 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54783 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54784 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54785 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54786 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54787 some unit tests fail.
54788 On MirBSD 10, when an unsupported locale is specified, setlocale()
54789 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
54790 # if HAVE_LANGINFO_CODESET
54792 const char *cs = nl_langinfo (CODESET);
54793 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
54794 || strcmp (cs, "UTF-8") == 0)
54799 /* On Cygwin, avoid locale names without encoding suffix, because the
54800 locale_charset() function relies on the encoding suffix. Note that
54801 LC_ALL is set on the command line. */
54802 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
54804 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
54805 on Cygwin 1.5.x. */
54806 if (MB_CUR_MAX == 1)
54808 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
54809 This excludes the UTF-8 encoding (except on MirBSD). */
54812 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54813 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
54814 for (p = buf; *p != '\0'; p++)
54815 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
54823 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54824 (eval $ac_link) 2>&5
54826 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54827 test $ac_status = 0; } && test -s conftest$ac_exeext; then
54829 # Handle native Windows specially, because there setlocale() interprets
54830 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
54831 # "fr" or "fra" as "French" or "French_France.1252",
54832 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
54833 # "ja" as "Japanese" or "Japanese_Japan.932",
54836 # Note that on native Windows, the Japanese locale is
54837 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
54838 # cannot use it here.
54839 gt_cv_locale_ja=none
54842 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
54843 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
54844 # configure script would override the LC_ALL setting. Likewise for
54845 # LC_CTYPE, which is also set at the beginning of the configure script.
54846 # Test for the AIX locale name.
54847 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54848 gt_cv_locale_ja=ja_JP
54850 # Test for the locale name with explicit encoding suffix.
54851 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54852 gt_cv_locale_ja=ja_JP.EUC-JP
54854 # Test for the HP-UX, OSF/1, NetBSD locale name.
54855 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54856 gt_cv_locale_ja=ja_JP.eucJP
54858 # Test for the IRIX, FreeBSD locale name.
54859 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54860 gt_cv_locale_ja=ja_JP.EUC
54862 # Test for the Solaris 7 locale name.
54863 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54866 # Special test for NetBSD 1.6.
54867 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
54868 gt_cv_locale_ja=ja_JP.eucJP
54871 gt_cv_locale_ja=none
54884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
54885 printf "%s\n" "$gt_cv_locale_ja" >&6; }
54886 LOCALE_JA=$gt_cv_locale_ja
54892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
54893 printf %s "checking for a transitional chinese locale... " >&6; }
54894 if test ${gt_cv_locale_zh_CN+y}
54896 printf %s "(cached) " >&6
54899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54900 /* end confdefs.h. */
54902 #include <locale.h>
54903 #include <stdlib.h>
54905 #if HAVE_LANGINFO_CODESET
54906 # include <langinfo.h>
54908 #include <stdlib.h>
54909 #include <string.h>
54914 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
54915 imitates locale dependent behaviour by looking at the environment
54916 variables, and all locales use the UTF-8 encoding. */
54917 #if defined __BEOS__ || defined __HAIKU__
54920 /* Check whether the given locale name is recognized by the system. */
54921 # if defined _WIN32 && !defined __CYGWIN__
54922 /* On native Windows, setlocale(category, "") looks at the system settings,
54923 not at the environment variables. Also, when an encoding suffix such
54924 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
54925 category of the locale to "C". */
54926 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
54927 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
54930 if (setlocale (LC_ALL, "") == NULL) return 1;
54932 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
54933 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
54934 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
54935 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
54936 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
54937 some unit tests fail.
54938 On MirBSD 10, when an unsupported locale is specified, setlocale()
54939 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
54940 # if HAVE_LANGINFO_CODESET
54942 const char *cs = nl_langinfo (CODESET);
54943 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
54944 || strcmp (cs, "UTF-8") == 0)
54949 /* On Cygwin, avoid locale names without encoding suffix, because the
54950 locale_charset() function relies on the encoding suffix. Note that
54951 LC_ALL is set on the command line. */
54952 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
54954 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
54955 This excludes the UTF-8 encoding (except on MirBSD). */
54958 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
54959 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
54960 for (p = buf; *p != '\0'; p++)
54961 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
54964 /* Check whether a typical GB18030 multibyte sequence is recognized as a
54965 single wide character. This excludes the GB2312 and GBK encodings. */
54966 if (mblen ("\203\062\332\066", 5) != 4)
54973 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54974 (eval $ac_link) 2>&5
54976 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54977 test $ac_status = 0; } && test -s conftest$ac_exeext; then
54979 # Handle native Windows specially, because there setlocale() interprets
54980 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
54981 # "fr" or "fra" as "French" or "French_France.1252",
54982 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
54983 # "ja" as "Japanese" or "Japanese_Japan.932",
54986 # Test for the hypothetical native Windows locale name.
54987 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
54988 gt_cv_locale_zh_CN=Chinese_China.54936
54991 gt_cv_locale_zh_CN=none
54995 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
54996 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
54997 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
54998 gt_cv_locale_zh_CN=none
55001 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
55002 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
55003 # configure script would override the LC_ALL setting. Likewise for
55004 # LC_CTYPE, which is also set at the beginning of the configure script.
55005 # Test for the locale name without encoding suffix.
55006 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55007 gt_cv_locale_zh_CN=zh_CN
55009 # Test for the locale name with explicit encoding suffix.
55010 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55011 gt_cv_locale_zh_CN=zh_CN.GB18030
55014 gt_cv_locale_zh_CN=none
55020 # If there was a link error, due to mblen(), the system is so old that
55021 # it certainly doesn't have a chinese locale.
55022 gt_cv_locale_zh_CN=none
55027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
55028 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
55029 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
55034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
55035 printf %s "checking for a french Unicode locale... " >&6; }
55036 if test ${gt_cv_locale_fr_utf8+y}
55038 printf %s "(cached) " >&6
55041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55042 /* end confdefs.h. */
55044 #include <locale.h>
55046 #if HAVE_LANGINFO_CODESET
55047 # include <langinfo.h>
55049 #include <stdlib.h>
55050 #include <string.h>
55054 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
55055 imitates locale dependent behaviour by looking at the environment
55056 variables, and all locales use the UTF-8 encoding. */
55057 #if !(defined __BEOS__ || defined __HAIKU__)
55058 /* Check whether the given locale name is recognized by the system. */
55059 # if defined _WIN32 && !defined __CYGWIN__
55060 /* On native Windows, setlocale(category, "") looks at the system settings,
55061 not at the environment variables. Also, when an encoding suffix such
55062 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
55063 category of the locale to "C". */
55064 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
55065 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
55068 if (setlocale (LC_ALL, "") == NULL) return 1;
55070 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
55071 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
55072 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
55073 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
55074 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
55075 some unit tests fail. */
55076 # if HAVE_LANGINFO_CODESET
55078 const char *cs = nl_langinfo (CODESET);
55079 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
55084 /* On Cygwin, avoid locale names without encoding suffix, because the
55085 locale_charset() function relies on the encoding suffix. Note that
55086 LC_ALL is set on the command line. */
55087 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
55089 /* Check whether in the abbreviation of the second month, the second
55090 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
55091 two bytes long, with UTF-8 encoding. */
55092 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
55093 if (strftime (buf, sizeof (buf), "%b", &t) < 4
55094 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
55097 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
55098 /* Check whether the decimal separator is a comma.
55099 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
55100 are nl_langinfo(RADIXCHAR) are both ".". */
55101 if (localeconv () ->decimal_point[0] != ',') return 1;
55107 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
55108 (eval $ac_link) 2>&5
55110 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55111 test $ac_status = 0; } && test -s conftest$ac_exeext; then
55113 # Handle native Windows specially, because there setlocale() interprets
55114 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
55115 # "fr" or "fra" as "French" or "French_France.1252",
55116 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
55117 # "ja" as "Japanese" or "Japanese_Japan.932",
55120 # Test for the hypothetical native Windows locale name.
55121 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55122 gt_cv_locale_fr_utf8=French_France.65001
55125 gt_cv_locale_fr_utf8=none
55129 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
55130 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
55131 # configure script would override the LC_ALL setting. Likewise for
55132 # LC_CTYPE, which is also set at the beginning of the configure script.
55133 # Test for the usual locale name.
55134 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55135 gt_cv_locale_fr_utf8=fr_FR
55137 # Test for the locale name with explicit encoding suffix.
55138 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55139 gt_cv_locale_fr_utf8=fr_FR.UTF-8
55141 # Test for the Solaris 7 locale name.
55142 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55143 gt_cv_locale_fr_utf8=fr.UTF-8
55146 gt_cv_locale_fr_utf8=none
55156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
55157 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
55158 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
55163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
55164 printf %s "checking for a french Unicode locale... " >&6; }
55165 if test ${gt_cv_locale_fr_utf8+y}
55167 printf %s "(cached) " >&6
55170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55171 /* end confdefs.h. */
55173 #include <locale.h>
55175 #if HAVE_LANGINFO_CODESET
55176 # include <langinfo.h>
55178 #include <stdlib.h>
55179 #include <string.h>
55183 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
55184 imitates locale dependent behaviour by looking at the environment
55185 variables, and all locales use the UTF-8 encoding. */
55186 #if !(defined __BEOS__ || defined __HAIKU__)
55187 /* Check whether the given locale name is recognized by the system. */
55188 # if defined _WIN32 && !defined __CYGWIN__
55189 /* On native Windows, setlocale(category, "") looks at the system settings,
55190 not at the environment variables. Also, when an encoding suffix such
55191 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
55192 category of the locale to "C". */
55193 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
55194 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
55197 if (setlocale (LC_ALL, "") == NULL) return 1;
55199 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
55200 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
55201 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
55202 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
55203 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
55204 some unit tests fail. */
55205 # if HAVE_LANGINFO_CODESET
55207 const char *cs = nl_langinfo (CODESET);
55208 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
55213 /* On Cygwin, avoid locale names without encoding suffix, because the
55214 locale_charset() function relies on the encoding suffix. Note that
55215 LC_ALL is set on the command line. */
55216 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
55218 /* Check whether in the abbreviation of the second month, the second
55219 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
55220 two bytes long, with UTF-8 encoding. */
55221 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
55222 if (strftime (buf, sizeof (buf), "%b", &t) < 4
55223 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
55226 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
55227 /* Check whether the decimal separator is a comma.
55228 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
55229 are nl_langinfo(RADIXCHAR) are both ".". */
55230 if (localeconv () ->decimal_point[0] != ',') return 1;
55236 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
55237 (eval $ac_link) 2>&5
55239 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55240 test $ac_status = 0; } && test -s conftest$ac_exeext; then
55242 # Handle native Windows specially, because there setlocale() interprets
55243 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
55244 # "fr" or "fra" as "French" or "French_France.1252",
55245 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
55246 # "ja" as "Japanese" or "Japanese_Japan.932",
55249 # Test for the hypothetical native Windows locale name.
55250 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55251 gt_cv_locale_fr_utf8=French_France.65001
55254 gt_cv_locale_fr_utf8=none
55258 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
55259 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
55260 # configure script would override the LC_ALL setting. Likewise for
55261 # LC_CTYPE, which is also set at the beginning of the configure script.
55262 # Test for the usual locale name.
55263 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55264 gt_cv_locale_fr_utf8=fr_FR
55266 # Test for the locale name with explicit encoding suffix.
55267 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55268 gt_cv_locale_fr_utf8=fr_FR.UTF-8
55270 # Test for the Solaris 7 locale name.
55271 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55272 gt_cv_locale_fr_utf8=fr.UTF-8
55275 gt_cv_locale_fr_utf8=none
55285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
55286 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
55287 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
55293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
55294 printf %s "checking for a transitional chinese locale... " >&6; }
55295 if test ${gt_cv_locale_zh_CN+y}
55297 printf %s "(cached) " >&6
55300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55301 /* end confdefs.h. */
55303 #include <locale.h>
55304 #include <stdlib.h>
55306 #if HAVE_LANGINFO_CODESET
55307 # include <langinfo.h>
55309 #include <stdlib.h>
55310 #include <string.h>
55315 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
55316 imitates locale dependent behaviour by looking at the environment
55317 variables, and all locales use the UTF-8 encoding. */
55318 #if defined __BEOS__ || defined __HAIKU__
55321 /* Check whether the given locale name is recognized by the system. */
55322 # if defined _WIN32 && !defined __CYGWIN__
55323 /* On native Windows, setlocale(category, "") looks at the system settings,
55324 not at the environment variables. Also, when an encoding suffix such
55325 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
55326 category of the locale to "C". */
55327 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
55328 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
55331 if (setlocale (LC_ALL, "") == NULL) return 1;
55333 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
55334 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
55335 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
55336 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
55337 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
55338 some unit tests fail.
55339 On MirBSD 10, when an unsupported locale is specified, setlocale()
55340 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
55341 # if HAVE_LANGINFO_CODESET
55343 const char *cs = nl_langinfo (CODESET);
55344 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
55345 || strcmp (cs, "UTF-8") == 0)
55350 /* On Cygwin, avoid locale names without encoding suffix, because the
55351 locale_charset() function relies on the encoding suffix. Note that
55352 LC_ALL is set on the command line. */
55353 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
55355 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
55356 This excludes the UTF-8 encoding (except on MirBSD). */
55359 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
55360 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
55361 for (p = buf; *p != '\0'; p++)
55362 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
55365 /* Check whether a typical GB18030 multibyte sequence is recognized as a
55366 single wide character. This excludes the GB2312 and GBK encodings. */
55367 if (mblen ("\203\062\332\066", 5) != 4)
55374 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
55375 (eval $ac_link) 2>&5
55377 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55378 test $ac_status = 0; } && test -s conftest$ac_exeext; then
55380 # Handle native Windows specially, because there setlocale() interprets
55381 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
55382 # "fr" or "fra" as "French" or "French_France.1252",
55383 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
55384 # "ja" as "Japanese" or "Japanese_Japan.932",
55387 # Test for the hypothetical native Windows locale name.
55388 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55389 gt_cv_locale_zh_CN=Chinese_China.54936
55392 gt_cv_locale_zh_CN=none
55396 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
55397 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
55398 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
55399 gt_cv_locale_zh_CN=none
55402 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
55403 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
55404 # configure script would override the LC_ALL setting. Likewise for
55405 # LC_CTYPE, which is also set at the beginning of the configure script.
55406 # Test for the locale name without encoding suffix.
55407 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55408 gt_cv_locale_zh_CN=zh_CN
55410 # Test for the locale name with explicit encoding suffix.
55411 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55412 gt_cv_locale_zh_CN=zh_CN.GB18030
55415 gt_cv_locale_zh_CN=none
55421 # If there was a link error, due to mblen(), the system is so old that
55422 # it certainly doesn't have a chinese locale.
55423 gt_cv_locale_zh_CN=none
55428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
55429 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
55430 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
55452 nanosleep_save_libs=$LIBS
55454 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
55455 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
55458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
55459 printf %s "checking for library containing nanosleep... " >&6; }
55460 if test ${ac_cv_search_nanosleep+y}
55462 printf %s "(cached) " >&6
55464 ac_func_search_save_LIBS=$LIBS
55465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55466 /* end confdefs.h. */
55468 /* Override any GCC internal prototype to avoid an error.
55469 Use char because int might match the return type of a GCC
55470 builtin and then its argument prototype would still apply. */
55475 return nanosleep ();
55480 for ac_lib in '' rt posix4
55482 if test -z "$ac_lib"; then
55483 ac_res="none required"
55486 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
55488 if ac_fn_c_try_link "$LINENO"
55490 ac_cv_search_nanosleep=$ac_res
55492 rm -f core conftest.err conftest.$ac_objext conftest.beam \
55494 if test ${ac_cv_search_nanosleep+y}
55499 if test ${ac_cv_search_nanosleep+y}
55503 ac_cv_search_nanosleep=no
55505 rm conftest.$ac_ext
55506 LIBS=$ac_func_search_save_LIBS
55508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
55509 printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
55510 ac_res=$ac_cv_search_nanosleep
55511 if test "$ac_res" != no
55513 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
55514 test "$ac_cv_search_nanosleep" = "none required" ||
55515 LIB_NANOSLEEP=$ac_cv_search_nanosleep
55518 if test "x$ac_cv_search_nanosleep" != xno; then
55521 if test $APPLE_UNIVERSAL_BUILD = 1; then
55522 # A universal build on Apple Mac OS X platforms.
55523 # The test result would be 'no (mishandles large arguments)' in 64-bit
55524 # mode but 'yes' in 32-bit mode. But we need a configuration result that
55525 # is valid in both modes.
55526 gl_cv_func_nanosleep='no (mishandles large arguments)'
55529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
55530 printf %s "checking for working nanosleep... " >&6; }
55531 if test ${gl_cv_func_nanosleep+y}
55533 printf %s "(cached) " >&6
55536 if test "$cross_compiling" = yes
55538 case "$host_os" in linux*) # Guess it halfway works when the kernel is Linux.
55539 gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
55540 mingw*) # Guess no on native Windows.
55541 gl_cv_func_nanosleep='guessing no' ;;
55542 *) # If we don't know, obey --enable-cross-guesses.
55543 gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
55547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55548 /* end confdefs.h. */
55551 #include <limits.h>
55552 #include <signal.h>
55553 #if HAVE_SYS_TIME_H
55554 #include <sys/time.h>
55557 #include <unistd.h>
55558 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
55559 #define TYPE_MAXIMUM(t) \
55560 ((t) (! TYPE_SIGNED (t) \
55562 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
55564 #if HAVE_DECL_ALARM
55566 check_for_SIGALRM (int sig)
55568 if (sig != SIGALRM)
55576 static struct timespec ts_sleep;
55577 static struct timespec ts_remaining;
55578 /* Test for major problems first. */
55581 ts_sleep.tv_sec = 0;
55582 ts_sleep.tv_nsec = 1;
55583 #if HAVE_DECL_ALARM
55585 static struct sigaction act;
55586 act.sa_handler = check_for_SIGALRM;
55587 sigemptyset (&act.sa_mask);
55588 sigaction (SIGALRM, &act, NULL);
55590 if (nanosleep (&ts_sleep, NULL) != 0)
55592 /* Test for a minor problem: the handling of large arguments. */
55593 ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
55594 ts_sleep.tv_nsec = 999999999;
55596 if (nanosleep (&ts_sleep, &ts_remaining) != -1)
55598 if (errno != EINTR)
55600 if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
55603 #else /* A simpler test for native Windows. */
55604 if (nanosleep (&ts_sleep, &ts_remaining) < 0)
55610 if ac_fn_c_try_run "$LINENO"
55612 gl_cv_func_nanosleep=yes
55614 case $? in 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; *) gl_cv_func_nanosleep=no;;
55617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
55618 conftest.$ac_objext conftest.beam conftest.$ac_ext
55623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
55624 printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
55625 case "$gl_cv_func_nanosleep" in
55627 REPLACE_NANOSLEEP=0
55630 REPLACE_NANOSLEEP=1
55631 case "$gl_cv_func_nanosleep" in
55632 *"mishandles large arguments"*)
55634 printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
55638 # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
55639 for ac_lib in $LIBSOCKET; do
55640 case " $LIB_NANOSLEEP " in
55642 *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
55652 LIBS=$nanosleep_save_libs
55654 if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
55663 M4tests_LIBOBJS="$M4tests_LIBOBJS nanosleep.$ac_objext"
55679 if test "$GL_M4_GNULIB_NANOSLEEP" != 1; then
55680 if test "$GL_M4_GNULIB_NANOSLEEP" = 0; then
55681 GL_M4_GNULIB_NANOSLEEP=$gl_module_indicator_condition
55683 GL_M4_GNULIB_NANOSLEEP="($GL_M4_GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
55691 printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
55697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
55698 printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
55699 if test ${gl_cv_header_netinet_in_h_selfcontained+y}
55701 printf %s "(cached) " >&6
55704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55705 /* end confdefs.h. */
55706 #include <netinet/in.h>
55715 if ac_fn_c_try_compile "$LINENO"
55717 gl_cv_header_netinet_in_h_selfcontained=yes
55719 gl_cv_header_netinet_in_h_selfcontained=no
55721 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
55724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
55725 printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
55726 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
55729 NETINET_IN_H='netinet/in.h'
55730 ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
55731 if test "x$ac_cv_header_netinet_in_h" = xyes
55733 printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
55746 if test $gl_cv_have_include_next = yes; then
55747 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
55749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
55750 printf %s "checking absolute name of <netinet/in.h>... " >&6; }
55751 if test ${gl_cv_next_netinet_in_h+y}
55753 printf %s "(cached) " >&6
55756 if test $ac_cv_header_netinet_in_h = yes; then
55761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55762 /* end confdefs.h. */
55763 #include <netinet/in.h>
55766 aix*) gl_absname_cpp="$ac_cpp -C" ;;
55767 *) gl_absname_cpp="$ac_cpp" ;;
55772 gl_dirsep_regex='[/\\]'
55775 gl_dirsep_regex='\/'
55778 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
55779 gl_header_literal_regex=`echo 'netinet/in.h' \
55780 | sed -e "$gl_make_literal_regex_sed"`
55781 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
55782 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
55788 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
55789 sed -n "$gl_absolute_header_sed"`
55791 gl_header=$gl_cv_absolute_netinet_in_h
55792 gl_cv_next_netinet_in_h='"'$gl_header'"'
55794 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
55799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
55800 printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; }
55802 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
55804 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
55805 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
55806 gl_next_as_first_directive='<'netinet/in.h'>'
55808 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
55809 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
55811 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
55816 if test $ac_cv_header_netinet_in_h = yes; then
55817 HAVE_NETINET_IN_H=1
55819 HAVE_NETINET_IN_H=0
55824 if test -n "$NETINET_IN_H"; then
55825 GL_GENERATE_NETINET_IN_H_TRUE=
55826 GL_GENERATE_NETINET_IN_H_FALSE='#'
55828 GL_GENERATE_NETINET_IN_H_TRUE='#'
55829 GL_GENERATE_NETINET_IN_H_FALSE=
55837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
55838 printf %s "checking for a traditional french locale... " >&6; }
55839 if test ${gt_cv_locale_fr+y}
55841 printf %s "(cached) " >&6
55844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55845 /* end confdefs.h. */
55847 #include <locale.h>
55849 #if HAVE_LANGINFO_CODESET
55850 # include <langinfo.h>
55852 #include <stdlib.h>
55853 #include <string.h>
55857 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
55858 imitates locale dependent behaviour by looking at the environment
55859 variables, and all locales use the UTF-8 encoding. */
55860 #if defined __BEOS__ || defined __HAIKU__
55863 /* Check whether the given locale name is recognized by the system. */
55864 # if defined _WIN32 && !defined __CYGWIN__
55865 /* On native Windows, setlocale(category, "") looks at the system settings,
55866 not at the environment variables. Also, when an encoding suffix such
55867 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
55868 category of the locale to "C". */
55869 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
55870 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
55873 if (setlocale (LC_ALL, "") == NULL) return 1;
55875 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
55876 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
55877 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
55878 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
55879 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
55880 some unit tests fail.
55881 On MirBSD 10, when an unsupported locale is specified, setlocale()
55882 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
55883 # if HAVE_LANGINFO_CODESET
55885 const char *cs = nl_langinfo (CODESET);
55886 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
55887 || strcmp (cs, "UTF-8") == 0)
55892 /* On Cygwin, avoid locale names without encoding suffix, because the
55893 locale_charset() function relies on the encoding suffix. Note that
55894 LC_ALL is set on the command line. */
55895 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
55897 /* Check whether in the abbreviation of the second month, the second
55898 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
55899 one byte long. This excludes the UTF-8 encoding. */
55900 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
55901 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
55902 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
55903 /* Check whether the decimal separator is a comma.
55904 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
55905 are nl_langinfo(RADIXCHAR) are both ".". */
55906 if (localeconv () ->decimal_point[0] != ',') return 1;
55913 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
55914 (eval $ac_link) 2>&5
55916 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55917 test $ac_status = 0; } && test -s conftest$ac_exeext; then
55919 # Handle native Windows specially, because there setlocale() interprets
55920 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
55921 # "fr" or "fra" as "French" or "French_France.1252",
55922 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
55923 # "ja" as "Japanese" or "Japanese_Japan.932",
55926 # Test for the native Windows locale name.
55927 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55928 gt_cv_locale_fr=French_France.1252
55931 gt_cv_locale_fr=none
55935 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
55936 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
55937 # configure script would override the LC_ALL setting. Likewise for
55938 # LC_CTYPE, which is also set at the beginning of the configure script.
55939 # Test for the usual locale name.
55940 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55941 gt_cv_locale_fr=fr_FR
55943 # Test for the locale name with explicit encoding suffix.
55944 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55945 gt_cv_locale_fr=fr_FR.ISO-8859-1
55947 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
55948 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55949 gt_cv_locale_fr=fr_FR.ISO8859-1
55951 # Test for the HP-UX locale name.
55952 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55953 gt_cv_locale_fr=fr_FR.iso88591
55955 # Test for the Solaris 7 locale name.
55956 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
55960 gt_cv_locale_fr=none
55972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
55973 printf "%s\n" "$gt_cv_locale_fr" >&6; }
55974 LOCALE_FR=$gt_cv_locale_fr
55979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
55980 printf %s "checking for a french Unicode locale... " >&6; }
55981 if test ${gt_cv_locale_fr_utf8+y}
55983 printf %s "(cached) " >&6
55986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55987 /* end confdefs.h. */
55989 #include <locale.h>
55991 #if HAVE_LANGINFO_CODESET
55992 # include <langinfo.h>
55994 #include <stdlib.h>
55995 #include <string.h>
55999 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
56000 imitates locale dependent behaviour by looking at the environment
56001 variables, and all locales use the UTF-8 encoding. */
56002 #if !(defined __BEOS__ || defined __HAIKU__)
56003 /* Check whether the given locale name is recognized by the system. */
56004 # if defined _WIN32 && !defined __CYGWIN__
56005 /* On native Windows, setlocale(category, "") looks at the system settings,
56006 not at the environment variables. Also, when an encoding suffix such
56007 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
56008 category of the locale to "C". */
56009 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
56010 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
56013 if (setlocale (LC_ALL, "") == NULL) return 1;
56015 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
56016 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
56017 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
56018 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
56019 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
56020 some unit tests fail. */
56021 # if HAVE_LANGINFO_CODESET
56023 const char *cs = nl_langinfo (CODESET);
56024 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
56029 /* On Cygwin, avoid locale names without encoding suffix, because the
56030 locale_charset() function relies on the encoding suffix. Note that
56031 LC_ALL is set on the command line. */
56032 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
56034 /* Check whether in the abbreviation of the second month, the second
56035 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
56036 two bytes long, with UTF-8 encoding. */
56037 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
56038 if (strftime (buf, sizeof (buf), "%b", &t) < 4
56039 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
56042 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
56043 /* Check whether the decimal separator is a comma.
56044 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
56045 are nl_langinfo(RADIXCHAR) are both ".". */
56046 if (localeconv () ->decimal_point[0] != ',') return 1;
56052 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
56053 (eval $ac_link) 2>&5
56055 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56056 test $ac_status = 0; } && test -s conftest$ac_exeext; then
56058 # Handle native Windows specially, because there setlocale() interprets
56059 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
56060 # "fr" or "fra" as "French" or "French_France.1252",
56061 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
56062 # "ja" as "Japanese" or "Japanese_Japan.932",
56065 # Test for the hypothetical native Windows locale name.
56066 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
56067 gt_cv_locale_fr_utf8=French_France.65001
56070 gt_cv_locale_fr_utf8=none
56074 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
56075 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
56076 # configure script would override the LC_ALL setting. Likewise for
56077 # LC_CTYPE, which is also set at the beginning of the configure script.
56078 # Test for the usual locale name.
56079 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
56080 gt_cv_locale_fr_utf8=fr_FR
56082 # Test for the locale name with explicit encoding suffix.
56083 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
56084 gt_cv_locale_fr_utf8=fr_FR.UTF-8
56086 # Test for the Solaris 7 locale name.
56087 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
56088 gt_cv_locale_fr_utf8=fr.UTF-8
56091 gt_cv_locale_fr_utf8=none
56101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
56102 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
56103 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
56111 if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
56114 case ${gl_cv_func_strerror_r_works-unset} in
56116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
56117 printf %s "checking whether perror matches strerror... " >&6; }
56118 if test ${gl_cv_func_perror_works+y}
56120 printf %s "(cached) " >&6
56122 if test "$cross_compiling" = yes
56125 # Guess yes on musl systems.
56126 *-musl*) gl_cv_func_perror_works="guessing yes" ;;
56127 # Guess yes on native Windows.
56128 mingw*) gl_cv_func_perror_works="guessing yes" ;;
56129 # Otherwise obey --enable-cross-guesses.
56130 *) gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
56134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56135 /* end confdefs.h. */
56138 #include <stdlib.h>
56139 #include <string.h>
56144 char *str = strerror (-1);
56145 if (!getenv("CONFTEST_OUTPUT")) return 0;
56146 if (!str) str = "";
56156 if ac_fn_c_try_run "$LINENO"
56158 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
56159 && cmp conftest.txt1 conftest.txt2 >/dev/null; then
56160 gl_cv_func_perror_works=yes
56162 gl_cv_func_perror_works=no
56164 rm -rf conftest.txt1 conftest.txt2
56166 gl_cv_func_perror_works=no
56168 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56169 conftest.$ac_objext conftest.beam conftest.$ac_ext
56174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
56175 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
56176 case "$gl_cv_func_perror_works" in
56178 *) REPLACE_PERROR=1 ;;
56186 if test $REPLACE_PERROR = 1; then
56195 M4tests_LIBOBJS="$M4tests_LIBOBJS perror.$ac_objext"
56207 if test "$GL_M4_GNULIB_PERROR" != 1; then
56208 if test "$GL_M4_GNULIB_PERROR" = 0; then
56209 GL_M4_GNULIB_PERROR=$gl_module_indicator_condition
56211 GL_M4_GNULIB_PERROR="($GL_M4_GNULIB_PERROR || $gl_module_indicator_condition)"
56219 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
56233 if { case "$host_os" in mingw*) true;; *) false;; esac; } \
56234 && test $gl_threads_api = windows; then
56235 REPLACE_PTHREAD_CREATE=1
56236 REPLACE_PTHREAD_ATTR_INIT=1
56237 REPLACE_PTHREAD_ATTR_GETDETACHSTATE=1
56238 REPLACE_PTHREAD_ATTR_SETDETACHSTATE=1
56239 REPLACE_PTHREAD_ATTR_DESTROY=1
56240 REPLACE_PTHREAD_SELF=1
56241 REPLACE_PTHREAD_EQUAL=1
56242 REPLACE_PTHREAD_DETACH=1
56243 REPLACE_PTHREAD_JOIN=1
56244 REPLACE_PTHREAD_EXIT=1
56246 if test $HAVE_PTHREAD_H = 0; then
56247 HAVE_PTHREAD_CREATE=0
56248 HAVE_PTHREAD_ATTR_INIT=0
56249 HAVE_PTHREAD_ATTR_GETDETACHSTATE=0
56250 HAVE_PTHREAD_ATTR_SETDETACHSTATE=0
56251 HAVE_PTHREAD_ATTR_DESTROY=0
56252 HAVE_PTHREAD_SELF=0
56253 HAVE_PTHREAD_EQUAL=0
56254 HAVE_PTHREAD_DETACH=0
56255 HAVE_PTHREAD_JOIN=0
56256 HAVE_PTHREAD_EXIT=0
56258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_create exists as a global function" >&5
56259 printf %s "checking whether pthread_create exists as a global function... " >&6; }
56260 if test ${gl_cv_func_pthread_create+y}
56262 printf %s "(cached) " >&6
56265 LIBS="$LIBS $LIBPMULTITHREAD"
56266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56267 /* end confdefs.h. */
56272 int pthread_create (void);
56275 return pthread_create ();
56279 if ac_fn_c_try_link "$LINENO"
56281 gl_cv_func_pthread_create=yes
56283 gl_cv_func_pthread_create=no
56285 rm -f core conftest.err conftest.$ac_objext conftest.beam \
56286 conftest$ac_exeext conftest.$ac_ext
56290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_create" >&5
56291 printf "%s\n" "$gl_cv_func_pthread_create" >&6; }
56292 if test $gl_cv_func_pthread_create = no; then
56293 REPLACE_PTHREAD_CREATE=1
56294 REPLACE_PTHREAD_ATTR_INIT=1
56296 printf "%s\n" "#define PTHREAD_CREATE_IS_INLINE 1" >>confdefs.h
56302 if test $HAVE_PTHREAD_CREATE = 0 || test $REPLACE_PTHREAD_CREATE = 1; then
56311 M4tests_LIBOBJS="$M4tests_LIBOBJS pthread-thread.$ac_objext"
56323 if test "$GL_M4_GNULIB_PTHREAD_THREAD" != 1; then
56324 if test "$GL_M4_GNULIB_PTHREAD_THREAD" = 0; then
56325 GL_M4_GNULIB_PTHREAD_THREAD=$gl_module_indicator_condition
56327 GL_M4_GNULIB_PTHREAD_THREAD="($GL_M4_GNULIB_PTHREAD_THREAD || $gl_module_indicator_condition)"
56335 printf "%s\n" "#define GNULIB_TEST_PTHREAD_THREAD 1" >>confdefs.h
56344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is a macro" >&5
56345 printf %s "checking whether pthread_sigmask is a macro... " >&6; }
56346 if test ${gl_cv_func_pthread_sigmask_macro+y}
56348 printf %s "(cached) " >&6
56350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56351 /* end confdefs.h. */
56353 #include <pthread.h>
56354 #include <signal.h>
56355 #ifdef pthread_sigmask
56356 headers_define_pthread_sigmask
56359 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
56360 $EGREP "headers_define_pthread_sigmask" >/dev/null 2>&1
56362 gl_cv_func_pthread_sigmask_macro=yes
56364 gl_cv_func_pthread_sigmask_macro=no
56370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_macro" >&5
56371 printf "%s\n" "$gl_cv_func_pthread_sigmask_macro" >&6; }
56373 LIB_PTHREAD_SIGMASK=
56375 if test $gl_cv_func_pthread_sigmask_macro = yes; then
56376 HAVE_PTHREAD_SIGMASK=0
56377 REPLACE_PTHREAD_SIGMASK=1
56382 if test "$gl_threads_api" = posix; then
56383 if test $ac_cv_func_pthread_sigmask = yes; then
56386 if test -n "$LIBMULTITHREAD"; then
56387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
56388 printf %s "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
56389 if test ${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+y}
56391 printf %s "(cached) " >&6
56393 gl_save_LIBS="$LIBS"
56394 LIBS="$LIBS $LIBMULTITHREAD"
56395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56396 /* end confdefs.h. */
56397 #include <pthread.h>
56398 #include <signal.h>
56403 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
56409 if ac_fn_c_try_link "$LINENO"
56411 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
56413 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
56415 rm -f core conftest.err conftest.$ac_objext conftest.beam \
56416 conftest$ac_exeext conftest.$ac_ext
56417 LIBS="$gl_save_LIBS"
56420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
56421 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
56422 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
56423 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
56425 HAVE_PTHREAD_SIGMASK=0
56428 HAVE_PTHREAD_SIGMASK=0
56432 if test $ac_cv_func_pthread_sigmask = yes; then
56433 REPLACE_PTHREAD_SIGMASK=1
56435 HAVE_PTHREAD_SIGMASK=0
56443 if test $HAVE_PTHREAD_SIGMASK = 1; then
56446 if test -z "$LIB_PTHREAD_SIGMASK"; then
56449 *' -lpthread '*) ;;
56451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
56452 printf %s "checking whether pthread_sigmask works without -lpthread... " >&6; }
56453 if test ${gl_cv_func_pthread_sigmask_in_libc_works+y}
56455 printf %s "(cached) " >&6
56458 if test "$cross_compiling" = yes
56462 freebsd* | midnightbsd* | hpux* | solaris | solaris2.[2-9]*)
56463 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
56465 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
56469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56470 /* end confdefs.h. */
56472 #include <pthread.h>
56473 #include <signal.h>
56474 #include <stddef.h>
56478 sigemptyset (&set);
56479 return pthread_sigmask (1729, &set, NULL) != 0;
56482 if ac_fn_c_try_run "$LINENO"
56484 gl_cv_func_pthread_sigmask_in_libc_works=no
56486 gl_cv_func_pthread_sigmask_in_libc_works=yes
56488 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56489 conftest.$ac_objext conftest.beam conftest.$ac_ext
56494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
56495 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
56496 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
56498 REPLACE_PTHREAD_SIGMASK=1
56500 printf "%s\n" "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
56507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
56508 printf %s "checking whether pthread_sigmask returns error numbers... " >&6; }
56509 if test ${gl_cv_func_pthread_sigmask_return_works+y}
56511 printf %s "(cached) " >&6
56514 gl_save_LIBS="$LIBS"
56515 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
56516 if test "$cross_compiling" = yes
56520 gl_cv_func_pthread_sigmask_return_works="guessing no";;
56522 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
56526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56527 /* end confdefs.h. */
56529 #include <pthread.h>
56530 #include <signal.h>
56531 #include <stddef.h>
56535 sigemptyset (&set);
56536 if (pthread_sigmask (1729, &set, NULL) == -1)
56541 if ac_fn_c_try_run "$LINENO"
56543 gl_cv_func_pthread_sigmask_return_works=yes
56545 gl_cv_func_pthread_sigmask_return_works=no
56547 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56548 conftest.$ac_objext conftest.beam conftest.$ac_ext
56551 LIBS="$gl_save_LIBS"
56554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
56555 printf "%s\n" "$gl_cv_func_pthread_sigmask_return_works" >&6; }
56556 case "$gl_cv_func_pthread_sigmask_return_works" in
56558 REPLACE_PTHREAD_SIGMASK=1
56560 printf "%s\n" "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
56565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
56566 printf %s "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
56567 if test ${gl_cv_func_pthread_sigmask_unblock_works+y}
56569 printf %s "(cached) " >&6
56574 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
56576 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
56579 LIBS="$LIBS $LIBMULTITHREAD"
56580 if test "$cross_compiling" = yes
56584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56585 /* end confdefs.h. */
56587 #include <pthread.h>
56588 #include <signal.h>
56590 #include <stdlib.h>
56591 #include <unistd.h>
56596 static volatile int sigint_occurred;
56598 sigint_handler (int sig)
56605 int pid = getpid ();
56607 signal (SIGINT, sigint_handler);
56608 sigemptyset (&set);
56609 sigaddset (&set, SIGINT);
56610 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
56612 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
56613 if (!(system (command) == 0))
56616 if (!(sigint_occurred == 0))
56618 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
56620 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
56625 if ac_fn_c_try_run "$LINENO"
56629 gl_cv_func_pthread_sigmask_unblock_works=no
56631 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56632 conftest.$ac_objext conftest.beam conftest.$ac_ext
56638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
56639 printf "%s\n" "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
56640 case "$gl_cv_func_pthread_sigmask_unblock_works" in
56642 REPLACE_PTHREAD_SIGMASK=1
56644 printf "%s\n" "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
56650 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
56659 M4tests_LIBOBJS="$M4tests_LIBOBJS pthread_sigmask.$ac_objext"
56662 if test $HAVE_PTHREAD_SIGMASK = 1; then
56664 printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
56678 if test "$GL_M4_GNULIB_PTHREAD_SIGMASK" != 1; then
56679 if test "$GL_M4_GNULIB_PTHREAD_SIGMASK" = 0; then
56680 GL_M4_GNULIB_PTHREAD_SIGMASK=$gl_module_indicator_condition
56682 GL_M4_GNULIB_PTHREAD_SIGMASK="($GL_M4_GNULIB_PTHREAD_SIGMASK || $gl_module_indicator_condition)"
56690 printf "%s\n" "#define GNULIB_TEST_PTHREAD_SIGMASK 1" >>confdefs.h
56696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
56697 printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
56698 if test ${gl_cv_func_svid_putenv+y}
56700 printf %s "(cached) " >&6
56702 if test "$cross_compiling" = yes
56705 # Guess yes on glibc systems.
56706 *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
56707 # Guess yes on musl systems.
56708 *-musl*) gl_cv_func_svid_putenv="guessing yes" ;;
56709 # Guess no on native Windows.
56710 mingw*) gl_cv_func_svid_putenv="guessing no" ;;
56711 # If we don't know, obey --enable-cross-guesses.
56712 *) gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
56716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56717 /* end confdefs.h. */
56718 $ac_includes_default
56727 /* Put it in env. */
56728 if (putenv ("CONFTEST_putenv=val"))
56731 /* Try to remove it. */
56732 if (putenv ("CONFTEST_putenv"))
56735 /* Make sure it was deleted. */
56736 if (getenv ("CONFTEST_putenv") != 0)
56745 if ac_fn_c_try_run "$LINENO"
56747 gl_cv_func_svid_putenv=yes
56749 gl_cv_func_svid_putenv=no
56751 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56752 conftest.$ac_objext conftest.beam conftest.$ac_ext
56757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
56758 printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
56759 case "$gl_cv_func_svid_putenv" in
56766 if test $REPLACE_PUTENV = 1; then
56775 M4tests_LIBOBJS="$M4tests_LIBOBJS putenv.$ac_objext"
56778 ac_fn_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
56779 if test "x$ac_cv_have_decl__putenv" = xyes
56785 printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
56798 if test "$GL_M4_GNULIB_PUTENV" != 1; then
56799 if test "$GL_M4_GNULIB_PUTENV" = 0; then
56800 GL_M4_GNULIB_PUTENV=$gl_module_indicator_condition
56802 GL_M4_GNULIB_PUTENV="($GL_M4_GNULIB_PUTENV || $gl_module_indicator_condition)"
56810 printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
56826 if { case "$host_os" in mingw*) true;; *) false;; esac; } \
56827 && test $gl_threads_api = windows; then
56828 REPLACE_SCHED_YIELD=1
56830 ac_fn_check_decl "$LINENO" "sched_yield" "ac_cv_have_decl_sched_yield" "#include <sched.h>
56831 " "$ac_c_undeclared_builtin_options" "CFLAGS"
56832 if test "x$ac_cv_have_decl_sched_yield" = xyes
56840 if test $HAVE_SCHED_YIELD = 0 || test $REPLACE_SCHED_YIELD = 1; then
56849 M4tests_LIBOBJS="$M4tests_LIBOBJS sched_yield.$ac_objext"
56861 if test "$GL_M4_GNULIB_SCHED_YIELD" != 1; then
56862 if test "$GL_M4_GNULIB_SCHED_YIELD" = 0; then
56863 GL_M4_GNULIB_SCHED_YIELD=$gl_module_indicator_condition
56865 GL_M4_GNULIB_SCHED_YIELD="($GL_M4_GNULIB_SCHED_YIELD || $gl_module_indicator_condition)"
56873 printf "%s\n" "#define GNULIB_TEST_SCHED_YIELD 1" >>confdefs.h
56881 if test "$ac_cv_header_winsock2_h" = yes; then
56885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
56886 printf %s "checking whether select supports a 0 argument... " >&6; }
56887 if test ${gl_cv_func_select_supports0+y}
56889 printf %s "(cached) " >&6
56892 if test "$cross_compiling" = yes
56896 # Guess no on Interix.
56897 interix*) gl_cv_func_select_supports0="guessing no";;
56898 # Guess yes otherwise.
56899 *) gl_cv_func_select_supports0="guessing yes";;
56903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56904 /* end confdefs.h. */
56906 #include <sys/types.h>
56907 #include <sys/time.h>
56908 #if HAVE_SYS_SELECT_H
56909 #include <sys/select.h>
56913 struct timeval timeout;
56914 timeout.tv_sec = 0;
56915 timeout.tv_usec = 5;
56916 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
56919 if ac_fn_c_try_run "$LINENO"
56921 gl_cv_func_select_supports0=yes
56923 gl_cv_func_select_supports0=no
56925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56926 conftest.$ac_objext conftest.beam conftest.$ac_ext
56931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
56932 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
56933 case "$gl_cv_func_select_supports0" in
56935 *) REPLACE_SELECT=1 ;;
56938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
56939 printf %s "checking whether select detects invalid fds... " >&6; }
56940 if test ${gl_cv_func_select_detects_ebadf+y}
56942 printf %s "(cached) " >&6
56945 if test "$cross_compiling" = yes
56949 # Guess yes on Linux systems.
56950 linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
56951 # Guess yes on glibc systems.
56952 *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
56953 # If we don't know, obey --enable-cross-guesses.
56954 *) gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
56958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56959 /* end confdefs.h. */
56961 #include <sys/types.h>
56962 #include <sys/time.h>
56963 #if HAVE_SYS_SELECT_H
56964 # include <sys/select.h>
56966 #include <unistd.h>
56981 struct timeval timeout;
56982 timeout.tv_sec = 0;
56983 timeout.tv_usec = 5;
56984 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
56990 if ac_fn_c_try_run "$LINENO"
56992 gl_cv_func_select_detects_ebadf=yes
56994 gl_cv_func_select_detects_ebadf=no
56996 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56997 conftest.$ac_objext conftest.beam conftest.$ac_ext
57002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
57003 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
57004 case $gl_cv_func_select_detects_ebadf in
57006 *) REPLACE_SELECT=1 ;;
57010 LIB_SELECT="$LIBSOCKET"
57011 if test $REPLACE_SELECT = 1; then
57014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57015 /* end confdefs.h. */
57017 #define WIN32_LEAN_AND_MEAN
57018 #include <windows.h>
57022 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
57026 if ac_fn_c_try_link "$LINENO"
57030 LIB_SELECT="$LIB_SELECT -luser32"
57032 rm -f core conftest.err conftest.$ac_objext conftest.beam \
57033 conftest$ac_exeext conftest.$ac_ext
57039 if test $REPLACE_SELECT = 1; then
57048 M4tests_LIBOBJS="$M4tests_LIBOBJS select.$ac_objext"
57060 if test "$GL_M4_GNULIB_SELECT" != 1; then
57061 if test "$GL_M4_GNULIB_SELECT" = 0; then
57062 GL_M4_GNULIB_SELECT=$gl_module_indicator_condition
57064 GL_M4_GNULIB_SELECT="($GL_M4_GNULIB_SELECT || $gl_module_indicator_condition)"
57072 printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
57079 if test $ac_cv_func_setenv = no; then
57082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
57083 printf %s "checking whether setenv validates arguments... " >&6; }
57084 if test ${gl_cv_func_setenv_works+y}
57086 printf %s "(cached) " >&6
57088 if test "$cross_compiling" = yes
57091 # Guess yes on glibc systems.
57092 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
57093 # Guess yes on musl systems.
57094 *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
57095 # If we don't know, obey --enable-cross-guesses.
57096 *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
57100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57101 /* end confdefs.h. */
57103 #include <stdlib.h>
57105 #include <string.h>
57113 if (setenv ("", "", 0) != -1)
57115 else if (errno != EINVAL)
57119 if (setenv ("a", "=", 1) != 0)
57121 else if (strcmp (getenv ("a"), "=") != 0)
57130 if ac_fn_c_try_run "$LINENO"
57132 gl_cv_func_setenv_works=yes
57134 gl_cv_func_setenv_works=no
57136 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
57137 conftest.$ac_objext conftest.beam conftest.$ac_ext
57141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
57142 printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
57143 case "$gl_cv_func_setenv_works" in
57151 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
57160 M4tests_LIBOBJS="$M4tests_LIBOBJS setenv.$ac_objext"
57172 if test "$GL_M4_GNULIB_SETENV" != 1; then
57173 if test "$GL_M4_GNULIB_SETENV" = 0; then
57174 GL_M4_GNULIB_SETENV=$gl_module_indicator_condition
57176 GL_M4_GNULIB_SETENV="($GL_M4_GNULIB_SETENV || $gl_module_indicator_condition)"
57184 printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
57191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
57192 printf %s "checking for a traditional french locale... " >&6; }
57193 if test ${gt_cv_locale_fr+y}
57195 printf %s "(cached) " >&6
57198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57199 /* end confdefs.h. */
57201 #include <locale.h>
57203 #if HAVE_LANGINFO_CODESET
57204 # include <langinfo.h>
57206 #include <stdlib.h>
57207 #include <string.h>
57211 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
57212 imitates locale dependent behaviour by looking at the environment
57213 variables, and all locales use the UTF-8 encoding. */
57214 #if defined __BEOS__ || defined __HAIKU__
57217 /* Check whether the given locale name is recognized by the system. */
57218 # if defined _WIN32 && !defined __CYGWIN__
57219 /* On native Windows, setlocale(category, "") looks at the system settings,
57220 not at the environment variables. Also, when an encoding suffix such
57221 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
57222 category of the locale to "C". */
57223 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
57224 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
57227 if (setlocale (LC_ALL, "") == NULL) return 1;
57229 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
57230 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
57231 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
57232 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
57233 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
57234 some unit tests fail.
57235 On MirBSD 10, when an unsupported locale is specified, setlocale()
57236 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
57237 # if HAVE_LANGINFO_CODESET
57239 const char *cs = nl_langinfo (CODESET);
57240 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
57241 || strcmp (cs, "UTF-8") == 0)
57246 /* On Cygwin, avoid locale names without encoding suffix, because the
57247 locale_charset() function relies on the encoding suffix. Note that
57248 LC_ALL is set on the command line. */
57249 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
57251 /* Check whether in the abbreviation of the second month, the second
57252 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
57253 one byte long. This excludes the UTF-8 encoding. */
57254 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
57255 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
57256 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
57257 /* Check whether the decimal separator is a comma.
57258 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
57259 are nl_langinfo(RADIXCHAR) are both ".". */
57260 if (localeconv () ->decimal_point[0] != ',') return 1;
57267 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
57268 (eval $ac_link) 2>&5
57270 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57271 test $ac_status = 0; } && test -s conftest$ac_exeext; then
57273 # Handle native Windows specially, because there setlocale() interprets
57274 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
57275 # "fr" or "fra" as "French" or "French_France.1252",
57276 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
57277 # "ja" as "Japanese" or "Japanese_Japan.932",
57280 # Test for the native Windows locale name.
57281 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57282 gt_cv_locale_fr=French_France.1252
57285 gt_cv_locale_fr=none
57289 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
57290 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
57291 # configure script would override the LC_ALL setting. Likewise for
57292 # LC_CTYPE, which is also set at the beginning of the configure script.
57293 # Test for the usual locale name.
57294 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57295 gt_cv_locale_fr=fr_FR
57297 # Test for the locale name with explicit encoding suffix.
57298 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57299 gt_cv_locale_fr=fr_FR.ISO-8859-1
57301 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
57302 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57303 gt_cv_locale_fr=fr_FR.ISO8859-1
57305 # Test for the HP-UX locale name.
57306 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57307 gt_cv_locale_fr=fr_FR.iso88591
57309 # Test for the Solaris 7 locale name.
57310 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57314 gt_cv_locale_fr=none
57326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
57327 printf "%s\n" "$gt_cv_locale_fr" >&6; }
57328 LOCALE_FR=$gt_cv_locale_fr
57333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
57334 printf %s "checking for a french Unicode locale... " >&6; }
57335 if test ${gt_cv_locale_fr_utf8+y}
57337 printf %s "(cached) " >&6
57340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57341 /* end confdefs.h. */
57343 #include <locale.h>
57345 #if HAVE_LANGINFO_CODESET
57346 # include <langinfo.h>
57348 #include <stdlib.h>
57349 #include <string.h>
57353 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
57354 imitates locale dependent behaviour by looking at the environment
57355 variables, and all locales use the UTF-8 encoding. */
57356 #if !(defined __BEOS__ || defined __HAIKU__)
57357 /* Check whether the given locale name is recognized by the system. */
57358 # if defined _WIN32 && !defined __CYGWIN__
57359 /* On native Windows, setlocale(category, "") looks at the system settings,
57360 not at the environment variables. Also, when an encoding suffix such
57361 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
57362 category of the locale to "C". */
57363 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
57364 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
57367 if (setlocale (LC_ALL, "") == NULL) return 1;
57369 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
57370 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
57371 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
57372 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
57373 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
57374 some unit tests fail. */
57375 # if HAVE_LANGINFO_CODESET
57377 const char *cs = nl_langinfo (CODESET);
57378 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
57383 /* On Cygwin, avoid locale names without encoding suffix, because the
57384 locale_charset() function relies on the encoding suffix. Note that
57385 LC_ALL is set on the command line. */
57386 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
57388 /* Check whether in the abbreviation of the second month, the second
57389 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
57390 two bytes long, with UTF-8 encoding. */
57391 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
57392 if (strftime (buf, sizeof (buf), "%b", &t) < 4
57393 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
57396 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
57397 /* Check whether the decimal separator is a comma.
57398 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
57399 are nl_langinfo(RADIXCHAR) are both ".". */
57400 if (localeconv () ->decimal_point[0] != ',') return 1;
57406 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
57407 (eval $ac_link) 2>&5
57409 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57410 test $ac_status = 0; } && test -s conftest$ac_exeext; then
57412 # Handle native Windows specially, because there setlocale() interprets
57413 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
57414 # "fr" or "fra" as "French" or "French_France.1252",
57415 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
57416 # "ja" as "Japanese" or "Japanese_Japan.932",
57419 # Test for the hypothetical native Windows locale name.
57420 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57421 gt_cv_locale_fr_utf8=French_France.65001
57424 gt_cv_locale_fr_utf8=none
57428 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
57429 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
57430 # configure script would override the LC_ALL setting. Likewise for
57431 # LC_CTYPE, which is also set at the beginning of the configure script.
57432 # Test for the usual locale name.
57433 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57434 gt_cv_locale_fr_utf8=fr_FR
57436 # Test for the locale name with explicit encoding suffix.
57437 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57438 gt_cv_locale_fr_utf8=fr_FR.UTF-8
57440 # Test for the Solaris 7 locale name.
57441 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57442 gt_cv_locale_fr_utf8=fr.UTF-8
57445 gt_cv_locale_fr_utf8=none
57455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
57456 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
57457 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
57463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
57464 printf %s "checking for a traditional japanese locale... " >&6; }
57465 if test ${gt_cv_locale_ja+y}
57467 printf %s "(cached) " >&6
57470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57471 /* end confdefs.h. */
57473 #include <locale.h>
57475 #if HAVE_LANGINFO_CODESET
57476 # include <langinfo.h>
57478 #include <stdlib.h>
57479 #include <string.h>
57484 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
57485 imitates locale dependent behaviour by looking at the environment
57486 variables, and all locales use the UTF-8 encoding. */
57487 #if defined __BEOS__ || defined __HAIKU__
57490 /* Check whether the given locale name is recognized by the system. */
57491 # if defined _WIN32 && !defined __CYGWIN__
57492 /* On native Windows, setlocale(category, "") looks at the system settings,
57493 not at the environment variables. Also, when an encoding suffix such
57494 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
57495 category of the locale to "C". */
57496 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
57497 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
57500 if (setlocale (LC_ALL, "") == NULL) return 1;
57502 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
57503 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
57504 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
57505 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
57506 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
57507 some unit tests fail.
57508 On MirBSD 10, when an unsupported locale is specified, setlocale()
57509 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
57510 # if HAVE_LANGINFO_CODESET
57512 const char *cs = nl_langinfo (CODESET);
57513 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
57514 || strcmp (cs, "UTF-8") == 0)
57519 /* On Cygwin, avoid locale names without encoding suffix, because the
57520 locale_charset() function relies on the encoding suffix. Note that
57521 LC_ALL is set on the command line. */
57522 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
57524 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
57525 on Cygwin 1.5.x. */
57526 if (MB_CUR_MAX == 1)
57528 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
57529 This excludes the UTF-8 encoding (except on MirBSD). */
57532 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
57533 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
57534 for (p = buf; *p != '\0'; p++)
57535 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
57543 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
57544 (eval $ac_link) 2>&5
57546 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57547 test $ac_status = 0; } && test -s conftest$ac_exeext; then
57549 # Handle native Windows specially, because there setlocale() interprets
57550 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
57551 # "fr" or "fra" as "French" or "French_France.1252",
57552 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
57553 # "ja" as "Japanese" or "Japanese_Japan.932",
57556 # Note that on native Windows, the Japanese locale is
57557 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
57558 # cannot use it here.
57559 gt_cv_locale_ja=none
57562 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
57563 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
57564 # configure script would override the LC_ALL setting. Likewise for
57565 # LC_CTYPE, which is also set at the beginning of the configure script.
57566 # Test for the AIX locale name.
57567 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57568 gt_cv_locale_ja=ja_JP
57570 # Test for the locale name with explicit encoding suffix.
57571 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57572 gt_cv_locale_ja=ja_JP.EUC-JP
57574 # Test for the HP-UX, OSF/1, NetBSD locale name.
57575 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57576 gt_cv_locale_ja=ja_JP.eucJP
57578 # Test for the IRIX, FreeBSD locale name.
57579 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57580 gt_cv_locale_ja=ja_JP.EUC
57582 # Test for the Solaris 7 locale name.
57583 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57586 # Special test for NetBSD 1.6.
57587 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
57588 gt_cv_locale_ja=ja_JP.eucJP
57591 gt_cv_locale_ja=none
57604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
57605 printf "%s\n" "$gt_cv_locale_ja" >&6; }
57606 LOCALE_JA=$gt_cv_locale_ja
57612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
57613 printf %s "checking for a transitional chinese locale... " >&6; }
57614 if test ${gt_cv_locale_zh_CN+y}
57616 printf %s "(cached) " >&6
57619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57620 /* end confdefs.h. */
57622 #include <locale.h>
57623 #include <stdlib.h>
57625 #if HAVE_LANGINFO_CODESET
57626 # include <langinfo.h>
57628 #include <stdlib.h>
57629 #include <string.h>
57634 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
57635 imitates locale dependent behaviour by looking at the environment
57636 variables, and all locales use the UTF-8 encoding. */
57637 #if defined __BEOS__ || defined __HAIKU__
57640 /* Check whether the given locale name is recognized by the system. */
57641 # if defined _WIN32 && !defined __CYGWIN__
57642 /* On native Windows, setlocale(category, "") looks at the system settings,
57643 not at the environment variables. Also, when an encoding suffix such
57644 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
57645 category of the locale to "C". */
57646 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
57647 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
57650 if (setlocale (LC_ALL, "") == NULL) return 1;
57652 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
57653 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
57654 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
57655 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
57656 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
57657 some unit tests fail.
57658 On MirBSD 10, when an unsupported locale is specified, setlocale()
57659 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
57660 # if HAVE_LANGINFO_CODESET
57662 const char *cs = nl_langinfo (CODESET);
57663 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
57664 || strcmp (cs, "UTF-8") == 0)
57669 /* On Cygwin, avoid locale names without encoding suffix, because the
57670 locale_charset() function relies on the encoding suffix. Note that
57671 LC_ALL is set on the command line. */
57672 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
57674 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
57675 This excludes the UTF-8 encoding (except on MirBSD). */
57678 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
57679 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
57680 for (p = buf; *p != '\0'; p++)
57681 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
57684 /* Check whether a typical GB18030 multibyte sequence is recognized as a
57685 single wide character. This excludes the GB2312 and GBK encodings. */
57686 if (mblen ("\203\062\332\066", 5) != 4)
57693 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
57694 (eval $ac_link) 2>&5
57696 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57697 test $ac_status = 0; } && test -s conftest$ac_exeext; then
57699 # Handle native Windows specially, because there setlocale() interprets
57700 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
57701 # "fr" or "fra" as "French" or "French_France.1252",
57702 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
57703 # "ja" as "Japanese" or "Japanese_Japan.932",
57706 # Test for the hypothetical native Windows locale name.
57707 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57708 gt_cv_locale_zh_CN=Chinese_China.54936
57711 gt_cv_locale_zh_CN=none
57715 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
57716 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
57717 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
57718 gt_cv_locale_zh_CN=none
57721 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
57722 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
57723 # configure script would override the LC_ALL setting. Likewise for
57724 # LC_CTYPE, which is also set at the beginning of the configure script.
57725 # Test for the locale name without encoding suffix.
57726 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57727 gt_cv_locale_zh_CN=zh_CN
57729 # Test for the locale name with explicit encoding suffix.
57730 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
57731 gt_cv_locale_zh_CN=zh_CN.GB18030
57734 gt_cv_locale_zh_CN=none
57740 # If there was a link error, due to mblen(), the system is so old that
57741 # it certainly doesn't have a chinese locale.
57742 gt_cv_locale_zh_CN=none
57747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
57748 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
57749 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
57753 if test "$ac_cv_header_winsock2_h" = yes; then
57762 M4tests_LIBOBJS="$M4tests_LIBOBJS setsockopt.$ac_objext"
57774 if test "$GL_M4_GNULIB_SETSOCKOPT" != 1; then
57775 if test "$GL_M4_GNULIB_SETSOCKOPT" = 0; then
57776 GL_M4_GNULIB_SETSOCKOPT=$gl_module_indicator_condition
57778 GL_M4_GNULIB_SETSOCKOPT="($GL_M4_GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
57786 printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
57797 ac_fn_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
57798 " "$ac_c_undeclared_builtin_options" "CFLAGS"
57799 if test "x$ac_cv_have_decl_sleep" = xyes
57805 printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h
57808 if test $ac_cv_have_decl_sleep != yes; then
57811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
57812 printf %s "checking for working sleep... " >&6; }
57813 if test ${gl_cv_func_sleep_works+y}
57815 printf %s "(cached) " >&6
57817 if test "$cross_compiling" = yes
57820 # Guess yes on glibc systems.
57821 *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
57822 # Guess yes on musl systems.
57823 *-musl*) gl_cv_func_sleep_works="guessing yes" ;;
57824 # Guess no on native Windows.
57825 mingw*) gl_cv_func_sleep_works="guessing no" ;;
57826 # If we don't know, obey --enable-cross-guesses.
57827 *) gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
57831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57832 /* end confdefs.h. */
57835 #include <unistd.h>
57836 #include <signal.h>
57838 handle_alarm (int sig)
57840 if (sig != SIGALRM)
57848 /* Failure to compile this test due to missing alarm is okay,
57849 since all such platforms (mingw) also lack sleep. */
57850 unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
57851 unsigned int remaining;
57852 signal (SIGALRM, handle_alarm);
57854 remaining = sleep (pentecost);
57855 if (remaining > pentecost)
57857 if (remaining <= pentecost - 10)
57865 if ac_fn_c_try_run "$LINENO"
57867 gl_cv_func_sleep_works=yes
57869 gl_cv_func_sleep_works=no
57871 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
57872 conftest.$ac_objext conftest.beam conftest.$ac_ext
57876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
57877 printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
57878 case "$gl_cv_func_sleep_works" in
57886 if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
57895 M4tests_LIBOBJS="$M4tests_LIBOBJS sleep.$ac_objext"
57907 if test "$GL_M4_GNULIB_SLEEP" != 1; then
57908 if test "$GL_M4_GNULIB_SLEEP" = 0; then
57909 GL_M4_GNULIB_SLEEP=$gl_module_indicator_condition
57911 GL_M4_GNULIB_SLEEP="($GL_M4_GNULIB_SLEEP || $gl_module_indicator_condition)"
57919 printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
57925 if test "$ac_cv_header_winsock2_h" = yes; then
57934 M4tests_LIBOBJS="$M4tests_LIBOBJS socket.$ac_objext"
57937 # When this module is used, sockets may actually occur as file descriptors,
57938 # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
57950 if test "$ac_cv_header_winsock2_h" = yes; then
57951 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
57952 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
57963 if test "$GL_M4_GNULIB_SOCKET" != 1; then
57964 if test "$GL_M4_GNULIB_SOCKET" = 0; then
57965 GL_M4_GNULIB_SOCKET=$gl_module_indicator_condition
57967 GL_M4_GNULIB_SOCKET="($GL_M4_GNULIB_SOCKET || $gl_module_indicator_condition)"
57975 printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
57981 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
57982 /* <sys/types.h> is not needed according to POSIX, but the
57983 <sys/socket.h> in i386-unknown-freebsd4.10 and
57984 powerpc-apple-darwin5.5 required it. */
57985 #include <sys/types.h>
57986 #if HAVE_SYS_SOCKET_H
57987 # include <sys/socket.h>
57988 #elif HAVE_WS2TCPIP_H
57989 # include <ws2tcpip.h>
57993 if test "x$ac_cv_type_socklen_t" = xyes
57997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
57998 printf %s "checking for socklen_t equivalent... " >&6; }
57999 if test ${gl_cv_socklen_t_equiv+y}
58001 printf %s "(cached) " >&6
58003 # Systems have either "struct sockaddr *" or
58004 # "void *" as the second argument to getpeername
58005 gl_cv_socklen_t_equiv=
58006 for arg2 in "struct sockaddr" void; do
58007 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
58008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58009 /* end confdefs.h. */
58010 #include <sys/types.h>
58011 #include <sys/socket.h>
58013 int getpeername (int, $arg2 *, $t *);
58018 getpeername (0, 0, &len);
58023 if ac_fn_c_try_compile "$LINENO"
58025 gl_cv_socklen_t_equiv="$t"
58027 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
58028 test "$gl_cv_socklen_t_equiv" != "" && break
58030 test "$gl_cv_socklen_t_equiv" != "" && break
58032 if test "$gl_cv_socklen_t_equiv" = ""; then
58033 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
58037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
58038 printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
58040 printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
58053 if test $ac_cv_have_decl_strerror_r = no; then
58054 HAVE_DECL_STRERROR_R=0
58057 if test $ac_cv_func_strerror_r = yes; then
58058 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
58059 if test $gl_cv_func_strerror_r_posix_signature = yes; then
58060 case "$gl_cv_func_strerror_r_works" in
58061 *no) REPLACE_STRERROR_R=1 ;;
58064 REPLACE_STRERROR_R=1
58067 REPLACE_STRERROR_R=1
58071 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
58080 M4tests_LIBOBJS="$M4tests_LIBOBJS strerror_r.$ac_objext"
58097 if test "$GL_M4_GNULIB_STRERROR_R" != 1; then
58098 if test "$GL_M4_GNULIB_STRERROR_R" = 0; then
58099 GL_M4_GNULIB_STRERROR_R=$gl_module_indicator_condition
58101 GL_M4_GNULIB_STRERROR_R="($GL_M4_GNULIB_STRERROR_R || $gl_module_indicator_condition)"
58109 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
58115 printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h
58128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
58129 printf %s "checking for a traditional french locale... " >&6; }
58130 if test ${gt_cv_locale_fr+y}
58132 printf %s "(cached) " >&6
58135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58136 /* end confdefs.h. */
58138 #include <locale.h>
58140 #if HAVE_LANGINFO_CODESET
58141 # include <langinfo.h>
58143 #include <stdlib.h>
58144 #include <string.h>
58148 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
58149 imitates locale dependent behaviour by looking at the environment
58150 variables, and all locales use the UTF-8 encoding. */
58151 #if defined __BEOS__ || defined __HAIKU__
58154 /* Check whether the given locale name is recognized by the system. */
58155 # if defined _WIN32 && !defined __CYGWIN__
58156 /* On native Windows, setlocale(category, "") looks at the system settings,
58157 not at the environment variables. Also, when an encoding suffix such
58158 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
58159 category of the locale to "C". */
58160 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
58161 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
58164 if (setlocale (LC_ALL, "") == NULL) return 1;
58166 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
58167 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
58168 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
58169 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
58170 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
58171 some unit tests fail.
58172 On MirBSD 10, when an unsupported locale is specified, setlocale()
58173 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
58174 # if HAVE_LANGINFO_CODESET
58176 const char *cs = nl_langinfo (CODESET);
58177 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
58178 || strcmp (cs, "UTF-8") == 0)
58183 /* On Cygwin, avoid locale names without encoding suffix, because the
58184 locale_charset() function relies on the encoding suffix. Note that
58185 LC_ALL is set on the command line. */
58186 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
58188 /* Check whether in the abbreviation of the second month, the second
58189 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
58190 one byte long. This excludes the UTF-8 encoding. */
58191 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
58192 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
58193 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
58194 /* Check whether the decimal separator is a comma.
58195 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
58196 are nl_langinfo(RADIXCHAR) are both ".". */
58197 if (localeconv () ->decimal_point[0] != ',') return 1;
58204 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
58205 (eval $ac_link) 2>&5
58207 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58208 test $ac_status = 0; } && test -s conftest$ac_exeext; then
58210 # Handle native Windows specially, because there setlocale() interprets
58211 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
58212 # "fr" or "fra" as "French" or "French_France.1252",
58213 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
58214 # "ja" as "Japanese" or "Japanese_Japan.932",
58217 # Test for the native Windows locale name.
58218 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58219 gt_cv_locale_fr=French_France.1252
58222 gt_cv_locale_fr=none
58226 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
58227 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
58228 # configure script would override the LC_ALL setting. Likewise for
58229 # LC_CTYPE, which is also set at the beginning of the configure script.
58230 # Test for the usual locale name.
58231 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58232 gt_cv_locale_fr=fr_FR
58234 # Test for the locale name with explicit encoding suffix.
58235 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58236 gt_cv_locale_fr=fr_FR.ISO-8859-1
58238 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
58239 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58240 gt_cv_locale_fr=fr_FR.ISO8859-1
58242 # Test for the HP-UX locale name.
58243 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58244 gt_cv_locale_fr=fr_FR.iso88591
58246 # Test for the Solaris 7 locale name.
58247 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58251 gt_cv_locale_fr=none
58263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
58264 printf "%s\n" "$gt_cv_locale_fr" >&6; }
58265 LOCALE_FR=$gt_cv_locale_fr
58270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
58271 printf %s "checking for a french Unicode locale... " >&6; }
58272 if test ${gt_cv_locale_fr_utf8+y}
58274 printf %s "(cached) " >&6
58277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58278 /* end confdefs.h. */
58280 #include <locale.h>
58282 #if HAVE_LANGINFO_CODESET
58283 # include <langinfo.h>
58285 #include <stdlib.h>
58286 #include <string.h>
58290 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
58291 imitates locale dependent behaviour by looking at the environment
58292 variables, and all locales use the UTF-8 encoding. */
58293 #if !(defined __BEOS__ || defined __HAIKU__)
58294 /* Check whether the given locale name is recognized by the system. */
58295 # if defined _WIN32 && !defined __CYGWIN__
58296 /* On native Windows, setlocale(category, "") looks at the system settings,
58297 not at the environment variables. Also, when an encoding suffix such
58298 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
58299 category of the locale to "C". */
58300 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
58301 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
58304 if (setlocale (LC_ALL, "") == NULL) return 1;
58306 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
58307 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
58308 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
58309 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
58310 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
58311 some unit tests fail. */
58312 # if HAVE_LANGINFO_CODESET
58314 const char *cs = nl_langinfo (CODESET);
58315 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
58320 /* On Cygwin, avoid locale names without encoding suffix, because the
58321 locale_charset() function relies on the encoding suffix. Note that
58322 LC_ALL is set on the command line. */
58323 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
58325 /* Check whether in the abbreviation of the second month, the second
58326 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
58327 two bytes long, with UTF-8 encoding. */
58328 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
58329 if (strftime (buf, sizeof (buf), "%b", &t) < 4
58330 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
58333 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
58334 /* Check whether the decimal separator is a comma.
58335 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
58336 are nl_langinfo(RADIXCHAR) are both ".". */
58337 if (localeconv () ->decimal_point[0] != ',') return 1;
58343 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
58344 (eval $ac_link) 2>&5
58346 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58347 test $ac_status = 0; } && test -s conftest$ac_exeext; then
58349 # Handle native Windows specially, because there setlocale() interprets
58350 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
58351 # "fr" or "fra" as "French" or "French_France.1252",
58352 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
58353 # "ja" as "Japanese" or "Japanese_Japan.932",
58356 # Test for the hypothetical native Windows locale name.
58357 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58358 gt_cv_locale_fr_utf8=French_France.65001
58361 gt_cv_locale_fr_utf8=none
58365 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
58366 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
58367 # configure script would override the LC_ALL setting. Likewise for
58368 # LC_CTYPE, which is also set at the beginning of the configure script.
58369 # Test for the usual locale name.
58370 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58371 gt_cv_locale_fr_utf8=fr_FR
58373 # Test for the locale name with explicit encoding suffix.
58374 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58375 gt_cv_locale_fr_utf8=fr_FR.UTF-8
58377 # Test for the Solaris 7 locale name.
58378 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58379 gt_cv_locale_fr_utf8=fr.UTF-8
58382 gt_cv_locale_fr_utf8=none
58392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
58393 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
58394 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
58400 if test $ac_cv_func_symlink = no; then
58403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
58404 printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
58405 if test ${gl_cv_func_symlink_works+y}
58407 printf %s "(cached) " >&6
58409 if test "$cross_compiling" = yes
58412 # Guess yes on Linux systems.
58413 linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
58414 # Guess yes on glibc systems.
58415 *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
58416 # If we don't know, obey --enable-cross-guesses.
58417 *) gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
58421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58422 /* end confdefs.h. */
58423 #include <unistd.h>
58429 if (!symlink ("a", "conftest.link/"))
58431 if (symlink ("conftest.f", "conftest.lnk2"))
58433 else if (!symlink ("a", "conftest.lnk2/"))
58441 if ac_fn_c_try_run "$LINENO"
58443 gl_cv_func_symlink_works=yes
58445 gl_cv_func_symlink_works=no
58447 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
58448 conftest.$ac_objext conftest.beam conftest.$ac_ext
58451 rm -f conftest.f conftest.link conftest.lnk2
58453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
58454 printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
58455 case "$gl_cv_func_symlink_works" in
58463 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
58472 M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
58484 if test "$GL_M4_GNULIB_SYMLINK" != 1; then
58485 if test "$GL_M4_GNULIB_SYMLINK" = 0; then
58486 GL_M4_GNULIB_SYMLINK=$gl_module_indicator_condition
58488 GL_M4_GNULIB_SYMLINK="($GL_M4_GNULIB_SYMLINK || $gl_module_indicator_condition)"
58496 printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
58539 if test $gl_threads_api = posix; then
58540 gl_save_LIBS="$LIBS"
58541 LIBS="$LIBS $LIBMULTITHREAD"
58542 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
58543 if test "x$ac_cv_func_pthread_atfork" = xyes
58545 printf "%s\n" "#define HAVE_PTHREAD_ATFORK 1" >>confdefs.h
58549 LIBS="$gl_save_LIBS"
58555 if test $ac_cv_have_decl_unsetenv = no; then
58556 HAVE_DECL_UNSETENV=0
58558 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
58559 if test "x$ac_cv_func_unsetenv" = xyes
58561 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
58565 if test $ac_cv_func_unsetenv = no; then
58569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
58570 printf %s "checking for unsetenv() return type... " >&6; }
58571 if test ${gt_cv_func_unsetenv_ret+y}
58573 printf %s "(cached) " >&6
58575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58576 /* end confdefs.h. */
58579 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
58580 #include <stdlib.h>
58585 int unsetenv (const char *name);
58595 if ac_fn_c_try_compile "$LINENO"
58597 gt_cv_func_unsetenv_ret='int'
58599 gt_cv_func_unsetenv_ret='void'
58601 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
58603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
58604 printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
58605 if test $gt_cv_func_unsetenv_ret = 'void'; then
58607 printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
58612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
58613 printf %s "checking whether unsetenv obeys POSIX... " >&6; }
58614 if test ${gl_cv_func_unsetenv_works+y}
58616 printf %s "(cached) " >&6
58618 if test "$cross_compiling" = yes
58621 # Guess yes on glibc systems.
58622 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
58623 # If we don't know, obey --enable-cross-guesses.
58624 *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
58628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58629 /* end confdefs.h. */
58631 #include <stdlib.h>
58633 extern char **environ;
58642 char entry1[] = "a=1";
58643 char entry2[] = "b=2";
58644 char *env[] = { entry1, entry2, NULL };
58645 if (putenv ((char *) "a=1")) return 1;
58646 if (putenv (entry2)) return 2;
58649 if (getenv ("a")) return 3;
58650 if (!unsetenv ("") || errno != EINVAL) return 4;
58653 if (!getenv ("a")) return 5;
58656 if (getenv ("a")) return 6;
58662 if ac_fn_c_try_run "$LINENO"
58664 gl_cv_func_unsetenv_works=yes
58666 gl_cv_func_unsetenv_works=no
58668 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
58669 conftest.$ac_objext conftest.beam conftest.$ac_ext
58674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
58675 printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
58676 case "$gl_cv_func_unsetenv_works" in
58684 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
58693 M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
58709 if test "$GL_M4_GNULIB_UNSETENV" != 1; then
58710 if test "$GL_M4_GNULIB_UNSETENV" = 0; then
58711 GL_M4_GNULIB_UNSETENV=$gl_module_indicator_condition
58713 GL_M4_GNULIB_UNSETENV="($GL_M4_GNULIB_UNSETENV || $gl_module_indicator_condition)"
58721 printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
58725 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
58728 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
58736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
58737 printf %s "checking for a traditional french locale... " >&6; }
58738 if test ${gt_cv_locale_fr+y}
58740 printf %s "(cached) " >&6
58743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58744 /* end confdefs.h. */
58746 #include <locale.h>
58748 #if HAVE_LANGINFO_CODESET
58749 # include <langinfo.h>
58751 #include <stdlib.h>
58752 #include <string.h>
58756 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
58757 imitates locale dependent behaviour by looking at the environment
58758 variables, and all locales use the UTF-8 encoding. */
58759 #if defined __BEOS__ || defined __HAIKU__
58762 /* Check whether the given locale name is recognized by the system. */
58763 # if defined _WIN32 && !defined __CYGWIN__
58764 /* On native Windows, setlocale(category, "") looks at the system settings,
58765 not at the environment variables. Also, when an encoding suffix such
58766 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
58767 category of the locale to "C". */
58768 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
58769 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
58772 if (setlocale (LC_ALL, "") == NULL) return 1;
58774 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
58775 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
58776 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
58777 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
58778 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
58779 some unit tests fail.
58780 On MirBSD 10, when an unsupported locale is specified, setlocale()
58781 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
58782 # if HAVE_LANGINFO_CODESET
58784 const char *cs = nl_langinfo (CODESET);
58785 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
58786 || strcmp (cs, "UTF-8") == 0)
58791 /* On Cygwin, avoid locale names without encoding suffix, because the
58792 locale_charset() function relies on the encoding suffix. Note that
58793 LC_ALL is set on the command line. */
58794 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
58796 /* Check whether in the abbreviation of the second month, the second
58797 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
58798 one byte long. This excludes the UTF-8 encoding. */
58799 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
58800 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
58801 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
58802 /* Check whether the decimal separator is a comma.
58803 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
58804 are nl_langinfo(RADIXCHAR) are both ".". */
58805 if (localeconv () ->decimal_point[0] != ',') return 1;
58812 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
58813 (eval $ac_link) 2>&5
58815 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58816 test $ac_status = 0; } && test -s conftest$ac_exeext; then
58818 # Handle native Windows specially, because there setlocale() interprets
58819 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
58820 # "fr" or "fra" as "French" or "French_France.1252",
58821 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
58822 # "ja" as "Japanese" or "Japanese_Japan.932",
58825 # Test for the native Windows locale name.
58826 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58827 gt_cv_locale_fr=French_France.1252
58830 gt_cv_locale_fr=none
58834 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
58835 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
58836 # configure script would override the LC_ALL setting. Likewise for
58837 # LC_CTYPE, which is also set at the beginning of the configure script.
58838 # Test for the usual locale name.
58839 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58840 gt_cv_locale_fr=fr_FR
58842 # Test for the locale name with explicit encoding suffix.
58843 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58844 gt_cv_locale_fr=fr_FR.ISO-8859-1
58846 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
58847 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58848 gt_cv_locale_fr=fr_FR.ISO8859-1
58850 # Test for the HP-UX locale name.
58851 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58852 gt_cv_locale_fr=fr_FR.iso88591
58854 # Test for the Solaris 7 locale name.
58855 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58859 gt_cv_locale_fr=none
58871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
58872 printf "%s\n" "$gt_cv_locale_fr" >&6; }
58873 LOCALE_FR=$gt_cv_locale_fr
58878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
58879 printf %s "checking for a french Unicode locale... " >&6; }
58880 if test ${gt_cv_locale_fr_utf8+y}
58882 printf %s "(cached) " >&6
58885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58886 /* end confdefs.h. */
58888 #include <locale.h>
58890 #if HAVE_LANGINFO_CODESET
58891 # include <langinfo.h>
58893 #include <stdlib.h>
58894 #include <string.h>
58898 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
58899 imitates locale dependent behaviour by looking at the environment
58900 variables, and all locales use the UTF-8 encoding. */
58901 #if !(defined __BEOS__ || defined __HAIKU__)
58902 /* Check whether the given locale name is recognized by the system. */
58903 # if defined _WIN32 && !defined __CYGWIN__
58904 /* On native Windows, setlocale(category, "") looks at the system settings,
58905 not at the environment variables. Also, when an encoding suffix such
58906 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
58907 category of the locale to "C". */
58908 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
58909 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
58912 if (setlocale (LC_ALL, "") == NULL) return 1;
58914 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
58915 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
58916 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
58917 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
58918 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
58919 some unit tests fail. */
58920 # if HAVE_LANGINFO_CODESET
58922 const char *cs = nl_langinfo (CODESET);
58923 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
58928 /* On Cygwin, avoid locale names without encoding suffix, because the
58929 locale_charset() function relies on the encoding suffix. Note that
58930 LC_ALL is set on the command line. */
58931 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
58933 /* Check whether in the abbreviation of the second month, the second
58934 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
58935 two bytes long, with UTF-8 encoding. */
58936 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
58937 if (strftime (buf, sizeof (buf), "%b", &t) < 4
58938 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
58941 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
58942 /* Check whether the decimal separator is a comma.
58943 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
58944 are nl_langinfo(RADIXCHAR) are both ".". */
58945 if (localeconv () ->decimal_point[0] != ',') return 1;
58951 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
58952 (eval $ac_link) 2>&5
58954 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58955 test $ac_status = 0; } && test -s conftest$ac_exeext; then
58957 # Handle native Windows specially, because there setlocale() interprets
58958 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
58959 # "fr" or "fra" as "French" or "French_France.1252",
58960 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
58961 # "ja" as "Japanese" or "Japanese_Japan.932",
58964 # Test for the hypothetical native Windows locale name.
58965 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58966 gt_cv_locale_fr_utf8=French_France.65001
58969 gt_cv_locale_fr_utf8=none
58973 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
58974 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
58975 # configure script would override the LC_ALL setting. Likewise for
58976 # LC_CTYPE, which is also set at the beginning of the configure script.
58977 # Test for the usual locale name.
58978 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58979 gt_cv_locale_fr_utf8=fr_FR
58981 # Test for the locale name with explicit encoding suffix.
58982 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58983 gt_cv_locale_fr_utf8=fr_FR.UTF-8
58985 # Test for the Solaris 7 locale name.
58986 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
58987 gt_cv_locale_fr_utf8=fr.UTF-8
58990 gt_cv_locale_fr_utf8=none
59000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
59001 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
59002 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
59008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
59009 printf %s "checking for a traditional japanese locale... " >&6; }
59010 if test ${gt_cv_locale_ja+y}
59012 printf %s "(cached) " >&6
59015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59016 /* end confdefs.h. */
59018 #include <locale.h>
59020 #if HAVE_LANGINFO_CODESET
59021 # include <langinfo.h>
59023 #include <stdlib.h>
59024 #include <string.h>
59029 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
59030 imitates locale dependent behaviour by looking at the environment
59031 variables, and all locales use the UTF-8 encoding. */
59032 #if defined __BEOS__ || defined __HAIKU__
59035 /* Check whether the given locale name is recognized by the system. */
59036 # if defined _WIN32 && !defined __CYGWIN__
59037 /* On native Windows, setlocale(category, "") looks at the system settings,
59038 not at the environment variables. Also, when an encoding suffix such
59039 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
59040 category of the locale to "C". */
59041 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
59042 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
59045 if (setlocale (LC_ALL, "") == NULL) return 1;
59047 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
59048 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
59049 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
59050 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
59051 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
59052 some unit tests fail.
59053 On MirBSD 10, when an unsupported locale is specified, setlocale()
59054 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
59055 # if HAVE_LANGINFO_CODESET
59057 const char *cs = nl_langinfo (CODESET);
59058 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
59059 || strcmp (cs, "UTF-8") == 0)
59064 /* On Cygwin, avoid locale names without encoding suffix, because the
59065 locale_charset() function relies on the encoding suffix. Note that
59066 LC_ALL is set on the command line. */
59067 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
59069 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
59070 on Cygwin 1.5.x. */
59071 if (MB_CUR_MAX == 1)
59073 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
59074 This excludes the UTF-8 encoding (except on MirBSD). */
59077 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
59078 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
59079 for (p = buf; *p != '\0'; p++)
59080 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
59088 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
59089 (eval $ac_link) 2>&5
59091 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59092 test $ac_status = 0; } && test -s conftest$ac_exeext; then
59094 # Handle native Windows specially, because there setlocale() interprets
59095 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
59096 # "fr" or "fra" as "French" or "French_France.1252",
59097 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
59098 # "ja" as "Japanese" or "Japanese_Japan.932",
59101 # Note that on native Windows, the Japanese locale is
59102 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
59103 # cannot use it here.
59104 gt_cv_locale_ja=none
59107 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
59108 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
59109 # configure script would override the LC_ALL setting. Likewise for
59110 # LC_CTYPE, which is also set at the beginning of the configure script.
59111 # Test for the AIX locale name.
59112 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59113 gt_cv_locale_ja=ja_JP
59115 # Test for the locale name with explicit encoding suffix.
59116 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59117 gt_cv_locale_ja=ja_JP.EUC-JP
59119 # Test for the HP-UX, OSF/1, NetBSD locale name.
59120 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59121 gt_cv_locale_ja=ja_JP.eucJP
59123 # Test for the IRIX, FreeBSD locale name.
59124 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59125 gt_cv_locale_ja=ja_JP.EUC
59127 # Test for the Solaris 7 locale name.
59128 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59131 # Special test for NetBSD 1.6.
59132 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
59133 gt_cv_locale_ja=ja_JP.eucJP
59136 gt_cv_locale_ja=none
59149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
59150 printf "%s\n" "$gt_cv_locale_ja" >&6; }
59151 LOCALE_JA=$gt_cv_locale_ja
59157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
59158 printf %s "checking for a transitional chinese locale... " >&6; }
59159 if test ${gt_cv_locale_zh_CN+y}
59161 printf %s "(cached) " >&6
59164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59165 /* end confdefs.h. */
59167 #include <locale.h>
59168 #include <stdlib.h>
59170 #if HAVE_LANGINFO_CODESET
59171 # include <langinfo.h>
59173 #include <stdlib.h>
59174 #include <string.h>
59179 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
59180 imitates locale dependent behaviour by looking at the environment
59181 variables, and all locales use the UTF-8 encoding. */
59182 #if defined __BEOS__ || defined __HAIKU__
59185 /* Check whether the given locale name is recognized by the system. */
59186 # if defined _WIN32 && !defined __CYGWIN__
59187 /* On native Windows, setlocale(category, "") looks at the system settings,
59188 not at the environment variables. Also, when an encoding suffix such
59189 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
59190 category of the locale to "C". */
59191 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
59192 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
59195 if (setlocale (LC_ALL, "") == NULL) return 1;
59197 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
59198 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
59199 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
59200 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
59201 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
59202 some unit tests fail.
59203 On MirBSD 10, when an unsupported locale is specified, setlocale()
59204 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
59205 # if HAVE_LANGINFO_CODESET
59207 const char *cs = nl_langinfo (CODESET);
59208 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
59209 || strcmp (cs, "UTF-8") == 0)
59214 /* On Cygwin, avoid locale names without encoding suffix, because the
59215 locale_charset() function relies on the encoding suffix. Note that
59216 LC_ALL is set on the command line. */
59217 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
59219 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
59220 This excludes the UTF-8 encoding (except on MirBSD). */
59223 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
59224 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
59225 for (p = buf; *p != '\0'; p++)
59226 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
59229 /* Check whether a typical GB18030 multibyte sequence is recognized as a
59230 single wide character. This excludes the GB2312 and GBK encodings. */
59231 if (mblen ("\203\062\332\066", 5) != 4)
59238 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
59239 (eval $ac_link) 2>&5
59241 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59242 test $ac_status = 0; } && test -s conftest$ac_exeext; then
59244 # Handle native Windows specially, because there setlocale() interprets
59245 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
59246 # "fr" or "fra" as "French" or "French_France.1252",
59247 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
59248 # "ja" as "Japanese" or "Japanese_Japan.932",
59251 # Test for the hypothetical native Windows locale name.
59252 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59253 gt_cv_locale_zh_CN=Chinese_China.54936
59256 gt_cv_locale_zh_CN=none
59260 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
59261 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
59262 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
59263 gt_cv_locale_zh_CN=none
59266 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
59267 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
59268 # configure script would override the LC_ALL setting. Likewise for
59269 # LC_CTYPE, which is also set at the beginning of the configure script.
59270 # Test for the locale name without encoding suffix.
59271 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59272 gt_cv_locale_zh_CN=zh_CN
59274 # Test for the locale name with explicit encoding suffix.
59275 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59276 gt_cv_locale_zh_CN=zh_CN.GB18030
59279 gt_cv_locale_zh_CN=none
59285 # If there was a link error, due to mblen(), the system is so old that
59286 # it certainly doesn't have a chinese locale.
59287 gt_cv_locale_zh_CN=none
59292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
59293 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
59294 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
59301 if test $ac_cv_func_wctob = no; then
59309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
59310 printf %s "checking whether wctob works... " >&6; }
59311 if test ${gl_cv_func_wctob_works+y}
59313 printf %s "(cached) " >&6
59317 # Guess no on Solaris <= 9 and Cygwin.
59318 solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
59319 gl_cv_func_wctob_works="guessing no" ;;
59320 # Guess no on native Windows.
59322 gl_cv_func_wctob_works="guessing no" ;;
59323 # Guess yes otherwise.
59324 *) gl_cv_func_wctob_works="guessing yes" ;;
59328 if test "$cross_compiling" = yes
59332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59333 /* end confdefs.h. */
59335 #include <locale.h>
59338 register long global __asm__ ("%ebx");
59342 setlocale (LC_ALL, "en_US.UTF-8");
59344 global = 0x12345678;
59345 if (wctob (0x00FC) != -1)
59347 if (global != 0x12345678)
59352 if ac_fn_c_try_run "$LINENO"
59356 gl_cv_func_wctob_works=no
59358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
59359 conftest.$ac_objext conftest.beam conftest.$ac_ext
59364 if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
59365 if test "$cross_compiling" = yes
59369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59370 /* end confdefs.h. */
59372 #include <locale.h>
59373 #include <stdlib.h>
59377 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
59381 if (mbtowc (&wc, "\374", 1) == 1)
59382 if (wctob (wc) != (unsigned char) '\374')
59388 if ac_fn_c_try_run "$LINENO"
59390 gl_cv_func_wctob_works=yes
59392 gl_cv_func_wctob_works=no
59394 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
59395 conftest.$ac_objext conftest.beam conftest.$ac_ext
59401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
59402 printf "%s\n" "$gl_cv_func_wctob_works" >&6; }
59403 case "$gl_cv_func_wctob_works" in
59405 *) REPLACE_WCTOB=1 ;;
59407 if test $REPLACE_WCTOB = 0; then
59409 ac_fn_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
59412 " "$ac_c_undeclared_builtin_options" "CFLAGS"
59413 if test "x$ac_cv_have_decl_wctob" = xyes
59419 printf "%s\n" "#define HAVE_DECL_WCTOB $ac_have_decl" >>confdefs.h
59421 if test $ac_cv_have_decl_wctob != yes; then
59427 if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
59436 M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
59451 if test "$GL_M4_GNULIB_WCTOB" != 1; then
59452 if test "$GL_M4_GNULIB_WCTOB" = 0; then
59453 GL_M4_GNULIB_WCTOB=$gl_module_indicator_condition
59455 GL_M4_GNULIB_WCTOB="($GL_M4_GNULIB_WCTOB || $gl_module_indicator_condition)"
59463 printf "%s\n" "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
59474 if test $REPLACE_WCTOMB = 1; then
59483 M4tests_LIBOBJS="$M4tests_LIBOBJS wctomb.$ac_objext"
59498 if test "$GL_M4_GNULIB_WCTOMB" != 1; then
59499 if test "$GL_M4_GNULIB_WCTOMB" = 0; then
59500 GL_M4_GNULIB_WCTOMB=$gl_module_indicator_condition
59502 GL_M4_GNULIB_WCTOMB="($GL_M4_GNULIB_WCTOMB || $gl_module_indicator_condition)"
59510 printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
59525 M4tests_LIBOBJS="$M4tests_LIBOBJS windows-thread.$ac_objext"
59533 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
59541 if test $gl_cv_header_signal_h_SIGPIPE != yes; then
59547 if test $REPLACE_WRITE = 1; then
59556 M4tests_LIBOBJS="$M4tests_LIBOBJS write.$ac_objext"
59569 if test "$GL_M4_GNULIB_WRITE" != 1; then
59570 if test "$GL_M4_GNULIB_WRITE" = 0; then
59571 GL_M4_GNULIB_WRITE=$gl_module_indicator_condition
59573 GL_M4_GNULIB_WRITE="($GL_M4_GNULIB_WRITE || $gl_module_indicator_condition)"
59581 printf "%s\n" "#define GNULIB_TEST_WRITE 1" >>confdefs.h
59598 LIBM4_LIBDEPS="$gl_libdeps"
59600 LIBM4_LTLIBDEPS="$gl_ltlibdeps"
59602 LIBTESTS_LIBDEPS="$gltests_libdeps"
59606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether an open file can be renamed" >&5
59607 printf %s "checking whether an open file can be renamed... " >&6; }
59608 if test ${M4_cv_func_rename_open_file_works+y}
59610 printf %s "(cached) " >&6
59612 if test "$cross_compiling" = yes
59614 M4_cv_func_rename_open_file_works='guessing no'
59616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59617 /* end confdefs.h. */
59618 $ac_includes_default
59622 FILE *f = fopen ("conftest.1", "w+");
59623 int result = rename ("conftest.1", "conftest.2");
59624 fclose (f); remove ("conftest.1"); remove ("conftest.2");
59630 if ac_fn_c_try_run "$LINENO"
59632 M4_cv_func_rename_open_file_works=yes
59634 M4_cv_func_rename_open_file_works=no
59636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
59637 conftest.$ac_objext conftest.beam conftest.$ac_ext
59641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $M4_cv_func_rename_open_file_works" >&5
59642 printf "%s\n" "$M4_cv_func_rename_open_file_works" >&6; }
59643 if test "$M4_cv_func_rename_open_file_works" = yes ; then
59644 M4_rename_open_works=1
59646 M4_rename_open_works=0
59649 printf "%s\n" "#define RENAME_OPEN_FILE_WORKS $M4_rename_open_works" >>confdefs.h
59653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if changeword is wanted" >&5
59654 printf %s "checking if changeword is wanted... " >&6; }
59655 # Check whether --enable-changeword was given.
59656 if test ${enable_changeword+y}
59658 enableval=$enable_changeword; if test "$enableval" = yes; then
59659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59660 printf "%s\n" "yes" >&6; }
59662 printf "%s\n" "#define ENABLE_CHANGEWORD 1" >>confdefs.h
59665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59666 printf "%s\n" "no" >&6; }
59669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59670 printf "%s\n" "no" >&6; }
59674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which shell to use for syscmd" >&5
59675 printf %s "checking which shell to use for syscmd... " >&6; }
59677 # Check whether --with-syscmd-shell was given.
59678 if test ${with_syscmd_shell+y}
59680 withval=$with_syscmd_shell; case $withval in
59681 yes) with_syscmd_shell=no;;
59684 with_syscmd_shell=no
59687 if test "$with_syscmd_shell" = no ; then
59688 with_syscmd_shell=/bin/sh
59689 if test "$cross_compiling" != yes ; then
59690 if as_fn_executable_p /bin/sh$EXEEXT
59694 if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi
59696 M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59697 for M4_dir in `if (command -p getconf PATH) 2>/dev/null ; then
59698 command -p getconf PATH
59700 echo "/bin$PATH_SEPARATOR$PATH"
59704 test -z "$M4_dir" && continue
59705 as_fn_executable_p "$M4_dir/sh" \
59706 && { with_syscmd_shell=$M4_dir/sh; break; }
59711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_syscmd_shell" >&5
59712 printf "%s\n" "$with_syscmd_shell" >&6; }
59714 printf "%s\n" "#define SYSCMD_SHELL \"$with_syscmd_shell\"" >>confdefs.h
59717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5
59718 printf %s "checking if malloc debugging is wanted... " >&6; }
59720 # Check whether --with-dmalloc was given.
59721 if test ${with_dmalloc+y}
59723 withval=$with_dmalloc; if test "$withval" = yes; then
59724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59725 printf "%s\n" "yes" >&6; }
59727 printf "%s\n" "#define WITH_DMALLOC 1" >>confdefs.h
59729 LIBS="$LIBS -ldmalloc"
59730 LDFLAGS="$LDFLAGS -g"
59732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59733 printf "%s\n" "no" >&6; }
59736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59737 printf "%s\n" "no" >&6; }
59741 ac_config_commands="$ac_config_commands stamp-h"
59746 OS2_LDFLAGS="-Zargs-resp" ;; #(
59753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
59754 printf %s "checking whether NLS is requested... " >&6; }
59755 # Check whether --enable-nls was given.
59756 if test ${enable_nls+y}
59758 enableval=$enable_nls; USE_NLS=$enableval
59763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
59764 printf "%s\n" "$USE_NLS" >&6; }
59769 GETTEXT_MACRO_VERSION=0.19
59774 # Prepare PATH_SEPARATOR.
59775 # The user is always right.
59776 if test "${PATH_SEPARATOR+set}" != set; then
59777 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
59778 # contains only /bin. Note that ksh looks also at the FPATH variable,
59779 # so we have to set that as well for the test.
59781 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
59782 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
59783 || PATH_SEPARATOR=';'
59787 # Find out how to test for executable files. Don't use a zero-byte file,
59788 # as systems may use methods other than mode bits to determine executability.
59789 cat >conf$$.file <<_ASEOF
59793 chmod +x conf$$.file
59794 if test -x conf$$.file >/dev/null 2>&1; then
59795 ac_executable_p="test -x"
59797 ac_executable_p="test -f"
59801 # Extract the first word of "msgfmt", so it can be a program name with args.
59802 set dummy msgfmt; ac_word=$2
59803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59804 printf %s "checking for $ac_word... " >&6; }
59805 if test ${ac_cv_path_MSGFMT+y}
59807 printf %s "(cached) " >&6
59811 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
59814 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
59815 for ac_dir in $PATH; do
59817 test -z "$ac_dir" && ac_dir=.
59818 for ac_exec_ext in '' $ac_executable_extensions; do
59819 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
59820 echo "$as_me: trying $ac_dir/$ac_word..." >&5
59821 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
59822 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
59823 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
59830 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
59834 MSGFMT="$ac_cv_path_MSGFMT"
59835 if test "$MSGFMT" != ":"; then
59836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
59837 printf "%s\n" "$MSGFMT" >&6; }
59839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59840 printf "%s\n" "no" >&6; }
59843 # Extract the first word of "gmsgfmt", so it can be a program name with args.
59844 set dummy gmsgfmt; ac_word=$2
59845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59846 printf %s "checking for $ac_word... " >&6; }
59847 if test ${ac_cv_path_GMSGFMT+y}
59849 printf %s "(cached) " >&6
59853 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
59856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59857 for as_dir in $PATH
59860 case $as_dir in #(((
59863 *) as_dir=$as_dir/ ;;
59865 for ac_exec_ext in '' $ac_executable_extensions; do
59866 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
59867 ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
59868 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
59875 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
59879 GMSGFMT=$ac_cv_path_GMSGFMT
59880 if test -n "$GMSGFMT"; then
59881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
59882 printf "%s\n" "$GMSGFMT" >&6; }
59884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59885 printf "%s\n" "no" >&6; }
59890 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
59891 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
59892 *) MSGFMT_015=$MSGFMT ;;
59895 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
59896 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
59897 *) GMSGFMT_015=$GMSGFMT ;;
59902 # Prepare PATH_SEPARATOR.
59903 # The user is always right.
59904 if test "${PATH_SEPARATOR+set}" != set; then
59905 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
59906 # contains only /bin. Note that ksh looks also at the FPATH variable,
59907 # so we have to set that as well for the test.
59909 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
59910 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
59911 || PATH_SEPARATOR=';'
59915 # Find out how to test for executable files. Don't use a zero-byte file,
59916 # as systems may use methods other than mode bits to determine executability.
59917 cat >conf$$.file <<_ASEOF
59921 chmod +x conf$$.file
59922 if test -x conf$$.file >/dev/null 2>&1; then
59923 ac_executable_p="test -x"
59925 ac_executable_p="test -f"
59929 # Extract the first word of "xgettext", so it can be a program name with args.
59930 set dummy xgettext; ac_word=$2
59931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59932 printf %s "checking for $ac_word... " >&6; }
59933 if test ${ac_cv_path_XGETTEXT+y}
59935 printf %s "(cached) " >&6
59937 case "$XGETTEXT" in
59939 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
59942 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
59943 for ac_dir in $PATH; do
59945 test -z "$ac_dir" && ac_dir=.
59946 for ac_exec_ext in '' $ac_executable_extensions; do
59947 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
59948 echo "$as_me: trying $ac_dir/$ac_word..." >&5
59949 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
59950 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
59951 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
59958 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
59962 XGETTEXT="$ac_cv_path_XGETTEXT"
59963 if test "$XGETTEXT" != ":"; then
59964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
59965 printf "%s\n" "$XGETTEXT" >&6; }
59967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59968 printf "%s\n" "no" >&6; }
59973 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
59974 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
59975 *) XGETTEXT_015=$XGETTEXT ;;
59980 # Prepare PATH_SEPARATOR.
59981 # The user is always right.
59982 if test "${PATH_SEPARATOR+set}" != set; then
59983 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
59984 # contains only /bin. Note that ksh looks also at the FPATH variable,
59985 # so we have to set that as well for the test.
59987 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
59988 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
59989 || PATH_SEPARATOR=';'
59993 # Find out how to test for executable files. Don't use a zero-byte file,
59994 # as systems may use methods other than mode bits to determine executability.
59995 cat >conf$$.file <<_ASEOF
59999 chmod +x conf$$.file
60000 if test -x conf$$.file >/dev/null 2>&1; then
60001 ac_executable_p="test -x"
60003 ac_executable_p="test -f"
60007 # Extract the first word of "msgmerge", so it can be a program name with args.
60008 set dummy msgmerge; ac_word=$2
60009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60010 printf %s "checking for $ac_word... " >&6; }
60011 if test ${ac_cv_path_MSGMERGE+y}
60013 printf %s "(cached) " >&6
60015 case "$MSGMERGE" in
60017 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
60020 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
60021 for ac_dir in $PATH; do
60023 test -z "$ac_dir" && ac_dir=.
60024 for ac_exec_ext in '' $ac_executable_extensions; do
60025 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
60026 echo "$as_me: trying $ac_dir/$ac_word..." >&5
60027 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
60028 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
60035 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
60039 MSGMERGE="$ac_cv_path_MSGMERGE"
60040 if test "$MSGMERGE" != ":"; then
60041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
60042 printf "%s\n" "$MSGMERGE" >&6; }
60044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
60045 printf "%s\n" "no" >&6; }
60049 test -n "$localedir" || localedir='${datadir}/locale'
60052 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
60055 ac_config_commands="$ac_config_commands po-directories"
60082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
60083 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
60084 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
60086 printf %s "(cached) " >&6
60088 gt_save_LIBS="$LIBS"
60089 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
60090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60091 /* end confdefs.h. */
60092 #include <CoreFoundation/CFPreferences.h>
60096 CFPreferencesCopyAppValue(NULL, NULL)
60101 if ac_fn_c_try_link "$LINENO"
60103 gt_cv_func_CFPreferencesCopyAppValue=yes
60105 gt_cv_func_CFPreferencesCopyAppValue=no
60107 rm -f core conftest.err conftest.$ac_objext conftest.beam \
60108 conftest$ac_exeext conftest.$ac_ext
60109 LIBS="$gt_save_LIBS"
60111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
60112 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
60113 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
60115 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
60118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
60119 printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
60120 if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y}
60122 printf %s "(cached) " >&6
60124 gt_save_LIBS="$LIBS"
60125 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
60126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60127 /* end confdefs.h. */
60128 #include <CoreFoundation/CFLocale.h>
60132 CFLocaleCopyPreferredLanguages();
60137 if ac_fn_c_try_link "$LINENO"
60139 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
60141 gt_cv_func_CFLocaleCopyPreferredLanguages=no
60143 rm -f core conftest.err conftest.$ac_objext conftest.beam \
60144 conftest$ac_exeext conftest.$ac_ext
60145 LIBS="$gt_save_LIBS"
60147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
60148 printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
60149 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
60151 printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
60155 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
60156 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
60157 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
60169 case " $gt_needs " in
60170 *" need-formatstring-macros "*) gt_api_version=3 ;;
60171 *" need-ngettext "*) gt_api_version=2 ;;
60172 *) gt_api_version=1 ;;
60174 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
60175 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
60177 if test "$USE_NLS" = "yes"; then
60178 gt_use_preinstalled_gnugettext=no
60181 if test $gt_api_version -ge 3; then
60182 gt_revision_test_code='
60183 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
60184 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
60186 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
60189 gt_revision_test_code=
60191 if test $gt_api_version -ge 2; then
60192 gt_expression_test_code=' + * ngettext ("", "", 0)'
60194 gt_expression_test_code=
60197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
60198 printf %s "checking for GNU gettext in libc... " >&6; }
60199 if eval test \${$gt_func_gnugettext_libc+y}
60201 printf %s "(cached) " >&6
60203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60204 /* end confdefs.h. */
60206 #include <libintl.h>
60207 $gt_revision_test_code
60208 extern int _nl_msg_cat_cntr;
60209 extern int *_nl_domain_bindings;
60215 bindtextdomain ("", "");
60216 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
60222 if ac_fn_c_try_link "$LINENO"
60224 eval "$gt_func_gnugettext_libc=yes"
60226 eval "$gt_func_gnugettext_libc=no"
60228 rm -f core conftest.err conftest.$ac_objext conftest.beam \
60229 conftest$ac_exeext conftest.$ac_ext
60231 eval ac_res=\$$gt_func_gnugettext_libc
60232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
60233 printf "%s\n" "$ac_res" >&6; }
60235 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
60241 am_save_CPPFLAGS="$CPPFLAGS"
60243 for element in $INCICONV; do
60245 for x in $CPPFLAGS; do
60247 acl_save_prefix="$prefix"
60248 prefix="$acl_final_prefix"
60249 acl_save_exec_prefix="$exec_prefix"
60250 exec_prefix="$acl_final_exec_prefix"
60252 exec_prefix="$acl_save_exec_prefix"
60253 prefix="$acl_save_prefix"
60255 if test "X$x" = "X$element"; then
60260 if test -z "$haveit"; then
60261 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
60266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
60267 printf %s "checking for iconv... " >&6; }
60268 if test ${am_cv_func_iconv+y}
60270 printf %s "(cached) " >&6
60273 am_cv_func_iconv="no, consider installing GNU libiconv"
60275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60276 /* end confdefs.h. */
60278 #include <stdlib.h>
60284 iconv_t cd = iconv_open("","");
60285 iconv(cd,NULL,NULL,NULL,NULL);
60291 if ac_fn_c_try_link "$LINENO"
60293 am_cv_func_iconv=yes
60295 rm -f core conftest.err conftest.$ac_objext conftest.beam \
60296 conftest$ac_exeext conftest.$ac_ext
60297 if test "$am_cv_func_iconv" != yes; then
60298 am_save_LIBS="$LIBS"
60299 LIBS="$LIBS $LIBICONV"
60300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60301 /* end confdefs.h. */
60303 #include <stdlib.h>
60309 iconv_t cd = iconv_open("","");
60310 iconv(cd,NULL,NULL,NULL,NULL);
60316 if ac_fn_c_try_link "$LINENO"
60318 am_cv_lib_iconv=yes
60319 am_cv_func_iconv=yes
60321 rm -f core conftest.err conftest.$ac_objext conftest.beam \
60322 conftest$ac_exeext conftest.$ac_ext
60323 LIBS="$am_save_LIBS"
60327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
60328 printf "%s\n" "$am_cv_func_iconv" >&6; }
60329 if test "$am_cv_func_iconv" = yes; then
60330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
60331 printf %s "checking for working iconv... " >&6; }
60332 if test ${am_cv_func_iconv_works+y}
60334 printf %s "(cached) " >&6
60337 am_save_LIBS="$LIBS"
60338 if test $am_cv_lib_iconv = yes; then
60339 LIBS="$LIBS $LIBICONV"
60341 am_cv_func_iconv_works=no
60342 for ac_iconv_const in '' 'const'; do
60343 if test "$cross_compiling" = yes
60346 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
60347 *) am_cv_func_iconv_works="guessing yes" ;;
60350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60351 /* end confdefs.h. */
60354 #include <string.h>
60356 #ifndef ICONV_CONST
60357 # define ICONV_CONST $ac_iconv_const
60364 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
60365 successful returns. This is even documented in
60366 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
60368 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
60369 if (cd_utf8_to_88591 != (iconv_t)(-1))
60371 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
60373 ICONV_CONST char *inptr = input;
60374 size_t inbytesleft = strlen (input);
60375 char *outptr = buf;
60376 size_t outbytesleft = sizeof (buf);
60377 size_t res = iconv (cd_utf8_to_88591,
60378 &inptr, &inbytesleft,
60379 &outptr, &outbytesleft);
60382 iconv_close (cd_utf8_to_88591);
60385 /* Test against Solaris 10 bug: Failures are not distinguishable from
60386 successful returns. */
60388 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
60389 if (cd_ascii_to_88591 != (iconv_t)(-1))
60391 static ICONV_CONST char input[] = "\263";
60393 ICONV_CONST char *inptr = input;
60394 size_t inbytesleft = strlen (input);
60395 char *outptr = buf;
60396 size_t outbytesleft = sizeof (buf);
60397 size_t res = iconv (cd_ascii_to_88591,
60398 &inptr, &inbytesleft,
60399 &outptr, &outbytesleft);
60402 iconv_close (cd_ascii_to_88591);
60405 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
60407 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
60408 if (cd_88591_to_utf8 != (iconv_t)(-1))
60410 static ICONV_CONST char input[] = "\304";
60411 static char buf[2] = { (char)0xDE, (char)0xAD };
60412 ICONV_CONST char *inptr = input;
60413 size_t inbytesleft = 1;
60414 char *outptr = buf;
60415 size_t outbytesleft = 1;
60416 size_t res = iconv (cd_88591_to_utf8,
60417 &inptr, &inbytesleft,
60418 &outptr, &outbytesleft);
60419 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
60421 iconv_close (cd_88591_to_utf8);
60424 #if 0 /* This bug could be worked around by the caller. */
60425 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
60427 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
60428 if (cd_88591_to_utf8 != (iconv_t)(-1))
60430 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
60432 ICONV_CONST char *inptr = input;
60433 size_t inbytesleft = strlen (input);
60434 char *outptr = buf;
60435 size_t outbytesleft = sizeof (buf);
60436 size_t res = iconv (cd_88591_to_utf8,
60437 &inptr, &inbytesleft,
60438 &outptr, &outbytesleft);
60441 iconv_close (cd_88591_to_utf8);
60445 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
60448 /* Try standardized names. */
60449 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
60450 /* Try IRIX, OSF/1 names. */
60451 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
60452 /* Try AIX names. */
60453 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
60454 /* Try HP-UX names. */
60455 iconv_t cd4 = iconv_open ("utf8", "eucJP");
60456 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
60457 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
60459 if (cd1 != (iconv_t)(-1))
60461 if (cd2 != (iconv_t)(-1))
60463 if (cd3 != (iconv_t)(-1))
60465 if (cd4 != (iconv_t)(-1))
60474 if ac_fn_c_try_run "$LINENO"
60476 am_cv_func_iconv_works=yes
60478 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
60479 conftest.$ac_objext conftest.beam conftest.$ac_ext
60482 test "$am_cv_func_iconv_works" = no || break
60484 LIBS="$am_save_LIBS"
60487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
60488 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
60489 case "$am_cv_func_iconv_works" in
60490 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
60491 *) am_func_iconv=yes ;;
60494 am_func_iconv=no am_cv_lib_iconv=no
60496 if test "$am_func_iconv" = yes; then
60498 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
60501 if test "$am_cv_lib_iconv" = yes; then
60502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
60503 printf %s "checking how to link with libiconv... " >&6; }
60504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
60505 printf "%s\n" "$LIBICONV" >&6; }
60507 CPPFLAGS="$am_save_CPPFLAGS"
60523 acl_save_prefix="$prefix"
60524 prefix="$acl_final_prefix"
60525 acl_save_exec_prefix="$exec_prefix"
60526 exec_prefix="$acl_final_exec_prefix"
60528 eval additional_includedir=\"$includedir\"
60529 eval additional_libdir=\"$libdir\"
60530 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
60531 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
60533 exec_prefix="$acl_save_exec_prefix"
60534 prefix="$acl_save_prefix"
60537 # Check whether --with-libintl-prefix was given.
60538 if test ${with_libintl_prefix+y}
60540 withval=$with_libintl_prefix;
60541 if test "X$withval" = "Xno"; then
60544 if test "X$withval" = "X"; then
60546 acl_save_prefix="$prefix"
60547 prefix="$acl_final_prefix"
60548 acl_save_exec_prefix="$exec_prefix"
60549 exec_prefix="$acl_final_exec_prefix"
60551 eval additional_includedir=\"$includedir\"
60552 eval additional_libdir=\"$libdir\"
60553 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
60554 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
60556 exec_prefix="$acl_save_exec_prefix"
60557 prefix="$acl_save_prefix"
60560 additional_includedir="$withval/include"
60561 additional_libdir="$withval/$acl_libdirstem"
60562 additional_libdir2="$withval/$acl_libdirstem2"
60563 additional_libdir3="$withval/$acl_libdirstem3"
60569 if test "X$additional_libdir2" = "X$additional_libdir"; then
60570 additional_libdir2=
60572 if test "X$additional_libdir3" = "X$additional_libdir"; then
60573 additional_libdir3=
60582 names_already_handled=
60583 names_next_round='intl '
60584 while test -n "$names_next_round"; do
60585 names_this_round="$names_next_round"
60587 for name in $names_this_round; do
60589 for n in $names_already_handled; do
60590 if test "$n" = "$name"; then
60591 already_handled=yes
60595 if test -z "$already_handled"; then
60596 names_already_handled="$names_already_handled $name"
60597 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
60598 eval value=\"\$HAVE_LIB$uppername\"
60599 if test -n "$value"; then
60600 if test "$value" = yes; then
60601 eval value=\"\$LIB$uppername\"
60602 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
60603 eval value=\"\$LTLIB$uppername\"
60604 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
60613 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
60614 if test -n "$acl_shlibext"; then
60615 shrext=".$acl_shlibext" # typically: shrext=.so
60619 if test $use_additional = yes; then
60620 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
60621 if test "X$found_dir" = "X"; then
60622 eval dir=\$$additional_libdir_variable
60623 if test -n "$dir"; then
60624 if test -n "$acl_shlibext"; then
60625 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
60627 found_so="$dir/$libname$shrext"
60629 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
60630 ver=`(cd "$dir" && \
60631 for f in "$libname$shrext".*; do echo "$f"; done \
60632 | sed -e "s,^$libname$shrext\\\\.,," \
60633 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
60634 | sed 1q ) 2>/dev/null`
60635 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
60637 found_so="$dir/$libname$shrext.$ver"
60640 eval library_names=\"$acl_library_names_spec\"
60641 for f in $library_names; do
60642 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
60651 if test "X$found_dir" = "X"; then
60652 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
60654 found_a="$dir/$libname.$acl_libext"
60657 if test "X$found_dir" != "X"; then
60658 if test -f "$dir/$libname.la"; then
60659 found_la="$dir/$libname.la"
60666 if test "X$found_dir" = "X"; then
60667 for x in $LDFLAGS $LTLIBINTL; do
60669 acl_save_prefix="$prefix"
60670 prefix="$acl_final_prefix"
60671 acl_save_exec_prefix="$exec_prefix"
60672 exec_prefix="$acl_final_exec_prefix"
60674 exec_prefix="$acl_save_exec_prefix"
60675 prefix="$acl_save_prefix"
60679 dir=`echo "X$x" | sed -e 's/^X-L//'`
60680 if test -n "$acl_shlibext"; then
60681 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
60683 found_so="$dir/$libname$shrext"
60685 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
60686 ver=`(cd "$dir" && \
60687 for f in "$libname$shrext".*; do echo "$f"; done \
60688 | sed -e "s,^$libname$shrext\\\\.,," \
60689 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
60690 | sed 1q ) 2>/dev/null`
60691 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
60693 found_so="$dir/$libname$shrext.$ver"
60696 eval library_names=\"$acl_library_names_spec\"
60697 for f in $library_names; do
60698 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
60707 if test "X$found_dir" = "X"; then
60708 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
60710 found_a="$dir/$libname.$acl_libext"
60713 if test "X$found_dir" != "X"; then
60714 if test -f "$dir/$libname.la"; then
60715 found_la="$dir/$libname.la"
60720 if test "X$found_dir" != "X"; then
60725 if test "X$found_dir" != "X"; then
60726 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
60727 if test "X$found_so" != "X"; then
60728 if test "$enable_rpath" = no \
60729 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
60730 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
60731 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
60732 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
60735 for x in $ltrpathdirs; do
60736 if test "X$x" = "X$found_dir"; then
60741 if test -z "$haveit"; then
60742 ltrpathdirs="$ltrpathdirs $found_dir"
60744 if test "$acl_hardcode_direct" = yes; then
60745 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
60747 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
60748 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
60750 for x in $rpathdirs; do
60751 if test "X$x" = "X$found_dir"; then
60756 if test -z "$haveit"; then
60757 rpathdirs="$rpathdirs $found_dir"
60761 for x in $LDFLAGS $LIBINTL; do
60763 acl_save_prefix="$prefix"
60764 prefix="$acl_final_prefix"
60765 acl_save_exec_prefix="$exec_prefix"
60766 exec_prefix="$acl_final_exec_prefix"
60768 exec_prefix="$acl_save_exec_prefix"
60769 prefix="$acl_save_prefix"
60771 if test "X$x" = "X-L$found_dir"; then
60776 if test -z "$haveit"; then
60777 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
60779 if test "$acl_hardcode_minus_L" != no; then
60780 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
60782 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
60788 if test "X$found_a" != "X"; then
60789 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
60791 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
60794 additional_includedir=
60795 case "$found_dir" in
60796 */$acl_libdirstem | */$acl_libdirstem/)
60797 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
60798 if test "$name" = 'intl'; then
60799 LIBINTL_PREFIX="$basedir"
60801 additional_includedir="$basedir/include"
60803 */$acl_libdirstem2 | */$acl_libdirstem2/)
60804 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
60805 if test "$name" = 'intl'; then
60806 LIBINTL_PREFIX="$basedir"
60808 additional_includedir="$basedir/include"
60810 */$acl_libdirstem3 | */$acl_libdirstem3/)
60811 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
60812 if test "$name" = 'intl'; then
60813 LIBINTL_PREFIX="$basedir"
60815 additional_includedir="$basedir/include"
60818 if test "X$additional_includedir" != "X"; then
60819 if test "X$additional_includedir" != "X/usr/include"; then
60821 if test "X$additional_includedir" = "X/usr/local/include"; then
60822 if test -n "$GCC"; then
60824 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
60828 if test -z "$haveit"; then
60829 for x in $CPPFLAGS $INCINTL; do
60831 acl_save_prefix="$prefix"
60832 prefix="$acl_final_prefix"
60833 acl_save_exec_prefix="$exec_prefix"
60834 exec_prefix="$acl_final_exec_prefix"
60836 exec_prefix="$acl_save_exec_prefix"
60837 prefix="$acl_save_prefix"
60839 if test "X$x" = "X-I$additional_includedir"; then
60844 if test -z "$haveit"; then
60845 if test -d "$additional_includedir"; then
60846 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
60852 if test -n "$found_la"; then
60853 save_libdir="$libdir"
60854 case "$found_la" in
60855 */* | *\\*) . "$found_la" ;;
60856 *) . "./$found_la" ;;
60858 libdir="$save_libdir"
60859 for dep in $dependency_libs; do
60862 dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
60863 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
60864 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
60865 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
60867 if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
60868 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
60869 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
60870 if test -n "$GCC"; then
60872 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
60876 if test -z "$haveit"; then
60878 for x in $LDFLAGS $LIBINTL; do
60880 acl_save_prefix="$prefix"
60881 prefix="$acl_final_prefix"
60882 acl_save_exec_prefix="$exec_prefix"
60883 exec_prefix="$acl_final_exec_prefix"
60885 exec_prefix="$acl_save_exec_prefix"
60886 prefix="$acl_save_prefix"
60888 if test "X$x" = "X-L$dependency_libdir"; then
60893 if test -z "$haveit"; then
60894 if test -d "$dependency_libdir"; then
60895 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
60899 for x in $LDFLAGS $LTLIBINTL; do
60901 acl_save_prefix="$prefix"
60902 prefix="$acl_final_prefix"
60903 acl_save_exec_prefix="$exec_prefix"
60904 exec_prefix="$acl_final_exec_prefix"
60906 exec_prefix="$acl_save_exec_prefix"
60907 prefix="$acl_save_prefix"
60909 if test "X$x" = "X-L$dependency_libdir"; then
60914 if test -z "$haveit"; then
60915 if test -d "$dependency_libdir"; then
60916 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
60923 dir=`echo "X$dep" | sed -e 's/^X-R//'`
60924 if test "$enable_rpath" != no; then
60926 for x in $rpathdirs; do
60927 if test "X$x" = "X$dir"; then
60932 if test -z "$haveit"; then
60933 rpathdirs="$rpathdirs $dir"
60936 for x in $ltrpathdirs; do
60937 if test "X$x" = "X$dir"; then
60942 if test -z "$haveit"; then
60943 ltrpathdirs="$ltrpathdirs $dir"
60948 dep=`echo "X$dep" | sed -e 's/^X-l//'`
60949 if test "X$dep" != Xc \
60950 || case $host_os in
60951 linux* | gnu* | k*bsd*-gnu) false ;;
60954 names_next_round="$names_next_round $dep"
60958 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
60961 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
60962 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
60968 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
60969 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
60975 if test "X$rpathdirs" != "X"; then
60976 if test -n "$acl_hardcode_libdir_separator"; then
60978 for found_dir in $rpathdirs; do
60979 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
60981 acl_save_libdir="$libdir"
60983 eval flag=\"$acl_hardcode_libdir_flag_spec\"
60984 libdir="$acl_save_libdir"
60985 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
60987 for found_dir in $rpathdirs; do
60988 acl_save_libdir="$libdir"
60989 libdir="$found_dir"
60990 eval flag=\"$acl_hardcode_libdir_flag_spec\"
60991 libdir="$acl_save_libdir"
60992 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
60996 if test "X$ltrpathdirs" != "X"; then
60997 for found_dir in $ltrpathdirs; do
60998 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
61006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
61007 printf %s "checking for GNU gettext in libintl... " >&6; }
61008 if eval test \${$gt_func_gnugettext_libintl+y}
61010 printf %s "(cached) " >&6
61012 gt_save_CPPFLAGS="$CPPFLAGS"
61013 CPPFLAGS="$CPPFLAGS $INCINTL"
61014 gt_save_LIBS="$LIBS"
61015 LIBS="$LIBS $LIBINTL"
61016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61017 /* end confdefs.h. */
61019 #include <libintl.h>
61020 $gt_revision_test_code
61021 extern int _nl_msg_cat_cntr;
61026 const char *_nl_expand_alias (const char *);
61032 bindtextdomain ("", "");
61033 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
61039 if ac_fn_c_try_link "$LINENO"
61041 eval "$gt_func_gnugettext_libintl=yes"
61043 eval "$gt_func_gnugettext_libintl=no"
61045 rm -f core conftest.err conftest.$ac_objext conftest.beam \
61046 conftest$ac_exeext conftest.$ac_ext
61047 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
61048 LIBS="$LIBS $LIBICONV"
61049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61050 /* end confdefs.h. */
61052 #include <libintl.h>
61053 $gt_revision_test_code
61054 extern int _nl_msg_cat_cntr;
61059 const char *_nl_expand_alias (const char *);
61065 bindtextdomain ("", "");
61066 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
61072 if ac_fn_c_try_link "$LINENO"
61074 LIBINTL="$LIBINTL $LIBICONV"
61075 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
61076 eval "$gt_func_gnugettext_libintl=yes"
61079 rm -f core conftest.err conftest.$ac_objext conftest.beam \
61080 conftest$ac_exeext conftest.$ac_ext
61082 CPPFLAGS="$gt_save_CPPFLAGS"
61083 LIBS="$gt_save_LIBS"
61085 eval ac_res=\$$gt_func_gnugettext_libintl
61086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
61087 printf "%s\n" "$ac_res" >&6; }
61090 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
61091 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
61092 && test "$PACKAGE" != gettext-runtime \
61093 && test "$PACKAGE" != gettext-tools; }; then
61094 gt_use_preinstalled_gnugettext=yes
61103 if test -n "$INTL_MACOSX_LIBS"; then
61104 if test "$gt_use_preinstalled_gnugettext" = "yes" \
61105 || test "$nls_cv_use_gnu_gettext" = "yes"; then
61106 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
61107 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
61111 if test "$gt_use_preinstalled_gnugettext" = "yes" \
61112 || test "$nls_cv_use_gnu_gettext" = "yes"; then
61114 printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
61121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
61122 printf %s "checking whether to use NLS... " >&6; }
61123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
61124 printf "%s\n" "$USE_NLS" >&6; }
61125 if test "$USE_NLS" = "yes"; then
61126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
61127 printf %s "checking where the gettext function comes from... " >&6; }
61128 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
61129 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
61130 gt_source="external libintl"
61135 gt_source="included intl directory"
61137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
61138 printf "%s\n" "$gt_source" >&6; }
61141 if test "$USE_NLS" = "yes"; then
61143 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
61144 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
61145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
61146 printf %s "checking how to link with libintl... " >&6; }
61147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
61148 printf "%s\n" "$LIBINTL" >&6; }
61150 for element in $INCINTL; do
61152 for x in $CPPFLAGS; do
61154 acl_save_prefix="$prefix"
61155 prefix="$acl_final_prefix"
61156 acl_save_exec_prefix="$exec_prefix"
61157 exec_prefix="$acl_final_exec_prefix"
61159 exec_prefix="$acl_save_exec_prefix"
61160 prefix="$acl_save_prefix"
61162 if test "X$x" = "X$element"; then
61167 if test -z "$haveit"; then
61168 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
61175 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
61178 printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
61187 INTLLIBS="$LIBINTL"
61196 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile po/Makefile.in src/Makefile tests/Makefile checks/Makefile examples/Makefile"
61199 cat >confcache <<\_ACEOF
61200 # This file is a shell script that caches the results of configure
61201 # tests run on this system so they can be shared between configure
61202 # scripts and configure runs, see configure's option --config-cache.
61203 # It is not useful on other systems. If it contains results you don't
61204 # want to keep, you may remove or edit it.
61206 # config.status only pays attention to the cache file if you give it
61207 # the --recheck option to rerun configure.
61209 # `ac_cv_env_foo' variables (set or unset) will be overridden when
61210 # loading this file, other *unset* `ac_cv_foo' will be assigned the
61211 # following values.
61215 # The following way of writing the cache mishandles newlines in values,
61216 # but we know of no workaround that is simple, portable, and efficient.
61217 # So, we kill variables containing newlines.
61218 # Ultrix sh set writes to stderr and can't be redirected directly,
61219 # and sets the high bit in the cache file unless we assign to the vars.
61221 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
61222 eval ac_val=\$$ac_var
61226 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
61227 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
61230 _ | IFS | as_nl) ;; #(
61231 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
61232 *) { eval $ac_var=; unset $ac_var;} ;;
61238 case $as_nl`(ac_space=' '; set) 2>&1` in #(
61239 *${as_nl}ac_space=\ *)
61240 # `set' does not quote correctly, so add quotes: double-quote
61241 # substitution turns \\\\ into \\, and sed turns \\ into \.
61244 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
61247 # `set' quotes correctly as required by POSIX, so do not add quotes.
61248 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
61257 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
61259 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
61261 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
61262 if test -w "$cache_file"; then
61263 if test "x$cache_file" != "x/dev/null"; then
61264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
61265 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
61266 if test ! -f "$cache_file" || test -h "$cache_file"; then
61267 cat confcache >"$cache_file"
61269 case $cache_file in #(
61271 mv -f confcache "$cache_file"$$ &&
61272 mv -f "$cache_file"$$ "$cache_file" ;; #(
61274 mv -f confcache "$cache_file" ;;
61279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
61280 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
61285 test "x$prefix" = xNONE && prefix=$ac_default_prefix
61286 # Let make expand exec_prefix.
61287 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
61289 DEFS=-DHAVE_CONFIG_H
61294 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
61295 # 1. Remove the extension, and $U if already installed.
61296 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
61297 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
61298 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
61299 # will be set to the directory where LIBOBJS objects are built.
61300 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
61301 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
61303 LIBOBJS=$ac_libobjs
61305 LTLIBOBJS=$ac_ltlibobjs
61308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
61309 printf %s "checking that generated files are newer than configure... " >&6; }
61310 if test -n "$am_sleep_pid"; then
61311 # Hide warnings about reused PIDs.
61312 wait $am_sleep_pid 2>/dev/null
61314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
61315 printf "%s\n" "done" >&6; }
61316 if test -n "$EXEEXT"; then
61318 am__EXEEXT_FALSE='#'
61320 am__EXEEXT_TRUE='#'
61324 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
61325 as_fn_error $? "conditional \"AMDEP\" was never defined.
61326 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61328 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
61329 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
61330 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61332 if test -z "${ANSICXX_TRUE}" && test -z "${ANSICXX_FALSE}"; then
61333 as_fn_error $? "conditional \"ANSICXX\" was never defined.
61334 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61336 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
61337 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
61338 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61340 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
61341 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
61342 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61344 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
61345 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
61346 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61348 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
61349 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
61350 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61352 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
61353 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
61354 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
61355 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61357 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
61358 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
61359 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61361 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
61362 as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
61363 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61365 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
61366 as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
61367 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61369 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
61370 as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
61371 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61373 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
61374 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
61375 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61377 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
61378 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
61379 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61381 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
61382 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
61383 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61387 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
61388 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
61389 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61391 CONFIG_INCLUDE=lib/config.h
61393 if test -z "${GL_GENERATE_SIGSEGV_H_TRUE}" && test -z "${GL_GENERATE_SIGSEGV_H_FALSE}"; then
61394 as_fn_error $? "conditional \"GL_GENERATE_SIGSEGV_H\" was never defined.
61395 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61397 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
61398 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
61399 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61401 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
61402 as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
61403 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61405 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
61406 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
61407 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61409 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then
61410 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR\" was never defined.
61411 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61413 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE}"; then
61414 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB\" was never defined.
61415 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61417 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
61418 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
61419 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61424 if test -n "$M4_LIBOBJS"; then
61425 # Remove the extension.
61426 sed_drop_objext='s/\.o$//;s/\.obj$//'
61427 for i in `for i in $M4_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
61428 M4_libobjs="$M4_libobjs $i.$ac_objext"
61429 M4_ltlibobjs="$M4_ltlibobjs $i.lo"
61432 M4_LIBOBJS=$M4_libobjs
61434 M4_LTLIBOBJS=$M4_ltlibobjs
61439 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
61440 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
61441 Usually this means the macro was only invoked conditionally." "$LINENO" 5
61446 if test -n "$M4tests_LIBOBJS"; then
61447 # Remove the extension.
61448 sed_drop_objext='s/\.o$//;s/\.obj$//'
61449 for i in `for i in $M4tests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
61450 M4tests_libobjs="$M4tests_libobjs $i.$ac_objext"
61451 M4tests_ltlibobjs="$M4tests_ltlibobjs $i.lo"
61454 M4tests_LIBOBJS=$M4tests_libobjs
61456 M4tests_LTLIBOBJS=$M4tests_ltlibobjs
61460 : "${CONFIG_STATUS=./config.status}"
61462 ac_clean_files_save=$ac_clean_files
61463 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
61464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
61465 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
61467 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
61469 # Generated by $as_me.
61470 # Run this file to recreate the current configuration.
61471 # Compiler output produced by configure, useful for debugging
61472 # configure, is in config.log if it exists.
61475 ac_cs_recheck=false
61478 SHELL=\${CONFIG_SHELL-$SHELL}
61481 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
61482 ## -------------------- ##
61483 ## M4sh Initialization. ##
61484 ## -------------------- ##
61486 # Be more Bourne compatible
61487 DUALCASE=1; export DUALCASE # for MKS sh
61489 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
61493 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
61494 # is contrary to our usage. Disable this feature.
61495 alias -g '${1+"$@"}'='"$@"'
61496 setopt NO_GLOB_SUBST
61498 case `(set -o) 2>/dev/null` in #(
61508 # Reset variables that may have inherited troublesome values from
61511 # IFS needs to be set, to space, tab, and newline, in precisely that order.
61512 # (If _AS_PATH_WALK were called with IFS unset, it would have the
61513 # side effect of setting IFS to empty, thus disabling word splitting.)
61514 # Quoting is to prevent editors from complaining about space-tab.
61524 # Ensure predictable behavior from utilities with locale-dependent output.
61530 # We cannot yet rely on "unset" to work, but we need these variables
61531 # to be unset--not just set to an empty or harmless value--now, to
61532 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
61533 # also avoids known problems related to "unset" and subshell syntax
61534 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
61535 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
61536 do eval test \${$as_var+y} \
61537 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
61540 # Ensure that fds 0, 1, and 2 are open.
61541 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
61542 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
61543 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
61545 # The user is always right.
61546 if ${PATH_SEPARATOR+false} :; then
61548 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
61549 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
61555 # Find who we are. Look in the path if we contain no directory separator.
61558 *[\\/]* ) as_myself=$0 ;;
61559 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61560 for as_dir in $PATH
61563 case $as_dir in #(((
61566 *) as_dir=$as_dir/ ;;
61568 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
61574 # We did not find ourselves, most probably we were run as `sh COMMAND'
61575 # in which case we are not to be found in the path.
61576 if test "x$as_myself" = x; then
61579 if test ! -f "$as_myself"; then
61580 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
61586 # as_fn_error STATUS ERROR [LINENO LOG_FD]
61587 # ----------------------------------------
61588 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
61589 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
61590 # script with STATUS, using 1 if that was 0.
61593 as_status=$1; test $as_status -eq 0 && as_status=1
61595 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
61596 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
61598 printf "%s\n" "$as_me: error: $2" >&2
61599 as_fn_exit $as_status
61604 # as_fn_set_status STATUS
61605 # -----------------------
61606 # Set $? to STATUS, without forking.
61607 as_fn_set_status ()
61610 } # as_fn_set_status
61612 # as_fn_exit STATUS
61613 # -----------------
61614 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
61618 as_fn_set_status $1
61624 # Portably unset VAR.
61627 { eval $1=; unset $1;}
61629 as_unset=as_fn_unset
61631 # as_fn_append VAR VALUE
61632 # ----------------------
61633 # Append the text in VALUE to the end of the definition contained in VAR. Take
61634 # advantage of any shell optimizations that allow amortized linear growth over
61635 # repeated appends, instead of the typical quadratic growth present in naive
61637 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
61639 eval 'as_fn_append ()
61650 # as_fn_arith ARG...
61651 # ------------------
61652 # Perform arithmetic evaluation on the ARGs, and store the result in the
61653 # global $as_val. Take advantage of shells that can avoid forks. The arguments
61654 # must be portable across $(()) and expr.
61655 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
61657 eval 'as_fn_arith ()
61664 as_val=`expr "$@" || test $? -eq 1`
61669 if expr a : '\(a\)' >/dev/null 2>&1 &&
61670 test "X`expr 00001 : '.*\(...\)'`" = X001; then
61676 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
61677 as_basename=basename
61682 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
61688 as_me=`$as_basename -- "$0" ||
61689 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
61690 X"$0" : 'X\(//\)$' \| \
61691 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
61692 printf "%s\n" X/"$0" |
61693 sed '/^.*\/\([^/][^/]*\)\/*$/{
61707 # Avoid depending upon Character Ranges.
61708 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
61709 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
61710 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
61711 as_cr_digits='0123456789'
61712 as_cr_alnum=$as_cr_Letters$as_cr_digits
61715 # Determine whether it's possible to make 'echo' print without a newline.
61716 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
61717 # for compatibility with existing Makefiles.
61718 ECHO_C= ECHO_N= ECHO_T=
61719 case `echo -n x` in #(((((
61721 case `echo 'xy\c'` in
61722 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
61724 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
61731 # For backward compatibility with old third-party macros, we provide
61732 # the shell variables $as_echo and $as_echo_n. New code should use
61733 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
61734 as_echo='printf %s\n'
61735 as_echo_n='printf %s'
61737 rm -f conf$$ conf$$.exe conf$$.file
61738 if test -d conf$$.dir; then
61739 rm -f conf$$.dir/conf$$.file
61742 mkdir conf$$.dir 2>/dev/null
61744 if (echo >conf$$.file) 2>/dev/null; then
61745 if ln -s conf$$.file conf$$ 2>/dev/null; then
61747 # ... but there are two gotchas:
61748 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
61749 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
61750 # In both cases, we have to default to `cp -pR'.
61751 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
61753 elif ln conf$$.file conf$$ 2>/dev/null; then
61761 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
61762 rmdir conf$$.dir 2>/dev/null
61767 # Create "$as_dir" as a directory, including parents if necessary.
61772 -*) as_dir=./$as_dir;;
61774 test -d "$as_dir" || eval $as_mkdir_p || {
61778 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
61779 *) as_qdir=$as_dir;;
61781 as_dirs="'$as_qdir' $as_dirs"
61782 as_dir=`$as_dirname -- "$as_dir" ||
61783 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61784 X"$as_dir" : 'X\(//\)[^/]' \| \
61785 X"$as_dir" : 'X\(//\)$' \| \
61786 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
61787 printf "%s\n" X"$as_dir" |
61788 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61792 /^X\(\/\/\)[^/].*/{
61805 test -d "$as_dir" && break
61807 test -z "$as_dirs" || eval "mkdir $as_dirs"
61808 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
61812 if mkdir -p . 2>/dev/null; then
61813 as_mkdir_p='mkdir -p "$as_dir"'
61815 test -d ./-p && rmdir ./-p
61820 # as_fn_executable_p FILE
61821 # -----------------------
61822 # Test if FILE is an executable regular file.
61823 as_fn_executable_p ()
61825 test -f "$1" && test -x "$1"
61826 } # as_fn_executable_p
61827 as_test_x='test -x'
61828 as_executable_p=as_fn_executable_p
61830 # Sed expression to map a string onto a valid CPP name.
61831 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
61833 # Sed expression to map a string onto a valid variable name.
61834 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
61838 ## ----------------------------------- ##
61839 ## Main body of $CONFIG_STATUS script. ##
61840 ## ----------------------------------- ##
61842 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
61844 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61845 # Save the log message, to keep $0 and so on meaningful, and to
61846 # report actual input values of CONFIG_FILES etc. instead of their
61847 # values after options handling.
61849 This file was extended by GNU M4 $as_me 1.4.19, which was
61850 generated by GNU Autoconf 2.71. Invocation command line was
61852 CONFIG_FILES = $CONFIG_FILES
61853 CONFIG_HEADERS = $CONFIG_HEADERS
61854 CONFIG_LINKS = $CONFIG_LINKS
61855 CONFIG_COMMANDS = $CONFIG_COMMANDS
61858 on `(hostname || uname -n) 2>/dev/null | sed 1q`
61863 case $ac_config_files in *"
61864 "*) set x $ac_config_files; shift; ac_config_files=$*;;
61867 case $ac_config_headers in *"
61868 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
61872 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61873 # Files that config.status was made for.
61874 config_files="$ac_config_files"
61875 config_headers="$ac_config_headers"
61876 config_links="$ac_config_links"
61877 config_commands="$ac_config_commands"
61881 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61883 \`$as_me' instantiates files and other configuration actions
61884 from templates according to the current configuration. Unless the files
61885 and actions are specified as TAGs, all are instantiated by default.
61887 Usage: $0 [OPTION]... [TAG]...
61889 -h, --help print this help, then exit
61890 -V, --version print version number and configuration settings, then exit
61891 --config print configuration, then exit
61892 -q, --quiet, --silent
61893 do not print progress messages
61894 -d, --debug don't remove temporary files
61895 --recheck update $as_me by reconfiguring in the same conditions
61896 --file=FILE[:TEMPLATE]
61897 instantiate the configuration file FILE
61898 --header=FILE[:TEMPLATE]
61899 instantiate the configuration header FILE
61901 Configuration files:
61904 Configuration headers:
61907 Configuration links:
61910 Configuration commands:
61913 Report bugs to <bug-m4@gnu.org>.
61914 GNU M4 home page: <https://www.gnu.org/software/m4/>.
61915 General help using GNU software: <https://www.gnu.org/gethelp/>."
61918 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
61919 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
61920 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61921 ac_cs_config='$ac_cs_config_escaped'
61923 GNU M4 config.status 1.4.19
61924 configured by $0, generated by GNU Autoconf 2.71,
61925 with options \\"\$ac_cs_config\\"
61927 Copyright (C) 2021 Free Software Foundation, Inc.
61928 This config.status script is free software; the Free Software Foundation
61929 gives unlimited permission to copy, distribute and modify it."
61936 test -n "\$AWK" || AWK=awk
61939 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61940 # The default lists apply if the user does not specify any file.
61946 ac_option=`expr "X$1" : 'X\([^=]*\)='`
61947 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
61951 ac_option=`expr "X$1" : 'X\([^=]*\)='`
61963 # Handling of the options.
61964 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
61966 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
61967 printf "%s\n" "$ac_cs_version"; exit ;;
61968 --config | --confi | --conf | --con | --co | --c )
61969 printf "%s\n" "$ac_cs_config"; exit ;;
61970 --debug | --debu | --deb | --de | --d | -d )
61972 --file | --fil | --fi | --f )
61975 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
61976 '') as_fn_error $? "missing file argument" ;;
61978 as_fn_append CONFIG_FILES " '$ac_optarg'"
61979 ac_need_defaults=false;;
61980 --header | --heade | --head | --hea )
61983 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
61985 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
61986 ac_need_defaults=false;;
61988 # Conflict between --help and --header
61989 as_fn_error $? "ambiguous option: \`$1'
61990 Try \`$0 --help' for more information.";;
61991 --help | --hel | -h )
61992 printf "%s\n" "$ac_cs_usage"; exit ;;
61993 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
61994 | -silent | --silent | --silen | --sile | --sil | --si | --s)
61997 # This is an error.
61998 -*) as_fn_error $? "unrecognized option: \`$1'
61999 Try \`$0 --help' for more information." ;;
62001 *) as_fn_append ac_config_targets " $1"
62002 ac_need_defaults=false ;;
62008 ac_configure_extra_args=
62010 if $ac_cs_silent; then
62012 ac_configure_extra_args="$ac_configure_extra_args --silent"
62016 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62017 if \$ac_cs_recheck; then
62018 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
62020 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
62021 CONFIG_SHELL='$SHELL'
62022 export CONFIG_SHELL
62027 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62031 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
62032 ## Running $as_me. ##
62034 printf "%s\n" "$ac_log"
62038 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62042 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
62043 GNUmakefile=$GNUmakefile
62044 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
62045 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
62046 # from automake < 1.5.
62047 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
62048 # Capture the value of LINGUAS because we need it to compute CATALOGS.
62049 LINGUAS="${LINGUAS-%UNSET%}"
62054 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62056 # Handling of arguments.
62057 for ac_config_target in $ac_config_targets
62059 case $ac_config_target in
62060 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
62061 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
62062 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
62063 "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
62064 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
62065 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
62066 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
62067 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
62068 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
62069 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
62070 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
62071 "checks/Makefile") CONFIG_FILES="$CONFIG_FILES checks/Makefile" ;;
62072 "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
62074 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
62079 # If the user did not use the arguments to specify the items to instantiate,
62080 # then the envvar interface is used. Set only those that are not.
62081 # We use the long form for the default assignment because of an extremely
62082 # bizarre bug on SunOS 4.1.3.
62083 if $ac_need_defaults; then
62084 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
62085 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
62086 test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
62087 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
62090 # Have a temporary directory for convenience. Make it in the build tree
62091 # simply because there is no reason against having it here, and in addition,
62092 # creating and moving files from /tmp can sometimes cause problems.
62093 # Hook for its removal unless debugging.
62094 # Note that there is a small window in which the directory will not be cleaned:
62095 # after its creation but before its name has been assigned to `$tmp'.
62099 trap 'exit_status=$?
62100 : "${ac_tmp:=$tmp}"
62101 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
62103 trap 'as_fn_exit 1' 1 2 13 15
62105 # Create a (secure) tmp directory for tmp files.
62108 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
62112 tmp=./conf$$-$RANDOM
62113 (umask 077 && mkdir "$tmp")
62114 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
62117 # Set up the scripts for CONFIG_FILES section.
62118 # No need to generate them if there are no CONFIG_FILES.
62119 # This happens for instance with `./config.status config.h'.
62120 if test -n "$CONFIG_FILES"; then
62123 ac_cr=`echo X | tr X '\015'`
62124 # On cygwin, bash can eat \r inside `` if the user requested igncr.
62125 # But we know of no other shell where ac_cr would be empty at this
62126 # point, so we can use a bashism as a fallback.
62127 if test "x$ac_cr" = x; then
62128 eval ac_cr=\$\'\\r\'
62130 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
62131 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
62134 ac_cs_awk_cr=$ac_cr
62137 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
62142 echo "cat >conf$$subs.awk <<_ACEOF" &&
62143 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
62145 } >conf$$subs.sh ||
62146 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
62147 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
62149 for ac_last_try in false false false false false :; do
62150 . ./conf$$subs.sh ||
62151 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
62153 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
62154 if test $ac_delim_n = $ac_delim_num; then
62156 elif $ac_last_try; then
62157 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
62159 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
62162 rm -f conf$$subs.sh
62164 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62165 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
62169 s/^/S["/; s/!.*/"]=/
62179 s/\(.\{148\}\)..*/\1/
62181 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
62186 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
62193 s/\(.\{148\}\)..*/\1/
62195 s/["\\]/\\&/g; s/^/"/; s/$/"/
62199 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
62204 ' <conf$$subs.awk | sed '
62209 ' >>$CONFIG_STATUS || ac_write_fail=1
62210 rm -f conf$$subs.awk
62211 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62213 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
62214 for (key in S) S_is_set[key] = 1
62220 nfields = split(line, field, "@")
62222 len = length(field[1])
62223 for (i = 2; i < nfields; i++) {
62225 keylen = length(key)
62226 if (S_is_set[key]) {
62228 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
62229 len += length(value) + length(field[++i])
62240 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62241 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
62242 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
62245 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
62246 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
62249 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
62250 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
62251 # trailing colons and then remove the whole line if VPATH becomes empty
62252 # (actually we leave an empty line to preserve line numbers).
62253 if test "x$srcdir" = x.; then
62254 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
62272 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62273 fi # test -n "$CONFIG_FILES"
62275 # Set up the scripts for CONFIG_HEADERS section.
62276 # No need to generate them if there are no CONFIG_HEADERS.
62277 # This happens for instance with `./config.status Makefile'.
62278 if test -n "$CONFIG_HEADERS"; then
62279 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
62283 # Transform confdefs.h into an awk script `defines.awk', embedded as
62284 # here-document in config.status, that substitutes the proper values into
62285 # config.h.in to produce config.h.
62287 # Create a delimiter string that does not exist in confdefs.h, to ease
62288 # handling of long lines.
62290 for ac_last_try in false false :; do
62291 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
62292 if test -z "$ac_tt"; then
62294 elif $ac_last_try; then
62295 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
62297 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
62301 # For the awk script, D is an array of macro values keyed by name,
62302 # likewise P contains macro parameters if any. Preserve backslash
62303 # newline sequences.
62305 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
62307 s/.\{148\}/&'"$ac_delim"'/g
62310 s/^[ ]*#[ ]*define[ ][ ]*/ /
62317 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
62319 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
62323 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
62324 D["\1"]=" \3\\\\\\n"\\/p
62326 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
62331 s/.\{148\}/&'"$ac_delim"'/g
62336 s/["\\]/\\&/g; s/^/"/; s/$/"/p
62339 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
62341 ' <confdefs.h | sed '
62342 s/'"$ac_delim"'/"\\\
62343 "/g' >>$CONFIG_STATUS || ac_write_fail=1
62345 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62346 for (key in D) D_is_set[key] = 1
62349 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
62351 split(line, arg, " ")
62352 if (arg[1] == "#") {
62356 defundef = substr(arg[1], 2)
62359 split(mac1, mac2, "(") #)
62361 prefix = substr(line, 1, index(line, defundef) - 1)
62362 if (D_is_set[macro]) {
62363 # Preserve the white space surrounding the "#".
62364 print prefix "define", macro P[macro] D[macro]
62367 # Replace #undef with comments. This is necessary, for example,
62368 # in the case of _POSIX_SOURCE, which is predefined and required
62369 # on some systems where configure will not decide to define it.
62370 if (defundef == "undef") {
62371 print "/*", prefix defundef, macro, "*/"
62379 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62380 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
62381 fi # test -n "$CONFIG_HEADERS"
62384 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
62389 :[FHLC]) ac_mode=$ac_tag; continue;;
62391 case $ac_mode$ac_tag in
62393 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
62394 :[FH]-) ac_tag=-:-;;
62395 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
62412 -) ac_f="$ac_tmp/stdin";;
62413 *) # Look for the file first in the build tree, then in the source tree
62414 # (if the path is not absolute). The absolute path cannot be DOS-style,
62415 # because $ac_f cannot contain `:'.
62419 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
62421 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
62423 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
62424 as_fn_append ac_file_inputs " '$ac_f'"
62427 # Let's still pretend it is `configure' which instantiates (i.e., don't
62428 # use $as_me), people would be surprised to read:
62429 # /* config.h. Generated by config.status. */
62430 configure_input='Generated from '`
62431 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
62433 if test x"$ac_file" != x-; then
62434 configure_input="$ac_file. $configure_input"
62435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
62436 printf "%s\n" "$as_me: creating $ac_file" >&6;}
62438 # Neutralize special characters interpreted by sed in replacement strings.
62439 case $configure_input in #(
62440 *\&* | *\|* | *\\* )
62441 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
62442 sed 's/[\\\\&|]/\\\\&/g'`;; #(
62443 *) ac_sed_conf_input=$configure_input;;
62447 *:-:* | *:-) cat >"$ac_tmp/stdin" \
62448 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
62453 ac_dir=`$as_dirname -- "$ac_file" ||
62454 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
62455 X"$ac_file" : 'X\(//\)[^/]' \| \
62456 X"$ac_file" : 'X\(//\)$' \| \
62457 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
62458 printf "%s\n" X"$ac_file" |
62459 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
62463 /^X\(\/\/\)[^/].*/{
62476 as_dir="$ac_dir"; as_fn_mkdir_p
62480 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
62482 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
62483 # A ".." for each directory in $ac_dir_suffix.
62484 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
62485 case $ac_top_builddir_sub in
62486 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
62487 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
62490 ac_abs_top_builddir=$ac_pwd
62491 ac_abs_builddir=$ac_pwd$ac_dir_suffix
62492 # for backward compatibility:
62493 ac_top_builddir=$ac_top_build_prefix
62496 .) # We are building in place.
62498 ac_top_srcdir=$ac_top_builddir_sub
62499 ac_abs_top_srcdir=$ac_pwd ;;
62500 [\\/]* | ?:[\\/]* ) # Absolute name.
62501 ac_srcdir=$srcdir$ac_dir_suffix;
62502 ac_top_srcdir=$srcdir
62503 ac_abs_top_srcdir=$srcdir ;;
62504 *) # Relative name.
62505 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
62506 ac_top_srcdir=$ac_top_build_prefix$srcdir
62507 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
62509 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
62519 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
62520 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
62522 ac_MKDIR_P=$MKDIR_P
62524 [\\/$]* | ?:[\\/]* ) ;;
62525 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
62529 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62530 # If the template does not know about datarootdir, expand it.
62531 # FIXME: This hack should be removed a few years after 2.60.
62532 ac_datarootdir_hack=; ac_datarootdir_seen=
62543 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
62544 *datarootdir*) ac_datarootdir_seen=yes;;
62545 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
62546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
62547 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
62549 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62550 ac_datarootdir_hack='
62551 s&@datadir@&$datadir&g
62552 s&@docdir@&$docdir&g
62553 s&@infodir@&$infodir&g
62554 s&@localedir@&$localedir&g
62555 s&@mandir@&$mandir&g
62556 s&\\\${datarootdir}&$datarootdir&g' ;;
62560 # Neutralize VPATH when `$srcdir' = `.'.
62561 # Shell code in configure.ac might set extrasub.
62562 # FIXME: do we really want to maintain this feature?
62563 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62564 ac_sed_extra="$ac_vpsub
62567 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62569 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
62570 s|@configure_input@|$ac_sed_conf_input|;t t
62571 s&@top_builddir@&$ac_top_builddir_sub&;t t
62572 s&@top_build_prefix@&$ac_top_build_prefix&;t t
62573 s&@srcdir@&$ac_srcdir&;t t
62574 s&@abs_srcdir@&$ac_abs_srcdir&;t t
62575 s&@top_srcdir@&$ac_top_srcdir&;t t
62576 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
62577 s&@builddir@&$ac_builddir&;t t
62578 s&@abs_builddir@&$ac_abs_builddir&;t t
62579 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
62580 s&@INSTALL@&$ac_INSTALL&;t t
62581 s&@MKDIR_P@&$ac_MKDIR_P&;t t
62582 $ac_datarootdir_hack
62584 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
62585 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
62587 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
62588 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
62589 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
62590 "$ac_tmp/out"`; test -z "$ac_out"; } &&
62591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
62592 which seems to be undefined. Please make sure it is defined" >&5
62593 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
62594 which seems to be undefined. Please make sure it is defined" >&2;}
62596 rm -f "$ac_tmp/stdin"
62598 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
62599 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
62601 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
62607 if test x"$ac_file" != x-; then
62609 printf "%s\n" "/* $configure_input */" >&1 \
62610 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
62611 } >"$ac_tmp/config.h" \
62612 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
62613 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
62614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
62615 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
62618 mv "$ac_tmp/config.h" "$ac_file" \
62619 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
62622 printf "%s\n" "/* $configure_input */" >&1 \
62623 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
62624 || as_fn_error $? "could not create -" "$LINENO" 5
62626 # Compute "$ac_file"'s index in $config_headers.
62629 for _am_header in $config_headers :; do
62630 case $_am_header in
62631 $_am_arg | $_am_arg:* )
62634 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
62637 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
62638 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
62639 X"$_am_arg" : 'X\(//\)[^/]' \| \
62640 X"$_am_arg" : 'X\(//\)$' \| \
62641 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
62642 printf "%s\n" X"$_am_arg" |
62643 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
62647 /^X\(\/\/\)[^/].*/{
62659 s/.*/./; q'`/stamp-h$_am_stamp_count
62666 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
62669 # Prefer the file from the source tree if names are identical.
62670 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
62671 ac_source=$srcdir/$ac_source
62674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
62675 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
62677 if test ! -r "$ac_source"; then
62678 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
62682 # Try a relative symlink, then a hard link, then a copy.
62684 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
62685 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
62687 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
62688 ln "$ac_source" "$ac_file" 2>/dev/null ||
62689 cp -p "$ac_source" "$ac_file" ||
62690 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
62693 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
62694 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
62699 case $ac_file$ac_mode in
62700 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
62701 # Older Autoconf quotes --file arguments for eval, but not when files
62702 # are listed without --file. Let's play safe and only enable the eval
62703 # if we detect the quoting.
62704 # TODO: see whether this extra hack can be removed once we start
62705 # requiring Autoconf 2.70 or later.
62706 case $CONFIG_FILES in #(
62708 eval set x "$CONFIG_FILES" ;; #(
62710 set x $CONFIG_FILES ;; #(
62715 # Used to flag and report bootstrapping failures.
62719 # Strip MF so we end up with the name of the file.
62720 am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
62721 # Check whether this is an Automake generated Makefile which includes
62722 # dependency-tracking related rules and includes.
62723 # Grep'ing the whole file directly is not great: AIX grep has a line
62724 # limit of 2048, but all sed's we know have understand at least 4000.
62725 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
62727 am_dirpart=`$as_dirname -- "$am_mf" ||
62728 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
62729 X"$am_mf" : 'X\(//\)[^/]' \| \
62730 X"$am_mf" : 'X\(//\)$' \| \
62731 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
62732 printf "%s\n" X"$am_mf" |
62733 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
62737 /^X\(\/\/\)[^/].*/{
62750 am_filepart=`$as_basename -- "$am_mf" ||
62751 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
62752 X"$am_mf" : 'X\(//\)$' \| \
62753 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
62754 printf "%s\n" X/"$am_mf" |
62755 sed '/^.*\/\([^/][^/]*\)\/*$/{
62768 { echo "$as_me:$LINENO: cd "$am_dirpart" \
62769 && sed -e '/# am--include-marker/d' "$am_filepart" \
62770 | $MAKE -f - am--depfiles" >&5
62771 (cd "$am_dirpart" \
62772 && sed -e '/# am--include-marker/d' "$am_filepart" \
62773 | $MAKE -f - am--depfiles) >&5 2>&5
62775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
62776 (exit $ac_status); } || am_rc=$?
62778 if test $am_rc -ne 0; then
62779 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
62780 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
62781 as_fn_error $? "Something went wrong bootstrapping makefile fragments
62782 for automatic dependency tracking. If GNU make was not used, consider
62783 re-running the configure script with MAKE=\"gmake\" (or whatever is
62784 necessary). You can also try re-running configure with the
62785 '--disable-dependency-tracking' option to at least be able to build
62786 the package (albeit without support for automatic dependency tracking).
62787 See \`config.log' for more details" "$LINENO" 5; }
62789 { am_dirpart=; unset am_dirpart;}
62790 { am_filepart=; unset am_filepart;}
62791 { am_mf=; unset am_mf;}
62792 { am_rc=; unset am_rc;}
62793 rm -f conftest-deps.mk
62796 "stamp-h":C) test -z "$CONFIG_HEADERS" || date > stamp-h ;;
62797 "po-directories":C)
62798 for ac_file in $CONFIG_FILES; do
62799 # Support "outfile[:infile[:infile...]]"
62801 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
62803 # PO directories have a Makefile.in generated from Makefile.in.in.
62804 case "$ac_file" in */Makefile.in)
62805 # Adjust a relative srcdir.
62806 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
62807 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
62808 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
62809 # In autoconf-2.13 it is called $ac_given_srcdir.
62810 # In autoconf-2.50 it is called $srcdir.
62811 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
62812 case "$ac_given_srcdir" in
62813 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
62814 /*) top_srcdir="$ac_given_srcdir" ;;
62815 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
62817 # Treat a directory as a PO directory if and only if it has a
62818 # POTFILES.in file. This allows packages to have multiple PO
62819 # directories under different names or in different locations.
62820 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
62821 rm -f "$ac_dir/POTFILES"
62822 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
62823 gt_tab=`printf '\t'`
62824 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
62825 POMAKEFILEDEPS="POTFILES.in"
62826 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
62827 # on $ac_dir but don't depend on user-specified configuration
62829 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
62830 # The LINGUAS file contains the set of available languages.
62831 if test -n "$OBSOLETE_ALL_LINGUAS"; then
62832 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
62834 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
62835 # Hide the ALL_LINGUAS assignment from automake < 1.5.
62836 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
62837 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
62839 # The set of available languages was given in configure.in.
62840 # Hide the ALL_LINGUAS assignment from automake < 1.5.
62841 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
62844 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
62845 # Compute UPDATEPOFILES
62846 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
62847 # Compute DUMMYPOFILES
62848 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
62850 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
62851 case "$ac_given_srcdir" in
62853 *) srcdirpre='$(srcdir)/' ;;
62859 for lang in $ALL_LINGUAS; do
62860 POFILES="$POFILES $srcdirpre$lang.po"
62861 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
62862 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
62863 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
62865 # CATALOGS depends on both $ac_dir and the user's LINGUAS
62866 # environment variable.
62868 if test -n "$ALL_LINGUAS"; then
62869 for presentlang in $ALL_LINGUAS; do
62871 if test "%UNSET%" != "$LINGUAS"; then
62872 desiredlanguages="$LINGUAS"
62874 desiredlanguages="$ALL_LINGUAS"
62876 for desiredlang in $desiredlanguages; do
62877 # Use the presentlang catalog if desiredlang is
62878 # a. equal to presentlang, or
62879 # b. a variant of presentlang (because in this case,
62880 # presentlang can be used as a fallback for messages
62881 # which are not translated in the desiredlang catalog).
62882 case "$desiredlang" in
62883 "$presentlang"*) useit=yes;;
62886 if test $useit = yes; then
62887 INST_LINGUAS="$INST_LINGUAS $presentlang"
62892 if test -n "$INST_LINGUAS"; then
62893 for lang in $INST_LINGUAS; do
62894 CATALOGS="$CATALOGS $lang.gmo"
62897 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
62898 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
62899 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
62900 if test -f "$f"; then
62902 *.orig | *.bak | *~) ;;
62903 *) cat "$f" >> "$ac_dir/Makefile" ;;
62918 ac_clean_files=$ac_clean_files_save
62920 test $ac_write_fail = 0 ||
62921 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
62924 # configure is writing to config.log, and then calls config.status.
62925 # config.status does its own redirection, appending to config.log.
62926 # Unfortunately, on DOS this fails, as config.log is still kept open
62927 # by configure, so config.status won't be able to write to it; its
62928 # output is simply discarded. So we exec the FD to /dev/null,
62929 # effectively closing config.log, so it can be properly (re)opened and
62930 # appended to by config.status. When coming back to configure, we
62931 # need to make the FD available again.
62932 if test "$no_create" != yes; then
62934 ac_config_status_args=
62935 test "$silent" = yes &&
62936 ac_config_status_args="$ac_config_status_args --quiet"
62938 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
62940 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
62941 # would make configure fail if this is the last instruction.
62942 $ac_cs_success || as_fn_exit 1
62944 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
62945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
62946 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}