2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.71 for GNU diffutils 3.8.
5 # Report bugs to <bug-diffutils@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
271 $0: bug-diffutils@gnu.org about your system, including any
272 $0: error possibly output before this message. Then install
273 $0: a modern shell, or manually run the script under such a
274 $0: shell if you do have one."
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 diffutils'
613 PACKAGE_TARNAME='diffutils'
614 PACKAGE_VERSION='3.8'
615 PACKAGE_STRING='GNU diffutils 3.8'
616 PACKAGE_BUGREPORT='bug-diffutils@gnu.org'
617 PACKAGE_URL='https://www.gnu.org/software/diffutils/'
619 ac_unique_file="src/diff.c"
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_fnmatch_required=POSIX
656 gl_getopt_required=POSIX
658 ac_subst_vars='gltests_LTLIBOBJS
670 XGETTEXT_EXTRA_OPTIONS
678 GETTEXT_MACRO_VERSION
686 LIBDIFFUTILS_LTLIBDEPS
690 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
692 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
697 GL_GNULIB_SCHED_YIELD
698 HAVE_STRUCT_SCHED_PARAM
700 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
705 GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK
706 GL_GNULIB_PTHREAD_SPIN
707 GL_GNULIB_PTHREAD_TSS
708 GL_GNULIB_PTHREAD_COND
709 GL_GNULIB_PTHREAD_RWLOCK
710 GL_GNULIB_PTHREAD_MUTEX
711 GL_GNULIB_PTHREAD_ONCE
712 GL_GNULIB_PTHREAD_THREAD
715 NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H
717 REPLACE_PTHREAD_SPIN_DESTROY
718 REPLACE_PTHREAD_SPIN_UNLOCK
719 REPLACE_PTHREAD_SPIN_TRYLOCK
720 REPLACE_PTHREAD_SPIN_LOCK
721 REPLACE_PTHREAD_SPIN_INIT
722 REPLACE_PTHREAD_KEY_DELETE
723 REPLACE_PTHREAD_GETSPECIFIC
724 REPLACE_PTHREAD_SETSPECIFIC
725 REPLACE_PTHREAD_KEY_CREATE
726 REPLACE_PTHREAD_COND_DESTROY
727 REPLACE_PTHREAD_COND_BROADCAST
728 REPLACE_PTHREAD_COND_SIGNAL
729 REPLACE_PTHREAD_COND_TIMEDWAIT
730 REPLACE_PTHREAD_COND_WAIT
731 REPLACE_PTHREAD_CONDATTR_DESTROY
732 REPLACE_PTHREAD_CONDATTR_INIT
733 REPLACE_PTHREAD_COND_INIT
734 REPLACE_PTHREAD_RWLOCK_DESTROY
735 REPLACE_PTHREAD_RWLOCK_UNLOCK
736 REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK
737 REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK
738 REPLACE_PTHREAD_RWLOCK_TRYWRLOCK
739 REPLACE_PTHREAD_RWLOCK_TRYRDLOCK
740 REPLACE_PTHREAD_RWLOCK_WRLOCK
741 REPLACE_PTHREAD_RWLOCK_RDLOCK
742 REPLACE_PTHREAD_RWLOCKATTR_DESTROY
743 REPLACE_PTHREAD_RWLOCKATTR_INIT
744 REPLACE_PTHREAD_RWLOCK_INIT
745 REPLACE_PTHREAD_MUTEX_DESTROY
746 REPLACE_PTHREAD_MUTEX_UNLOCK
747 REPLACE_PTHREAD_MUTEX_TIMEDLOCK
748 REPLACE_PTHREAD_MUTEX_TRYLOCK
749 REPLACE_PTHREAD_MUTEX_LOCK
750 REPLACE_PTHREAD_MUTEXATTR_DESTROY
751 REPLACE_PTHREAD_MUTEXATTR_SETROBUST
752 REPLACE_PTHREAD_MUTEXATTR_GETROBUST
753 REPLACE_PTHREAD_MUTEXATTR_SETTYPE
754 REPLACE_PTHREAD_MUTEXATTR_GETTYPE
755 REPLACE_PTHREAD_MUTEXATTR_INIT
756 REPLACE_PTHREAD_MUTEX_INIT
760 REPLACE_PTHREAD_DETACH
761 REPLACE_PTHREAD_EQUAL
763 REPLACE_PTHREAD_ATTR_DESTROY
764 REPLACE_PTHREAD_ATTR_SETDETACHSTATE
765 REPLACE_PTHREAD_ATTR_GETDETACHSTATE
766 REPLACE_PTHREAD_ATTR_INIT
767 REPLACE_PTHREAD_CREATE
768 HAVE_PTHREAD_SPIN_DESTROY
769 HAVE_PTHREAD_SPIN_UNLOCK
770 HAVE_PTHREAD_SPIN_TRYLOCK
771 HAVE_PTHREAD_SPIN_LOCK
772 HAVE_PTHREAD_SPIN_INIT
773 HAVE_PTHREAD_KEY_DELETE
774 HAVE_PTHREAD_GETSPECIFIC
775 HAVE_PTHREAD_SETSPECIFIC
776 HAVE_PTHREAD_KEY_CREATE
777 HAVE_PTHREAD_COND_DESTROY
778 HAVE_PTHREAD_COND_BROADCAST
779 HAVE_PTHREAD_COND_SIGNAL
780 HAVE_PTHREAD_COND_TIMEDWAIT
781 HAVE_PTHREAD_COND_WAIT
782 HAVE_PTHREAD_CONDATTR_DESTROY
783 HAVE_PTHREAD_CONDATTR_INIT
784 HAVE_PTHREAD_COND_INIT
785 HAVE_PTHREAD_RWLOCK_DESTROY
786 HAVE_PTHREAD_RWLOCK_UNLOCK
787 HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
788 HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK
789 HAVE_PTHREAD_RWLOCK_TRYWRLOCK
790 HAVE_PTHREAD_RWLOCK_TRYRDLOCK
791 HAVE_PTHREAD_RWLOCK_WRLOCK
792 HAVE_PTHREAD_RWLOCK_RDLOCK
793 HAVE_PTHREAD_RWLOCKATTR_DESTROY
794 HAVE_PTHREAD_RWLOCKATTR_INIT
795 HAVE_PTHREAD_RWLOCK_INIT
796 HAVE_PTHREAD_MUTEX_DESTROY
797 HAVE_PTHREAD_MUTEX_UNLOCK
798 HAVE_PTHREAD_MUTEX_TIMEDLOCK
799 HAVE_PTHREAD_MUTEX_TRYLOCK
800 HAVE_PTHREAD_MUTEX_LOCK
801 HAVE_PTHREAD_MUTEXATTR_DESTROY
802 HAVE_PTHREAD_MUTEXATTR_SETROBUST
803 HAVE_PTHREAD_MUTEXATTR_GETROBUST
804 HAVE_PTHREAD_MUTEXATTR_SETTYPE
805 HAVE_PTHREAD_MUTEXATTR_GETTYPE
806 HAVE_PTHREAD_MUTEXATTR_INIT
807 HAVE_PTHREAD_MUTEX_INIT
814 HAVE_PTHREAD_ATTR_DESTROY
815 HAVE_PTHREAD_ATTR_SETDETACHSTATE
816 HAVE_PTHREAD_ATTR_GETDETACHSTATE
817 HAVE_PTHREAD_ATTR_INIT
819 HAVE_PTHREAD_PROCESS_SHARED
820 HAVE_PTHREAD_MUTEX_ROBUST
821 HAVE_PTHREAD_MUTEX_RECURSIVE
822 HAVE_PTHREAD_CREATE_DETACHED
823 HAVE_PTHREAD_SPINLOCK_T
825 GL_GENERATE_NETINET_IN_H_FALSE
826 GL_GENERATE_NETINET_IN_H_TRUE
829 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
835 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
845 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
861 GL_GNULIB_GETSOCKNAME
862 GL_GNULIB_GETPEERNAME
869 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
873 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
874 HAVE_STRUCT_SOCKADDR_STORAGE
876 GL_CXXFLAG_ALLOW_WARNINGS
877 GL_CFLAG_ALLOW_WARNINGS
878 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
881 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
882 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
883 LIBUNISTRING_UNIWIDTH_H
884 LIBUNISTRING_UNITYPES_H
885 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE
886 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE
887 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE
888 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE
889 LIBUNISTRING_UNISTR_H
891 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
893 TIME_H_DEFINES_TIME_UTC
894 UNISTD_H_DEFINES_STRUCT_TIMESPEC
895 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
896 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
897 TIME_H_DEFINES_STRUCT_TIMESPEC
898 NEXT_AS_FIRST_DIRECTIVE_TIME_H
901 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
905 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
908 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
912 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
914 NEXT_AS_FIRST_DIRECTIVE_STRING_H
916 HAVE_DECL_STRNCASECMP
919 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
921 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
924 GL_GENERATE_STDBOOL_H_FALSE
925 GL_GENERATE_STDBOOL_H_TRUE
927 GL_GENERATE_STDARG_H_FALSE
928 GL_GENERATE_STDARG_H_TRUE
930 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
932 GL_GENERATE_STDALIGN_H_FALSE
933 GL_GENERATE_STDALIGN_H_TRUE
935 GL_GENERATE_SIGSEGV_H_FALSE
936 GL_GENERATE_SIGSEGV_H_TRUE
942 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
945 GL_GNULIB_SIGPROCMASK
946 GL_GNULIB_SIGNAL_H_SIGPIPE
948 GL_GNULIB_PTHREAD_SIGMASK
950 REPLACE_PTHREAD_SIGMASK
952 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
953 HAVE_STRUCT_SIGACTION_SA_SIGACTION
959 HAVE_POSIX_SIGNALBLOCKING
965 GL_GNULIB_TIMESPEC_GET
988 HAVE_DECL_LOCALTIME_R
991 REPLACE_STRERRORNAME_NP
1010 HAVE_STRERRORNAME_NP
1011 HAVE_DECL_STRERROR_R
1030 GL_GNULIB_MDA_STRDUP
1031 GL_GNULIB_MDA_MEMCCPY
1032 GL_GNULIB_STRVERSCMP
1034 GL_GNULIB_SIGDESCR_NP
1035 GL_GNULIB_SIGABBREV_NP
1036 GL_GNULIB_STRERRORNAME_NP
1037 GL_GNULIB_STRERROR_R
1044 GL_GNULIB_MBSCASESTR
1045 GL_GNULIB_MBSPCASECMP
1046 GL_GNULIB_MBSNCASECMP
1047 GL_GNULIB_MBSCASECMP
1054 GL_GNULIB_STRCASESTR
1072 GL_GNULIB_EXPLICIT_BZERO
1082 GL_GNULIB_LOCALENAME
1084 GL_GNULIB_SETLOCALE_NULL
1086 GL_GNULIB_LOCALECONV
1087 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1090 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1092 GL_GENERATE_STDDEF_H_FALSE
1093 GL_GENERATE_STDDEF_H_TRUE
1098 LOCALENAME_ENHANCE_LOCALE_FUNCS
1099 REPLACE_STRUCT_LCONV
1108 LOCALCHARSET_TESTS_ENVIRONMENT
1109 GL_GNULIB_NL_LANGINFO
1110 HAVE_LANGINFO_YESEXPR
1112 HAVE_LANGINFO_ALTMON
1113 HAVE_LANGINFO_T_FMT_AMPM
1114 HAVE_LANGINFO_CODESET
1116 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1133 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
1148 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1150 UINT64_MAX_EQ_ULONG_MAX
1151 UINT32_MAX_LT_UINTMAX_MAX
1153 INT64_MAX_EQ_LONG_MAX
1154 INT32_MAX_LT_INTMAX_MAX
1162 GL_GENERATE_STDINT_H_FALSE
1163 GL_GENERATE_STDINT_H_TRUE
1175 HAVE_SIGNED_SIG_ATOMIC_T
1178 BITSIZEOF_SIG_ATOMIC_T
1181 APPLE_UNIVERSAL_BUILD
1183 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1188 GNULIBHEADERS_OVERRIDE_WINT_T
1189 GL_GENERATE_LIMITS_H_FALSE
1190 GL_GENERATE_LIMITS_H_TRUE
1192 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1194 NEXT_AS_FIRST_DIRECTIVE_ICONV_H
1197 GL_GENERATE_ICONV_H_FALSE
1198 GL_GENERATE_ICONV_H_TRUE
1215 GL_GNULIB_GETTIMEOFDAY
1216 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1218 REPLACE_STRUCT_TIMEVAL
1219 REPLACE_GETTIMEOFDAY
1233 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1238 GL_GNULIB_OVERRIDES_STRUCT_STAT
1254 WINDOWS_64_BIT_ST_SIZE
1255 WINDOWS_STAT_TIMESPEC
1256 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1282 GL_GNULIB_MDA_TEMPNAM
1285 GL_GNULIB_MDA_FILENO
1286 GL_GNULIB_MDA_FDOPEN
1287 GL_GNULIB_MDA_FCLOSEALL
1288 GL_GNULIB_VSPRINTF_POSIX
1290 GL_GNULIB_VPRINTF_POSIX
1292 GL_GNULIB_VFPRINTF_POSIX
1299 GL_GNULIB_STDIO_H_SIGPIPE
1300 GL_GNULIB_STDIO_H_NONBLOCKING
1301 GL_GNULIB_SPRINTF_POSIX
1310 GL_GNULIB_PRINTF_POSIX
1315 GL_GNULIB_OBSTACK_PRINTF_POSIX
1316 GL_GNULIB_OBSTACK_PRINTF
1332 GL_GNULIB_FPRINTF_POSIX
1348 REPLACE_STDIO_WRITE_FUNCS
1349 REPLACE_STDIO_READ_FUNCS
1358 REPLACE_OBSTACK_PRINTF
1383 HAVE_DECL_OBSTACK_PRINTF
1391 GL_GENERATE_FNMATCH_H_FALSE
1392 GL_GENERATE_FNMATCH_H_TRUE
1395 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1400 GL_GENERATE_FLOAT_H_FALSE
1401 GL_GENERATE_FLOAT_H_TRUE
1403 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1405 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1411 GL_GNULIB_NONBLOCKING
1426 GL_GENERATE_ERRNO_H_FALSE
1427 GL_GENERATE_ERRNO_H_TRUE
1429 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1432 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1435 PRAGMA_SYSTEM_HEADER
1436 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1440 GL_GNULIB_MDA_UNLINK
1445 GL_GNULIB_MDA_ISATTY
1446 GL_GNULIB_MDA_GETPID
1447 GL_GNULIB_MDA_GETCWD
1448 GL_GNULIB_MDA_EXECVPE
1449 GL_GNULIB_MDA_EXECVP
1450 GL_GNULIB_MDA_EXECVE
1452 GL_GNULIB_MDA_EXECLP
1453 GL_GNULIB_MDA_EXECLE
1459 GL_GNULIB_MDA_ACCESS
1464 GL_GNULIB_UNISTD_H_SIGPIPE
1465 GL_GNULIB_UNISTD_H_NONBLOCKING
1466 GL_GNULIB_UNISTD_H_GETOPT
1472 GL_GNULIB_SETHOSTNAME
1474 GL_GNULIB_READLINKAT
1486 GL_GNULIB_GROUP_MEMBER
1487 GL_GNULIB_GETUSERSHELL
1489 GL_GNULIB_GETPAGESIZE
1490 GL_GNULIB_GETOPT_POSIX
1491 GL_GNULIB_GETLOGIN_R
1493 GL_GNULIB_GETHOSTNAME
1495 GL_GNULIB_GETENTROPY
1496 GL_GNULIB_GETDTABLESIZE
1497 GL_GNULIB_GETDOMAINNAME
1512 GL_GNULIB_EUIDACCESS
1517 GL_GNULIB_COPY_FILE_RANGE
1524 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1525 SYS_IOCTL_H_HAVE_WINSOCK2_H
1526 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1527 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1528 UNISTD_H_HAVE_WINSOCK2_H
1529 UNISTD_H_HAVE_SYS_RANDOM_H
1554 REPLACE_GETDTABLESIZE
1555 REPLACE_GETDOMAINNAME
1576 HAVE_DECL_SETHOSTNAME
1577 HAVE_DECL_GETUSERSHELL
1578 HAVE_DECL_GETPAGESIZE
1579 HAVE_DECL_GETLOGIN_R
1581 HAVE_DECL_GETDOMAINNAME
1618 HAVE_COPY_FILE_RANGE
1621 GL_GNULIB_MDA_PUTENV
1622 GL_GNULIB_MDA_MKTEMP
1629 GL_GNULIB_SYSTEM_POSIX
1637 GL_GNULIB_SECURE_GETENV
1640 GL_GNULIB_REALLOC_POSIX
1641 GL_GNULIB_REALLOCARRAY
1648 GL_GNULIB_POSIX_OPENPT
1649 GL_GNULIB_POSIX_MEMALIGN
1656 GL_GNULIB_MALLOC_POSIX
1659 GL_GNULIB_GETLOADAVG
1660 GL_GNULIB_FREE_POSIX
1661 GL_GNULIB_CANONICALIZE_FILE_NAME
1662 GL_GNULIB_CALLOC_POSIX
1664 GL_GNULIB_ALIGNED_ALLOC
1677 REPLACE_REALLOCARRAY
1685 REPLACE_POSIX_MEMALIGN
1691 REPLACE_CANONICALIZE_FILE_NAME
1693 REPLACE_ALIGNED_ALLOC
1697 HAVE_STRUCT_RANDOM_DATA
1730 HAVE_DECL_GETLOADAVG
1734 HAVE_CANONICALIZE_FILE_NAME
1740 GL_GNULIB_MDA_WCSDUP
1753 GL_GNULIB_WCSNCASECMP
1754 GL_GNULIB_WCSCASECMP
1772 GL_GNULIB_WCSNRTOMBS
1775 GL_GNULIB_MBSNRTOWCS
1841 GL_GENERATE_ALLOCA_H_FALSE
1842 GL_GENERATE_ALLOCA_H_TRUE
1845 GL_COND_LIBTOOL_FALSE
1846 GL_COND_LIBTOOL_TRUE
1879 AM_DEFAULT_VERBOSITY
1893 INSTALL_STRIP_PROGRAM
1936 program_transform_name
1950 enable_option_checking
1952 enable_dependency_tracking
1956 enable_cross_guesses
1959 with_libiconv_prefix
1962 with_libsigsegv_prefix
1964 with_packager_version
1965 with_packager_bug_reports
1970 ac_precious_vars='build_alias
1981 # Initialize some variables set by options.
1983 ac_init_version=false
1984 ac_unrecognized_opts=
1985 ac_unrecognized_sep=
1986 # The variables have the same names as the options, with
1987 # dashes changed to underlines.
1988 cache_file=/dev/null
1995 program_transform_name=s,x,x,
2003 # Installation directory options.
2004 # These are left unexpanded so users can "make install exec_prefix=/foo"
2005 # and all the variables that are supposed to be based on exec_prefix
2006 # by default will actually change.
2007 # Use braces instead of parens because sh, perl, etc. also accept them.
2008 # (The list follows the same order as the GNU Coding Standards.)
2009 bindir='${exec_prefix}/bin'
2010 sbindir='${exec_prefix}/sbin'
2011 libexecdir='${exec_prefix}/libexec'
2012 datarootdir='${prefix}/share'
2013 datadir='${datarootdir}'
2014 sysconfdir='${prefix}/etc'
2015 sharedstatedir='${prefix}/com'
2016 localstatedir='${prefix}/var'
2017 runstatedir='${localstatedir}/run'
2018 includedir='${prefix}/include'
2019 oldincludedir='/usr/include'
2020 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2021 infodir='${datarootdir}/info'
2026 libdir='${exec_prefix}/lib'
2027 localedir='${datarootdir}/locale'
2028 mandir='${datarootdir}/man'
2034 # If the previous option needs an argument, assign it.
2035 if test -n "$ac_prev"; then
2036 eval $ac_prev=\$ac_option
2042 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2047 case $ac_dashdash$ac_option in
2051 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2053 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2054 bindir=$ac_optarg ;;
2056 -build | --build | --buil | --bui | --bu)
2057 ac_prev=build_alias ;;
2058 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2059 build_alias=$ac_optarg ;;
2061 -cache-file | --cache-file | --cache-fil | --cache-fi \
2062 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2063 ac_prev=cache_file ;;
2064 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2065 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2066 cache_file=$ac_optarg ;;
2068 --config-cache | -C)
2069 cache_file=config.cache ;;
2071 -datadir | --datadir | --datadi | --datad)
2073 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2074 datadir=$ac_optarg ;;
2076 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2077 | --dataroo | --dataro | --datar)
2078 ac_prev=datarootdir ;;
2079 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2080 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2081 datarootdir=$ac_optarg ;;
2083 -disable-* | --disable-*)
2084 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2085 # Reject names that are not valid shell variable names.
2086 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2087 as_fn_error $? "invalid feature name: \`$ac_useropt'"
2088 ac_useropt_orig=$ac_useropt
2089 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2090 case $ac_user_opts in
2092 "enable_$ac_useropt"
2094 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2095 ac_unrecognized_sep=', ';;
2097 eval enable_$ac_useropt=no ;;
2099 -docdir | --docdir | --docdi | --doc | --do)
2101 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2102 docdir=$ac_optarg ;;
2104 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2106 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2107 dvidir=$ac_optarg ;;
2109 -enable-* | --enable-*)
2110 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2111 # Reject names that are not valid shell variable names.
2112 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2113 as_fn_error $? "invalid feature name: \`$ac_useropt'"
2114 ac_useropt_orig=$ac_useropt
2115 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2116 case $ac_user_opts in
2118 "enable_$ac_useropt"
2120 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2121 ac_unrecognized_sep=', ';;
2123 eval enable_$ac_useropt=\$ac_optarg ;;
2125 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2126 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2127 | --exec | --exe | --ex)
2128 ac_prev=exec_prefix ;;
2129 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2130 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2131 | --exec=* | --exe=* | --ex=*)
2132 exec_prefix=$ac_optarg ;;
2134 -gas | --gas | --ga | --g)
2135 # Obsolete; use --with-gas.
2138 -help | --help | --hel | --he | -h)
2139 ac_init_help=long ;;
2140 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2141 ac_init_help=recursive ;;
2142 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2143 ac_init_help=short ;;
2145 -host | --host | --hos | --ho)
2146 ac_prev=host_alias ;;
2147 -host=* | --host=* | --hos=* | --ho=*)
2148 host_alias=$ac_optarg ;;
2150 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2152 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2154 htmldir=$ac_optarg ;;
2156 -includedir | --includedir | --includedi | --included | --include \
2157 | --includ | --inclu | --incl | --inc)
2158 ac_prev=includedir ;;
2159 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2160 | --includ=* | --inclu=* | --incl=* | --inc=*)
2161 includedir=$ac_optarg ;;
2163 -infodir | --infodir | --infodi | --infod | --info | --inf)
2165 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2166 infodir=$ac_optarg ;;
2168 -libdir | --libdir | --libdi | --libd)
2170 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2171 libdir=$ac_optarg ;;
2173 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2174 | --libexe | --libex | --libe)
2175 ac_prev=libexecdir ;;
2176 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2177 | --libexe=* | --libex=* | --libe=*)
2178 libexecdir=$ac_optarg ;;
2180 -localedir | --localedir | --localedi | --localed | --locale)
2181 ac_prev=localedir ;;
2182 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2183 localedir=$ac_optarg ;;
2185 -localstatedir | --localstatedir | --localstatedi | --localstated \
2186 | --localstate | --localstat | --localsta | --localst | --locals)
2187 ac_prev=localstatedir ;;
2188 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2189 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2190 localstatedir=$ac_optarg ;;
2192 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2194 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2195 mandir=$ac_optarg ;;
2197 -nfp | --nfp | --nf)
2198 # Obsolete; use --without-fp.
2201 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2202 | --no-cr | --no-c | -n)
2205 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2206 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2209 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2210 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2211 | --oldin | --oldi | --old | --ol | --o)
2212 ac_prev=oldincludedir ;;
2213 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2214 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2215 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2216 oldincludedir=$ac_optarg ;;
2218 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2220 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2221 prefix=$ac_optarg ;;
2223 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2224 | --program-pre | --program-pr | --program-p)
2225 ac_prev=program_prefix ;;
2226 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2227 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2228 program_prefix=$ac_optarg ;;
2230 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2231 | --program-suf | --program-su | --program-s)
2232 ac_prev=program_suffix ;;
2233 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2234 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2235 program_suffix=$ac_optarg ;;
2237 -program-transform-name | --program-transform-name \
2238 | --program-transform-nam | --program-transform-na \
2239 | --program-transform-n | --program-transform- \
2240 | --program-transform | --program-transfor \
2241 | --program-transfo | --program-transf \
2242 | --program-trans | --program-tran \
2243 | --progr-tra | --program-tr | --program-t)
2244 ac_prev=program_transform_name ;;
2245 -program-transform-name=* | --program-transform-name=* \
2246 | --program-transform-nam=* | --program-transform-na=* \
2247 | --program-transform-n=* | --program-transform-=* \
2248 | --program-transform=* | --program-transfor=* \
2249 | --program-transfo=* | --program-transf=* \
2250 | --program-trans=* | --program-tran=* \
2251 | --progr-tra=* | --program-tr=* | --program-t=*)
2252 program_transform_name=$ac_optarg ;;
2254 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2256 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2257 pdfdir=$ac_optarg ;;
2259 -psdir | --psdir | --psdi | --psd | --ps)
2261 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2264 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2265 | -silent | --silent | --silen | --sile | --sil)
2268 -runstatedir | --runstatedir | --runstatedi | --runstated \
2269 | --runstate | --runstat | --runsta | --runst | --runs \
2270 | --run | --ru | --r)
2271 ac_prev=runstatedir ;;
2272 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2273 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2274 | --run=* | --ru=* | --r=*)
2275 runstatedir=$ac_optarg ;;
2277 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2279 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2281 sbindir=$ac_optarg ;;
2283 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2284 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2285 | --sharedst | --shareds | --shared | --share | --shar \
2287 ac_prev=sharedstatedir ;;
2288 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2289 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2290 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2292 sharedstatedir=$ac_optarg ;;
2294 -site | --site | --sit)
2296 -site=* | --site=* | --sit=*)
2299 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2301 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2302 srcdir=$ac_optarg ;;
2304 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2305 | --syscon | --sysco | --sysc | --sys | --sy)
2306 ac_prev=sysconfdir ;;
2307 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2308 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2309 sysconfdir=$ac_optarg ;;
2311 -target | --target | --targe | --targ | --tar | --ta | --t)
2312 ac_prev=target_alias ;;
2313 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2314 target_alias=$ac_optarg ;;
2316 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2319 -version | --version | --versio | --versi | --vers | -V)
2320 ac_init_version=: ;;
2323 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2324 # Reject names that are not valid shell variable names.
2325 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2326 as_fn_error $? "invalid package name: \`$ac_useropt'"
2327 ac_useropt_orig=$ac_useropt
2328 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2329 case $ac_user_opts in
2333 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2334 ac_unrecognized_sep=', ';;
2336 eval with_$ac_useropt=\$ac_optarg ;;
2338 -without-* | --without-*)
2339 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2340 # Reject names that are not valid shell variable names.
2341 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2342 as_fn_error $? "invalid package name: \`$ac_useropt'"
2343 ac_useropt_orig=$ac_useropt
2344 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2345 case $ac_user_opts in
2349 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2350 ac_unrecognized_sep=', ';;
2352 eval with_$ac_useropt=no ;;
2355 # Obsolete; use --with-x.
2358 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2359 | --x-incl | --x-inc | --x-in | --x-i)
2360 ac_prev=x_includes ;;
2361 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2362 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2363 x_includes=$ac_optarg ;;
2365 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2366 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2367 ac_prev=x_libraries ;;
2368 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2369 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2370 x_libraries=$ac_optarg ;;
2372 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2373 Try \`$0 --help' for more information"
2377 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2378 # Reject names that are not valid shell variable names.
2379 case $ac_envvar in #(
2380 '' | [0-9]* | *[!_$as_cr_alnum]* )
2381 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2383 eval $ac_envvar=\$ac_optarg
2384 export $ac_envvar ;;
2387 # FIXME: should be removed in autoconf 3.0.
2388 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2389 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2390 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2391 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2397 if test -n "$ac_prev"; then
2398 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2399 as_fn_error $? "missing argument to $ac_option"
2402 if test -n "$ac_unrecognized_opts"; then
2403 case $enable_option_checking in
2405 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2406 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2410 # Check all directory arguments for consistency.
2411 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2412 datadir sysconfdir sharedstatedir localstatedir includedir \
2413 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2414 libdir localedir mandir runstatedir
2416 eval ac_val=\$$ac_var
2417 # Remove trailing slashes.
2420 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2421 eval $ac_var=\$ac_val;;
2423 # Be sure to have absolute directory names.
2425 [\\/$]* | ?:[\\/]* ) continue;;
2426 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2428 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2431 # There might be people who depend on the old broken behavior: `$host'
2432 # used to hold the argument of --host etc.
2433 # FIXME: To remove some day.
2436 target=$target_alias
2438 # FIXME: To remove some day.
2439 if test "x$host_alias" != x; then
2440 if test "x$build_alias" = x; then
2441 cross_compiling=maybe
2442 elif test "x$build_alias" != "x$host_alias"; then
2448 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2450 test "$silent" = yes && exec 6>/dev/null
2453 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2454 ac_ls_di=`ls -di .` &&
2455 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2456 as_fn_error $? "working directory cannot be determined"
2457 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2458 as_fn_error $? "pwd does not report name of working directory"
2461 # Find the source files, if location was not specified.
2462 if test -z "$srcdir"; then
2463 ac_srcdir_defaulted=yes
2464 # Try the directory containing this script, then the parent directory.
2465 ac_confdir=`$as_dirname -- "$as_myself" ||
2466 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2467 X"$as_myself" : 'X\(//\)[^/]' \| \
2468 X"$as_myself" : 'X\(//\)$' \| \
2469 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2470 printf "%s\n" X"$as_myself" |
2471 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2489 if test ! -r "$srcdir/$ac_unique_file"; then
2493 ac_srcdir_defaulted=no
2495 if test ! -r "$srcdir/$ac_unique_file"; then
2496 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2497 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2499 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2501 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2503 # When building in place, set srcdir=.
2504 if test "$ac_abs_confdir" = "$ac_pwd"; then
2507 # Remove unnecessary trailing slashes from srcdir.
2508 # Double slashes in file names in object file debugging info
2509 # mess up M-x gdb in Emacs.
2511 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2513 for ac_var in $ac_precious_vars; do
2514 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2515 eval ac_env_${ac_var}_value=\$${ac_var}
2516 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2517 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2521 # Report the --help message.
2523 if test "$ac_init_help" = "long"; then
2524 # Omit some internal or obsolete options to make the list less imposing.
2525 # This message is too long to be a string in the A/UX 3.1 sh.
2527 \`configure' configures GNU diffutils 3.8 to adapt to many kinds of systems.
2529 Usage: $0 [OPTION]... [VAR=VALUE]...
2531 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2532 VAR=VALUE. See below for descriptions of some of the useful variables.
2534 Defaults for the options are specified in brackets.
2537 -h, --help display this help and exit
2538 --help=short display options specific to this package
2539 --help=recursive display the short help of all the included packages
2540 -V, --version display version information and exit
2541 -q, --quiet, --silent do not print \`checking ...' messages
2542 --cache-file=FILE cache test results in FILE [disabled]
2543 -C, --config-cache alias for \`--cache-file=config.cache'
2544 -n, --no-create do not create output files
2545 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2547 Installation directories:
2548 --prefix=PREFIX install architecture-independent files in PREFIX
2549 [$ac_default_prefix]
2550 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2553 By default, \`make install' will install all the files in
2554 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2555 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2556 for instance \`--prefix=\$HOME'.
2558 For better control, use the options below.
2560 Fine tuning of the installation directories:
2561 --bindir=DIR user executables [EPREFIX/bin]
2562 --sbindir=DIR system admin executables [EPREFIX/sbin]
2563 --libexecdir=DIR program executables [EPREFIX/libexec]
2564 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2565 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2566 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2567 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
2568 --libdir=DIR object code libraries [EPREFIX/lib]
2569 --includedir=DIR C header files [PREFIX/include]
2570 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2571 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2572 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2573 --infodir=DIR info documentation [DATAROOTDIR/info]
2574 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2575 --mandir=DIR man documentation [DATAROOTDIR/man]
2576 --docdir=DIR documentation root [DATAROOTDIR/doc/diffutils]
2577 --htmldir=DIR html documentation [DOCDIR]
2578 --dvidir=DIR dvi documentation [DOCDIR]
2579 --pdfdir=DIR pdf documentation [DOCDIR]
2580 --psdir=DIR ps documentation [DOCDIR]
2586 --program-prefix=PREFIX prepend PREFIX to installed program names
2587 --program-suffix=SUFFIX append SUFFIX to installed program names
2588 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2591 --build=BUILD configure for building on BUILD [guessed]
2592 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2596 if test -n "$ac_init_help"; then
2597 case $ac_init_help in
2598 short | recursive ) echo "Configuration of GNU diffutils 3.8:";;
2603 --disable-option-checking ignore unrecognized --enable/--with options
2604 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2605 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2606 --enable-silent-rules less verbose build output (undo: "make V=1")
2607 --disable-silent-rules verbose build output (undo: "make V=0")
2608 --enable-dependency-tracking
2609 do not reject slow dependency extractors
2610 --disable-dependency-tracking
2611 speeds up one-time build
2612 --disable-largefile omit support for large files
2613 --disable-year2038 omit support for timestamps past the year 2038
2614 --enable-threads={isoc|posix|isoc+posix|windows}
2615 specify multithreading API
2616 --disable-threads build without multithread safety
2617 --enable-cross-guesses={conservative|risky}
2618 specify policy for cross-compilation guesses
2619 --disable-rpath do not hardcode runtime library paths
2620 --enable-gcc-warnings turn on lots of GCC warnings (for developers)
2621 --disable-nls do not use Native Language Support
2624 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2625 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2626 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2627 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
2628 --without-libiconv-prefix don't search for libiconv in includedir and libdir
2629 --without-included-regex
2630 don't compile regex; this is the default on systems
2631 with recent-enough versions of the GNU C Library
2632 (use with caution on other systems).
2633 --with-libsigsegv use the GNU libsigsegv library, when present,
2634 instead of the gnulib module 'sigsegv'
2635 --with-libsigsegv-prefix[=DIR] search for libsigsegv in DIR/include and DIR/lib
2636 --without-libsigsegv-prefix don't search for libsigsegv in includedir and libdir
2637 --with-packager String identifying the packager of this software
2638 --with-packager-version Packager-specific version information
2639 --with-packager-bug-reports
2640 Packager info for bug reports (URL/e-mail/...)
2641 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
2642 --without-libintl-prefix don't search for libintl in includedir and libdir
2644 Some influential environment variables:
2645 CC C compiler command
2646 CFLAGS C compiler flags
2647 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2648 nonstandard directory <lib dir>
2649 LIBS libraries to pass to the linker, e.g. -l<library>
2650 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2651 you have headers in a nonstandard directory <include dir>
2654 Use these variables to override the choices made by `configure' or to help
2655 it to find libraries and programs with nonstandard names/locations.
2657 Report bugs to <bug-diffutils@gnu.org>.
2658 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>.
2659 General help using GNU software: <https://www.gnu.org/gethelp/>.
2664 if test "$ac_init_help" = "recursive"; then
2665 # If there are subdirs, report their specific --help.
2666 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2667 test -d "$ac_dir" ||
2668 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2673 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2675 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2676 # A ".." for each directory in $ac_dir_suffix.
2677 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2678 case $ac_top_builddir_sub in
2679 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2680 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2683 ac_abs_top_builddir=$ac_pwd
2684 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2685 # for backward compatibility:
2686 ac_top_builddir=$ac_top_build_prefix
2689 .) # We are building in place.
2691 ac_top_srcdir=$ac_top_builddir_sub
2692 ac_abs_top_srcdir=$ac_pwd ;;
2693 [\\/]* | ?:[\\/]* ) # Absolute name.
2694 ac_srcdir=$srcdir$ac_dir_suffix;
2695 ac_top_srcdir=$srcdir
2696 ac_abs_top_srcdir=$srcdir ;;
2698 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2699 ac_top_srcdir=$ac_top_build_prefix$srcdir
2700 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2702 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2704 cd "$ac_dir" || { ac_status=$?; continue; }
2705 # Check for configure.gnu first; this name is used for a wrapper for
2706 # Metaconfig's "Configure" on case-insensitive file systems.
2707 if test -f "$ac_srcdir/configure.gnu"; then
2709 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2710 elif test -f "$ac_srcdir/configure"; then
2712 $SHELL "$ac_srcdir/configure" --help=recursive
2714 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2716 cd "$ac_pwd" || { ac_status=$?; break; }
2720 test -n "$ac_init_help" && exit $ac_status
2721 if $ac_init_version; then
2723 GNU diffutils configure 3.8
2724 generated by GNU Autoconf 2.71
2726 Copyright (C) 2021 Free Software Foundation, Inc.
2727 This configure script is free software; the Free Software Foundation
2728 gives unlimited permission to copy, distribute and modify it.
2733 ## ------------------------ ##
2734 ## Autoconf initialization. ##
2735 ## ------------------------ ##
2737 # ac_fn_c_try_compile LINENO
2738 # --------------------------
2739 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2740 ac_fn_c_try_compile ()
2742 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2743 rm -f conftest.$ac_objext conftest.beam
2744 if { { ac_try="$ac_compile"
2746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2747 *) ac_try_echo=$ac_try;;
2749 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2750 printf "%s\n" "$ac_try_echo"; } >&5
2751 (eval "$ac_compile") 2>conftest.err
2753 if test -s conftest.err; then
2754 grep -v '^ *+' conftest.err >conftest.er1
2755 cat conftest.er1 >&5
2756 mv -f conftest.er1 conftest.err
2758 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2759 test $ac_status = 0; } && {
2760 test -z "$ac_c_werror_flag" ||
2761 test ! -s conftest.err
2762 } && test -s conftest.$ac_objext
2766 printf "%s\n" "$as_me: failed program was:" >&5
2767 sed 's/^/| /' conftest.$ac_ext >&5
2771 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2772 as_fn_set_status $ac_retval
2774 } # ac_fn_c_try_compile
2776 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2777 # -------------------------------------------------------
2778 # Tests whether HEADER exists and can be compiled using the include files in
2779 # INCLUDES, setting the cache variable VAR accordingly.
2780 ac_fn_c_check_header_compile ()
2782 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2784 printf %s "checking for $2... " >&6; }
2785 if eval test \${$3+y}
2787 printf %s "(cached) " >&6
2789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2790 /* end confdefs.h. */
2794 if ac_fn_c_try_compile "$LINENO"
2800 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2804 printf "%s\n" "$ac_res" >&6; }
2805 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2807 } # ac_fn_c_check_header_compile
2809 # ac_fn_c_try_cpp LINENO
2810 # ----------------------
2811 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2814 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2815 if { { ac_try="$ac_cpp conftest.$ac_ext"
2817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2818 *) ac_try_echo=$ac_try;;
2820 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2821 printf "%s\n" "$ac_try_echo"; } >&5
2822 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2824 if test -s conftest.err; then
2825 grep -v '^ *+' conftest.err >conftest.er1
2826 cat conftest.er1 >&5
2827 mv -f conftest.er1 conftest.err
2829 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2830 test $ac_status = 0; } > conftest.i && {
2831 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2832 test ! -s conftest.err
2837 printf "%s\n" "$as_me: failed program was:" >&5
2838 sed 's/^/| /' conftest.$ac_ext >&5
2842 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2843 as_fn_set_status $ac_retval
2847 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2848 # -------------------------------------------
2849 # Tests whether TYPE exists after having included INCLUDES, setting cache
2850 # variable VAR accordingly.
2851 ac_fn_c_check_type ()
2853 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2855 printf %s "checking for $2... " >&6; }
2856 if eval test \${$3+y}
2858 printf %s "(cached) " >&6
2861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2862 /* end confdefs.h. */
2873 if ac_fn_c_try_compile "$LINENO"
2875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876 /* end confdefs.h. */
2887 if ac_fn_c_try_compile "$LINENO"
2893 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2895 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2899 printf "%s\n" "$ac_res" >&6; }
2900 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2902 } # ac_fn_c_check_type
2904 # ac_fn_c_try_link LINENO
2905 # -----------------------
2906 # Try to link conftest.$ac_ext, and return whether this succeeded.
2909 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2910 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
2911 if { { ac_try="$ac_link"
2913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2914 *) ac_try_echo=$ac_try;;
2916 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2917 printf "%s\n" "$ac_try_echo"; } >&5
2918 (eval "$ac_link") 2>conftest.err
2920 if test -s conftest.err; then
2921 grep -v '^ *+' conftest.err >conftest.er1
2922 cat conftest.er1 >&5
2923 mv -f conftest.er1 conftest.err
2925 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2926 test $ac_status = 0; } && {
2927 test -z "$ac_c_werror_flag" ||
2928 test ! -s conftest.err
2929 } && test -s conftest$ac_exeext && {
2930 test "$cross_compiling" = yes ||
2931 test -x conftest$ac_exeext
2936 printf "%s\n" "$as_me: failed program was:" >&5
2937 sed 's/^/| /' conftest.$ac_ext >&5
2941 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2942 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2943 # interfere with the next link command; also delete a directory that is
2944 # left behind by Apple's compiler. We do this before executing the actions.
2945 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2946 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2947 as_fn_set_status $ac_retval
2949 } # ac_fn_c_try_link
2951 # ac_fn_c_try_run LINENO
2952 # ----------------------
2953 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2954 # executables *can* be run.
2957 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2958 if { { ac_try="$ac_link"
2960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2961 *) ac_try_echo=$ac_try;;
2963 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2964 printf "%s\n" "$ac_try_echo"; } >&5
2965 (eval "$ac_link") 2>&5
2967 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2968 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2969 { { case "(($ac_try" in
2970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2971 *) ac_try_echo=$ac_try;;
2973 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2974 printf "%s\n" "$ac_try_echo"; } >&5
2975 (eval "$ac_try") 2>&5
2977 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2978 test $ac_status = 0; }; }
2982 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2983 printf "%s\n" "$as_me: failed program was:" >&5
2984 sed 's/^/| /' conftest.$ac_ext >&5
2986 ac_retval=$ac_status
2988 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2989 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2990 as_fn_set_status $ac_retval
2994 # ac_fn_c_check_func LINENO FUNC VAR
2995 # ----------------------------------
2996 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2997 ac_fn_c_check_func ()
2999 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3001 printf %s "checking for $2... " >&6; }
3002 if eval test \${$3+y}
3004 printf %s "(cached) " >&6
3006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3007 /* end confdefs.h. */
3008 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3009 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3010 #define $2 innocuous_$2
3012 /* System header to define __stub macros and hopefully few prototypes,
3013 which can conflict with char $2 (); below. */
3018 /* Override any GCC internal prototype to avoid an error.
3019 Use char because int might match the return type of a GCC
3020 builtin and then its argument prototype would still apply. */
3025 /* The GNU C library defines this for functions which it implements
3026 to always fail with ENOSYS. Some functions are actually named
3027 something starting with __ and the normal name is an alias. */
3028 #if defined __stub_$2 || defined __stub___$2
3040 if ac_fn_c_try_link "$LINENO"
3046 rm -f core conftest.err conftest.$ac_objext conftest.beam \
3047 conftest$ac_exeext conftest.$ac_ext
3050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3051 printf "%s\n" "$ac_res" >&6; }
3052 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3054 } # ac_fn_c_check_func
3056 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3057 # --------------------------------------------
3058 # Tries to find the compile-time value of EXPR in a program that includes
3059 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3061 ac_fn_c_compute_int ()
3063 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3064 if test "$cross_compiling" = yes; then
3065 # Depending upon the size, compute the lo and hi bounds.
3066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3067 /* end confdefs.h. */
3072 static int test_array [1 - 2 * !(($2) >= 0)];
3074 return test_array [0];
3080 if ac_fn_c_try_compile "$LINENO"
3084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3085 /* end confdefs.h. */
3090 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3092 return test_array [0];
3098 if ac_fn_c_try_compile "$LINENO"
3100 ac_hi=$ac_mid; break
3102 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3103 if test $ac_lo -le $ac_mid; then
3107 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3109 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3113 /* end confdefs.h. */
3118 static int test_array [1 - 2 * !(($2) < 0)];
3120 return test_array [0];
3126 if ac_fn_c_try_compile "$LINENO"
3130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3131 /* end confdefs.h. */
3136 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3138 return test_array [0];
3144 if ac_fn_c_try_compile "$LINENO"
3146 ac_lo=$ac_mid; break
3148 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3149 if test $ac_mid -le $ac_hi; then
3153 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3155 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3160 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3162 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3163 # Binary search between lo and hi bounds.
3164 while test "x$ac_lo" != "x$ac_hi"; do
3165 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3167 /* end confdefs.h. */
3172 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3174 return test_array [0];
3180 if ac_fn_c_try_compile "$LINENO"
3184 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3186 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3189 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3194 /* end confdefs.h. */
3196 static long int longval (void) { return $2; }
3197 static unsigned long int ulongval (void) { return $2; }
3204 FILE *f = fopen ("conftest.val", "w");
3209 long int i = longval ();
3212 fprintf (f, "%ld", i);
3216 unsigned long int i = ulongval ();
3219 fprintf (f, "%lu", i);
3221 /* Do not output a trailing newline, as this causes \r\n confusion
3222 on some platforms. */
3223 return ferror (f) || fclose (f) != 0;
3229 if ac_fn_c_try_run "$LINENO"
3231 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3235 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3236 conftest.$ac_objext conftest.beam conftest.$ac_ext
3240 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3241 as_fn_set_status $ac_retval
3243 } # ac_fn_c_compute_int
3245 # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
3246 # ------------------------------------------------------------------
3247 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3248 # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
3251 ac_save_ac_compile="$ac_compile"
3252 if test -n "$ac_compile_for_check_decl"; then
3253 ac_compile="$ac_compile_for_check_decl"
3255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3256 as_decl_name=`echo $2|sed 's/ *(.*//'`
3257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3258 printf %s "checking whether $as_decl_name is declared... " >&6; }
3259 if eval test \${$3+y}
3261 printf %s "(cached) " >&6
3263 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3264 eval ac_save_FLAGS=\$$6
3265 as_fn_append $6 " $5"
3266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3267 /* end confdefs.h. */
3272 #ifndef $as_decl_name
3274 (void) $as_decl_use;
3276 (void) $as_decl_name;
3284 if ac_fn_c_try_compile "$LINENO"
3290 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3291 eval $6=\$ac_save_FLAGS
3295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3296 printf "%s\n" "$ac_res" >&6; }
3297 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3298 ac_compile="$ac_save_ac_compile"
3300 } # ac_fn_check_decl
3302 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3303 # ----------------------------------------------------
3304 # Tries to find if the field MEMBER exists in type AGGR, after including
3305 # INCLUDES, setting cache variable VAR accordingly.
3306 ac_fn_c_check_member ()
3308 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3310 printf %s "checking for $2.$3... " >&6; }
3311 if eval test \${$4+y}
3313 printf %s "(cached) " >&6
3315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3316 /* end confdefs.h. */
3328 if ac_fn_c_try_compile "$LINENO"
3332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3333 /* end confdefs.h. */
3339 if (sizeof ac_aggr.$3)
3345 if ac_fn_c_try_compile "$LINENO"
3351 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3353 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3357 printf "%s\n" "$ac_res" >&6; }
3358 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3360 } # ac_fn_c_check_member
3361 ac_configure_args_raw=
3366 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3368 as_fn_append ac_configure_args_raw " '$ac_arg'"
3371 case $ac_configure_args_raw in
3375 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
3376 ac_unsafe_a="$ac_unsafe_z#~"
3377 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3378 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3381 cat >config.log <<_ACEOF
3382 This file contains any messages produced by compilers while
3383 running configure, to aid debugging if configure makes a mistake.
3385 It was created by GNU diffutils $as_me 3.8, which was
3386 generated by GNU Autoconf 2.71. Invocation command line was
3388 $ $0$ac_configure_args_raw
3398 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3399 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3400 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3401 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3402 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3404 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3405 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3407 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3408 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3409 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3410 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3411 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3412 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3413 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3421 case $as_dir in #(((
3424 *) as_dir=$as_dir/ ;;
3426 printf "%s\n" "PATH: $as_dir"
3442 # Keep a trace of the command line.
3443 # Strip out --no-create and --no-recursion so they do not pile up.
3444 # Strip out --silent because we don't want to record it for future runs.
3445 # Also quote any args containing shell meta-characters.
3446 # Make two passes to allow for proper duplicate-argument suppression.
3450 ac_must_keep_next=false
3456 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3457 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3458 | -silent | --silent | --silen | --sile | --sil)
3461 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3464 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3466 as_fn_append ac_configure_args1 " '$ac_arg'"
3467 if test $ac_must_keep_next = true; then
3468 ac_must_keep_next=false # Got value, back to normal.
3471 *=* | --config-cache | -C | -disable-* | --disable-* \
3472 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3473 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3474 | -with-* | --with-* | -without-* | --without-* | --x)
3475 case "$ac_configure_args0 " in
3476 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3479 -* ) ac_must_keep_next=true ;;
3482 as_fn_append ac_configure_args " '$ac_arg'"
3487 { ac_configure_args0=; unset ac_configure_args0;}
3488 { ac_configure_args1=; unset ac_configure_args1;}
3490 # When interrupted or exit'd, cleanup temporary files, and complete
3491 # config.log. We remove comments because anyway the quotes in there
3492 # would cause problems or look ugly.
3493 # WARNING: Use '\'' to represent an apostrophe within the trap.
3494 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3495 trap 'exit_status=$?
3498 # Save into config.log some information that might help in debugging.
3502 printf "%s\n" "## ---------------- ##
3503 ## Cache variables. ##
3504 ## ---------------- ##"
3506 # The following way of writing the cache mishandles newlines in values,
3508 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3509 eval ac_val=\$$ac_var
3513 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3514 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3517 _ | IFS | as_nl) ;; #(
3518 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3519 *) { eval $ac_var=; unset $ac_var;} ;;
3524 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3525 *${as_nl}ac_space=\ *)
3527 "s/'\''/'\''\\\\'\'''\''/g;
3528 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3531 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3538 printf "%s\n" "## ----------------- ##
3539 ## Output variables. ##
3540 ## ----------------- ##"
3542 for ac_var in $ac_subst_vars
3544 eval ac_val=\$$ac_var
3546 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3548 printf "%s\n" "$ac_var='\''$ac_val'\''"
3552 if test -n "$ac_subst_files"; then
3553 printf "%s\n" "## ------------------- ##
3554 ## File substitutions. ##
3555 ## ------------------- ##"
3557 for ac_var in $ac_subst_files
3559 eval ac_val=\$$ac_var
3561 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3563 printf "%s\n" "$ac_var='\''$ac_val'\''"
3568 if test -s confdefs.h; then
3569 printf "%s\n" "## ----------- ##
3576 test "$ac_signal" != 0 &&
3577 printf "%s\n" "$as_me: caught signal $ac_signal"
3578 printf "%s\n" "$as_me: exit $exit_status"
3580 rm -f core *.core core.conftest.* &&
3581 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3584 for ac_signal in 1 2 13 15; do
3585 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3589 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3590 rm -f -r conftest* confdefs.h
3592 printf "%s\n" "/* confdefs.h */" > confdefs.h
3594 # Predefined preprocessor variables.
3596 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3598 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3600 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3602 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3604 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3606 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3609 # Let the site file select an alternate cache file if it wants to.
3610 # Prefer an explicitly selected file to automatically selected ones.
3611 if test -n "$CONFIG_SITE"; then
3612 ac_site_files="$CONFIG_SITE"
3613 elif test "x$prefix" != xNONE; then
3614 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
3616 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
3619 for ac_site_file in $ac_site_files
3621 case $ac_site_file in #(
3625 ac_site_file=./$ac_site_file ;;
3627 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
3628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3629 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3630 sed 's/^/| /' "$ac_site_file" >&5
3632 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3633 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3634 as_fn_error $? "failed to load site script $ac_site_file
3635 See \`config.log' for more details" "$LINENO" 5; }
3639 if test -r "$cache_file"; then
3640 # Some versions of bash will fail to source /dev/null (special files
3641 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3642 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3644 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3646 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3647 *) . "./$cache_file";;
3651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3652 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3656 # Test code for whether the C compiler supports C89 (global declarations)
3657 ac_c_conftest_c89_globals='
3658 /* Does the compiler advertise C89 conformance?
3659 Do not test the value of __STDC__, because some compilers set it to 0
3660 while being otherwise adequately conformant. */
3661 #if !defined __STDC__
3662 # error "Compiler does not advertise C89 conformance"
3668 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
3669 struct buf { int x; };
3670 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
3671 static char *e (p, i)
3677 static char *f (char * (*g) (char **, int), char **p, ...)
3682 s = g (p, va_arg (v,int));
3687 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3688 function prototypes and stuff, but not \xHH hex character constants.
3689 These do not provoke an error unfortunately, instead are silently treated
3690 as an "x". The following induces an error, until -std is added to get
3691 proper ANSI mode. Curiously \x00 != x always comes out true, for an
3692 array size at least. It is necessary to write \x00 == 0 to get something
3693 that is true only with -std. */
3694 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
3696 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3697 inside strings and character constants. */
3698 #define FOO(x) '\''x'\''
3699 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
3701 int test (int i, double x);
3702 struct s1 {int (*f) (int a);};
3703 struct s2 {int (*f) (double a);};
3704 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
3707 # Test code for whether the C compiler supports C89 (body of main).
3708 ac_c_conftest_c89_main='
3709 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
3712 # Test code for whether the C compiler supports C99 (global declarations)
3713 ac_c_conftest_c99_globals='
3714 // Does the compiler advertise C99 conformance?
3715 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
3716 # error "Compiler does not advertise C99 conformance"
3719 #include <stdbool.h>
3720 extern int puts (const char *);
3721 extern int printf (const char *, ...);
3722 extern int dprintf (int, const char *, ...);
3723 extern void *malloc (size_t);
3725 // Check varargs macros. These examples are taken from C99 6.10.3.5.
3726 // dprintf is used instead of fprintf to avoid needing to declare
3728 #define debug(...) dprintf (2, __VA_ARGS__)
3729 #define showlist(...) puts (#__VA_ARGS__)
3730 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3732 test_varargs_macros (void)
3737 debug ("X = %d\n", x);
3738 showlist (The first, second, and third items.);
3739 report (x>y, "x is %d but y is %d", x, y);
3742 // Check long long types.
3743 #define BIG64 18446744073709551615ull
3744 #define BIG32 4294967295ul
3745 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3747 #error "your preprocessor is broken"
3751 #error "your preprocessor is broken"
3753 static long long int bignum = -9223372036854775807LL;
3754 static unsigned long long int ubignum = BIG64;
3756 struct incomplete_array
3764 const wchar_t *name;
3768 typedef const char *ccp;
3771 test_restrict (ccp restrict text)
3773 // See if C++-style comments work.
3774 // Iterate through items via the restricted pointer.
3775 // Also check for declarations in for loops.
3776 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
3781 // Check varargs and va_copy.
3783 test_varargs (const char *format, ...)
3786 va_start (args, format);
3788 va_copy (args_copy, args);
3790 const char *str = "";
3798 case '\''s'\'': // string
3799 str = va_arg (args_copy, const char *);
3801 case '\''d'\'': // int
3802 number = va_arg (args_copy, int);
3804 case '\''f'\'': // float
3805 fnumber = va_arg (args_copy, double);
3814 return *str && number && fnumber;
3818 # Test code for whether the C compiler supports C99 (body of main).
3819 ac_c_conftest_c99_main='
3821 _Bool success = false;
3822 success |= (argc != 0);
3825 if (test_restrict ("String literal") == 0)
3827 char *restrict newvar = "Another string";
3830 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
3831 test_varargs_macros ();
3833 // Check flexible array members.
3834 struct incomplete_array *ia =
3835 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3837 for (int i = 0; i < ia->datasize; ++i)
3838 ia->data[i] = i * 1.234;
3840 // Check named initializers.
3841 struct named_init ni = {
3843 .name = L"Test wide string",
3844 .average = 543.34343,
3849 int dynamic_array[ni.number];
3850 dynamic_array[0] = argv[0][0];
3851 dynamic_array[ni.number - 1] = 543;
3853 // work around unused variable warnings
3854 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
3855 || dynamic_array[ni.number - 1] != 543);
3858 # Test code for whether the C compiler supports C11 (global declarations)
3859 ac_c_conftest_c11_globals='
3860 // Does the compiler advertise C11 conformance?
3861 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
3862 # error "Compiler does not advertise C11 conformance"
3866 char _Alignas (double) aligned_as_double;
3867 char _Alignas (0) no_special_alignment;
3868 extern char aligned_as_int;
3869 char _Alignas (0) _Alignas (int) aligned_as_int;
3874 int_alignment = _Alignof (int),
3875 int_array_alignment = _Alignof (int[100]),
3876 char_alignment = _Alignof (char)
3878 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
3881 int _Noreturn does_not_return (void) { for (;;) continue; }
3883 // Check _Static_assert.
3884 struct test_static_assert
3887 _Static_assert (sizeof (int) <= sizeof (long int),
3888 "_Static_assert does not work in struct");
3892 // Check UTF-8 literals.
3893 #define u8 syntax error!
3894 char const utf8_literal[] = u8"happens to be ASCII" "another string";
3896 // Check duplicate typedefs.
3897 typedef long *long_ptr;
3898 typedef long int *long_ptr;
3899 typedef long_ptr long_ptr;
3901 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
3905 struct { int i; int j; };
3906 struct { int k; long int l; } w;
3912 # Test code for whether the C compiler supports C11 (body of main).
3913 ac_c_conftest_c11_main='
3914 _Static_assert ((offsetof (struct anonymous, i)
3915 == offsetof (struct anonymous, w.k)),
3916 "Anonymous union alignment botch");
3922 # Test code for whether the C compiler supports C11 (complete).
3923 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3924 ${ac_c_conftest_c99_globals}
3925 ${ac_c_conftest_c11_globals}
3928 main (int argc, char **argv)
3931 ${ac_c_conftest_c89_main}
3932 ${ac_c_conftest_c99_main}
3933 ${ac_c_conftest_c11_main}
3938 # Test code for whether the C compiler supports C99 (complete).
3939 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3940 ${ac_c_conftest_c99_globals}
3943 main (int argc, char **argv)
3946 ${ac_c_conftest_c89_main}
3947 ${ac_c_conftest_c99_main}
3952 # Test code for whether the C compiler supports C89 (complete).
3953 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3956 main (int argc, char **argv)
3959 ${ac_c_conftest_c89_main}
3964 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
3965 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3966 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3967 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3968 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3969 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3970 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3971 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3972 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3973 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3974 as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
3975 as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
3976 as_fn_append ac_func_c_list " readlinkat HAVE_READLINKAT"
3977 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
3978 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
3979 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
3980 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
3981 as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
3982 as_fn_append ac_header_c_list " fnmatch.h fnmatch_h HAVE_FNMATCH_H"
3983 as_fn_append ac_func_c_list " fnmatch HAVE_FNMATCH"
3984 as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS"
3985 gl_fnmatch_required=GNU
3986 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
3987 gl_getopt_required=GNU
3988 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
3989 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
3990 as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
3991 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
3992 as_fn_append ac_func_c_list " getrandom HAVE_GETRANDOM"
3993 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
3994 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
3995 as_fn_append ac_header_c_list " threads.h threads_h HAVE_THREADS_H"
3996 as_fn_append ac_header_c_list " iconv.h iconv_h HAVE_ICONV_H"
3997 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
3998 as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
3999 as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
4000 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
4001 as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
4002 as_fn_append ac_func_c_list " iswblank HAVE_ISWBLANK"
4003 as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
4004 as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
4005 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
4006 as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
4007 as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
4008 as_fn_append ac_func_c_list " mbslen HAVE_MBSLEN"
4009 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
4010 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
4011 as_fn_append ac_func_c_list " mkstemp HAVE_MKSTEMP"
4012 as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
4013 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
4014 as_fn_append ac_func_c_list " readlink HAVE_READLINK"
4015 as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
4016 as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
4017 as_fn_append ac_func_c_list " setenv HAVE_SETENV"
4018 as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
4019 as_fn_append ac_func_c_list " setrlimit HAVE_SETRLIMIT"
4020 as_fn_append ac_func_c_list " getrlimit HAVE_GETRLIMIT"
4021 as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
4022 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
4023 as_fn_append ac_func_c_list " strptime HAVE_STRPTIME"
4024 as_fn_append ac_func_c_list " strtoimax HAVE_STRTOIMAX"
4025 as_fn_append ac_header_c_list " sys/random.h sys_random_h HAVE_SYS_RANDOM_H"
4026 as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
4027 as_fn_append ac_func_c_list " localtime_r HAVE_LOCALTIME_R"
4028 as_fn_append ac_func_c_list " timegm HAVE_TIMEGM"
4029 as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
4030 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
4031 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
4032 as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
4033 as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH"
4034 as_fn_append ac_func_c_list " wmempcpy HAVE_WMEMPCPY"
4035 as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
4036 as_fn_append ac_func_c_list " ftruncate HAVE_FTRUNCATE"
4037 as_fn_append ac_func_c_list " duplocale HAVE_DUPLOCALE"
4038 as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
4039 as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
4040 as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE"
4041 as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
4042 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
4043 as_fn_append ac_header_c_list " pthread.h pthread_h HAVE_PTHREAD_H"
4044 as_fn_append ac_func_c_list " pthread_sigmask HAVE_PTHREAD_SIGMASK"
4045 as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
4046 as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
4047 as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
4048 as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
4049 as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
4050 as_fn_append ac_func_c_list " shutdown HAVE_SHUTDOWN"
4051 as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
4052 as_fn_append ac_func_c_list " wctob HAVE_WCTOB"
4053 as_fn_append ac_func_c_list " sigprocmask HAVE_SIGPROCMASK"
4054 as_fn_append ac_func_c_list " strcasecoll HAVE_STRCASECOLL"
4055 as_fn_append ac_func_c_list " stricoll HAVE_STRICOLL"
4056 as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
4057 as_fn_append ac_func_c_list " fork HAVE_FORK"
4058 as_fn_append ac_func_c_list " vfork HAVE_VFORK"
4059 gt_needs="$gt_needs need-ngettext"
4061 # Auxiliary files required by this configure script.
4062 ac_aux_files="config.rpath config.guess config.sub compile missing install-sh"
4064 # Locations in which to look for auxiliary files.
4065 ac_aux_dir_candidates="${srcdir}/build-aux"
4067 # Search for a directory containing all of the required auxiliary files,
4068 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
4069 # If we don't find one directory that contains all the files we need,
4070 # we report the set of missing files from the *first* directory in
4071 # $ac_aux_dir_candidates and give up.
4072 ac_missing_aux_files=""
4073 ac_first_candidate=:
4074 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
4075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4077 for as_dir in $ac_aux_dir_candidates
4080 case $as_dir in #(((
4083 *) as_dir=$as_dir/ ;;
4087 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
4088 ac_aux_dir_found=yes
4090 for ac_aux in $ac_aux_files
4092 # As a special case, if "install-sh" is required, that requirement
4093 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
4094 # and $ac_install_sh is set appropriately for whichever one is found.
4095 if test x"$ac_aux" = x"install-sh"
4097 if test -f "${as_dir}install-sh"; then
4098 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
4099 ac_install_sh="${as_dir}install-sh -c"
4100 elif test -f "${as_dir}install.sh"; then
4101 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
4102 ac_install_sh="${as_dir}install.sh -c"
4103 elif test -f "${as_dir}shtool"; then
4104 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
4105 ac_install_sh="${as_dir}shtool install -c"
4108 if $ac_first_candidate; then
4109 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
4115 if test -f "${as_dir}${ac_aux}"; then
4116 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
4119 if $ac_first_candidate; then
4120 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
4127 if test "$ac_aux_dir_found" = yes; then
4128 ac_aux_dir="$as_dir"
4131 ac_first_candidate=false
4140 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
4144 # These three variables are undocumented and unsupported,
4145 # and are intended to be withdrawn in a future Autoconf release.
4146 # They can cause serious problems if a builder's source tree is in a directory
4147 # whose full name contains unusual characters.
4148 if test -f "${ac_aux_dir}config.guess"; then
4149 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
4151 if test -f "${ac_aux_dir}config.sub"; then
4152 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
4154 if test -f "$ac_aux_dir/configure"; then
4155 ac_configure="$SHELL ${ac_aux_dir}configure"
4158 # Check that the precious variables saved in the cache have kept the same
4160 ac_cache_corrupted=false
4161 for ac_var in $ac_precious_vars; do
4162 eval ac_old_set=\$ac_cv_env_${ac_var}_set
4163 eval ac_new_set=\$ac_env_${ac_var}_set
4164 eval ac_old_val=\$ac_cv_env_${ac_var}_value
4165 eval ac_new_val=\$ac_env_${ac_var}_value
4166 case $ac_old_set,$ac_new_set in
4168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
4169 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
4170 ac_cache_corrupted=: ;;
4172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
4173 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
4174 ac_cache_corrupted=: ;;
4177 if test "x$ac_old_val" != "x$ac_new_val"; then
4178 # differences in whitespace do not lead to failure.
4179 ac_old_val_w=`echo x $ac_old_val`
4180 ac_new_val_w=`echo x $ac_new_val`
4181 if test "$ac_old_val_w" != "$ac_new_val_w"; then
4182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
4183 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
4184 ac_cache_corrupted=:
4186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
4187 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
4188 eval $ac_var=\$ac_old_val
4190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
4191 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
4192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
4193 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
4196 # Pass precious variables to config.status.
4197 if test "$ac_new_set" = set; then
4199 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
4200 *) ac_arg=$ac_var=$ac_new_val ;;
4202 case " $ac_configure_args " in
4203 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
4204 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
4208 if $ac_cache_corrupted; then
4209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4210 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
4212 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
4213 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
4214 and start over" "$LINENO" 5
4216 ## -------------------- ##
4217 ## Main body of script. ##
4218 ## -------------------- ##
4221 ac_cpp='$CPP $CPPFLAGS'
4222 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4223 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4224 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4232 am__api_version='1.16'
4236 # Find a good install program. We prefer a C program (faster),
4237 # so one script is as good as another. But avoid the broken or
4238 # incompatible versions:
4239 # SysV /etc/install, /usr/sbin/install
4240 # SunOS /usr/etc/install
4241 # IRIX /sbin/install
4243 # AmigaOS /C/install, which installs bootblocks on floppy discs
4244 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4245 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4246 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4247 # OS/2's system install, which has a completely different semantic
4248 # ./install, which can be erroneously created by make from ./install.sh.
4249 # Reject install programs that cannot install multiple files.
4250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4251 printf %s "checking for a BSD-compatible install... " >&6; }
4252 if test -z "$INSTALL"; then
4253 if test ${ac_cv_path_install+y}
4255 printf %s "(cached) " >&6
4257 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4261 case $as_dir in #(((
4264 *) as_dir=$as_dir/ ;;
4266 # Account for fact that we put trailing slashes in our PATH walk.
4269 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4270 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4273 # OSF1 and SCO ODT 3.0 have their own names for install.
4274 # Don't use installbsd from OSF since it installs stuff as root
4276 for ac_prog in ginstall scoinst install; do
4277 for ac_exec_ext in '' $ac_executable_extensions; do
4278 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
4279 if test $ac_prog = install &&
4280 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4281 # AIX install. It has an incompatible calling convention.
4283 elif test $ac_prog = install &&
4284 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4285 # program-specific install script used by HP pwplus--don't use.
4288 rm -rf conftest.one conftest.two conftest.dir
4289 echo one > conftest.one
4290 echo two > conftest.two
4292 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
4293 test -s conftest.one && test -s conftest.two &&
4294 test -s conftest.dir/conftest.one &&
4295 test -s conftest.dir/conftest.two
4297 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
4310 rm -rf conftest.one conftest.two conftest.dir
4313 if test ${ac_cv_path_install+y}; then
4314 INSTALL=$ac_cv_path_install
4316 # As a last resort, use the slow shell script. Don't cache a
4317 # value for INSTALL within a source directory, because that will
4318 # break other packages using the cache if that directory is
4319 # removed, or if the value is a relative name.
4320 INSTALL=$ac_install_sh
4323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4324 printf "%s\n" "$INSTALL" >&6; }
4326 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4327 # It thinks the first close brace ends the variable substitution.
4328 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4330 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4332 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
4335 printf %s "checking whether build environment is sane... " >&6; }
4336 # Reject unsafe characters in $srcdir or the absolute working directory
4337 # name. Accept space and tab only in the latter.
4341 *[\\\"\#\$\&\'\`$am_lf]*)
4342 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4345 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
4346 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4349 # Do 'set' in a subshell so we don't clobber the current shell's
4350 # arguments. Must try -L first in case configure is actually a
4351 # symlink; some systems play weird games with the mod time of symlinks
4352 # (eg FreeBSD returns the mod time of the symlink's containing
4356 for am_try in 1 2; do
4357 echo "timestamp, slept: $am_has_slept" > conftest.file
4358 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4359 if test "$*" = "X"; then
4361 set X `ls -t "$srcdir/configure" conftest.file`
4363 if test "$*" != "X $srcdir/configure conftest.file" \
4364 && test "$*" != "X conftest.file $srcdir/configure"; then
4366 # If neither matched, then we have a broken ls. This can happen
4367 # if, for instance, CONFIG_SHELL is bash and it inherits a
4368 # broken ls alias from the environment. This has actually
4369 # happened. Such a system could not be considered "sane".
4370 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
4371 alias in your environment" "$LINENO" 5
4373 if test "$2" = conftest.file || test $am_try -eq 2; then
4380 test "$2" = conftest.file
4386 as_fn_error $? "newly created file is older than distributed files!
4387 Check your system clock" "$LINENO" 5
4389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4390 printf "%s\n" "yes" >&6; }
4391 # If we didn't sleep, we still need to ensure time stamps of config.status and
4392 # generated files are strictly newer.
4394 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4401 test "$program_prefix" != NONE &&
4402 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4403 # Use a double $ so make ignores it.
4404 test "$program_suffix" != NONE &&
4405 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4406 # Double any \ or $.
4407 # By default was `s,x,x', remove it if useless.
4408 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4409 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
4412 # Expand $ac_aux_dir to an absolute path.
4413 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4416 if test x"${MISSING+set}" != xset; then
4417 MISSING="\${SHELL} '$am_aux_dir/missing'"
4419 # Use eval to expand $SHELL
4420 if eval "$MISSING --is-lightweight"; then
4421 am_missing_run="$MISSING "
4424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4425 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4428 if test x"${install_sh+set}" != xset; then
4431 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4433 install_sh="\${SHELL} $am_aux_dir/install-sh"
4437 # Installed binaries are usually stripped using 'strip' when the user
4438 # run "make install-strip". However 'strip' might not be the right
4439 # tool to use in cross-compilation environments, therefore Automake
4440 # will honor the 'STRIP' environment variable to overrule this program.
4441 if test "$cross_compiling" != no; then
4442 if test -n "$ac_tool_prefix"; then
4443 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4444 set dummy ${ac_tool_prefix}strip; ac_word=$2
4445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446 printf %s "checking for $ac_word... " >&6; }
4447 if test ${ac_cv_prog_STRIP+y}
4449 printf %s "(cached) " >&6
4451 if test -n "$STRIP"; then
4452 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4458 case $as_dir in #(((
4461 *) as_dir=$as_dir/ ;;
4463 for ac_exec_ext in '' $ac_executable_extensions; do
4464 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4465 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4466 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4475 STRIP=$ac_cv_prog_STRIP
4476 if test -n "$STRIP"; then
4477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4478 printf "%s\n" "$STRIP" >&6; }
4480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4481 printf "%s\n" "no" >&6; }
4486 if test -z "$ac_cv_prog_STRIP"; then
4488 # Extract the first word of "strip", so it can be a program name with args.
4489 set dummy strip; ac_word=$2
4490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4491 printf %s "checking for $ac_word... " >&6; }
4492 if test ${ac_cv_prog_ac_ct_STRIP+y}
4494 printf %s "(cached) " >&6
4496 if test -n "$ac_ct_STRIP"; then
4497 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4503 case $as_dir in #(((
4506 *) as_dir=$as_dir/ ;;
4508 for ac_exec_ext in '' $ac_executable_extensions; do
4509 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4510 ac_cv_prog_ac_ct_STRIP="strip"
4511 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4520 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4521 if test -n "$ac_ct_STRIP"; then
4522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4523 printf "%s\n" "$ac_ct_STRIP" >&6; }
4525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4526 printf "%s\n" "no" >&6; }
4529 if test "x$ac_ct_STRIP" = x; then
4532 case $cross_compiling:$ac_tool_warned in
4534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4535 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4536 ac_tool_warned=yes ;;
4541 STRIP="$ac_cv_prog_STRIP"
4545 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
4549 printf %s "checking for a race-free mkdir -p... " >&6; }
4550 if test -z "$MKDIR_P"; then
4551 if test ${ac_cv_path_mkdir+y}
4553 printf %s "(cached) " >&6
4555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4556 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4559 case $as_dir in #(((
4562 *) as_dir=$as_dir/ ;;
4564 for ac_prog in mkdir gmkdir; do
4565 for ac_exec_ext in '' $ac_executable_extensions; do
4566 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
4567 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
4568 'mkdir ('*'coreutils) '* | \
4570 'mkdir (fileutils) '4.1*)
4571 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
4581 test -d ./--version && rmdir ./--version
4582 if test ${ac_cv_path_mkdir+y}; then
4583 MKDIR_P="$ac_cv_path_mkdir -p"
4585 # As a last resort, use the slow shell script. Don't cache a
4586 # value for MKDIR_P within a source directory, because that will
4587 # break other packages using the cache if that directory is
4588 # removed, or if the value is a relative name.
4589 MKDIR_P="$ac_install_sh -d"
4592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4593 printf "%s\n" "$MKDIR_P" >&6; }
4595 for ac_prog in gawk mawk nawk awk
4597 # Extract the first word of "$ac_prog", so it can be a program name with args.
4598 set dummy $ac_prog; ac_word=$2
4599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4600 printf %s "checking for $ac_word... " >&6; }
4601 if test ${ac_cv_prog_AWK+y}
4603 printf %s "(cached) " >&6
4605 if test -n "$AWK"; then
4606 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4608 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4612 case $as_dir in #(((
4615 *) as_dir=$as_dir/ ;;
4617 for ac_exec_ext in '' $ac_executable_extensions; do
4618 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4619 ac_cv_prog_AWK="$ac_prog"
4620 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4630 if test -n "$AWK"; then
4631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4632 printf "%s\n" "$AWK" >&6; }
4634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4635 printf "%s\n" "no" >&6; }
4639 test -n "$AWK" && break
4642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4643 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4645 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4646 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
4648 printf %s "(cached) " >&6
4650 cat >conftest.make <<\_ACEOF
4653 @echo '@@@%%%=$(MAKE)=@@@%%%'
4655 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4656 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4658 eval ac_cv_prog_make_${ac_make}_set=yes;;
4660 eval ac_cv_prog_make_${ac_make}_set=no;;
4664 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4666 printf "%s\n" "yes" >&6; }
4669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4670 printf "%s\n" "no" >&6; }
4671 SET_MAKE="MAKE=${MAKE-make}"
4674 rm -rf .tst 2>/dev/null
4675 mkdir .tst 2>/dev/null
4676 if test -d .tst; then
4681 rmdir .tst 2>/dev/null
4683 # Check whether --enable-silent-rules was given.
4684 if test ${enable_silent_rules+y}
4686 enableval=$enable_silent_rules;
4689 case $enable_silent_rules in # (((
4690 yes) AM_DEFAULT_VERBOSITY=0;;
4691 no) AM_DEFAULT_VERBOSITY=1;;
4692 *) AM_DEFAULT_VERBOSITY=1;;
4694 am_make=${MAKE-make}
4695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4696 printf %s "checking whether $am_make supports nested variables... " >&6; }
4697 if test ${am_cv_make_support_nested_variables+y}
4699 printf %s "(cached) " >&6
4701 if printf "%s\n" 'TRUE=$(BAR$(V))
4707 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4708 am_cv_make_support_nested_variables=yes
4710 am_cv_make_support_nested_variables=no
4713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4714 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4715 if test $am_cv_make_support_nested_variables = yes; then
4717 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4719 AM_V=$AM_DEFAULT_VERBOSITY
4720 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4724 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4725 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4726 # is not polluted with repeated "-I."
4727 am__isrc=' -I$(srcdir)'
4728 # test to see if srcdir already configured
4729 if test -f $srcdir/config.status; then
4730 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4734 # test whether we have cygpath
4735 if test -z "$CYGPATH_W"; then
4736 if (cygpath --version) >/dev/null 2>/dev/null; then
4737 CYGPATH_W='cygpath -w'
4744 # Define the identity of the package.
4749 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
4752 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
4754 # Some tools Automake needs.
4756 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4759 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4762 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4765 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4768 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4770 # For better backward compatibility. To be removed once Automake 1.9.x
4771 # dies out for good. For more background, see:
4772 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4773 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4774 mkdir_p='$(MKDIR_P)'
4776 # We need awk for the "check" target (and possibly the TAP driver). The
4777 # system "awk" is bad on some platforms.
4778 # Always define AMTAR for backward compatibility. Yes, it's still used
4779 # in the wild :-( We should find a proper way to deprecate it ...
4783 # We'll loop over all known methods to create a tar archive until one works.
4784 _am_tools='gnutar pax cpio none'
4786 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4792 # Variables for tags utilities; see am/tags.am
4793 if test -z "$CTAGS"; then
4797 if test -z "$ETAGS"; then
4801 if test -z "$CSCOPE"; then
4807 # POSIX will say in a future version that running "rm -f" with no argument
4808 # is OK; and we want to be able to make that assumption in our Makefile
4809 # recipes. So use an aggressive probe to check that the usage we want is
4810 # actually supported "in the wild" to an acceptable degree.
4811 # See automake bug#10828.
4812 # To make any issue more visible, cause the running configure to be aborted
4813 # by default if the 'rm' program in use doesn't match our expectations; the
4814 # user can still override this though.
4815 if rm -f && rm -fr && rm -rf; then : OK; else
4819 Your 'rm' program seems unable to run without file operands specified
4820 on the command line, even when the '-f' option is present. This is contrary
4821 to the behaviour of most rm programs out there, and not conforming with
4822 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4824 Please tell bug-automake@gnu.org about your system, including the value
4825 of your $PATH and any error possibly output before this message. This
4826 can help us improve future automake versions.
4829 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4830 echo 'Configuration will proceed anyway, since you have set the' >&2
4831 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4835 Aborting the configuration process, to ensure you take notice of the issue.
4837 You can download and install GNU coreutils to get an 'rm' implementation
4838 that behaves properly: <https://www.gnu.org/software/coreutils/>.
4840 If you want to complete the configuration process using your problematic
4841 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4842 to "yes", and re-run configure.
4845 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4849 # Check whether --enable-silent-rules was given.
4850 if test ${enable_silent_rules+y}
4852 enableval=$enable_silent_rules;
4855 case $enable_silent_rules in # (((
4856 yes) AM_DEFAULT_VERBOSITY=0;;
4857 no) AM_DEFAULT_VERBOSITY=1;;
4858 *) AM_DEFAULT_VERBOSITY=0;;
4860 am_make=${MAKE-make}
4861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4862 printf %s "checking whether $am_make supports nested variables... " >&6; }
4863 if test ${am_cv_make_support_nested_variables+y}
4865 printf %s "(cached) " >&6
4867 if printf "%s\n" 'TRUE=$(BAR$(V))
4873 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4874 am_cv_make_support_nested_variables=yes
4876 am_cv_make_support_nested_variables=no
4879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4880 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4881 if test $am_cv_make_support_nested_variables = yes; then
4883 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4885 AM_V=$AM_DEFAULT_VERBOSITY
4886 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4889 # make --enable-silent-rules the default.
4891 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
4894 for ac_prog in gawk mawk nawk awk
4896 # Extract the first word of "$ac_prog", so it can be a program name with args.
4897 set dummy $ac_prog; ac_word=$2
4898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4899 printf %s "checking for $ac_word... " >&6; }
4900 if test ${ac_cv_prog_AWK+y}
4902 printf %s "(cached) " >&6
4904 if test -n "$AWK"; then
4905 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4911 case $as_dir in #(((
4914 *) as_dir=$as_dir/ ;;
4916 for ac_exec_ext in '' $ac_executable_extensions; do
4917 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4918 ac_cv_prog_AWK="$ac_prog"
4919 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4929 if test -n "$AWK"; then
4930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4931 printf "%s\n" "$AWK" >&6; }
4933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4934 printf "%s\n" "no" >&6; }
4938 test -n "$AWK" && break
4951 ac_cpp='$CPP $CPPFLAGS'
4952 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4953 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4954 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4955 if test -n "$ac_tool_prefix"; then
4956 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4957 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4959 printf %s "checking for $ac_word... " >&6; }
4960 if test ${ac_cv_prog_CC+y}
4962 printf %s "(cached) " >&6
4964 if test -n "$CC"; then
4965 ac_cv_prog_CC="$CC" # Let the user override the test.
4967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971 case $as_dir in #(((
4974 *) as_dir=$as_dir/ ;;
4976 for ac_exec_ext in '' $ac_executable_extensions; do
4977 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4978 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4979 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4989 if test -n "$CC"; then
4990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4991 printf "%s\n" "$CC" >&6; }
4993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994 printf "%s\n" "no" >&6; }
4999 if test -z "$ac_cv_prog_CC"; then
5001 # Extract the first word of "gcc", so it can be a program name with args.
5002 set dummy gcc; ac_word=$2
5003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004 printf %s "checking for $ac_word... " >&6; }
5005 if test ${ac_cv_prog_ac_ct_CC+y}
5007 printf %s "(cached) " >&6
5009 if test -n "$ac_ct_CC"; then
5010 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016 case $as_dir in #(((
5019 *) as_dir=$as_dir/ ;;
5021 for ac_exec_ext in '' $ac_executable_extensions; do
5022 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5023 ac_cv_prog_ac_ct_CC="gcc"
5024 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5033 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5034 if test -n "$ac_ct_CC"; then
5035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5036 printf "%s\n" "$ac_ct_CC" >&6; }
5038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039 printf "%s\n" "no" >&6; }
5042 if test "x$ac_ct_CC" = x; then
5045 case $cross_compiling:$ac_tool_warned in
5047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5048 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5049 ac_tool_warned=yes ;;
5057 if test -z "$CC"; then
5058 if test -n "$ac_tool_prefix"; then
5059 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5060 set dummy ${ac_tool_prefix}cc; ac_word=$2
5061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062 printf %s "checking for $ac_word... " >&6; }
5063 if test ${ac_cv_prog_CC+y}
5065 printf %s "(cached) " >&6
5067 if test -n "$CC"; then
5068 ac_cv_prog_CC="$CC" # Let the user override the test.
5070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074 case $as_dir in #(((
5077 *) as_dir=$as_dir/ ;;
5079 for ac_exec_ext in '' $ac_executable_extensions; do
5080 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5081 ac_cv_prog_CC="${ac_tool_prefix}cc"
5082 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5092 if test -n "$CC"; then
5093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5094 printf "%s\n" "$CC" >&6; }
5096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5097 printf "%s\n" "no" >&6; }
5103 if test -z "$CC"; then
5104 # Extract the first word of "cc", so it can be a program name with args.
5105 set dummy cc; ac_word=$2
5106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5107 printf %s "checking for $ac_word... " >&6; }
5108 if test ${ac_cv_prog_CC+y}
5110 printf %s "(cached) " >&6
5112 if test -n "$CC"; then
5113 ac_cv_prog_CC="$CC" # Let the user override the test.
5116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5120 case $as_dir in #(((
5123 *) as_dir=$as_dir/ ;;
5125 for ac_exec_ext in '' $ac_executable_extensions; do
5126 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5127 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5128 ac_prog_rejected=yes
5132 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5139 if test $ac_prog_rejected = yes; then
5140 # We found a bogon in the path, so make sure we never use it.
5141 set dummy $ac_cv_prog_CC
5143 if test $# != 0; then
5144 # We chose a different compiler from the bogus one.
5145 # However, it has the same basename, so the bogon will be chosen
5146 # first if we set CC to just the basename; use the full file name.
5148 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5154 if test -n "$CC"; then
5155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5156 printf "%s\n" "$CC" >&6; }
5158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5159 printf "%s\n" "no" >&6; }
5164 if test -z "$CC"; then
5165 if test -n "$ac_tool_prefix"; then
5166 for ac_prog in cl.exe
5168 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5169 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5171 printf %s "checking for $ac_word... " >&6; }
5172 if test ${ac_cv_prog_CC+y}
5174 printf %s "(cached) " >&6
5176 if test -n "$CC"; then
5177 ac_cv_prog_CC="$CC" # Let the user override the test.
5179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5183 case $as_dir in #(((
5186 *) as_dir=$as_dir/ ;;
5188 for ac_exec_ext in '' $ac_executable_extensions; do
5189 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5190 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5191 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5201 if test -n "$CC"; then
5202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5203 printf "%s\n" "$CC" >&6; }
5205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5206 printf "%s\n" "no" >&6; }
5210 test -n "$CC" && break
5213 if test -z "$CC"; then
5215 for ac_prog in cl.exe
5217 # Extract the first word of "$ac_prog", so it can be a program name with args.
5218 set dummy $ac_prog; ac_word=$2
5219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5220 printf %s "checking for $ac_word... " >&6; }
5221 if test ${ac_cv_prog_ac_ct_CC+y}
5223 printf %s "(cached) " >&6
5225 if test -n "$ac_ct_CC"; then
5226 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5232 case $as_dir in #(((
5235 *) as_dir=$as_dir/ ;;
5237 for ac_exec_ext in '' $ac_executable_extensions; do
5238 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5239 ac_cv_prog_ac_ct_CC="$ac_prog"
5240 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5249 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5250 if test -n "$ac_ct_CC"; then
5251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5252 printf "%s\n" "$ac_ct_CC" >&6; }
5254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5255 printf "%s\n" "no" >&6; }
5259 test -n "$ac_ct_CC" && break
5262 if test "x$ac_ct_CC" = x; then
5265 case $cross_compiling:$ac_tool_warned in
5267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5268 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5269 ac_tool_warned=yes ;;
5276 if test -z "$CC"; then
5277 if test -n "$ac_tool_prefix"; then
5278 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5279 set dummy ${ac_tool_prefix}clang; ac_word=$2
5280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281 printf %s "checking for $ac_word... " >&6; }
5282 if test ${ac_cv_prog_CC+y}
5284 printf %s "(cached) " >&6
5286 if test -n "$CC"; then
5287 ac_cv_prog_CC="$CC" # Let the user override the test.
5289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5293 case $as_dir in #(((
5296 *) as_dir=$as_dir/ ;;
5298 for ac_exec_ext in '' $ac_executable_extensions; do
5299 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5300 ac_cv_prog_CC="${ac_tool_prefix}clang"
5301 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5311 if test -n "$CC"; then
5312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5313 printf "%s\n" "$CC" >&6; }
5315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5316 printf "%s\n" "no" >&6; }
5321 if test -z "$ac_cv_prog_CC"; then
5323 # Extract the first word of "clang", so it can be a program name with args.
5324 set dummy clang; ac_word=$2
5325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5326 printf %s "checking for $ac_word... " >&6; }
5327 if test ${ac_cv_prog_ac_ct_CC+y}
5329 printf %s "(cached) " >&6
5331 if test -n "$ac_ct_CC"; then
5332 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5338 case $as_dir in #(((
5341 *) as_dir=$as_dir/ ;;
5343 for ac_exec_ext in '' $ac_executable_extensions; do
5344 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5345 ac_cv_prog_ac_ct_CC="clang"
5346 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5355 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5356 if test -n "$ac_ct_CC"; then
5357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5358 printf "%s\n" "$ac_ct_CC" >&6; }
5360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5361 printf "%s\n" "no" >&6; }
5364 if test "x$ac_ct_CC" = x; then
5367 case $cross_compiling:$ac_tool_warned in
5369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5370 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5371 ac_tool_warned=yes ;;
5382 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5383 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5384 as_fn_error $? "no acceptable C compiler found in \$PATH
5385 See \`config.log' for more details" "$LINENO" 5; }
5387 # Provide some information about the compiler.
5388 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5391 for ac_option in --version -v -V -qversion -version; do
5392 { { ac_try="$ac_compiler $ac_option >&5"
5394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5395 *) ac_try_echo=$ac_try;;
5397 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5398 printf "%s\n" "$ac_try_echo"; } >&5
5399 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5401 if test -s conftest.err; then
5403 ... rest of stderr output deleted ...
5404 10q' conftest.err >conftest.er1
5405 cat conftest.er1 >&5
5407 rm -f conftest.er1 conftest.err
5408 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5409 test $ac_status = 0; }
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5413 /* end confdefs.h. */
5423 ac_clean_files_save=$ac_clean_files
5424 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5425 # Try to create an executable without -o first, disregard a.out.
5426 # It will help us diagnose broken compilers, and finding out an intuition
5428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5429 printf %s "checking whether the C compiler works... " >&6; }
5430 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5432 # The possible output files:
5433 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5436 for ac_file in $ac_files
5439 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5440 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5445 if { { ac_try="$ac_link_default"
5447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5448 *) ac_try_echo=$ac_try;;
5450 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5451 printf "%s\n" "$ac_try_echo"; } >&5
5452 (eval "$ac_link_default") 2>&5
5454 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5455 test $ac_status = 0; }
5457 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5458 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5459 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5460 # so that the user can short-circuit this test for compilers unknown to
5462 for ac_file in $ac_files ''
5464 test -f "$ac_file" || continue
5466 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5469 # We found the default executable, but exeext='' is most
5473 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
5475 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5477 # We set ac_cv_exeext here because the later test for it is not
5478 # safe: cross compilers may not add the suffix if given an `-o'
5479 # argument, so we may need to know it at that point already.
5480 # Even if this section looks crufty: it has the advantage of
5487 test "$ac_cv_exeext" = no && ac_cv_exeext=
5492 if test -z "$ac_file"
5494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5495 printf "%s\n" "no" >&6; }
5496 printf "%s\n" "$as_me: failed program was:" >&5
5497 sed 's/^/| /' conftest.$ac_ext >&5
5499 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5500 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5501 as_fn_error 77 "C compiler cannot create executables
5502 See \`config.log' for more details" "$LINENO" 5; }
5504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5505 printf "%s\n" "yes" >&6; }
5507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5508 printf %s "checking for C compiler default output file name... " >&6; }
5509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5510 printf "%s\n" "$ac_file" >&6; }
5511 ac_exeext=$ac_cv_exeext
5513 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5514 ac_clean_files=$ac_clean_files_save
5515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5516 printf %s "checking for suffix of executables... " >&6; }
5517 if { { ac_try="$ac_link"
5519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5520 *) ac_try_echo=$ac_try;;
5522 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5523 printf "%s\n" "$ac_try_echo"; } >&5
5524 (eval "$ac_link") 2>&5
5526 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5527 test $ac_status = 0; }
5529 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5530 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5531 # work properly (i.e., refer to `conftest.exe'), while it won't with
5533 for ac_file in conftest.exe conftest conftest.*; do
5534 test -f "$ac_file" || continue
5536 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5537 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5543 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5544 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5545 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5546 See \`config.log' for more details" "$LINENO" 5; }
5548 rm -f conftest conftest$ac_cv_exeext
5549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5550 printf "%s\n" "$ac_cv_exeext" >&6; }
5552 rm -f conftest.$ac_ext
5553 EXEEXT=$ac_cv_exeext
5555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5556 /* end confdefs.h. */
5561 FILE *f = fopen ("conftest.out", "w");
5562 return ferror (f) || fclose (f) != 0;
5568 ac_clean_files="$ac_clean_files conftest.out"
5569 # Check that the compiler produces executables we can run. If not, either
5570 # the compiler is broken, or we cross compile.
5571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5572 printf %s "checking whether we are cross compiling... " >&6; }
5573 if test "$cross_compiling" != yes; then
5574 { { ac_try="$ac_link"
5576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5577 *) ac_try_echo=$ac_try;;
5579 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5580 printf "%s\n" "$ac_try_echo"; } >&5
5581 (eval "$ac_link") 2>&5
5583 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5584 test $ac_status = 0; }
5585 if { ac_try='./conftest$ac_cv_exeext'
5586 { { case "(($ac_try" in
5587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5588 *) ac_try_echo=$ac_try;;
5590 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5591 printf "%s\n" "$ac_try_echo"; } >&5
5592 (eval "$ac_try") 2>&5
5594 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5595 test $ac_status = 0; }; }; then
5598 if test "$cross_compiling" = maybe; then
5601 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5602 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5603 as_fn_error 77 "cannot run C compiled programs.
5604 If you meant to cross compile, use \`--host'.
5605 See \`config.log' for more details" "$LINENO" 5; }
5609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5610 printf "%s\n" "$cross_compiling" >&6; }
5612 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5613 ac_clean_files=$ac_clean_files_save
5614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5615 printf %s "checking for suffix of object files... " >&6; }
5616 if test ${ac_cv_objext+y}
5618 printf %s "(cached) " >&6
5620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5621 /* end confdefs.h. */
5631 rm -f conftest.o conftest.obj
5632 if { { ac_try="$ac_compile"
5634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5635 *) ac_try_echo=$ac_try;;
5637 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5638 printf "%s\n" "$ac_try_echo"; } >&5
5639 (eval "$ac_compile") 2>&5
5641 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5642 test $ac_status = 0; }
5644 for ac_file in conftest.o conftest.obj conftest.*; do
5645 test -f "$ac_file" || continue;
5647 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5648 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5653 printf "%s\n" "$as_me: failed program was:" >&5
5654 sed 's/^/| /' conftest.$ac_ext >&5
5656 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5657 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5658 as_fn_error $? "cannot compute suffix of object files: cannot compile
5659 See \`config.log' for more details" "$LINENO" 5; }
5661 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5664 printf "%s\n" "$ac_cv_objext" >&6; }
5665 OBJEXT=$ac_cv_objext
5667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5668 printf %s "checking whether the compiler supports GNU C... " >&6; }
5669 if test ${ac_cv_c_compiler_gnu+y}
5671 printf %s "(cached) " >&6
5673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5674 /* end confdefs.h. */
5687 if ac_fn_c_try_compile "$LINENO"
5693 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5694 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5698 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5699 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5701 if test $ac_compiler_gnu = yes; then
5706 ac_test_CFLAGS=${CFLAGS+y}
5707 ac_save_CFLAGS=$CFLAGS
5708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5709 printf %s "checking whether $CC accepts -g... " >&6; }
5710 if test ${ac_cv_prog_cc_g+y}
5712 printf %s "(cached) " >&6
5714 ac_save_c_werror_flag=$ac_c_werror_flag
5715 ac_c_werror_flag=yes
5718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5719 /* end confdefs.h. */
5729 if ac_fn_c_try_compile "$LINENO"
5734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5735 /* end confdefs.h. */
5745 if ac_fn_c_try_compile "$LINENO"
5749 ac_c_werror_flag=$ac_save_c_werror_flag
5751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5752 /* end confdefs.h. */
5762 if ac_fn_c_try_compile "$LINENO"
5766 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5768 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5770 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5771 ac_c_werror_flag=$ac_save_c_werror_flag
5773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5774 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5775 if test $ac_test_CFLAGS; then
5776 CFLAGS=$ac_save_CFLAGS
5777 elif test $ac_cv_prog_cc_g = yes; then
5778 if test "$GCC" = yes; then
5784 if test "$GCC" = yes; then
5791 if test x$ac_prog_cc_stdc = xno
5793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5794 printf %s "checking for $CC option to enable C11 features... " >&6; }
5795 if test ${ac_cv_prog_cc_c11+y}
5797 printf %s "(cached) " >&6
5799 ac_cv_prog_cc_c11=no
5801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5802 /* end confdefs.h. */
5803 $ac_c_conftest_c11_program
5805 for ac_arg in '' -std=gnu11
5807 CC="$ac_save_CC $ac_arg"
5808 if ac_fn_c_try_compile "$LINENO"
5810 ac_cv_prog_cc_c11=$ac_arg
5812 rm -f core conftest.err conftest.$ac_objext conftest.beam
5813 test "x$ac_cv_prog_cc_c11" != "xno" && break
5815 rm -f conftest.$ac_ext
5819 if test "x$ac_cv_prog_cc_c11" = xno
5821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5822 printf "%s\n" "unsupported" >&6; }
5824 if test "x$ac_cv_prog_cc_c11" = x
5826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5827 printf "%s\n" "none needed" >&6; }
5829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5830 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5831 CC="$CC $ac_cv_prog_cc_c11"
5833 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5837 if test x$ac_prog_cc_stdc = xno
5839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5840 printf %s "checking for $CC option to enable C99 features... " >&6; }
5841 if test ${ac_cv_prog_cc_c99+y}
5843 printf %s "(cached) " >&6
5845 ac_cv_prog_cc_c99=no
5847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5848 /* end confdefs.h. */
5849 $ac_c_conftest_c99_program
5851 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
5853 CC="$ac_save_CC $ac_arg"
5854 if ac_fn_c_try_compile "$LINENO"
5856 ac_cv_prog_cc_c99=$ac_arg
5858 rm -f core conftest.err conftest.$ac_objext conftest.beam
5859 test "x$ac_cv_prog_cc_c99" != "xno" && break
5861 rm -f conftest.$ac_ext
5865 if test "x$ac_cv_prog_cc_c99" = xno
5867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5868 printf "%s\n" "unsupported" >&6; }
5870 if test "x$ac_cv_prog_cc_c99" = x
5872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5873 printf "%s\n" "none needed" >&6; }
5875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5876 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
5877 CC="$CC $ac_cv_prog_cc_c99"
5879 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5883 if test x$ac_prog_cc_stdc = xno
5885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5886 printf %s "checking for $CC option to enable C89 features... " >&6; }
5887 if test ${ac_cv_prog_cc_c89+y}
5889 printf %s "(cached) " >&6
5891 ac_cv_prog_cc_c89=no
5893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5894 /* end confdefs.h. */
5895 $ac_c_conftest_c89_program
5897 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5899 CC="$ac_save_CC $ac_arg"
5900 if ac_fn_c_try_compile "$LINENO"
5902 ac_cv_prog_cc_c89=$ac_arg
5904 rm -f core conftest.err conftest.$ac_objext conftest.beam
5905 test "x$ac_cv_prog_cc_c89" != "xno" && break
5907 rm -f conftest.$ac_ext
5911 if test "x$ac_cv_prog_cc_c89" = xno
5913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5914 printf "%s\n" "unsupported" >&6; }
5916 if test "x$ac_cv_prog_cc_c89" = x
5918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5919 printf "%s\n" "none needed" >&6; }
5921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5922 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5923 CC="$CC $ac_cv_prog_cc_c89"
5925 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5931 ac_cpp='$CPP $CPPFLAGS'
5932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5938 ac_cpp='$CPP $CPPFLAGS'
5939 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5940 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5941 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5943 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5944 if test ${am_cv_prog_cc_c_o+y}
5946 printf %s "(cached) " >&6
5948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5949 /* end confdefs.h. */
5959 # Make sure it works both with $CC and with simple cc.
5960 # Following AC_PROG_CC_C_O, we do the test twice because some
5961 # compilers refuse to overwrite an existing .o file with -o,
5962 # though they will create one.
5963 am_cv_prog_cc_c_o=yes
5965 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5966 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5969 (exit $ac_status); } \
5970 && test -f conftest2.$ac_objext; then
5973 am_cv_prog_cc_c_o=no
5977 rm -f core conftest*
5980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5981 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5982 if test "$am_cv_prog_cc_c_o" != yes; then
5983 # Losing compiler, so override with the script.
5984 # FIXME: It is wrong to rewrite CC.
5985 # But if we don't then we get into trouble of one sort or another.
5986 # A longer-term fix would be to have automake use am__CC in this case,
5987 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5988 CC="$am_aux_dir/compile $CC"
5991 ac_cpp='$CPP $CPPFLAGS'
5992 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5993 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5994 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5999 printf %s "checking whether the compiler is clang... " >&6; }
6000 if test ${gl_cv_compiler_clang+y}
6002 printf %s "(cached) " >&6
6004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6005 /* end confdefs.h. */
6020 if ac_fn_c_try_compile "$LINENO"
6022 gl_cv_compiler_clang=no
6024 gl_cv_compiler_clang=yes
6026 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
6030 printf "%s\n" "$gl_cv_compiler_clang" >&6; }
6033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
6034 printf %s "checking for compiler option needed when checking for declarations... " >&6; }
6035 if test ${gl_cv_compiler_check_decl_option+y}
6037 printf %s "(cached) " >&6
6039 if test $gl_cv_compiler_clang = yes; then
6040 save_ac_compile="$ac_compile"
6041 ac_compile="$ac_compile -Werror=implicit-function-declaration"
6042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6043 /* end confdefs.h. */
6053 if ac_fn_c_try_compile "$LINENO"
6055 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
6057 gl_cv_compiler_check_decl_option=none
6059 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6060 ac_compile="$save_ac_compile"
6062 gl_cv_compiler_check_decl_option=none
6066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
6067 printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
6068 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
6069 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
6071 ac_compile_for_check_decl="$ac_compile"
6074 DEPDIR="${am__leading_dot}deps"
6076 ac_config_commands="$ac_config_commands depfiles"
6078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
6079 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
6080 cat > confinc.mk << 'END'
6082 @echo this is the am__doit target >confinc.out
6087 # BSD make does it like this.
6088 echo '.include "confinc.mk" # ignored' > confmf.BSD
6089 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
6090 echo 'include confinc.mk # ignored' > confmf.GNU
6092 for s in GNU BSD; do
6093 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
6094 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
6096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6097 (exit $ac_status); }
6098 case $?:`cat confinc.out 2>/dev/null` in #(
6099 '0:this is the am__doit target') :
6102 am__include='.include' am__quote='"' ;; #(
6104 am__include='include' am__quote='' ;;
6109 if test "$am__include" != "#"; then
6110 _am_result="yes ($s style)"
6114 rm -f confinc.* confmf.*
6115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
6116 printf "%s\n" "${_am_result}" >&6; }
6118 # Check whether --enable-dependency-tracking was given.
6119 if test ${enable_dependency_tracking+y}
6121 enableval=$enable_dependency_tracking;
6124 if test "x$enable_dependency_tracking" != xno; then
6125 am_depcomp="$ac_aux_dir/depcomp"
6129 if test "x$enable_dependency_tracking" != xno; then
6139 depcc="$CC" am_compiler_list=
6141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6142 printf %s "checking dependency style of $depcc... " >&6; }
6143 if test ${am_cv_CC_dependencies_compiler_type+y}
6145 printf %s "(cached) " >&6
6147 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6148 # We make a subdir and do the tests there. Otherwise we can end up
6149 # making bogus files that we don't know about and never remove. For
6150 # instance it was reported that on HP-UX the gcc test will end up
6151 # making a dummy file named 'D' -- because '-MD' means "put the output
6155 # Copy depcomp to subdir because otherwise we won't find it if we're
6156 # using a relative directory.
6157 cp "$am_depcomp" conftest.dir
6159 # We will build objects and dependencies in a subdirectory because
6160 # it helps to detect inapplicable dependency modes. For instance
6161 # both Tru64's cc and ICC support -MD to output dependencies as a
6162 # side effect of compilation, but ICC will put the dependencies in
6163 # the current directory while Tru64 will put them in the object
6167 am_cv_CC_dependencies_compiler_type=none
6168 if test "$am_compiler_list" = ""; then
6169 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6172 case " $depcc " in #(
6173 *\ -arch\ *\ -arch\ *) am__universal=true ;;
6176 for depmode in $am_compiler_list; do
6177 # Setup a source with many dependencies, because some compilers
6178 # like to wrap large dependency lists on column 80 (with \), and
6179 # we should not choose a depcomp mode which is confused by this.
6181 # We need to recreate these files for each test, as the compiler may
6182 # overwrite some of them when testing with obscure command lines.
6183 # This happens at least with the AIX C compiler.
6185 for i in 1 2 3 4 5 6; do
6186 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6187 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6188 # Solaris 10 /bin/sh.
6189 echo '/* dummy */' > sub/conftst$i.h
6191 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6193 # We check with '-c' and '-o' for the sake of the "dashmstdout"
6194 # mode. It turns out that the SunPro C++ compiler does not properly
6195 # handle '-M -o', and we need to detect this. Also, some Intel
6196 # versions had trouble with output in subdirs.
6197 am__obj=sub/conftest.${OBJEXT-o}
6198 am__minus_obj="-o $am__obj"
6201 # This depmode causes a compiler race in universal mode.
6202 test "$am__universal" = false || continue
6205 # After this tag, mechanisms are not by side-effect, so they'll
6206 # only be used when explicitly requested.
6207 if test "x$enable_dependency_tracking" = xyes; then
6213 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6214 # This compiler won't grok '-c -o', but also, the minuso test has
6215 # not run yet. These depmodes are late enough in the game, and
6216 # so weak that their functioning should not be impacted.
6217 am__obj=conftest.${OBJEXT-o}
6222 if depmode=$depmode \
6223 source=sub/conftest.c object=$am__obj \
6224 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6225 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6226 >/dev/null 2>conftest.err &&
6227 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6228 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6229 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6230 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6231 # icc doesn't choke on unknown options, it will just issue warnings
6232 # or remarks (even with -Werror). So we grep stderr for any message
6233 # that says an option was ignored or not supported.
6234 # When given -MP, icc 7.0 and 7.1 complain thusly:
6235 # icc: Command line warning: ignoring option '-M'; no argument required
6236 # The diagnosis changed in icc 8.0:
6237 # icc: Command line remark: option '-MP' not supported
6238 if (grep 'ignoring option' conftest.err ||
6239 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6240 am_cv_CC_dependencies_compiler_type=$depmode
6249 am_cv_CC_dependencies_compiler_type=none
6253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6254 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
6255 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6258 test "x$enable_dependency_tracking" != xno \
6259 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6261 am__fastdepCC_FALSE='#'
6263 am__fastdepCC_TRUE='#'
6264 am__fastdepCC_FALSE=
6270 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
6272 if test -n "$ac_tool_prefix"; then
6273 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6274 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6276 printf %s "checking for $ac_word... " >&6; }
6277 if test ${ac_cv_prog_RANLIB+y}
6279 printf %s "(cached) " >&6
6281 if test -n "$RANLIB"; then
6282 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6288 case $as_dir in #(((
6291 *) as_dir=$as_dir/ ;;
6293 for ac_exec_ext in '' $ac_executable_extensions; do
6294 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6295 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6296 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6305 RANLIB=$ac_cv_prog_RANLIB
6306 if test -n "$RANLIB"; then
6307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6308 printf "%s\n" "$RANLIB" >&6; }
6310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6311 printf "%s\n" "no" >&6; }
6316 if test -z "$ac_cv_prog_RANLIB"; then
6317 ac_ct_RANLIB=$RANLIB
6318 # Extract the first word of "ranlib", so it can be a program name with args.
6319 set dummy ranlib; ac_word=$2
6320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6321 printf %s "checking for $ac_word... " >&6; }
6322 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6324 printf %s "(cached) " >&6
6326 if test -n "$ac_ct_RANLIB"; then
6327 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6333 case $as_dir in #(((
6336 *) as_dir=$as_dir/ ;;
6338 for ac_exec_ext in '' $ac_executable_extensions; do
6339 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6340 ac_cv_prog_ac_ct_RANLIB="ranlib"
6341 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6350 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6351 if test -n "$ac_ct_RANLIB"; then
6352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6353 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6356 printf "%s\n" "no" >&6; }
6359 if test "x$ac_ct_RANLIB" = x; then
6362 case $cross_compiling:$ac_tool_warned in
6364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6365 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6366 ac_tool_warned=yes ;;
6368 RANLIB=$ac_ct_RANLIB
6371 RANLIB="$ac_cv_prog_RANLIB"
6375 ac_header= ac_cache=
6376 for ac_item in $ac_header_c_list
6378 if test $ac_cache; then
6379 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6380 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6381 printf "%s\n" "#define $ac_item 1" >> confdefs.h
6383 ac_header= ac_cache=
6384 elif test $ac_header; then
6398 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
6401 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6411 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6412 if test ${ac_cv_safe_to_define___extensions__+y}
6414 printf %s "(cached) " >&6
6416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6417 /* end confdefs.h. */
6419 # define __EXTENSIONS__ 1
6420 $ac_includes_default
6429 if ac_fn_c_try_compile "$LINENO"
6431 ac_cv_safe_to_define___extensions__=yes
6433 ac_cv_safe_to_define___extensions__=no
6435 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6438 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6441 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6442 if test ${ac_cv_should_define__xopen_source+y}
6444 printf %s "(cached) " >&6
6446 ac_cv_should_define__xopen_source=no
6447 if test $ac_cv_header_wchar_h = yes
6449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6450 /* end confdefs.h. */
6462 if ac_fn_c_try_compile "$LINENO"
6466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6467 /* end confdefs.h. */
6469 #define _XOPEN_SOURCE 500
6480 if ac_fn_c_try_compile "$LINENO"
6482 ac_cv_should_define__xopen_source=yes
6484 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6486 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6490 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6492 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6494 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6496 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6498 printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6500 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6502 printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6504 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6506 printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6508 printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6510 printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6512 printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6514 printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6516 printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6518 printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6520 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6522 if test $ac_cv_header_minix_config_h = yes
6525 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6527 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6529 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6534 if test $ac_cv_safe_to_define___extensions__ = yes
6536 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6539 if test $ac_cv_should_define__xopen_source = yes
6541 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6547 # Make sure we can run config.sub.
6548 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
6549 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
6551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6552 printf %s "checking build system type... " >&6; }
6553 if test ${ac_cv_build+y}
6555 printf %s "(cached) " >&6
6557 ac_build_alias=$build_alias
6558 test "x$ac_build_alias" = x &&
6559 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
6560 test "x$ac_build_alias" = x &&
6561 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6562 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
6563 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
6566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6567 printf "%s\n" "$ac_cv_build" >&6; }
6568 case $ac_cv_build in
6570 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6573 ac_save_IFS=$IFS; IFS='-'
6579 # Remember, the first character of IFS is used to create $*,
6580 # except with old shells:
6583 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6587 printf %s "checking host system type... " >&6; }
6588 if test ${ac_cv_host+y}
6590 printf %s "(cached) " >&6
6592 if test "x$host_alias" = x; then
6593 ac_cv_host=$ac_cv_build
6595 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
6596 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
6600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6601 printf "%s\n" "$ac_cv_host" >&6; }
6604 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6607 ac_save_IFS=$IFS; IFS='-'
6613 # Remember, the first character of IFS is used to create $*,
6614 # except with old shells:
6617 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6627 printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h
6633 ac_cpp='$CPP $CPPFLAGS'
6634 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6635 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6636 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6638 printf %s "checking how to run the C preprocessor... " >&6; }
6639 # On Suns, sometimes $CPP names a directory.
6640 if test -n "$CPP" && test -d "$CPP"; then
6643 if test -z "$CPP"; then
6644 if test ${ac_cv_prog_CPP+y}
6646 printf %s "(cached) " >&6
6648 # Double quotes because $CC needs to be expanded
6649 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
6652 for ac_c_preproc_warn_flag in '' yes
6654 # Use a header file that comes with gcc, so configuring glibc
6655 # with a fresh cross-compiler works.
6656 # On the NeXT, cc -E runs the code through the compiler's parser,
6657 # not just through cpp. "Syntax error" is here to catch this case.
6658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6659 /* end confdefs.h. */
6663 if ac_fn_c_try_cpp "$LINENO"
6667 # Broken: fails on valid input.
6670 rm -f conftest.err conftest.i conftest.$ac_ext
6672 # OK, works on sane cases. Now check whether nonexistent headers
6673 # can be detected and how.
6674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6675 /* end confdefs.h. */
6676 #include <ac_nonexistent.h>
6678 if ac_fn_c_try_cpp "$LINENO"
6680 # Broken: success on invalid input.
6683 # Passes both tests.
6687 rm -f conftest.err conftest.i conftest.$ac_ext
6690 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6691 rm -f conftest.i conftest.err conftest.$ac_ext
6705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6706 printf "%s\n" "$CPP" >&6; }
6708 for ac_c_preproc_warn_flag in '' yes
6710 # Use a header file that comes with gcc, so configuring glibc
6711 # with a fresh cross-compiler works.
6712 # On the NeXT, cc -E runs the code through the compiler's parser,
6713 # not just through cpp. "Syntax error" is here to catch this case.
6714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6715 /* end confdefs.h. */
6719 if ac_fn_c_try_cpp "$LINENO"
6723 # Broken: fails on valid input.
6726 rm -f conftest.err conftest.i conftest.$ac_ext
6728 # OK, works on sane cases. Now check whether nonexistent headers
6729 # can be detected and how.
6730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6731 /* end confdefs.h. */
6732 #include <ac_nonexistent.h>
6734 if ac_fn_c_try_cpp "$LINENO"
6736 # Broken: success on invalid input.
6739 # Passes both tests.
6743 rm -f conftest.err conftest.i conftest.$ac_ext
6746 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6747 rm -f conftest.i conftest.err conftest.$ac_ext
6752 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6753 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6754 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6755 See \`config.log' for more details" "$LINENO" 5; }
6759 ac_cpp='$CPP $CPPFLAGS'
6760 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6761 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6762 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6766 printf %s "checking for grep that handles long lines and -e... " >&6; }
6767 if test ${ac_cv_path_GREP+y}
6769 printf %s "(cached) " >&6
6771 if test -z "$GREP"; then
6772 ac_path_GREP_found=false
6773 # Loop through the user's path and test for each of PROGNAME-LIST
6774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6775 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6778 case $as_dir in #(((
6781 *) as_dir=$as_dir/ ;;
6783 for ac_prog in grep ggrep
6785 for ac_exec_ext in '' $ac_executable_extensions; do
6786 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
6787 as_fn_executable_p "$ac_path_GREP" || continue
6788 # Check for GNU ac_path_GREP and select it if it is found.
6789 # Check for GNU $ac_path_GREP
6790 case `"$ac_path_GREP" --version 2>&1` in
6792 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6795 printf %s 0123456789 >"conftest.in"
6798 cat "conftest.in" "conftest.in" >"conftest.tmp"
6799 mv "conftest.tmp" "conftest.in"
6800 cp "conftest.in" "conftest.nl"
6801 printf "%s\n" 'GREP' >> "conftest.nl"
6802 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6803 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6804 as_fn_arith $ac_count + 1 && ac_count=$as_val
6805 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6806 # Best one so far, save it but keep looking for a better one
6807 ac_cv_path_GREP="$ac_path_GREP"
6808 ac_path_GREP_max=$ac_count
6810 # 10*(2^10) chars as input seems more than enough
6811 test $ac_count -gt 10 && break
6813 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6816 $ac_path_GREP_found && break 3
6821 if test -z "$ac_cv_path_GREP"; then
6822 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6825 ac_cv_path_GREP=$GREP
6829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6830 printf "%s\n" "$ac_cv_path_GREP" >&6; }
6831 GREP="$ac_cv_path_GREP"
6834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6835 printf %s "checking for egrep... " >&6; }
6836 if test ${ac_cv_path_EGREP+y}
6838 printf %s "(cached) " >&6
6840 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6841 then ac_cv_path_EGREP="$GREP -E"
6843 if test -z "$EGREP"; then
6844 ac_path_EGREP_found=false
6845 # Loop through the user's path and test for each of PROGNAME-LIST
6846 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6847 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6850 case $as_dir in #(((
6853 *) as_dir=$as_dir/ ;;
6855 for ac_prog in egrep
6857 for ac_exec_ext in '' $ac_executable_extensions; do
6858 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6859 as_fn_executable_p "$ac_path_EGREP" || continue
6860 # Check for GNU ac_path_EGREP and select it if it is found.
6861 # Check for GNU $ac_path_EGREP
6862 case `"$ac_path_EGREP" --version 2>&1` in
6864 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6867 printf %s 0123456789 >"conftest.in"
6870 cat "conftest.in" "conftest.in" >"conftest.tmp"
6871 mv "conftest.tmp" "conftest.in"
6872 cp "conftest.in" "conftest.nl"
6873 printf "%s\n" 'EGREP' >> "conftest.nl"
6874 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6875 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6876 as_fn_arith $ac_count + 1 && ac_count=$as_val
6877 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6878 # Best one so far, save it but keep looking for a better one
6879 ac_cv_path_EGREP="$ac_path_EGREP"
6880 ac_path_EGREP_max=$ac_count
6882 # 10*(2^10) chars as input seems more than enough
6883 test $ac_count -gt 10 && break
6885 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6888 $ac_path_EGREP_found && break 3
6893 if test -z "$ac_cv_path_EGREP"; then
6894 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6897 ac_cv_path_EGREP=$EGREP
6902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6903 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6904 EGREP="$ac_cv_path_EGREP"
6910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6911 printf %s "checking for Minix Amsterdam compiler... " >&6; }
6912 if test ${gl_cv_c_amsterdam_compiler+y}
6914 printf %s "(cached) " >&6
6917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6918 /* end confdefs.h. */
6925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6926 $EGREP "Amsterdam" >/dev/null 2>&1
6928 gl_cv_c_amsterdam_compiler=yes
6930 gl_cv_c_amsterdam_compiler=no
6936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6937 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
6939 if test $gl_cv_c_amsterdam_compiler = yes; then
6940 if test -z "$AR"; then
6943 if test -z "$ARFLAGS"; then
6950 if test -n "$ac_tool_prefix"; then
6951 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6952 set dummy ${ac_tool_prefix}ar; ac_word=$2
6953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6954 printf %s "checking for $ac_word... " >&6; }
6955 if test ${ac_cv_prog_AR+y}
6957 printf %s "(cached) " >&6
6959 if test -n "$AR"; then
6960 ac_cv_prog_AR="$AR" # Let the user override the test.
6962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6966 case $as_dir in #(((
6969 *) as_dir=$as_dir/ ;;
6971 for ac_exec_ext in '' $ac_executable_extensions; do
6972 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6973 ac_cv_prog_AR="${ac_tool_prefix}ar"
6974 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6984 if test -n "$AR"; then
6985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6986 printf "%s\n" "$AR" >&6; }
6988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6989 printf "%s\n" "no" >&6; }
6994 if test -z "$ac_cv_prog_AR"; then
6996 # Extract the first word of "ar", so it can be a program name with args.
6997 set dummy ar; ac_word=$2
6998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6999 printf %s "checking for $ac_word... " >&6; }
7000 if test ${ac_cv_prog_ac_ct_AR+y}
7002 printf %s "(cached) " >&6
7004 if test -n "$ac_ct_AR"; then
7005 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7011 case $as_dir in #(((
7014 *) as_dir=$as_dir/ ;;
7016 for ac_exec_ext in '' $ac_executable_extensions; do
7017 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7018 ac_cv_prog_ac_ct_AR="ar"
7019 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7028 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7029 if test -n "$ac_ct_AR"; then
7030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7031 printf "%s\n" "$ac_ct_AR" >&6; }
7033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7034 printf "%s\n" "no" >&6; }
7037 if test "x$ac_ct_AR" = x; then
7040 case $cross_compiling:$ac_tool_warned in
7042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7043 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7044 ac_tool_warned=yes ;;
7052 if test -z "$ARFLAGS"; then
7058 if test -z "$RANLIB"; then
7059 if test $gl_cv_c_amsterdam_compiler = yes; then
7062 if test -n "$ac_tool_prefix"; then
7063 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7064 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7066 printf %s "checking for $ac_word... " >&6; }
7067 if test ${ac_cv_prog_RANLIB+y}
7069 printf %s "(cached) " >&6
7071 if test -n "$RANLIB"; then
7072 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7078 case $as_dir in #(((
7081 *) as_dir=$as_dir/ ;;
7083 for ac_exec_ext in '' $ac_executable_extensions; do
7084 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7085 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7086 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7095 RANLIB=$ac_cv_prog_RANLIB
7096 if test -n "$RANLIB"; then
7097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7098 printf "%s\n" "$RANLIB" >&6; }
7100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7101 printf "%s\n" "no" >&6; }
7106 if test -z "$ac_cv_prog_RANLIB"; then
7107 ac_ct_RANLIB=$RANLIB
7108 # Extract the first word of "ranlib", so it can be a program name with args.
7109 set dummy ranlib; ac_word=$2
7110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7111 printf %s "checking for $ac_word... " >&6; }
7112 if test ${ac_cv_prog_ac_ct_RANLIB+y}
7114 printf %s "(cached) " >&6
7116 if test -n "$ac_ct_RANLIB"; then
7117 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7123 case $as_dir in #(((
7126 *) as_dir=$as_dir/ ;;
7128 for ac_exec_ext in '' $ac_executable_extensions; do
7129 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7130 ac_cv_prog_ac_ct_RANLIB="ranlib"
7131 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7140 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7141 if test -n "$ac_ct_RANLIB"; then
7142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7143 printf "%s\n" "$ac_ct_RANLIB" >&6; }
7145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7146 printf "%s\n" "no" >&6; }
7149 if test "x$ac_ct_RANLIB" = x; then
7152 case $cross_compiling:$ac_tool_warned in
7154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7155 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7156 ac_tool_warned=yes ;;
7158 RANLIB=$ac_ct_RANLIB
7161 RANLIB="$ac_cv_prog_RANLIB"
7171 # IEEE behaviour is the default on all CPUs except Alpha and SH
7172 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
7173 # and the GCC 4.1.2 manual).
7176 # On Alpha systems, a compiler option provides the behaviour.
7177 # See the ieee(3) manual page, also available at
7178 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
7179 if test -n "$GCC"; then
7180 # GCC has the option -mieee.
7181 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
7182 CPPFLAGS="$CPPFLAGS -mieee"
7184 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
7185 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
7186 CPPFLAGS="$CPPFLAGS -ieee"
7190 if test -n "$GCC"; then
7191 # GCC has the option -mieee.
7192 CPPFLAGS="$CPPFLAGS -mieee"
7197 # Check whether --enable-largefile was given.
7198 if test ${enable_largefile+y}
7200 enableval=$enable_largefile;
7203 if test "$enable_largefile" != no
7205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7206 printf %s "checking for special C compiler options needed for large files... " >&6; }
7207 if test ${ac_cv_sys_largefile_CC+y}
7209 printf %s "(cached) " >&6
7211 ac_cv_sys_largefile_CC=no
7212 if test "$GCC" != yes; then
7215 # IRIX 6.2 and later do not support large files by default,
7216 # so use the C compiler's -n32 option if that helps.
7217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7218 /* end confdefs.h. */
7219 #include <sys/types.h>
7220 /* Check that off_t can represent 2**63 - 1 correctly.
7221 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7222 since some C++ compilers masquerading as C compilers
7223 incorrectly reject 9223372036854775807. */
7224 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7225 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7226 && LARGE_OFF_T % 2147483647 == 1)
7236 if ac_fn_c_try_compile "$LINENO"
7240 rm -f core conftest.err conftest.$ac_objext conftest.beam
7242 if ac_fn_c_try_compile "$LINENO"
7244 ac_cv_sys_largefile_CC=' -n32'; break
7246 rm -f core conftest.err conftest.$ac_objext conftest.beam
7250 rm -f conftest.$ac_ext
7253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7254 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
7255 if test "$ac_cv_sys_largefile_CC" != no; then
7256 CC=$CC$ac_cv_sys_largefile_CC
7259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7260 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7261 if test ${ac_cv_sys_file_offset_bits+y}
7263 printf %s "(cached) " >&6
7266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7267 /* end confdefs.h. */
7268 #include <sys/types.h>
7269 /* Check that off_t can represent 2**63 - 1 correctly.
7270 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7271 since some C++ compilers masquerading as C compilers
7272 incorrectly reject 9223372036854775807. */
7273 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7274 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7275 && LARGE_OFF_T % 2147483647 == 1)
7285 if ac_fn_c_try_compile "$LINENO"
7287 ac_cv_sys_file_offset_bits=no; break
7289 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7291 /* end confdefs.h. */
7292 #undef _FILE_OFFSET_BITS
7293 #define _FILE_OFFSET_BITS 64
7294 #include <sys/types.h>
7295 /* Check that off_t can represent 2**63 - 1 correctly.
7296 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7297 since some C++ compilers masquerading as C compilers
7298 incorrectly reject 9223372036854775807. */
7299 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7300 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7301 && LARGE_OFF_T % 2147483647 == 1)
7311 if ac_fn_c_try_compile "$LINENO"
7313 ac_cv_sys_file_offset_bits=64; break
7315 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7316 ac_cv_sys_file_offset_bits=unknown
7320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7321 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
7322 case $ac_cv_sys_file_offset_bits in #(
7325 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
7329 case $ac_cv_sys_file_offset_bits in #(
7331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7332 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
7333 if test ${ac_cv_sys_large_files+y}
7335 printf %s "(cached) " >&6
7338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7339 /* end confdefs.h. */
7340 #include <sys/types.h>
7341 /* Check that off_t can represent 2**63 - 1 correctly.
7342 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7343 since some C++ compilers masquerading as C compilers
7344 incorrectly reject 9223372036854775807. */
7345 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7346 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7347 && LARGE_OFF_T % 2147483647 == 1)
7357 if ac_fn_c_try_compile "$LINENO"
7359 ac_cv_sys_large_files=no; break
7361 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7363 /* end confdefs.h. */
7365 #define _LARGE_FILES 1
7366 #include <sys/types.h>
7367 /* Check that off_t can represent 2**63 - 1 correctly.
7368 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7369 since some C++ compilers masquerading as C compilers
7370 incorrectly reject 9223372036854775807. */
7371 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7372 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7373 && LARGE_OFF_T % 2147483647 == 1)
7383 if ac_fn_c_try_compile "$LINENO"
7385 ac_cv_sys_large_files=1; break
7387 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7388 ac_cv_sys_large_files=unknown
7392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7393 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
7394 case $ac_cv_sys_large_files in #(
7397 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
7400 rm -rf conftest* ;; #(
7403 # Check whether --enable-year2038 was given.
7404 if test ${enable_year2038+y}
7406 enableval=$enable_year2038;
7409 if test "$enable_year2038" != no
7412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t" >&5
7413 printf %s "checking for 64-bit time_t... " >&6; }
7414 if test ${gl_cv_type_time_t_64+y}
7416 printf %s "(cached) " >&6
7418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7419 /* end confdefs.h. */
7422 /* Check that time_t can represent 2**63 - 1 correctly.
7423 We can't simply define LARGE_TIME_T to be 9223372036854775807,
7424 since some C++ compilers masquerading as C compilers
7425 incorrectly reject 9223372036854775807. */
7426 #define LARGE_TIME_T (((time_t) 1 << 31 << 31) - 1 + ((time_t) 1 << 31 << 31))
7427 int verify_time_t_range[(LARGE_TIME_T % 2147483629 == 721
7428 && LARGE_TIME_T % 2147483647 == 1)
7432 if ac_fn_c_try_compile "$LINENO"
7434 gl_cv_type_time_t_64=yes
7436 gl_cv_type_time_t_64=no
7438 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_64" >&5
7442 printf "%s\n" "$gl_cv_type_time_t_64" >&6; }
7443 if test "$gl_cv_type_time_t_64" = no; then
7444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t with _TIME_BITS=64" >&5
7445 printf %s "checking for 64-bit time_t with _TIME_BITS=64... " >&6; }
7446 if test ${gl_cv_type_time_t_bits_macro+y}
7448 printf %s "(cached) " >&6
7450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7451 /* end confdefs.h. */
7452 #define _TIME_BITS 64
7453 #define _FILE_OFFSET_BITS 64
7456 /* Check that time_t can represent 2**63 - 1 correctly.
7457 We can't simply define LARGE_TIME_T to be 9223372036854775807,
7458 since some C++ compilers masquerading as C compilers
7459 incorrectly reject 9223372036854775807. */
7460 #define LARGE_TIME_T (((time_t) 1 << 31 << 31) - 1 + ((time_t) 1 << 31 << 31))
7461 int verify_time_t_range[(LARGE_TIME_T % 2147483629 == 721
7462 && LARGE_TIME_T % 2147483647 == 1)
7466 if ac_fn_c_try_compile "$LINENO"
7468 gl_cv_type_time_t_bits_macro=yes
7470 gl_cv_type_time_t_bits_macro=no
7472 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_bits_macro" >&5
7476 printf "%s\n" "$gl_cv_type_time_t_bits_macro" >&6; }
7477 if test "$gl_cv_type_time_t_bits_macro" = yes; then
7479 printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
7482 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
7484 gl_cv_type_time_t_64=yes
7487 if test $gl_cv_type_time_t_64 = no; then
7488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7489 /* end confdefs.h. */
7490 #ifdef _USE_32BIT_TIME_T
7497 if ac_fn_c_try_compile "$LINENO"
7499 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7500 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
7501 as_fn_error $? "This package requires a 64-bit 'time_t' type. Remove _USE_32BIT_TIME_T from the compiler flags.
7502 See \`config.log' for more details" "$LINENO" 5; }
7504 # If not cross-compiling and says we should check,
7505 # and 'touch' works with a large timestamp, then evidently 64-bit time_t
7506 # is desired and supported, so fail and ask the builder to fix the
7507 # problem. Otherwise, just warn the builder.
7509 if test "$gl_warned_about_64_bit_time_t" != yes; then
7510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'?" >&5
7511 printf "%s\n" "$as_me: WARNING: This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'?" >&2;}
7512 gl_warned_about_64_bit_time_t=yes
7516 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7530 printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
7541 # Check whether --enable-threads was given.
7542 if test ${enable_threads+y}
7544 enableval=$enable_threads; gl_use_threads=$enableval
7546 if test -n "$gl_use_threads_default"; then
7547 gl_use_threads="$gl_use_threads_default"
7550 osf*) gl_use_threads=no ;;
7553 1.[0-5].*) gl_use_threads=no ;;
7554 *) gl_use_threads=yes ;;
7558 case "$gl_use_winpthreads_default" in
7559 yes) gl_use_threads=posix ;;
7560 no) gl_use_threads=windows ;;
7561 *) gl_use_threads=yes ;;
7564 *) gl_use_threads=yes ;;
7570 if test "$gl_use_threads" = yes \
7571 || test "$gl_use_threads" = isoc \
7572 || test "$gl_use_threads" = posix \
7573 || test "$gl_use_threads" = isoc+posix; then
7574 # For using <threads.h> or <pthread.h>:
7577 if test -z "$gl_anythreadlib_early_done"; then
7580 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7581 # groks <pthread.h>. cc also understands the flag -pthread, but
7582 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7583 # 2. putting a flag into CPPFLAGS that has an effect on the linker
7584 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7585 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7586 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7589 # Some systems optimize for single-threaded programs by default, and
7590 # need special flags to disable these optimizations. For example, the
7591 # definition of 'errno' in <errno.h>.
7593 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7594 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7596 gl_anythreadlib_early_done=done
7603 # Pre-early section.
7608 # Code from module absolute-header:
7609 # Code from module accept:
7610 # Code from module accept-tests:
7611 # Code from module alloca:
7612 # Code from module alloca-opt:
7613 # Code from module alloca-opt-tests:
7614 # Code from module allocator:
7615 # Code from module announce-gen:
7616 # Code from module areadlink:
7617 # Code from module areadlink-tests:
7618 # Code from module argmatch:
7619 # Code from module argmatch-tests:
7620 # Code from module arpa_inet:
7621 # Code from module arpa_inet-tests:
7622 # Code from module assure:
7623 # Code from module atoll:
7624 # Code from module attribute:
7625 # Code from module basename-lgpl:
7626 # Code from module binary-io:
7627 # Code from module binary-io-tests:
7628 # Code from module bind:
7629 # Code from module bind-tests:
7630 # Code from module bitrotate:
7631 # Code from module bitrotate-tests:
7632 # Code from module btowc:
7633 # Code from module btowc-tests:
7634 # Code from module builtin-expect:
7635 # Code from module c-ctype:
7636 # Code from module c-ctype-tests:
7637 # Code from module c-stack:
7638 # Code from module c-stack-tests:
7639 # Code from module c-strcase:
7640 # Code from module c-strcase-tests:
7641 # Code from module c-strcaseeq:
7642 # Code from module c99:
7643 # Code from module calloc-gnu:
7644 # Code from module calloc-gnu-tests:
7645 # Code from module calloc-posix:
7646 # Code from module careadlinkat:
7647 # Code from module clock-time:
7648 # Code from module cloexec:
7649 # Code from module cloexec-tests:
7650 # Code from module close:
7651 # Code from module close-tests:
7652 # Code from module config-h:
7653 # Code from module connect:
7654 # Code from module connect-tests:
7655 # Code from module ctype:
7656 # Code from module ctype-tests:
7657 # Code from module diffseq:
7658 # Code from module dirname:
7659 # Code from module dirname-lgpl:
7660 # Code from module dirname-tests:
7661 # Code from module do-release-commit-and-tag:
7662 # Code from module double-slash-root:
7663 # Code from module dtotimespec:
7664 # Code from module dup2:
7665 # Code from module dup2-tests:
7666 # Code from module dynarray:
7667 # Code from module dynarray-tests:
7668 # Code from module environ:
7669 # Code from module environ-tests:
7670 # Code from module errno:
7671 # Code from module errno-tests:
7672 # Code from module error:
7673 # Code from module exclude:
7674 # Code from module exclude-tests:
7675 # Code from module exitfail:
7676 # Code from module extensions:
7677 # Code from module extern-inline:
7678 # Code from module fcntl:
7679 # Code from module fcntl-h:
7680 # Code from module fcntl-h-tests:
7681 # Code from module fcntl-tests:
7682 # Code from module fd-hook:
7683 # Code from module fdl:
7684 # Code from module fdopen:
7685 # Code from module fdopen-tests:
7686 # Code from module fgetc-tests:
7687 # Code from module file-type:
7688 # Code from module filename:
7689 # Code from module filenamecat:
7690 # Code from module filenamecat-lgpl:
7691 # Code from module filenamecat-tests:
7692 # Code from module flexmember:
7693 # Code from module float:
7694 # Code from module float-tests:
7695 # Code from module fnmatch:
7696 # Code from module fnmatch-gnu:
7697 # Code from module fnmatch-h:
7698 # Code from module fnmatch-h-tests:
7699 # Code from module fnmatch-tests:
7700 # Code from module fopen:
7701 # Code from module fopen-gnu:
7702 # Code from module fopen-gnu-tests:
7703 # Code from module fopen-tests:
7704 # Code from module fpieee:
7706 # Code from module fpucw:
7707 # Code from module fputc-tests:
7708 # Code from module fread-tests:
7709 # Code from module free-posix:
7710 # Code from module free-posix-tests:
7711 # Code from module freopen:
7712 # Code from module freopen-tests:
7713 # Code from module fstat:
7714 # Code from module fstat-tests:
7715 # Code from module ftruncate:
7716 # Code from module ftruncate-tests:
7717 # Code from module fwrite-tests:
7718 # Code from module gendocs:
7719 # Code from module getcwd-lgpl:
7720 # Code from module getcwd-lgpl-tests:
7721 # Code from module getdtablesize:
7722 # Code from module getdtablesize-tests:
7723 # Code from module getopt-gnu:
7724 # Code from module getopt-gnu-tests:
7725 # Code from module getopt-posix:
7726 # Code from module getopt-posix-tests:
7727 # Code from module getpagesize:
7728 # Code from module getprogname:
7729 # Code from module getprogname-tests:
7730 # Code from module getrandom:
7731 # Code from module getrandom-tests:
7732 # Code from module gettext-h:
7733 # Code from module gettime:
7734 # Code from module gettimeofday:
7735 # Code from module gettimeofday-tests:
7736 # Code from module git-version-gen:
7737 # Code from module gitlog-to-changelog:
7738 # Code from module gnu-make:
7739 # Code from module gnu-web-doc-update:
7740 # Code from module gnumakefile:
7741 # Code from module gnupload:
7742 # Code from module gperf:
7743 # Code from module hard-locale:
7744 # Code from module hard-locale-tests:
7745 # Code from module hash:
7746 # Code from module hash-pjw:
7747 # Code from module hash-tests:
7748 # Code from module havelib:
7749 # Code from module host-cpu-c-abi:
7750 # Code from module ialloc:
7751 # Code from module iconv:
7752 # Code from module iconv-h:
7753 # Code from module iconv-h-tests:
7754 # Code from module iconv-tests:
7755 # Code from module iconv_open:
7756 # Code from module idx:
7757 # Code from module ignore-value:
7758 # Code from module ignore-value-tests:
7759 # Code from module include_next:
7760 # Code from module inet_pton:
7761 # Code from module inet_pton-tests:
7762 # Code from module inline:
7763 # Code from module intprops:
7764 # Code from module intprops-tests:
7765 # Code from module inttostr:
7766 # Code from module inttostr-tests:
7767 # Code from module inttypes:
7768 # Code from module inttypes-incomplete:
7769 # Code from module inttypes-tests:
7770 # Code from module ioctl:
7771 # Code from module ioctl-tests:
7772 # Code from module isblank:
7773 # Code from module isblank-tests:
7774 # Code from module iswblank:
7775 # Code from module iswblank-tests:
7776 # Code from module iswdigit:
7777 # Code from module iswdigit-tests:
7778 # Code from module iswxdigit:
7779 # Code from module iswxdigit-tests:
7780 # Code from module langinfo:
7781 # Code from module langinfo-tests:
7782 # Code from module largefile:
7785 # Code from module libc-config:
7786 # Code from module limits-h:
7787 # Code from module limits-h-tests:
7788 # Code from module listen:
7789 # Code from module listen-tests:
7790 # Code from module localcharset:
7791 # Code from module localcharset-tests:
7792 # Code from module locale:
7793 # Code from module locale-tests:
7794 # Code from module localeconv:
7795 # Code from module localeconv-tests:
7796 # Code from module lock:
7797 # Code from module lstat:
7798 # Code from module lstat-tests:
7799 # Code from module maintainer-makefile:
7800 # Code from module malloc-gnu:
7801 # Code from module malloc-gnu-tests:
7802 # Code from module malloc-posix:
7803 # Code from module malloca:
7804 # Code from module malloca-tests:
7805 # Code from module manywarnings:
7806 # Code from module mbchar:
7807 # Code from module mbiter:
7808 # Code from module mbrtowc:
7809 # Code from module mbrtowc-tests:
7810 # Code from module mbscasecmp:
7811 # Code from module mbscasecmp-tests:
7812 # Code from module mbsinit:
7813 # Code from module mbsinit-tests:
7814 # Code from module mbslen:
7815 # Code from module mbsrtowcs:
7816 # Code from module mbsrtowcs-tests:
7817 # Code from module mbsstr:
7818 # Code from module mbsstr-tests:
7819 # Code from module mbtowc:
7820 # Code from module mbuiter:
7821 # Code from module memchr:
7822 # Code from module memchr-tests:
7823 # Code from module mempcpy:
7824 # Code from module minmax:
7825 # Code from module mkdir:
7826 # Code from module mkdir-tests:
7827 # Code from module mkstemp:
7828 # Code from module mktime:
7829 # Code from module mktime-internal:
7830 # Code from module msvc-inval:
7831 # Code from module msvc-nothrow:
7832 # Code from module multiarch:
7833 # Code from module nanosleep:
7834 # Code from module nanosleep-tests:
7835 # Code from module netinet_in:
7836 # Code from module netinet_in-tests:
7837 # Code from module nl_langinfo:
7838 # Code from module nl_langinfo-tests:
7839 # Code from module nocrash:
7840 # Code from module nstrftime:
7841 # Code from module nstrftime-tests:
7842 # Code from module open:
7843 # Code from module open-tests:
7844 # Code from module pathmax:
7845 # Code from module pathmax-tests:
7846 # Code from module perror:
7847 # Code from module perror-tests:
7848 # Code from module pipe-posix:
7849 # Code from module pipe-posix-tests:
7850 # Code from module progname:
7851 # Code from module propername:
7852 # Code from module pthread-h:
7855 if test -z "$gl_anythreadlib_early_done"; then
7858 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7859 # groks <pthread.h>. cc also understands the flag -pthread, but
7860 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7861 # 2. putting a flag into CPPFLAGS that has an effect on the linker
7862 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7863 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7864 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7867 # Some systems optimize for single-threaded programs by default, and
7868 # need special flags to disable these optimizations. For example, the
7869 # definition of 'errno' in <errno.h>.
7871 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7872 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7874 gl_anythreadlib_early_done=done
7877 # Code from module pthread-h-tests:
7878 # Code from module pthread-thread:
7879 # Code from module pthread-thread-tests:
7880 # Code from module pthread_sigmask:
7881 # Code from module pthread_sigmask-tests:
7882 # Code from module putenv:
7883 # Code from module quote:
7884 # Code from module quotearg:
7885 # Code from module quotearg-simple:
7886 # Code from module quotearg-simple-tests:
7887 # Code from module raise:
7888 # Code from module raise-tests:
7889 # Code from module rawmemchr:
7890 # Code from module rawmemchr-tests:
7891 # Code from module readlink:
7892 # Code from module readlink-tests:
7893 # Code from module readme-release:
7894 # Code from module realloc-gnu:
7895 # Code from module realloc-gnu-tests:
7896 # Code from module realloc-posix:
7897 # Code from module reallocarray:
7898 # Code from module reallocarray-tests:
7899 # Code from module regex:
7900 # Code from module regex-tests:
7901 # Code from module same-inode:
7902 # Code from module sched:
7903 # Code from module sched-tests:
7904 # Code from module select:
7905 # Code from module select-tests:
7906 # Code from module setenv:
7907 # Code from module setenv-tests:
7908 # Code from module setlocale-null:
7909 # Code from module setlocale-null-tests:
7910 # Code from module setsockopt:
7911 # Code from module setsockopt-tests:
7912 # Code from module sh-quote:
7913 # Code from module sh-quote-tests:
7914 # Code from module sigaction:
7915 # Code from module sigaction-tests:
7916 # Code from module signal:
7917 # Code from module signal-h:
7918 # Code from module signal-h-tests:
7919 # Code from module sigprocmask:
7920 # Code from module sigprocmask-tests:
7921 # Code from module sigsegv:
7922 # Code from module sigsegv-tests:
7923 # Code from module size_max:
7924 # Code from module sleep:
7925 # Code from module sleep-tests:
7926 # Code from module snippet/_Noreturn:
7927 # Code from module snippet/arg-nonnull:
7928 # Code from module snippet/c++defs:
7929 # Code from module snippet/warn-on-use:
7930 # Code from module snprintf:
7931 # Code from module snprintf-tests:
7932 # Code from module socket:
7933 # Code from module socketlib:
7934 # Code from module sockets:
7935 # Code from module sockets-tests:
7936 # Code from module socklen:
7937 # Code from module ssize_t:
7938 # Code from module stat:
7939 # Code from module stat-macros:
7940 # Code from module stat-tests:
7941 # Code from module stat-time:
7942 # Code from module stat-time-tests:
7943 # Code from module std-gnu11:
7944 # Code from module stdalign:
7945 # Code from module stdalign-tests:
7946 # Code from module stdarg:
7950 # Code from module stdarg-tests:
7951 # Code from module stdbool:
7952 # Code from module stdbool-tests:
7953 # Code from module stddef:
7954 # Code from module stddef-tests:
7955 # Code from module stdint:
7956 # Code from module stdint-tests:
7957 # Code from module stdio:
7958 # Code from module stdio-tests:
7959 # Code from module stdlib:
7960 # Code from module stdlib-tests:
7961 # Code from module stdopen:
7962 # Code from module strcase:
7963 # Code from module streq:
7964 # Code from module strerror:
7965 # Code from module strerror-override:
7966 # Code from module strerror-tests:
7967 # Code from module strerror_r-posix:
7968 # Code from module strerror_r-posix-tests:
7969 # Code from module striconv:
7970 # Code from module striconv-tests:
7971 # Code from module string:
7972 # Code from module string-tests:
7973 # Code from module strings:
7974 # Code from module strings-tests:
7975 # Code from module strnlen:
7976 # Code from module strnlen-tests:
7977 # Code from module strnlen1:
7978 # Code from module strptime:
7979 # Code from module strtoimax:
7980 # Code from module strtoimax-tests:
7981 # Code from module strtoll:
7982 # Code from module strtoll-tests:
7983 # Code from module symlink:
7984 # Code from module symlink-tests:
7985 # Code from module sys_ioctl:
7986 # Code from module sys_ioctl-tests:
7987 # Code from module sys_random:
7988 # Code from module sys_random-tests:
7989 # Code from module sys_select:
7990 # Code from module sys_select-tests:
7991 # Code from module sys_socket:
7992 # Code from module sys_socket-tests:
7993 # Code from module sys_stat:
7994 # Code from module sys_stat-tests:
7995 # Code from module sys_time:
7996 # Code from module sys_time-tests:
7997 # Code from module sys_types:
7998 # Code from module sys_types-tests:
7999 # Code from module sys_uio:
8000 # Code from module sys_uio-tests:
8001 # Code from module sys_wait:
8002 # Code from module sys_wait-tests:
8003 # Code from module system-quote:
8004 # Code from module tempname:
8005 # Code from module test-framework-sh:
8006 # Code from module test-framework-sh-tests:
8007 # Code from module thread:
8008 # Code from module thread-tests:
8009 # Code from module threadlib:
8013 # Code from module time:
8014 # Code from module time-tests:
8015 # Code from module time_r:
8016 # Code from module time_rz:
8017 # Code from module timegm:
8018 # Code from module timespec:
8019 # Code from module timespec-add:
8020 # Code from module timespec-sub:
8021 # Code from module timespec-tests:
8022 # Code from module trim:
8023 # Code from module tzset:
8024 # Code from module unistd:
8025 # Code from module unistd-tests:
8026 # Code from module unistr/base:
8027 # Code from module unistr/u8-mbtoucr:
8028 # Code from module unistr/u8-mbtoucr-tests:
8029 # Code from module unistr/u8-uctomb:
8030 # Code from module unistr/u8-uctomb-tests:
8031 # Code from module unitypes:
8032 # Code from module uniwidth/base:
8033 # Code from module uniwidth/width:
8034 # Code from module uniwidth/width-tests:
8035 # Code from module unlocked-io:
8036 # Code from module unlocked-io-internal:
8037 # Code from module unsetenv:
8038 # Code from module unsetenv-tests:
8039 # Code from module update-copyright:
8040 # Code from module update-copyright-tests:
8041 # Code from module useless-if-before-free:
8042 # Code from module vasnprintf:
8043 # Code from module vasnprintf-tests:
8044 # Code from module vasprintf:
8045 # Code from module vasprintf-tests:
8046 # Code from module vc-list-files:
8047 # Code from module vc-list-files-tests:
8048 # Code from module verify:
8049 # Code from module verify-tests:
8050 # Code from module version-etc:
8051 # Code from module version-etc-fsf:
8052 # Code from module version-etc-tests:
8053 # Code from module warnings:
8054 # Code from module wchar:
8055 # Code from module wchar-tests:
8056 # Code from module wcrtomb:
8057 # Code from module wcrtomb-tests:
8058 # Code from module wctob:
8059 # Code from module wctomb:
8060 # Code from module wctype-h:
8061 # Code from module wctype-h-tests:
8062 # Code from module wcwidth:
8063 # Code from module wcwidth-tests:
8064 # Code from module windows-mutex:
8065 # Code from module windows-once:
8066 # Code from module windows-recmutex:
8067 # Code from module windows-rwlock:
8068 # Code from module windows-thread:
8069 # Code from module windows-tls:
8070 # Code from module wmemchr:
8071 # Code from module wmempcpy:
8072 # Code from module xalloc:
8073 # Code from module xalloc-die:
8074 # Code from module xalloc-die-tests:
8075 # Code from module xalloc-oversized:
8076 # Code from module xfreopen:
8077 # Code from module xmalloca:
8078 # Code from module xreadlink:
8079 # Code from module xsize:
8080 # Code from module xstdopen:
8081 # Code from module xstdopen-tests:
8082 # Code from module xstriconv:
8083 # Code from module xstrtoimax:
8084 # Code from module xstrtoimax-tests:
8085 # Code from module xstrtol:
8086 # Code from module xstrtol-error:
8087 # Code from module xstrtol-tests:
8088 # Code from module xvasprintf:
8089 # Code from module xvasprintf-tests:
8100 # Check whether --enable-cross-guesses was given.
8101 if test ${enable_cross_guesses+y}
8103 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
8104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
8105 printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
8106 enableval=conservative
8108 gl_cross_guesses="$enableval"
8110 gl_cross_guesses=conservative
8113 if test $gl_cross_guesses = risky; then
8114 gl_cross_guess_normal="guessing yes"
8115 gl_cross_guess_inverted="guessing no"
8117 gl_cross_guess_normal="guessing no"
8118 gl_cross_guess_inverted="guessing yes"
8120 LIBC_FATAL_STDERR_=1
8121 export LIBC_FATAL_STDERR_
8124 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8125 if test "x$ac_cv_type_size_t" = xyes
8130 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
8134 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8135 # for constant arguments. Useless!
8136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8137 printf %s "checking for working alloca.h... " >&6; }
8138 if test ${ac_cv_working_alloca_h+y}
8140 printf %s "(cached) " >&6
8142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8143 /* end confdefs.h. */
8148 char *p = (char *) alloca (2 * sizeof (int));
8154 if ac_fn_c_try_link "$LINENO"
8156 ac_cv_working_alloca_h=yes
8158 ac_cv_working_alloca_h=no
8160 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8161 conftest$ac_exeext conftest.$ac_ext
8163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8164 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
8165 if test $ac_cv_working_alloca_h = yes; then
8167 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
8171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8172 printf %s "checking for alloca... " >&6; }
8173 if test ${ac_cv_func_alloca_works+y}
8175 printf %s "(cached) " >&6
8177 if test $ac_cv_working_alloca_h = yes; then
8178 ac_cv_func_alloca_works=yes
8180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8181 /* end confdefs.h. */
8186 # define alloca __builtin_alloca
8187 # elif defined _MSC_VER
8188 # include <malloc.h>
8189 # define alloca _alloca
8194 void *alloca (size_t);
8201 char *p = (char *) alloca (1);
8207 if ac_fn_c_try_link "$LINENO"
8209 ac_cv_func_alloca_works=yes
8211 ac_cv_func_alloca_works=no
8213 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8214 conftest$ac_exeext conftest.$ac_ext
8216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8217 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
8220 if test $ac_cv_func_alloca_works = yes; then
8222 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
8225 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8226 # that cause trouble. Some versions do not even contain alloca or
8227 # contain a buggy version. If you still want to use their alloca,
8228 # use ar to extract alloca.o from them instead of compiling alloca.c.
8234 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8236 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
8239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8240 printf %s "checking stack direction for C alloca... " >&6; }
8241 if test ${ac_cv_c_stack_direction+y}
8243 printf %s "(cached) " >&6
8245 if test "$cross_compiling" = yes
8247 ac_cv_c_stack_direction=0
8249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8250 /* end confdefs.h. */
8251 $ac_includes_default
8253 find_stack_direction (int *addr, int depth)
8258 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8259 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8264 main (int argc, char **argv)
8266 return find_stack_direction (0, argc + !argv + 20) < 0;
8269 if ac_fn_c_try_run "$LINENO"
8271 ac_cv_c_stack_direction=1
8273 ac_cv_c_stack_direction=-1
8275 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8276 conftest.$ac_objext conftest.beam conftest.$ac_ext
8280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8281 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
8282 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
8329 HAVE_DECL_WCWIDTH=1;
8330 REPLACE_MBSTATE_T=0;
8336 REPLACE_MBSRTOWCS=0;
8337 REPLACE_MBSNRTOWCS=0;
8339 REPLACE_WCSRTOMBS=0;
8340 REPLACE_WCSNRTOMBS=0;
8348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8349 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8350 if test ${gl_cv_header_wchar_h_correct_inline+y}
8352 printf %s "(cached) " >&6
8354 gl_cv_header_wchar_h_correct_inline=yes
8357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8358 /* end confdefs.h. */
8361 #define wcstod renamed_wcstod
8363 extern int zero (void);
8364 int main () { return zero(); }
8367 save_ac_compile="$ac_compile"
8368 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
8369 if echo '#include "conftest.c"' >conftest1.c \
8370 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8371 (eval $ac_compile) 2>&5
8373 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8374 test $ac_status = 0; }; then
8375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8376 /* end confdefs.h. */
8379 #define wcstod renamed_wcstod
8381 int zero (void) { return 0; }
8384 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
8385 if echo '#include "conftest.c"' >conftest2.c \
8386 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8387 (eval $ac_compile) 2>&5
8389 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8390 test $ac_status = 0; }; then
8391 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8394 gl_cv_header_wchar_h_correct_inline=no
8398 ac_compile="$save_ac_compile"
8399 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
8404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8405 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
8406 if test $gl_cv_header_wchar_h_correct_inline = no; then
8407 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8408 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8409 C99 mode. You have four options:
8410 - Add the flag -fgnu89-inline to CC and reconfigure, or
8411 - Fix your include files, using parts of
8412 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8413 - Use a gcc version older than 4.3, or
8414 - Don't use the flags -std=c99 or -std=gnu99.
8415 Configuration aborted." "$LINENO" 5
8419 for ac_item in $ac_func_c_list
8421 if test $ac_func; then
8422 ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
8423 if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
8424 echo "#define $ac_item 1" >> confdefs.h
8432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8433 printf %s "checking for nl_langinfo and CODESET... " >&6; }
8434 if test ${am_cv_langinfo_codeset+y}
8436 printf %s "(cached) " >&6
8438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8439 /* end confdefs.h. */
8440 #include <langinfo.h>
8444 char* cs = nl_langinfo(CODESET); return !cs;
8449 if ac_fn_c_try_link "$LINENO"
8451 am_cv_langinfo_codeset=yes
8453 am_cv_langinfo_codeset=no
8455 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8456 conftest$ac_exeext conftest.$ac_ext
8459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8460 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
8461 if test $am_cv_langinfo_codeset = yes; then
8463 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8471 printf %s "checking for a traditional french locale... " >&6; }
8472 if test ${gt_cv_locale_fr+y}
8474 printf %s "(cached) " >&6
8477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8478 /* end confdefs.h. */
8482 #if HAVE_LANGINFO_CODESET
8483 # include <langinfo.h>
8490 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
8491 imitates locale dependent behaviour by looking at the environment
8492 variables, and all locales use the UTF-8 encoding. */
8493 #if defined __BEOS__ || defined __HAIKU__
8496 /* Check whether the given locale name is recognized by the system. */
8497 # if defined _WIN32 && !defined __CYGWIN__
8498 /* On native Windows, setlocale(category, "") looks at the system settings,
8499 not at the environment variables. Also, when an encoding suffix such
8500 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8501 category of the locale to "C". */
8502 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8503 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8506 if (setlocale (LC_ALL, "") == NULL) return 1;
8508 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8509 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8510 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8511 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8512 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8513 some unit tests fail.
8514 On MirBSD 10, when an unsupported locale is specified, setlocale()
8515 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
8516 # if HAVE_LANGINFO_CODESET
8518 const char *cs = nl_langinfo (CODESET);
8519 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8520 || strcmp (cs, "UTF-8") == 0)
8525 /* On Cygwin, avoid locale names without encoding suffix, because the
8526 locale_charset() function relies on the encoding suffix. Note that
8527 LC_ALL is set on the command line. */
8528 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8530 /* Check whether in the abbreviation of the second month, the second
8531 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8532 one byte long. This excludes the UTF-8 encoding. */
8533 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8534 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8535 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8536 /* Check whether the decimal separator is a comma.
8537 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8538 are nl_langinfo(RADIXCHAR) are both ".". */
8539 if (localeconv () ->decimal_point[0] != ',') return 1;
8546 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8547 (eval $ac_link) 2>&5
8549 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8550 test $ac_status = 0; } && test -s conftest$ac_exeext; then
8552 # Handle native Windows specially, because there setlocale() interprets
8553 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8554 # "fr" or "fra" as "French" or "French_France.1252",
8555 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8556 # "ja" as "Japanese" or "Japanese_Japan.932",
8559 # Test for the native Windows locale name.
8560 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8561 gt_cv_locale_fr=French_France.1252
8564 gt_cv_locale_fr=none
8568 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8569 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8570 # configure script would override the LC_ALL setting. Likewise for
8571 # LC_CTYPE, which is also set at the beginning of the configure script.
8572 # Test for the usual locale name.
8573 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8574 gt_cv_locale_fr=fr_FR
8576 # Test for the locale name with explicit encoding suffix.
8577 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8578 gt_cv_locale_fr=fr_FR.ISO-8859-1
8580 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8581 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8582 gt_cv_locale_fr=fr_FR.ISO8859-1
8584 # Test for the HP-UX locale name.
8585 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8586 gt_cv_locale_fr=fr_FR.iso88591
8588 # Test for the Solaris 7 locale name.
8589 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8593 gt_cv_locale_fr=none
8605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8606 printf "%s\n" "$gt_cv_locale_fr" >&6; }
8607 LOCALE_FR=$gt_cv_locale_fr
8632 GL_GNULIB_MBSRTOWCS=0
8636 GL_GNULIB_MBSNRTOWCS=0
8644 GL_GNULIB_WCSRTOMBS=0
8648 GL_GNULIB_WCSNRTOMBS=0
8668 GL_GNULIB_WMEMMOVE=0
8672 GL_GNULIB_WMEMPCPY=0
8720 GL_GNULIB_WCSCASECMP=0
8724 GL_GNULIB_WCSNCASECMP=0
8768 GL_GNULIB_WCSWIDTH=0
8772 GL_GNULIB_WCSFTIME=0
8776 GL_GNULIB_MDA_WCSDUP=1
8782 HAVE_ALIGNED_ALLOC=1;
8784 HAVE_CANONICALIZE_FILE_NAME=1;
8788 HAVE_DECL_GETLOADAVG=1;
8792 HAVE_DECL_INITSTATE=1;
8799 HAVE_POSIX_MEMALIGN=1;
8800 HAVE_POSIX_OPENPT=1;
8807 HAVE_REALLOCARRAY=1;
8810 HAVE_SECURE_GETENV=1;
8814 HAVE_DECL_SETSTATE=1;
8821 HAVE_STRUCT_RANDOM_DATA=1;
8822 HAVE_SYS_LOADAVG_H=0;
8824 HAVE_DECL_UNSETENV=1;
8825 REPLACE_ALIGNED_ALLOC=0;
8827 REPLACE_CANONICALIZE_FILE_NAME=0;
8829 REPLACE_INITSTATE=0;
8833 REPLACE_POSIX_MEMALIGN=0;
8835 REPLACE_PTSNAME_R=0;
8841 REPLACE_REALLOCARRAY=0;
8855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
8856 printf %s "checking whether malloc is ptrdiff_t safe... " >&6; }
8857 if test ${gl_cv_malloc_ptrdiff+y}
8859 printf %s "(cached) " >&6
8861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8862 /* end confdefs.h. */
8868 /* 64-bit ptrdiff_t is so wide that no practical platform
8870 #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
8872 /* On rare machines where size_t fits in ptrdiff_t there
8874 #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
8876 /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
8877 bounds even on 32-bit platforms. We don't know which
8878 non-glibc systems are safe. */
8879 #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
8881 #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
8884 #error "malloc might not be ptrdiff_t safe"
8892 if ac_fn_c_try_compile "$LINENO"
8894 gl_cv_malloc_ptrdiff=yes
8896 gl_cv_malloc_ptrdiff=no
8898 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
8902 printf "%s\n" "$gl_cv_malloc_ptrdiff" >&6; }
8907 test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1
8911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
8912 printf %s "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
8913 if test ${gl_cv_func_malloc_posix+y}
8915 printf %s "(cached) " >&6
8920 gl_cv_func_malloc_posix=no ;;
8923 gl_cv_func_malloc_posix=no ;;
8925 gl_cv_func_malloc_posix=yes ;;
8929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
8930 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
8936 if test "$gl_cv_func_malloc_posix" = yes; then
8938 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
8947 if test $REPLACE_MALLOC = 1; then
8957 GL_GNULIB_ALIGNED_ALLOC=0
8965 GL_GNULIB_CALLOC_POSIX=0
8969 GL_GNULIB_CANONICALIZE_FILE_NAME=0
8973 GL_GNULIB_FREE_POSIX=0
8977 GL_GNULIB_GETLOADAVG=0
8981 GL_GNULIB_GETSUBOPT=0
8989 GL_GNULIB_MALLOC_POSIX=0
9001 GL_GNULIB_MKOSTEMP=0
9005 GL_GNULIB_MKOSTEMPS=0
9013 GL_GNULIB_MKSTEMPS=0
9017 GL_GNULIB_POSIX_MEMALIGN=0
9021 GL_GNULIB_POSIX_OPENPT=0
9029 GL_GNULIB_PTSNAME_R=0
9045 GL_GNULIB_RANDOM_R=0
9049 GL_GNULIB_REALLOCARRAY=0
9053 GL_GNULIB_REALLOC_POSIX=0
9057 GL_GNULIB_REALPATH=0
9065 GL_GNULIB_SECURE_GETENV=0
9093 GL_GNULIB_STRTOULL=0
9097 GL_GNULIB_SYSTEM_POSIX=0
9101 GL_GNULIB_UNLOCKPT=0
9105 GL_GNULIB_UNSETENV=0
9113 GL_GNULIB_MDA_ECVT=1
9117 GL_GNULIB_MDA_FCVT=1
9121 GL_GNULIB_MDA_GCVT=1
9125 GL_GNULIB_MDA_MKTEMP=1
9129 GL_GNULIB_MDA_PUTENV=1
9133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9134 printf %s "checking for C/C++ restrict keyword... " >&6; }
9135 if test ${ac_cv_c_restrict+y}
9137 printf %s "(cached) " >&6
9140 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
9141 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
9142 # Put 'restrict' last, because C++ lacks it.
9143 for ac_kw in __restrict__ __restrict _Restrict restrict; do
9144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9145 /* end confdefs.h. */
9146 typedef int *int_ptr;
9147 int foo (int_ptr $ac_kw ip) { return ip[0]; }
9148 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
9149 int bar (int ip[$ac_kw]) { return ip[0]; }
9157 return foo (t) + bar (t);
9163 if ac_fn_c_try_compile "$LINENO"
9165 ac_cv_c_restrict=$ac_kw
9167 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9168 test "$ac_cv_c_restrict" != no && break
9172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9173 printf "%s\n" "$ac_cv_c_restrict" >&6; }
9175 case $ac_cv_c_restrict in
9177 no) printf "%s\n" "#define restrict /**/" >>confdefs.h
9179 *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
9186 HAVE_COPY_FILE_RANGE=1;
9196 HAVE_GETDTABLESIZE=1;
9203 HAVE_GROUP_MEMBER=1;
9219 HAVE_DECL_ENVIRON=1;
9220 HAVE_DECL_EXECVPE=1;
9222 HAVE_DECL_FDATASYNC=1;
9223 HAVE_DECL_GETDOMAINNAME=1;
9224 HAVE_DECL_GETLOGIN=1;
9225 HAVE_DECL_GETLOGIN_R=1;
9226 HAVE_DECL_GETPAGESIZE=1;
9227 HAVE_DECL_GETUSERSHELL=1;
9228 HAVE_DECL_SETHOSTNAME=1;
9229 HAVE_DECL_TRUNCATE=1;
9230 HAVE_DECL_TTYNAME_R=1;
9245 REPLACE_FACCESSAT=0;
9247 REPLACE_FTRUNCATE=0;
9249 REPLACE_GETDOMAINNAME=0;
9250 REPLACE_GETDTABLESIZE=0;
9251 REPLACE_GETLOGIN_R=0;
9252 REPLACE_GETGROUPS=0;
9253 REPLACE_GETPAGESIZE=0;
9264 REPLACE_READLINKAT=0;
9268 REPLACE_SYMLINKAT=0;
9270 REPLACE_TTYNAME_R=0;
9275 UNISTD_H_HAVE_SYS_RANDOM_H=0;
9276 UNISTD_H_HAVE_WINSOCK2_H=0;
9277 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9283 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9284 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9286 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9289 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9294 SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
9295 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9318 GL_GNULIB_COPY_FILE_RANGE=0
9338 GL_GNULIB_EUIDACCESS=0
9370 GL_GNULIB_FACCESSAT=0
9378 GL_GNULIB_FCHOWNAT=0
9382 GL_GNULIB_FDATASYNC=0
9390 GL_GNULIB_FTRUNCATE=0
9398 GL_GNULIB_GETDOMAINNAME=0
9402 GL_GNULIB_GETDTABLESIZE=0
9406 GL_GNULIB_GETENTROPY=0
9410 GL_GNULIB_GETGROUPS=0
9414 GL_GNULIB_GETHOSTNAME=0
9418 GL_GNULIB_GETLOGIN=0
9422 GL_GNULIB_GETLOGIN_R=0
9426 GL_GNULIB_GETOPT_POSIX=0
9430 GL_GNULIB_GETPAGESIZE=0
9438 GL_GNULIB_GETUSERSHELL=0
9442 GL_GNULIB_GROUP_MEMBER=0
9486 GL_GNULIB_READLINK=0
9490 GL_GNULIB_READLINKAT=0
9498 GL_GNULIB_SETHOSTNAME=0
9510 GL_GNULIB_SYMLINKAT=0
9514 GL_GNULIB_TRUNCATE=0
9518 GL_GNULIB_TTYNAME_R=0
9522 GL_GNULIB_UNISTD_H_GETOPT=0
9526 GL_GNULIB_UNISTD_H_NONBLOCKING=0
9530 GL_GNULIB_UNISTD_H_SIGPIPE=0
9538 GL_GNULIB_UNLINKAT=0
9550 GL_GNULIB_MDA_ACCESS=1
9554 GL_GNULIB_MDA_CHDIR=1
9558 GL_GNULIB_MDA_CLOSE=1
9566 GL_GNULIB_MDA_DUP2=1
9570 GL_GNULIB_MDA_EXECL=1
9574 GL_GNULIB_MDA_EXECLE=1
9578 GL_GNULIB_MDA_EXECLP=1
9582 GL_GNULIB_MDA_EXECV=1
9586 GL_GNULIB_MDA_EXECVE=1
9590 GL_GNULIB_MDA_EXECVP=1
9594 GL_GNULIB_MDA_EXECVPE=1
9598 GL_GNULIB_MDA_GETCWD=1
9602 GL_GNULIB_MDA_GETPID=1
9606 GL_GNULIB_MDA_ISATTY=1
9610 GL_GNULIB_MDA_LSEEK=1
9614 GL_GNULIB_MDA_READ=1
9618 GL_GNULIB_MDA_RMDIR=1
9622 GL_GNULIB_MDA_SWAB=1
9626 GL_GNULIB_MDA_UNLINK=1
9630 GL_GNULIB_MDA_WRITE=1
9639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9640 printf %s "checking whether the preprocessor supports include_next... " >&6; }
9641 if test ${gl_cv_have_include_next+y}
9643 printf %s "(cached) " >&6
9645 rm -rf conftestd1a conftestd1b conftestd2
9646 mkdir conftestd1a conftestd1b conftestd2
9647 cat <<EOF > conftestd1a/conftest.h
9648 #define DEFINED_IN_CONFTESTD1
9649 #include_next <conftest.h>
9650 #ifdef DEFINED_IN_CONFTESTD2
9653 #error "include_next doesn't work"
9656 cat <<EOF > conftestd1b/conftest.h
9657 #define DEFINED_IN_CONFTESTD1
9659 #include_next <conftest.h>
9660 #ifdef DEFINED_IN_CONFTESTD2
9663 #error "include_next doesn't work"
9666 cat <<EOF > conftestd2/conftest.h
9667 #ifndef DEFINED_IN_CONFTESTD1
9668 #error "include_next test doesn't work"
9670 #define DEFINED_IN_CONFTESTD2
9672 gl_save_CPPFLAGS="$CPPFLAGS"
9673 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9675 /* end confdefs.h. */
9676 #include <conftest.h>
9678 if ac_fn_c_try_compile "$LINENO"
9680 gl_cv_have_include_next=yes
9682 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9684 /* end confdefs.h. */
9685 #include <conftest.h>
9687 if ac_fn_c_try_compile "$LINENO"
9689 gl_cv_have_include_next=buggy
9691 gl_cv_have_include_next=no
9693 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9696 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9697 CPPFLAGS="$gl_save_CPPFLAGS"
9698 rm -rf conftestd1a conftestd1b conftestd2
9701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9702 printf "%s\n" "$gl_cv_have_include_next" >&6; }
9703 PRAGMA_SYSTEM_HEADER=
9704 if test $gl_cv_have_include_next = yes; then
9705 INCLUDE_NEXT=include_next
9706 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9707 if test -n "$GCC"; then
9708 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9711 if test $gl_cv_have_include_next = buggy; then
9712 INCLUDE_NEXT=include
9713 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9715 INCLUDE_NEXT=include
9716 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
9724 printf %s "checking whether source code line length is unlimited... " >&6; }
9725 if test ${gl_cv_source_line_length_unlimited+y}
9727 printf %s "(cached) " >&6
9729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9730 /* end confdefs.h. */
9737 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9738 $EGREP "choke me" >/dev/null 2>&1
9740 gl_cv_source_line_length_unlimited=no
9742 gl_cv_source_line_length_unlimited=yes
9748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
9749 printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
9750 if test $gl_cv_source_line_length_unlimited = no; then
9751 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9768 if test $gl_cv_have_include_next = yes; then
9769 gl_cv_next_ctype_h='<'ctype.h'>'
9771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
9772 printf %s "checking absolute name of <ctype.h>... " >&6; }
9773 if test ${gl_cv_next_ctype_h+y}
9775 printf %s "(cached) " >&6
9780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9781 /* end confdefs.h. */
9785 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9786 *) gl_absname_cpp="$ac_cpp" ;;
9791 gl_dirsep_regex='[/\\]'
9794 gl_dirsep_regex='\/'
9797 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9798 gl_header_literal_regex=`echo 'ctype.h' \
9799 | sed -e "$gl_make_literal_regex_sed"`
9800 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9801 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9807 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9808 sed -n "$gl_absolute_header_sed"`
9810 gl_header=$gl_cv_absolute_ctype_h
9811 gl_cv_next_ctype_h='"'$gl_header'"'
9815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
9816 printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
9818 NEXT_CTYPE_H=$gl_cv_next_ctype_h
9820 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9821 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9822 gl_next_as_first_directive='<'ctype.h'>'
9824 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9825 gl_next_as_first_directive=$gl_cv_next_ctype_h
9827 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
9844 #if defined _WIN32 && !defined __CYGWIN__
9845 #define access _access
9846 #define chdir _chdir
9847 #define chmod _chmod
9848 #define close _close
9849 #define creat _creat
9853 #define execl _execl
9854 #define execle _execle
9855 #define execlp _execlp
9856 #define execv _execv
9857 #define execve _execve
9858 #define execvp _execvp
9859 #define execvpe _execvpe
9860 #define fcloseall _fcloseall
9862 #define fdopen _fdopen
9863 #define fileno _fileno
9865 #define getcwd _getcwd
9866 #define getpid _getpid
9868 #define isatty _isatty
9872 #define lfind _lfind
9873 #define lsearch _lsearch
9874 #define lseek _lseek
9875 #define memccpy _memccpy
9876 #define mkdir _mkdir
9877 #define mktemp _mktemp
9879 #define putenv _putenv
9882 #define rmdir _rmdir
9883 #define strdup _strdup
9885 #define tempnam _tempnam
9886 #define tzset _tzset
9887 #define umask _umask
9888 #define unlink _unlink
9889 #define utime _utime
9890 #define wcsdup _wcsdup
9891 #define write _write
9905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9906 printf %s "checking if environ is properly declared... " >&6; }
9907 if test ${gt_cv_var_environ_declaration+y}
9909 printf %s "(cached) " >&6
9911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9912 /* end confdefs.h. */
9916 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
9919 typedef struct { int foo; } foo_t;
9920 extern foo_t environ;
9929 if ac_fn_c_try_compile "$LINENO"
9931 gt_cv_var_environ_declaration=no
9933 gt_cv_var_environ_declaration=yes
9935 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9938 printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
9939 if test $gt_cv_var_environ_declaration = yes; then
9941 printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9946 if test $gt_cv_var_environ_declaration != yes; then
9952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9953 printf %s "checking for complete errno.h... " >&6; }
9954 if test ${gl_cv_header_errno_h_complete+y}
9956 printf %s "(cached) " >&6
9959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9960 /* end confdefs.h. */
9963 #if !defined ETXTBSY
9972 #if !defined ENOLINK
9978 #if !defined EMULTIHOP
9981 #if !defined EBADMSG
9984 #if !defined EOVERFLOW
9987 #if !defined ENOTSUP
9990 #if !defined ENETRESET
9993 #if !defined ECONNABORTED
10002 #if !defined ECANCELED
10005 #if !defined EOWNERDEAD
10008 #if !defined ENOTRECOVERABLE
10011 #if !defined EILSEQ
10016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10017 $EGREP "booboo" >/dev/null 2>&1
10019 gl_cv_header_errno_h_complete=no
10021 gl_cv_header_errno_h_complete=yes
10027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
10028 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
10029 if test $gl_cv_header_errno_h_complete = yes; then
10040 if test $gl_cv_have_include_next = yes; then
10041 gl_cv_next_errno_h='<'errno.h'>'
10043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10044 printf %s "checking absolute name of <errno.h>... " >&6; }
10045 if test ${gl_cv_next_errno_h+y}
10047 printf %s "(cached) " >&6
10052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10053 /* end confdefs.h. */
10057 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10058 *) gl_absname_cpp="$ac_cpp" ;;
10063 gl_dirsep_regex='[/\\]'
10066 gl_dirsep_regex='\/'
10069 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10070 gl_header_literal_regex=`echo 'errno.h' \
10071 | sed -e "$gl_make_literal_regex_sed"`
10072 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10073 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10079 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10080 sed -n "$gl_absolute_header_sed"`
10082 gl_header=$gl_cv_absolute_errno_h
10083 gl_cv_next_errno_h='"'$gl_header'"'
10087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10088 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
10090 NEXT_ERRNO_H=$gl_cv_next_errno_h
10092 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10093 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10094 gl_next_as_first_directive='<'errno.h'>'
10096 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10097 gl_next_as_first_directive=$gl_cv_next_errno_h
10099 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10107 if test -n "$ERRNO_H"; then
10108 GL_GENERATE_ERRNO_H_TRUE=
10109 GL_GENERATE_ERRNO_H_FALSE='#'
10111 GL_GENERATE_ERRNO_H_TRUE='#'
10112 GL_GENERATE_ERRNO_H_FALSE=
10116 if test -n "$ERRNO_H"; then
10117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10118 printf %s "checking for EMULTIHOP value... " >&6; }
10119 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
10121 printf %s "(cached) " >&6
10124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10125 /* end confdefs.h. */
10133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10134 $EGREP "yes" >/dev/null 2>&1
10136 gl_cv_header_errno_h_EMULTIHOP=yes
10138 gl_cv_header_errno_h_EMULTIHOP=no
10142 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10144 /* end confdefs.h. */
10146 #define _XOPEN_SOURCE_EXTENDED 1
10153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10154 $EGREP "yes" >/dev/null 2>&1
10156 gl_cv_header_errno_h_EMULTIHOP=hidden
10160 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10161 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
10162 #define _XOPEN_SOURCE_EXTENDED 1
10164 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10166 #include <stdlib.h>
10176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10177 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10178 case $gl_cv_header_errno_h_EMULTIHOP in
10180 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10183 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10191 if test -n "$ERRNO_H"; then
10192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10193 printf %s "checking for ENOLINK value... " >&6; }
10194 if test ${gl_cv_header_errno_h_ENOLINK+y}
10196 printf %s "(cached) " >&6
10199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10200 /* end confdefs.h. */
10208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10209 $EGREP "yes" >/dev/null 2>&1
10211 gl_cv_header_errno_h_ENOLINK=yes
10213 gl_cv_header_errno_h_ENOLINK=no
10217 if test $gl_cv_header_errno_h_ENOLINK = no; then
10218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10219 /* end confdefs.h. */
10221 #define _XOPEN_SOURCE_EXTENDED 1
10228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10229 $EGREP "yes" >/dev/null 2>&1
10231 gl_cv_header_errno_h_ENOLINK=hidden
10235 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10236 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
10237 #define _XOPEN_SOURCE_EXTENDED 1
10239 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10241 #include <stdlib.h>
10251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10252 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
10253 case $gl_cv_header_errno_h_ENOLINK in
10255 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10258 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10266 if test -n "$ERRNO_H"; then
10267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10268 printf %s "checking for EOVERFLOW value... " >&6; }
10269 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
10271 printf %s "(cached) " >&6
10274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10275 /* end confdefs.h. */
10283 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10284 $EGREP "yes" >/dev/null 2>&1
10286 gl_cv_header_errno_h_EOVERFLOW=yes
10288 gl_cv_header_errno_h_EOVERFLOW=no
10292 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10294 /* end confdefs.h. */
10296 #define _XOPEN_SOURCE_EXTENDED 1
10303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10304 $EGREP "yes" >/dev/null 2>&1
10306 gl_cv_header_errno_h_EOVERFLOW=hidden
10310 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10311 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
10312 #define _XOPEN_SOURCE_EXTENDED 1
10314 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10316 #include <stdlib.h>
10326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10327 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10328 case $gl_cv_header_errno_h_EOVERFLOW in
10330 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10333 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
10342 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
10343 if test ${ac_cv_c_undeclared_builtin_options+y}
10345 printf %s "(cached) " >&6
10347 ac_save_CFLAGS=$CFLAGS
10348 ac_cv_c_undeclared_builtin_options='cannot detect'
10349 for ac_arg in '' -fno-builtin; do
10350 CFLAGS="$ac_save_CFLAGS $ac_arg"
10351 # This test program should *not* compile successfully.
10352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10353 /* end confdefs.h. */
10363 if ac_fn_c_try_compile "$LINENO"
10367 # This test program should compile successfully.
10368 # No library function is consistently available on
10369 # freestanding implementations, so test against a dummy
10370 # declaration. Include always-available headers on the
10371 # off chance that they somehow elicit warnings.
10372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10373 /* end confdefs.h. */
10375 #include <limits.h>
10376 #include <stdarg.h>
10377 #include <stddef.h>
10378 extern void ac_decl (int, char *);
10383 (void) ac_decl (0, (char *) 0);
10390 if ac_fn_c_try_compile "$LINENO"
10392 if test x"$ac_arg" = x
10394 ac_cv_c_undeclared_builtin_options='none needed'
10396 ac_cv_c_undeclared_builtin_options=$ac_arg
10400 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10402 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10404 CFLAGS=$ac_save_CFLAGS
10407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
10408 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
10409 case $ac_cv_c_undeclared_builtin_options in #(
10411 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10412 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
10413 as_fn_error $? "cannot make $CC report undeclared builtins
10414 See \`config.log' for more details" "$LINENO" 5; } ;; #(
10416 ac_c_undeclared_builtin_options='' ;; #(
10418 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
10421 ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
10422 if test "x$ac_cv_have_decl_strerror_r" = xyes
10428 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
10431 if test $ac_cv_have_decl_strerror_r = yes; then
10432 # For backward compatibility's sake, define HAVE_STRERROR_R.
10433 # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
10434 # as AC_CHECK_DECLS_ONCE.)
10436 printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
10440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10441 printf %s "checking whether strerror_r returns char *... " >&6; }
10442 if test ${ac_cv_func_strerror_r_char_p+y}
10444 printf %s "(cached) " >&6
10447 ac_cv_func_strerror_r_char_p=no
10448 if test $ac_cv_have_decl_strerror_r = yes; then
10449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10450 /* end confdefs.h. */
10451 #include <string.h>
10457 char x = *strerror_r (0, buf, sizeof buf);
10458 char *p = strerror_r (0, buf, sizeof buf);
10465 if ac_fn_c_try_compile "$LINENO"
10467 ac_cv_func_strerror_r_char_p=yes
10469 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10475 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
10476 if test $ac_cv_func_strerror_r_char_p = yes; then
10478 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10483 XGETTEXT_EXTRA_OPTIONS=
10507 GL_GNULIB_NONBLOCKING=0
10519 GL_GNULIB_MDA_CREAT=1
10523 GL_GNULIB_MDA_OPEN=1
10533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
10534 printf %s "checking for working fcntl.h... " >&6; }
10535 if test ${gl_cv_header_working_fcntl_h+y}
10537 printf %s "(cached) " >&6
10539 if test "$cross_compiling" = yes
10542 # Guess 'no' on native Windows.
10543 mingw*) gl_cv_header_working_fcntl_h='no' ;;
10544 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
10548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10549 /* end confdefs.h. */
10550 #include <sys/types.h>
10551 #include <sys/stat.h>
10553 # include <unistd.h>
10554 #else /* on Windows with MSVC */
10556 # include <stdlib.h>
10557 # defined sleep(n) _sleep ((n) * 1000)
10565 #define O_NOATIME 0
10568 #define O_NOFOLLOW 0
10570 static int const constants[] =
10572 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10573 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10580 int result = !constants;
10583 static char const sym[] = "conftest.sym";
10584 if (symlink ("/dev/null", sym) != 0)
10588 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10595 if (unlink (sym) != 0 || symlink (".", sym) != 0)
10599 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10610 static char const file[] = "confdefs.h";
10611 int fd = open (file, O_RDONLY | O_NOATIME);
10617 if (fstat (fd, &st0) != 0)
10623 if (read (fd, &c, 1) != 1)
10627 if (close (fd) != 0)
10632 if (stat (file, &st1) != 0)
10635 if (st0.st_atime != st1.st_atime)
10647 if ac_fn_c_try_run "$LINENO"
10649 gl_cv_header_working_fcntl_h=yes
10652 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10653 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10654 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10655 *) gl_cv_header_working_fcntl_h='no';;
10658 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10659 conftest.$ac_objext conftest.beam conftest.$ac_ext
10664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10665 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
10667 case $gl_cv_header_working_fcntl_h in #(
10668 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10672 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
10675 case $gl_cv_header_working_fcntl_h in #(
10676 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10680 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
10684 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
10686 if test "x$ac_cv_type_pid_t" = xyes
10690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10691 /* end confdefs.h. */
10693 #if defined _WIN64 && !defined __CYGWIN__
10706 if ac_fn_c_try_compile "$LINENO"
10710 ac_pid_type='__int64'
10712 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10714 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
10720 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
10721 if test "x$ac_cv_type_mode_t" = xyes
10726 printf "%s\n" "#define mode_t int" >>confdefs.h
10741 if test $gl_cv_have_include_next = yes; then
10742 gl_cv_next_fcntl_h='<'fcntl.h'>'
10744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
10745 printf %s "checking absolute name of <fcntl.h>... " >&6; }
10746 if test ${gl_cv_next_fcntl_h+y}
10748 printf %s "(cached) " >&6
10753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10754 /* end confdefs.h. */
10758 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10759 *) gl_absname_cpp="$ac_cpp" ;;
10764 gl_dirsep_regex='[/\\]'
10767 gl_dirsep_regex='\/'
10770 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10771 gl_header_literal_regex=`echo 'fcntl.h' \
10772 | sed -e "$gl_make_literal_regex_sed"`
10773 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10774 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10780 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10781 sed -n "$gl_absolute_header_sed"`
10783 gl_header=$gl_cv_absolute_fcntl_h
10784 gl_cv_next_fcntl_h='"'$gl_header'"'
10788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
10789 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
10791 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
10793 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10794 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10795 gl_next_as_first_directive='<'fcntl.h'>'
10797 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10798 gl_next_as_first_directive=$gl_cv_next_fcntl_h
10800 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
10836 if test $gl_cv_have_include_next = yes; then
10837 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
10839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
10840 printf %s "checking absolute name of <fnmatch.h>... " >&6; }
10841 if test ${gl_cv_next_fnmatch_h+y}
10843 printf %s "(cached) " >&6
10846 if test $ac_cv_header_fnmatch_h = yes; then
10851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10852 /* end confdefs.h. */
10853 #include <fnmatch.h>
10856 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10857 *) gl_absname_cpp="$ac_cpp" ;;
10862 gl_dirsep_regex='[/\\]'
10865 gl_dirsep_regex='\/'
10868 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10869 gl_header_literal_regex=`echo 'fnmatch.h' \
10870 | sed -e "$gl_make_literal_regex_sed"`
10871 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10872 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10878 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10879 sed -n "$gl_absolute_header_sed"`
10881 gl_header=$gl_cv_absolute_fnmatch_h
10882 gl_cv_next_fnmatch_h='"'$gl_header'"'
10884 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
10889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
10890 printf "%s\n" "$gl_cv_next_fnmatch_h" >&6; }
10892 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
10894 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10895 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10896 gl_next_as_first_directive='<'fnmatch.h'>'
10898 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10899 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
10901 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
10909 if test $ac_cv_header_fnmatch_h = yes; then
10918 FNMATCH_H=fnmatch.h
10920 if test $ac_cv_header_fnmatch_h != yes; then
10921 FNMATCH_H=fnmatch.h
10926 if test -n "$FNMATCH_H"; then
10927 GL_GENERATE_FNMATCH_H_TRUE=
10928 GL_GENERATE_FNMATCH_H_FALSE='#'
10930 GL_GENERATE_FNMATCH_H_TRUE='#'
10931 GL_GENERATE_FNMATCH_H_FALSE=
10942 GL_GNULIB_FNMATCH=0
10948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10949 printf %s "checking for mbstate_t... " >&6; }
10950 if test ${ac_cv_type_mbstate_t+y}
10952 printf %s "(cached) " >&6
10954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10955 /* end confdefs.h. */
10956 $ac_includes_default
10961 mbstate_t x; return sizeof x;
10966 if ac_fn_c_try_compile "$LINENO"
10968 ac_cv_type_mbstate_t=yes
10970 ac_cv_type_mbstate_t=no
10972 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10975 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
10976 if test $ac_cv_type_mbstate_t = yes; then
10978 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
10982 printf "%s\n" "#define mbstate_t int" >>confdefs.h
10988 HAVE_DECL_FCLOSEALL=1;
10989 HAVE_DECL_FPURGE=1;
10990 HAVE_DECL_FSEEKO=1;
10991 HAVE_DECL_FTELLO=1;
10992 HAVE_DECL_GETDELIM=1;
10993 HAVE_DECL_GETLINE=1;
10994 HAVE_DECL_OBSTACK_PRINTF=1;
10995 HAVE_DECL_SNPRINTF=1;
10996 HAVE_DECL_VSNPRINTF=1;
11017 REPLACE_GETDELIM=0;
11019 REPLACE_OBSTACK_PRINTF=0;
11025 REPLACE_RENAMEAT=0;
11026 REPLACE_SNPRINTF=0;
11028 REPLACE_STDIO_READ_FUNCS=0;
11029 REPLACE_STDIO_WRITE_FUNCS=0;
11031 REPLACE_VASPRINTF=0;
11032 REPLACE_VDPRINTF=0;
11033 REPLACE_VFPRINTF=0;
11035 REPLACE_VSNPRINTF=0;
11036 REPLACE_VSPRINTF=0;
11040 GL_GNULIB_DPRINTF=0
11068 GL_GNULIB_FPRINTF=0
11072 GL_GNULIB_FPRINTF_POSIX=0
11092 GL_GNULIB_FREOPEN=0
11124 GL_GNULIB_GETCHAR=0
11128 GL_GNULIB_GETDELIM=0
11132 GL_GNULIB_GETLINE=0
11136 GL_GNULIB_OBSTACK_PRINTF=0
11140 GL_GNULIB_OBSTACK_PRINTF_POSIX=0
11160 GL_GNULIB_PRINTF_POSIX=0
11168 GL_GNULIB_PUTCHAR=0
11184 GL_GNULIB_RENAMEAT=0
11192 GL_GNULIB_SNPRINTF=0
11196 GL_GNULIB_SPRINTF_POSIX=0
11200 GL_GNULIB_STDIO_H_NONBLOCKING=0
11204 GL_GNULIB_STDIO_H_SIGPIPE=0
11208 GL_GNULIB_TMPFILE=0
11212 GL_GNULIB_VASPRINTF=0
11216 GL_GNULIB_VFSCANF=0
11224 GL_GNULIB_VDPRINTF=0
11228 GL_GNULIB_VFPRINTF=0
11232 GL_GNULIB_VFPRINTF_POSIX=0
11236 GL_GNULIB_VPRINTF=0
11240 GL_GNULIB_VPRINTF_POSIX=0
11244 GL_GNULIB_VSNPRINTF=0
11248 GL_GNULIB_VSPRINTF_POSIX=0
11252 GL_GNULIB_MDA_FCLOSEALL=1
11256 GL_GNULIB_MDA_FDOPEN=1
11260 GL_GNULIB_MDA_FILENO=1
11264 GL_GNULIB_MDA_GETW=1
11268 GL_GNULIB_MDA_PUTW=1
11272 GL_GNULIB_MDA_TEMPNAM=1
11289 REPLACE_FCHMODAT=0;
11292 REPLACE_FUTIMENS=0;
11296 REPLACE_MKFIFOAT=0;
11300 REPLACE_UTIMENSAT=0;
11302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11303 printf %s "checking whether stat file-mode macros are broken... " >&6; }
11304 if test ${ac_cv_header_stat_broken+y}
11306 printf %s "(cached) " >&6
11308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11309 /* end confdefs.h. */
11310 #include <sys/types.h>
11311 #include <sys/stat.h>
11313 #if defined S_ISBLK && defined S_IFDIR
11314 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11317 #if defined S_ISBLK && defined S_IFCHR
11318 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11321 #if defined S_ISLNK && defined S_IFREG
11322 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11325 #if defined S_ISSOCK && defined S_IFREG
11326 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11330 if ac_fn_c_try_compile "$LINENO"
11332 ac_cv_header_stat_broken=no
11334 ac_cv_header_stat_broken=yes
11336 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11339 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
11340 if test $ac_cv_header_stat_broken = yes; then
11342 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
11350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11351 printf %s "checking for 64-bit off_t... " >&6; }
11352 if test ${gl_cv_type_off_t_64+y}
11354 printf %s "(cached) " >&6
11356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11357 /* end confdefs.h. */
11358 #include <sys/types.h>
11359 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
11369 if ac_fn_c_try_compile "$LINENO"
11371 gl_cv_type_off_t_64=yes
11373 gl_cv_type_off_t_64=no
11375 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
11379 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
11380 if test $gl_cv_type_off_t_64 = no; then
11381 WINDOWS_64_BIT_OFF_T=1
11383 WINDOWS_64_BIT_OFF_T=0
11385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
11386 printf %s "checking for 64-bit st_size... " >&6; }
11387 if test ${gl_cv_member_st_size_64+y}
11389 printf %s "(cached) " >&6
11391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11392 /* end confdefs.h. */
11393 #include <sys/types.h>
11395 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
11405 if ac_fn_c_try_compile "$LINENO"
11407 gl_cv_member_st_size_64=yes
11409 gl_cv_member_st_size_64=no
11411 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
11415 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
11416 if test $gl_cv_member_st_size_64 = no; then
11417 WINDOWS_64_BIT_ST_SIZE=1
11419 WINDOWS_64_BIT_ST_SIZE=0
11423 WINDOWS_64_BIT_OFF_T=0
11424 WINDOWS_64_BIT_ST_SIZE=0
11442 if test $gl_cv_have_include_next = yes; then
11443 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11446 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
11447 if test ${gl_cv_next_sys_stat_h+y}
11449 printf %s "(cached) " >&6
11452 if test $ac_cv_header_sys_stat_h = yes; then
11457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11458 /* end confdefs.h. */
11459 #include <sys/stat.h>
11462 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11463 *) gl_absname_cpp="$ac_cpp" ;;
11468 gl_dirsep_regex='[/\\]'
11471 gl_dirsep_regex='\/'
11474 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11475 gl_header_literal_regex=`echo 'sys/stat.h' \
11476 | sed -e "$gl_make_literal_regex_sed"`
11477 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11478 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11484 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11485 sed -n "$gl_absolute_header_sed"`
11487 gl_header=$gl_cv_absolute_sys_stat_h
11488 gl_cv_next_sys_stat_h='"'$gl_header'"'
11490 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11496 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
11498 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11500 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11501 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11502 gl_next_as_first_directive='<'sys/stat.h'>'
11504 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11505 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11507 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11516 WINDOWS_STAT_TIMESPEC=0
11525 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11526 #include <sys/stat.h>
11528 if test "x$ac_cv_type_nlink_t" = xyes
11533 printf "%s\n" "#define nlink_t int" >>confdefs.h
11548 ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
11549 if test "x$ac_cv_header_sdkddkver_h" = xyes
11551 printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h
11564 GL_GNULIB_FCHMODAT=0
11572 GL_GNULIB_FSTATAT=0
11576 GL_GNULIB_FUTIMENS=0
11580 GL_GNULIB_GETUMASK=0
11596 GL_GNULIB_MKDIRAT=0
11604 GL_GNULIB_MKFIFOAT=0
11612 GL_GNULIB_MKNODAT=0
11620 GL_GNULIB_UTIMENSAT=0
11624 GL_GNULIB_OVERRIDES_STRUCT_STAT=0
11628 GL_GNULIB_MDA_CHMOD=1
11632 GL_GNULIB_MDA_MKDIR=1
11636 GL_GNULIB_MDA_UMASK=1
11641 ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
11642 if test "x$ac_cv_have_decl_getdtablesize" = xyes
11648 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
11664 if test $gl_cv_have_include_next = yes; then
11665 gl_cv_next_getopt_h='<'getopt.h'>'
11667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
11668 printf %s "checking absolute name of <getopt.h>... " >&6; }
11669 if test ${gl_cv_next_getopt_h+y}
11671 printf %s "(cached) " >&6
11674 if test $ac_cv_header_getopt_h = yes; then
11679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11680 /* end confdefs.h. */
11681 #include <getopt.h>
11684 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11685 *) gl_absname_cpp="$ac_cpp" ;;
11690 gl_dirsep_regex='[/\\]'
11693 gl_dirsep_regex='\/'
11696 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11697 gl_header_literal_regex=`echo 'getopt.h' \
11698 | sed -e "$gl_make_literal_regex_sed"`
11699 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11700 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11706 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11707 sed -n "$gl_absolute_header_sed"`
11709 gl_header=$gl_cv_absolute_getopt_h
11710 gl_cv_next_getopt_h='"'$gl_header'"'
11712 gl_cv_next_getopt_h='<'getopt.h'>'
11717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
11718 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
11720 NEXT_GETOPT_H=$gl_cv_next_getopt_h
11722 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11723 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11724 gl_next_as_first_directive='<'getopt.h'>'
11726 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11727 gl_next_as_first_directive=$gl_cv_next_getopt_h
11729 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
11734 if test $ac_cv_header_getopt_h = yes; then
11743 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11744 for ac_header in getopt.h
11746 ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11747 if test "x$ac_cv_header_getopt_h" = xyes
11749 printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
11752 gl_replace_getopt=yes
11758 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11760 for ac_func in getopt_long_only
11762 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11763 if test "x$ac_cv_func_getopt_long_only" = xyes
11765 printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
11768 gl_replace_getopt=yes
11774 if test -z "$gl_replace_getopt"; then
11775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
11776 printf %s "checking whether getopt is POSIX compatible... " >&6; }
11777 if test ${gl_cv_func_getopt_posix+y}
11779 printf %s "(cached) " >&6
11782 if test $cross_compiling = no; then
11783 if test "$cross_compiling" = yes
11785 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11786 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11787 as_fn_error $? "cannot run test program while cross compiling
11788 See \`config.log' for more details" "$LINENO" 5; }
11790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11791 /* end confdefs.h. */
11793 #include <unistd.h>
11794 #include <stdlib.h>
11795 #include <string.h>
11800 static char program[] = "program";
11801 static char a[] = "-a";
11802 static char foo[] = "foo";
11803 static char bar[] = "bar";
11804 char *argv[] = { program, a, foo, bar, NULL };
11807 c = getopt (4, argv, "ab");
11810 c = getopt (4, argv, "ab");
11813 if (!(optind == 2))
11819 if ac_fn_c_try_run "$LINENO"
11821 gl_cv_func_getopt_posix=maybe
11823 gl_cv_func_getopt_posix=no
11825 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11826 conftest.$ac_objext conftest.beam conftest.$ac_ext
11829 if test $gl_cv_func_getopt_posix = maybe; then
11830 if test "$cross_compiling" = yes
11832 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11833 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11834 as_fn_error $? "cannot run test program while cross compiling
11835 See \`config.log' for more details" "$LINENO" 5; }
11837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11838 /* end confdefs.h. */
11840 #include <unistd.h>
11841 #include <stdlib.h>
11842 #include <string.h>
11847 static char program[] = "program";
11848 static char donald[] = "donald";
11849 static char p[] = "-p";
11850 static char billy[] = "billy";
11851 static char duck[] = "duck";
11852 static char a[] = "-a";
11853 static char bar[] = "bar";
11854 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
11857 c = getopt (7, argv, "+abp:q:");
11860 if (!(strcmp (argv[0], "program") == 0))
11862 if (!(strcmp (argv[1], "donald") == 0))
11864 if (!(strcmp (argv[2], "-p") == 0))
11866 if (!(strcmp (argv[3], "billy") == 0))
11868 if (!(strcmp (argv[4], "duck") == 0))
11870 if (!(strcmp (argv[5], "-a") == 0))
11872 if (!(strcmp (argv[6], "bar") == 0))
11874 if (!(optind == 1))
11880 if ac_fn_c_try_run "$LINENO"
11882 gl_cv_func_getopt_posix=maybe
11884 gl_cv_func_getopt_posix=no
11886 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11887 conftest.$ac_objext conftest.beam conftest.$ac_ext
11891 if test $gl_cv_func_getopt_posix = maybe; then
11892 if test "$cross_compiling" = yes
11894 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11895 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11896 as_fn_error $? "cannot run test program while cross compiling
11897 See \`config.log' for more details" "$LINENO" 5; }
11899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11900 /* end confdefs.h. */
11902 #include <unistd.h>
11903 #include <stdlib.h>
11904 #include <string.h>
11909 static char program[] = "program";
11910 static char ab[] = "-ab";
11911 char *argv[3] = { program, ab, NULL };
11912 if (getopt (2, argv, "ab:") != 'a')
11914 if (getopt (2, argv, "ab:") != '?')
11924 if ac_fn_c_try_run "$LINENO"
11926 gl_cv_func_getopt_posix=yes
11928 gl_cv_func_getopt_posix=no
11930 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11931 conftest.$ac_objext conftest.beam conftest.$ac_ext
11937 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
11938 *) gl_cv_func_getopt_posix="guessing yes";;
11943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11944 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
11945 case "$gl_cv_func_getopt_posix" in
11946 *no) gl_replace_getopt=yes ;;
11950 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11952 printf %s "checking for working GNU getopt function... " >&6; }
11953 if test ${gl_cv_func_getopt_gnu+y}
11955 printf %s "(cached) " >&6
11957 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11958 # optstring is necessary for programs like m4 that have POSIX-mandated
11959 # semantics for supporting options interspersed with files.
11960 # Also, since getopt_long is a GNU extension, we require optind=0.
11961 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
11962 # so take care to revert to the correct (non-)export state.
11963 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
11964 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
11965 xx) gl_had_POSIXLY_CORRECT=exported ;;
11966 x) gl_had_POSIXLY_CORRECT=yes ;;
11967 *) gl_had_POSIXLY_CORRECT= ;;
11970 export POSIXLY_CORRECT
11971 if test "$cross_compiling" = yes
11973 gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
11976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11977 /* end confdefs.h. */
11978 #include <getopt.h>
11979 #include <stddef.h>
11980 #include <string.h>
11982 #include <stdlib.h>
11983 #if defined __MACH__ && defined __APPLE__
11984 /* Avoid a crash on Mac OS X. */
11985 #include <mach/mach.h>
11986 #include <mach/mach_error.h>
11987 #include <mach/thread_status.h>
11988 #include <mach/exception.h>
11989 #include <mach/task.h>
11990 #include <pthread.h>
11991 /* The exception port on which our thread listens. */
11992 static mach_port_t our_exception_port;
11993 /* The main function of the thread listening for exceptions of type
11996 mach_exception_thread (void *arg)
11998 /* Buffer for a message to be received. */
12000 mach_msg_header_t head;
12001 mach_msg_body_t msgh_body;
12004 mach_msg_return_t retval;
12005 /* Wait for a message on the exception port. */
12006 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
12007 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
12008 if (retval != MACH_MSG_SUCCESS)
12013 nocrash_init (void)
12015 mach_port_t self = mach_task_self ();
12016 /* Allocate a port on which the thread shall listen for exceptions. */
12017 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
12019 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
12020 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
12021 MACH_MSG_TYPE_MAKE_SEND)
12023 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
12025 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
12026 /* Create the thread listening on the exception port. */
12027 pthread_attr_t attr;
12029 if (pthread_attr_init (&attr) == 0
12030 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
12031 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
12032 pthread_attr_destroy (&attr);
12033 /* Replace the exception port info for these exceptions with our own.
12034 Note that we replace the exception port for the entire task, not only
12035 for a particular thread. This has the effect that when our exception
12036 port gets the message, the thread specific exception port has already
12037 been asked, and we don't need to bother about it.
12038 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
12039 task_set_exception_ports (self, mask, our_exception_port,
12040 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
12045 #elif defined _WIN32 && ! defined __CYGWIN__
12046 /* Avoid a crash on native Windows. */
12047 #define WIN32_LEAN_AND_MEAN
12048 #include <windows.h>
12049 #include <winerror.h>
12051 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
12053 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
12055 case EXCEPTION_ACCESS_VIOLATION:
12056 case EXCEPTION_IN_PAGE_ERROR:
12057 case EXCEPTION_STACK_OVERFLOW:
12058 case EXCEPTION_GUARD_PAGE:
12059 case EXCEPTION_PRIV_INSTRUCTION:
12060 case EXCEPTION_ILLEGAL_INSTRUCTION:
12061 case EXCEPTION_DATATYPE_MISALIGNMENT:
12062 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
12063 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
12066 return EXCEPTION_CONTINUE_SEARCH;
12069 nocrash_init (void)
12071 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
12074 /* Avoid a crash on POSIX systems. */
12075 #include <signal.h>
12076 #include <unistd.h>
12077 /* A POSIX signal handler. */
12079 exception_handler (int sig)
12084 nocrash_init (void)
12087 signal (SIGSEGV, exception_handler);
12090 signal (SIGBUS, exception_handler);
12104 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
12105 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
12106 OSF/1 5.1, Solaris 10. */
12108 static char conftest[] = "conftest";
12109 static char plus[] = "-+";
12110 char *argv[3] = { conftest, plus, NULL };
12112 if (getopt (2, argv, "+a") != '?')
12115 /* This code succeeds on glibc 2.8, mingw,
12116 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
12117 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
12119 static char program[] = "program";
12120 static char p[] = "-p";
12121 static char foo[] = "foo";
12122 static char bar[] = "bar";
12123 char *argv[] = { program, p, foo, bar, NULL };
12126 if (getopt (4, argv, "p::") != 'p')
12128 else if (optarg != NULL)
12130 else if (getopt (4, argv, "p::") != -1)
12132 else if (optind != 2)
12135 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
12137 static char program[] = "program";
12138 static char foo[] = "foo";
12139 static char p[] = "-p";
12140 char *argv[] = { program, foo, p, NULL };
12142 if (getopt (3, argv, "-p") != 1)
12144 else if (getopt (3, argv, "-p") != 'p')
12147 /* This code fails on glibc 2.11. */
12149 static char program[] = "program";
12150 static char b[] = "-b";
12151 static char a[] = "-a";
12152 char *argv[] = { program, b, a, NULL };
12153 optind = opterr = 0;
12154 if (getopt (3, argv, "+:a:b") != 'b')
12156 else if (getopt (3, argv, "+:a:b") != ':')
12159 /* This code dumps core on glibc 2.14. */
12161 static char program[] = "program";
12162 static char w[] = "-W";
12163 static char dummy[] = "dummy";
12164 char *argv[] = { program, w, dummy, NULL };
12165 optind = opterr = 1;
12166 if (getopt (3, argv, "W;") != 'W')
12175 if ac_fn_c_try_run "$LINENO"
12177 gl_cv_func_getopt_gnu=yes
12179 gl_cv_func_getopt_gnu=no
12181 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12182 conftest.$ac_objext conftest.beam conftest.$ac_ext
12185 case $gl_had_POSIXLY_CORRECT in
12187 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
12188 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
12192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
12193 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
12194 if test "$gl_cv_func_getopt_gnu" != yes; then
12195 gl_replace_getopt=yes
12197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
12198 printf %s "checking for working GNU getopt_long function... " >&6; }
12199 if test ${gl_cv_func_getopt_long_gnu+y}
12201 printf %s "(cached) " >&6
12203 if test "$cross_compiling" = yes
12206 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
12207 *) gl_cv_func_getopt_long_gnu="guessing yes";;
12211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12212 /* end confdefs.h. */
12213 #include <getopt.h>
12214 #include <stddef.h>
12215 #include <string.h>
12220 static const struct option long_options[] =
12222 { "xtremely-",no_argument, NULL, 1003 },
12223 { "xtra", no_argument, NULL, 1001 },
12224 { "xtreme", no_argument, NULL, 1002 },
12225 { "xtremely", no_argument, NULL, 1003 },
12226 { NULL, 0, NULL, 0 }
12228 /* This code fails on OpenBSD 5.0. */
12230 static char program[] = "program";
12231 static char xtremel[] = "--xtremel";
12232 char *argv[] = { program, xtremel, NULL };
12234 optind = 1; opterr = 0;
12235 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
12244 if ac_fn_c_try_run "$LINENO"
12246 gl_cv_func_getopt_long_gnu=yes
12248 gl_cv_func_getopt_long_gnu=no
12250 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12251 conftest.$ac_objext conftest.beam conftest.$ac_ext
12256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
12257 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
12258 case "$gl_cv_func_getopt_long_gnu" in
12260 *) gl_replace_getopt=yes ;;
12270 REPLACE_GETRANDOM=0;
12275 GL_GNULIB_GETRANDOM=0
12282 HAVE_GETTIMEOFDAY=1;
12283 HAVE_STRUCT_TIMEVAL=1;
12285 REPLACE_GETTIMEOFDAY=0;
12286 REPLACE_STRUCT_TIMEVAL=0;
12302 if test $gl_cv_have_include_next = yes; then
12303 gl_cv_next_sys_time_h='<'sys/time.h'>'
12305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
12306 printf %s "checking absolute name of <sys/time.h>... " >&6; }
12307 if test ${gl_cv_next_sys_time_h+y}
12309 printf %s "(cached) " >&6
12312 if test $ac_cv_header_sys_time_h = yes; then
12317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12318 /* end confdefs.h. */
12319 #include <sys/time.h>
12322 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12323 *) gl_absname_cpp="$ac_cpp" ;;
12328 gl_dirsep_regex='[/\\]'
12331 gl_dirsep_regex='\/'
12334 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12335 gl_header_literal_regex=`echo 'sys/time.h' \
12336 | sed -e "$gl_make_literal_regex_sed"`
12337 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12338 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12344 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12345 sed -n "$gl_absolute_header_sed"`
12347 gl_header=$gl_cv_absolute_sys_time_h
12348 gl_cv_next_sys_time_h='"'$gl_header'"'
12350 gl_cv_next_sys_time_h='<'sys/time.h'>'
12355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
12356 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
12358 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
12360 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12361 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12362 gl_next_as_first_directive='<'sys/time.h'>'
12364 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12365 gl_next_as_first_directive=$gl_cv_next_sys_time_h
12367 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
12373 if test $ac_cv_header_sys_time_h != yes; then
12381 if test $ac_cv_header_sys_socket_h != yes; then
12382 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12383 if test "x$ac_cv_header_winsock2_h" = xyes
12385 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
12390 if test "$ac_cv_header_winsock2_h" = yes; then
12392 UNISTD_H_HAVE_WINSOCK2_H=1
12393 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
12400 printf %s "checking for struct timeval... " >&6; }
12401 if test ${gl_cv_sys_struct_timeval+y}
12403 printf %s "(cached) " >&6
12405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12406 /* end confdefs.h. */
12407 #if HAVE_SYS_TIME_H
12408 #include <sys/time.h>
12411 #if HAVE_WINSOCK2_H
12412 # include <winsock2.h>
12418 static struct timeval x; x.tv_sec = x.tv_usec;
12423 if ac_fn_c_try_compile "$LINENO"
12425 gl_cv_sys_struct_timeval=yes
12427 gl_cv_sys_struct_timeval=no
12429 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
12433 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
12434 if test $gl_cv_sys_struct_timeval != yes; then
12435 HAVE_STRUCT_TIMEVAL=0
12437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
12438 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
12439 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
12441 printf %s "(cached) " >&6
12443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12444 /* end confdefs.h. */
12445 #if HAVE_SYS_TIME_H
12446 #include <sys/time.h>
12449 #if HAVE_WINSOCK2_H
12450 # include <winsock2.h>
12456 static struct timeval x;
12457 typedef int verify_tv_sec_type[
12458 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
12465 if ac_fn_c_try_compile "$LINENO"
12467 gl_cv_sys_struct_timeval_tv_sec=yes
12469 gl_cv_sys_struct_timeval_tv_sec=no
12471 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
12475 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
12476 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
12477 REPLACE_STRUCT_TIMEVAL=1
12487 GL_GNULIB_GETTIMEOFDAY=0
12495 if test -z "$gl_pthreadlib_body_done"; then
12499 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
12500 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
12501 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12502 if test "x$ac_cv_header_pthread_h" = xyes
12504 gl_have_pthread_h=yes
12506 gl_have_pthread_h=no
12509 if test "$gl_have_pthread_h" = yes; then
12510 # Other possible tests:
12511 # -lpthreads (FSU threads, PCthreads)
12513 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
12514 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
12515 # the second one only in libpthread, and lock.c needs it.
12517 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
12518 # needs -pthread for some reason. See:
12519 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
12521 for gl_pthread in '' '-pthread'; do
12522 LIBS="$LIBS $gl_pthread"
12523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12524 /* end confdefs.h. */
12525 #include <pthread.h>
12527 pthread_mutexattr_t ma;
12532 pthread_mutex_lock (&m);
12533 pthread_mutexattr_init (&ma);
12538 if ac_fn_c_try_link "$LINENO"
12541 LIBPTHREAD=$gl_pthread
12542 LIBPMULTITHREAD=$gl_pthread
12544 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12545 conftest$ac_exeext conftest.$ac_ext
12547 test $gl_pthread_api = yes && break
12549 echo "$as_me:12549: gl_pthread_api=$gl_pthread_api" >&5
12550 echo "$as_me:12550: LIBPTHREAD=$LIBPTHREAD" >&5
12552 gl_pthread_in_glibc=no
12553 # On Linux with glibc >= 2.34, libc contains the fully functional
12554 # pthread functions.
12557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12558 /* end confdefs.h. */
12559 #include <features.h>
12560 #ifdef __GNU_LIBRARY__
12561 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
12567 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12568 $EGREP "Lucky user" >/dev/null 2>&1
12570 gl_pthread_in_glibc=yes
12576 echo "$as_me:12576: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
12578 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
12579 # since it is defined as a macro on OSF/1.)
12580 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
12581 # The program links fine without libpthread. But it may actually
12582 # need to link with libpthread in order to create multiple threads.
12583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12584 printf %s "checking for pthread_kill in -lpthread... " >&6; }
12585 if test ${ac_cv_lib_pthread_pthread_kill+y}
12587 printf %s "(cached) " >&6
12589 ac_check_lib_save_LIBS=$LIBS
12590 LIBS="-lpthread $LIBS"
12591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12592 /* end confdefs.h. */
12594 /* Override any GCC internal prototype to avoid an error.
12595 Use char because int might match the return type of a GCC
12596 builtin and then its argument prototype would still apply. */
12597 char pthread_kill ();
12601 return pthread_kill ();
12606 if ac_fn_c_try_link "$LINENO"
12608 ac_cv_lib_pthread_pthread_kill=yes
12610 ac_cv_lib_pthread_pthread_kill=no
12612 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12613 conftest$ac_exeext conftest.$ac_ext
12614 LIBS=$ac_check_lib_save_LIBS
12616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12617 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
12618 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
12620 if test $gl_pthread_in_glibc = yes; then
12623 LIBPMULTITHREAD=-lpthread
12624 # On Solaris and HP-UX, most pthread functions exist also in libc.
12625 # Therefore pthread_in_use() needs to actually try to create a
12626 # thread: pthread_create from libc will fail, whereas
12627 # pthread_create will actually create a thread.
12628 # On Solaris 10 or newer, this test is no longer needed, because
12629 # libc contains the fully functional pthread functions.
12631 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
12633 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
12640 elif test $gl_pthread_api != yes; then
12641 # Some library is needed. Try libpthread and libc_r.
12642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12643 printf %s "checking for pthread_kill in -lpthread... " >&6; }
12644 if test ${ac_cv_lib_pthread_pthread_kill+y}
12646 printf %s "(cached) " >&6
12648 ac_check_lib_save_LIBS=$LIBS
12649 LIBS="-lpthread $LIBS"
12650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12651 /* end confdefs.h. */
12653 /* Override any GCC internal prototype to avoid an error.
12654 Use char because int might match the return type of a GCC
12655 builtin and then its argument prototype would still apply. */
12656 char pthread_kill ();
12660 return pthread_kill ();
12665 if ac_fn_c_try_link "$LINENO"
12667 ac_cv_lib_pthread_pthread_kill=yes
12669 ac_cv_lib_pthread_pthread_kill=no
12671 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12672 conftest$ac_exeext conftest.$ac_ext
12673 LIBS=$ac_check_lib_save_LIBS
12675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12676 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
12677 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
12680 LIBPTHREAD=-lpthread
12681 LIBPMULTITHREAD=-lpthread
12684 if test $gl_pthread_api != yes; then
12686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
12687 printf %s "checking for pthread_kill in -lc_r... " >&6; }
12688 if test ${ac_cv_lib_c_r_pthread_kill+y}
12690 printf %s "(cached) " >&6
12692 ac_check_lib_save_LIBS=$LIBS
12694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12695 /* end confdefs.h. */
12697 /* Override any GCC internal prototype to avoid an error.
12698 Use char because int might match the return type of a GCC
12699 builtin and then its argument prototype would still apply. */
12700 char pthread_kill ();
12704 return pthread_kill ();
12709 if ac_fn_c_try_link "$LINENO"
12711 ac_cv_lib_c_r_pthread_kill=yes
12713 ac_cv_lib_c_r_pthread_kill=no
12715 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12716 conftest$ac_exeext conftest.$ac_ext
12717 LIBS=$ac_check_lib_save_LIBS
12719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
12720 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
12721 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
12725 LIBPMULTITHREAD=-lc_r
12730 echo "$as_me:12730: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
12732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
12733 printf %s "checking whether POSIX threads API is available... " >&6; }
12734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
12735 printf "%s\n" "$gl_pthread_api" >&6; }
12738 if test $gl_pthread_api = yes; then
12740 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
12744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12745 /* end confdefs.h. */
12755 if ac_fn_c_try_link "$LINENO"
12760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
12761 printf %s "checking for sched_yield in -lrt... " >&6; }
12762 if test ${ac_cv_lib_rt_sched_yield+y}
12764 printf %s "(cached) " >&6
12766 ac_check_lib_save_LIBS=$LIBS
12768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12769 /* end confdefs.h. */
12771 /* Override any GCC internal prototype to avoid an error.
12772 Use char because int might match the return type of a GCC
12773 builtin and then its argument prototype would still apply. */
12774 char sched_yield ();
12778 return sched_yield ();
12783 if ac_fn_c_try_link "$LINENO"
12785 ac_cv_lib_rt_sched_yield=yes
12787 ac_cv_lib_rt_sched_yield=no
12789 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12790 conftest$ac_exeext conftest.$ac_ext
12791 LIBS=$ac_check_lib_save_LIBS
12793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
12794 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
12795 if test "x$ac_cv_lib_rt_sched_yield" = xyes
12797 LIB_SCHED_YIELD=-lrt
12799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
12800 printf %s "checking for sched_yield in -lposix4... " >&6; }
12801 if test ${ac_cv_lib_posix4_sched_yield+y}
12803 printf %s "(cached) " >&6
12805 ac_check_lib_save_LIBS=$LIBS
12806 LIBS="-lposix4 $LIBS"
12807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12808 /* end confdefs.h. */
12810 /* Override any GCC internal prototype to avoid an error.
12811 Use char because int might match the return type of a GCC
12812 builtin and then its argument prototype would still apply. */
12813 char sched_yield ();
12817 return sched_yield ();
12822 if ac_fn_c_try_link "$LINENO"
12824 ac_cv_lib_posix4_sched_yield=yes
12826 ac_cv_lib_posix4_sched_yield=no
12828 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12829 conftest$ac_exeext conftest.$ac_ext
12830 LIBS=$ac_check_lib_save_LIBS
12832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
12833 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
12834 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
12836 LIB_SCHED_YIELD=-lposix4
12843 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12844 conftest$ac_exeext conftest.$ac_ext
12847 gl_pthreadlib_body_done=done
12857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
12858 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
12859 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
12861 printf %s "(cached) " >&6
12864 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
12865 *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
12866 gl_cv_func_setlocale_null_all_mtsafe=no ;;
12867 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
12868 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
12869 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
12870 # If we don't know, obey --enable-cross-guesses.
12872 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
12876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
12877 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
12881 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
12882 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
12886 case "$gl_cv_func_setlocale_null_all_mtsafe" in
12887 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
12888 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
12891 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
12894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
12895 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
12896 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
12898 printf %s "(cached) " >&6
12901 # Guess no on OpenBSD, AIX.
12903 gl_cv_func_setlocale_null_one_mtsafe=no ;;
12904 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
12905 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
12906 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
12907 # If we don't know, obey --enable-cross-guesses.
12909 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
12913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
12914 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
12918 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
12919 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
12923 case "$gl_cv_func_setlocale_null_one_mtsafe" in
12924 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
12925 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
12928 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
12931 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
12933 mingw*) LIB_SETLOCALE_NULL= ;;
12937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
12938 printf %s "checking whether imported symbols can be declared weak... " >&6; }
12939 if test ${gl_cv_have_weak+y}
12941 printf %s "(cached) " >&6
12944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12945 /* end confdefs.h. */
12946 extern void xyzzy ();
12956 if ac_fn_c_try_link "$LINENO"
12958 gl_cv_have_weak=maybe
12960 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12961 conftest$ac_exeext conftest.$ac_ext
12962 if test $gl_cv_have_weak = maybe; then
12963 if test "$cross_compiling" = yes
12965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12966 /* end confdefs.h. */
12968 Extensible Linking Format
12972 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12973 $EGREP "Extensible Linking Format" >/dev/null 2>&1
12975 gl_cv_have_weak="guessing yes"
12977 gl_cv_have_weak="guessing no"
12983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12984 /* end confdefs.h. */
12990 return (fputs == NULL);
12993 if ac_fn_c_try_run "$LINENO"
12995 gl_cv_have_weak=yes
12999 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13000 conftest.$ac_objext conftest.beam conftest.$ac_ext
13004 case " $LDFLAGS " in
13005 *" -static "*) gl_cv_have_weak=no ;;
13007 case "$gl_cv_have_weak" in
13010 freebsd* | dragonfly* | midnightbsd*)
13012 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
13013 cat <<EOF > conftest2.c
13014 #include <pthread.h>
13015 #pragma weak pthread_mutexattr_gettype
13018 return (pthread_mutexattr_gettype != NULL);
13021 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
13022 || gl_cv_have_weak=no
13023 rm -f conftest1.c libempty.so conftest2.c conftest
13030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
13031 printf "%s\n" "$gl_cv_have_weak" >&6; }
13032 case "$gl_cv_have_weak" in
13035 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
13040 case "$gl_cv_have_weak" in
13041 *yes) LIB_SETLOCALE_NULL= ;;
13042 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
13047 LIB_SETLOCALE_NULL=
13052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13053 /* end confdefs.h. */
13060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13061 $EGREP "MicrosoftCompiler" >/dev/null 2>&1
13064 echo 'int dummy;' > conftest.c
13065 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
13066 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
13067 (eval $ac_try) 2>&5
13069 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13070 test $ac_status = 0; }; } >/dev/null 2>&1
13071 if test -f conftest.o; then
13076 gl_c_asm_opt='-c -Fa'
13091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
13092 printf %s "checking host CPU and C ABI... " >&6; }
13093 if test ${gl_cv_host_cpu_c_abi+y}
13095 printf %s "(cached) " >&6
13097 case "$host_cpu" in
13100 gl_cv_host_cpu_c_abi=i386
13104 # On x86_64 systems, the C compiler may be generating code in one of
13106 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
13107 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
13108 # with native Windows (mingw, MSVC).
13109 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
13110 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
13111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13112 /* end confdefs.h. */
13113 #if (defined __x86_64__ || defined __amd64__ \
13114 || defined _M_X64 || defined _M_AMD64)
13121 if ac_fn_c_try_compile "$LINENO"
13123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13124 /* end confdefs.h. */
13125 #if defined __ILP32__ || defined _ILP32
13132 if ac_fn_c_try_compile "$LINENO"
13134 gl_cv_host_cpu_c_abi=x86_64-x32
13136 gl_cv_host_cpu_c_abi=x86_64
13138 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13140 gl_cv_host_cpu_c_abi=i386
13142 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13145 alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
13146 gl_cv_host_cpu_c_abi=alpha
13150 # Assume arm with EABI.
13151 # On arm64 systems, the C compiler may be generating code in one of
13153 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
13154 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
13155 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
13156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13157 /* end confdefs.h. */
13165 if ac_fn_c_try_compile "$LINENO"
13167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13168 /* end confdefs.h. */
13169 #if defined __ILP32__ || defined _ILP32
13176 if ac_fn_c_try_compile "$LINENO"
13178 gl_cv_host_cpu_c_abi=arm64-ilp32
13180 gl_cv_host_cpu_c_abi=arm64
13182 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13184 # Don't distinguish little-endian and big-endian arm, since they
13185 # don't require different machine code for simple operations and
13186 # since the user can distinguish them through the preprocessor
13187 # defines __ARMEL__ vs. __ARMEB__.
13188 # But distinguish arm which passes floating-point arguments and
13189 # return values in integer registers (r0, r1, ...) - this is
13190 # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
13191 # passes them in float registers (s0, s1, ...) and double registers
13192 # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
13193 # sets the preprocessor defines __ARM_PCS (for the first case) and
13194 # __ARM_PCS_VFP (for the second case), but older GCC does not.
13195 echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
13196 # Look for a reference to the register d0 in the .s file.
13197 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
13198 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
13199 (eval $ac_try) 2>&5
13201 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13202 test $ac_status = 0; }; } >/dev/null 2>&1
13203 if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
13204 gl_cv_host_cpu_c_abi=armhf
13206 gl_cv_host_cpu_c_abi=arm
13211 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13214 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
13215 # On hppa, the C compiler may be generating 32-bit code or 64-bit
13216 # code. In the latter case, it defines _LP64 and __LP64__.
13217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13218 /* end confdefs.h. */
13226 if ac_fn_c_try_compile "$LINENO"
13228 gl_cv_host_cpu_c_abi=hppa64
13230 gl_cv_host_cpu_c_abi=hppa
13232 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13236 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
13237 # 32-bit code. In the latter case, it defines _ILP32.
13238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13239 /* end confdefs.h. */
13247 if ac_fn_c_try_compile "$LINENO"
13249 gl_cv_host_cpu_c_abi=ia64-ilp32
13251 gl_cv_host_cpu_c_abi=ia64
13253 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13257 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
13259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13260 /* end confdefs.h. */
13261 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
13268 if ac_fn_c_try_compile "$LINENO"
13270 gl_cv_host_cpu_c_abi=mips64
13272 # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
13273 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
13274 # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
13275 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
13276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13277 /* end confdefs.h. */
13278 #if (_MIPS_SIM == _ABIN32)
13285 if ac_fn_c_try_compile "$LINENO"
13287 gl_cv_host_cpu_c_abi=mipsn32
13289 gl_cv_host_cpu_c_abi=mips
13291 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13293 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13297 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
13298 # No need to distinguish them here; the caller may distinguish
13299 # them based on the OS.
13300 # On powerpc64 systems, the C compiler may still be generating
13301 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
13302 # be generating 64-bit code.
13303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13304 /* end confdefs.h. */
13305 #if defined __powerpc64__ || defined __LP64__
13312 if ac_fn_c_try_compile "$LINENO"
13314 # On powerpc64, there are two ABIs on Linux: The AIX compatible
13315 # one and the ELFv2 one. The latter defines _CALL_ELF=2.
13316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13317 /* end confdefs.h. */
13318 #if defined _CALL_ELF && _CALL_ELF == 2
13325 if ac_fn_c_try_compile "$LINENO"
13327 gl_cv_host_cpu_c_abi=powerpc64-elfv2
13329 gl_cv_host_cpu_c_abi=powerpc64
13331 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13334 gl_cv_host_cpu_c_abi=powerpc
13336 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13340 gl_cv_host_cpu_c_abi=powerpc
13343 riscv32 | riscv64 )
13344 # There are 2 architectures (with variants): rv32* and rv64*.
13345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13346 /* end confdefs.h. */
13347 #if __riscv_xlen == 64
13354 if ac_fn_c_try_compile "$LINENO"
13360 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13361 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
13362 # Size of 'long' and 'void *':
13363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13364 /* end confdefs.h. */
13365 #if defined __LP64__
13372 if ac_fn_c_try_compile "$LINENO"
13378 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13380 # __riscv_float_abi_double:
13381 # 'float' and 'double' are passed in floating-point registers.
13382 # __riscv_float_abi_single:
13383 # 'float' are passed in floating-point registers.
13384 # __riscv_float_abi_soft:
13385 # No values are passed in floating-point registers.
13386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13387 /* end confdefs.h. */
13388 #if defined __riscv_float_abi_double
13395 if ac_fn_c_try_compile "$LINENO"
13399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400 /* end confdefs.h. */
13401 #if defined __riscv_float_abi_single
13408 if ac_fn_c_try_compile "$LINENO"
13414 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13417 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13418 gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
13422 # On s390x, the C compiler may be generating 64-bit (= s390x) code
13423 # or 31-bit (= s390) code.
13424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13425 /* end confdefs.h. */
13426 #if defined __LP64__ || defined __s390x__
13433 if ac_fn_c_try_compile "$LINENO"
13435 gl_cv_host_cpu_c_abi=s390x
13437 gl_cv_host_cpu_c_abi=s390
13439 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13443 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
13444 # C compiler still generates 32-bit code.
13445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13446 /* end confdefs.h. */
13447 #if defined __sparcv9 || defined __arch64__
13454 if ac_fn_c_try_compile "$LINENO"
13456 gl_cv_host_cpu_c_abi=sparc64
13458 gl_cv_host_cpu_c_abi=sparc
13460 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13464 gl_cv_host_cpu_c_abi="$host_cpu"
13469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
13470 printf "%s\n" "$gl_cv_host_cpu_c_abi" >&6; }
13472 HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
13473 HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
13478 # AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
13479 # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
13480 # earlier, but KAI C++ 3.2d doesn't like this.
13481 sed -e 's/-/_/g' >> confdefs.h <<EOF
13482 #ifndef __${HOST_CPU}__
13483 #define __${HOST_CPU}__ 1
13485 #ifndef __${HOST_CPU_C_ABI}__
13486 #define __${HOST_CPU_C_ABI}__ 1
13493 if test "X$prefix" = "XNONE"; then
13494 acl_final_prefix="$ac_default_prefix"
13496 acl_final_prefix="$prefix"
13498 if test "X$exec_prefix" = "XNONE"; then
13499 acl_final_exec_prefix='${prefix}'
13501 acl_final_exec_prefix="$exec_prefix"
13503 acl_save_prefix="$prefix"
13504 prefix="$acl_final_prefix"
13505 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
13506 prefix="$acl_save_prefix"
13510 # Check whether --with-gnu-ld was given.
13511 if test ${with_gnu_ld+y}
13513 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
13518 # Prepare PATH_SEPARATOR.
13519 # The user is always right.
13520 if test "${PATH_SEPARATOR+set}" != set; then
13521 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
13522 # contains only /bin. Note that ksh looks also at the FPATH variable,
13523 # so we have to set that as well for the test.
13525 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13526 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13527 || PATH_SEPARATOR=';'
13531 if test -n "$LD"; then
13532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
13533 printf %s "checking for ld... " >&6; }
13534 elif test "$GCC" = yes; then
13535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
13536 printf %s "checking for ld used by $CC... " >&6; }
13537 elif test "$with_gnu_ld" = yes; then
13538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
13539 printf %s "checking for GNU ld... " >&6; }
13541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
13542 printf %s "checking for non-GNU ld... " >&6; }
13544 if test -n "$LD"; then
13545 # Let the user override the test with a path.
13548 if test ${acl_cv_path_LD+y}
13550 printf %s "(cached) " >&6
13553 acl_cv_path_LD= # Final result of this test
13554 ac_prog=ld # Program to search in $PATH
13555 if test "$GCC" = yes; then
13556 # Check if gcc -print-prog-name=ld gives a path.
13559 # gcc leaves a trailing carriage return which upsets mingw
13560 acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
13562 acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
13564 case $acl_output in
13565 # Accept absolute paths.
13567 re_direlt='/[^/][^/]*/\.\./'
13568 # Canonicalize the pathname of ld
13569 acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
13570 while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
13571 acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
13573 # Got the pathname. No search in PATH is needed.
13574 acl_cv_path_LD="$acl_output"
13578 # If it fails, then pretend we aren't using GCC.
13581 # If it is relative, then search for the first ld in PATH.
13582 with_gnu_ld=unknown
13586 if test -n "$ac_prog"; then
13587 # Search for $ac_prog in $PATH.
13588 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13589 for ac_dir in $PATH; do
13590 IFS="$acl_save_ifs"
13591 test -z "$ac_dir" && ac_dir=.
13592 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13593 acl_cv_path_LD="$ac_dir/$ac_prog"
13594 # Check to see if the program is GNU ld. I'd rather use --version,
13595 # but apparently some variants of GNU ld only accept -v.
13596 # Break only if it was the GNU/non-GNU ld that we prefer.
13597 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
13598 *GNU* | *'with BFD'*)
13599 test "$with_gnu_ld" != no && break
13602 test "$with_gnu_ld" != yes && break
13607 IFS="$acl_save_ifs"
13611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13612 /* end confdefs.h. */
13613 #if defined __powerpc64__ || defined __LP64__
13620 if ac_fn_c_try_compile "$LINENO"
13622 # The compiler produces 64-bit code. Add option '-b64' so that the
13623 # linker groks 64-bit object files.
13624 case "$acl_cv_path_LD " in
13626 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
13630 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13634 /* end confdefs.h. */
13635 #if defined __sparcv9 || defined __arch64__
13642 if ac_fn_c_try_compile "$LINENO"
13646 # The compiler produces 32-bit code. Add option '-m elf32_sparc'
13647 # so that the linker groks 32-bit object files.
13648 case "$acl_cv_path_LD " in
13649 *" -m elf32_sparc "*) ;;
13650 *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
13654 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13660 LD="$acl_cv_path_LD"
13662 if test -n "$LD"; then
13663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
13664 printf "%s\n" "$LD" >&6; }
13666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13667 printf "%s\n" "no" >&6; }
13668 as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
13670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
13671 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
13672 if test ${acl_cv_prog_gnu_ld+y}
13674 printf %s "(cached) " >&6
13676 # I'd rather use --version here, but apparently some GNU lds only accept -v.
13677 case `$LD -v 2>&1 </dev/null` in
13678 *GNU* | *'with BFD'*)
13679 acl_cv_prog_gnu_ld=yes
13682 acl_cv_prog_gnu_ld=no
13686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
13687 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
13688 with_gnu_ld=$acl_cv_prog_gnu_ld
13694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
13695 printf %s "checking for shared library run path origin... " >&6; }
13696 if test ${acl_cv_rpath+y}
13698 printf %s "(cached) " >&6
13701 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
13702 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
13704 rm -f ./conftest.sh
13708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
13709 printf "%s\n" "$acl_cv_rpath" >&6; }
13711 acl_libext="$acl_cv_libext"
13712 acl_shlibext="$acl_cv_shlibext"
13713 acl_libname_spec="$acl_cv_libname_spec"
13714 acl_library_names_spec="$acl_cv_library_names_spec"
13715 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
13716 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
13717 acl_hardcode_direct="$acl_cv_hardcode_direct"
13718 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
13719 # Check whether --enable-rpath was given.
13720 if test ${enable_rpath+y}
13722 enableval=$enable_rpath; :
13730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
13731 printf %s "checking 32-bit host C ABI... " >&6; }
13732 if test ${gl_cv_host_cpu_c_abi_32bit+y}
13734 printf %s "(cached) " >&6
13736 if test -n "$gl_cv_host_cpu_c_abi"; then
13737 case "$gl_cv_host_cpu_c_abi" in
13738 i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
13739 gl_cv_host_cpu_c_abi_32bit=yes ;;
13740 x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
13741 gl_cv_host_cpu_c_abi_32bit=no ;;
13743 gl_cv_host_cpu_c_abi_32bit=unknown ;;
13746 case "$host_cpu" in
13748 # CPUs that only support a 32-bit ABI.
13757 | microblaze | microblazeel \
13758 | nds32 | nds32le | nds32be \
13759 | nios2 | nios2eb | nios2el \
13762 | sh | sh1234 | sh1234elb \
13765 gl_cv_host_cpu_c_abi_32bit=yes
13768 # CPUs that only support a 64-bit ABI.
13769 alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
13771 gl_cv_host_cpu_c_abi_32bit=no
13775 gl_cv_host_cpu_c_abi_32bit=yes
13779 # On x86_64 systems, the C compiler may be generating code in one of
13781 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
13782 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
13783 # with native Windows (mingw, MSVC).
13784 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
13785 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
13786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13787 /* end confdefs.h. */
13788 #if (defined __x86_64__ || defined __amd64__ \
13789 || defined _M_X64 || defined _M_AMD64) \
13790 && !(defined __ILP32__ || defined _ILP32)
13797 if ac_fn_c_try_compile "$LINENO"
13799 gl_cv_host_cpu_c_abi_32bit=no
13801 gl_cv_host_cpu_c_abi_32bit=yes
13803 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13807 # Assume arm with EABI.
13808 # On arm64 systems, the C compiler may be generating code in one of
13810 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
13811 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
13812 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
13813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13814 /* end confdefs.h. */
13815 #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
13822 if ac_fn_c_try_compile "$LINENO"
13824 gl_cv_host_cpu_c_abi_32bit=no
13826 gl_cv_host_cpu_c_abi_32bit=yes
13828 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13831 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
13832 # On hppa, the C compiler may be generating 32-bit code or 64-bit
13833 # code. In the latter case, it defines _LP64 and __LP64__.
13834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13835 /* end confdefs.h. */
13843 if ac_fn_c_try_compile "$LINENO"
13845 gl_cv_host_cpu_c_abi_32bit=no
13847 gl_cv_host_cpu_c_abi_32bit=yes
13849 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13853 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
13854 # 32-bit code. In the latter case, it defines _ILP32.
13855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13856 /* end confdefs.h. */
13864 if ac_fn_c_try_compile "$LINENO"
13866 gl_cv_host_cpu_c_abi_32bit=yes
13868 gl_cv_host_cpu_c_abi_32bit=no
13870 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13874 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
13876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13877 /* end confdefs.h. */
13878 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
13885 if ac_fn_c_try_compile "$LINENO"
13887 gl_cv_host_cpu_c_abi_32bit=no
13889 gl_cv_host_cpu_c_abi_32bit=yes
13891 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13895 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
13896 # No need to distinguish them here; the caller may distinguish
13897 # them based on the OS.
13898 # On powerpc64 systems, the C compiler may still be generating
13899 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
13900 # be generating 64-bit code.
13901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13902 /* end confdefs.h. */
13903 #if defined __powerpc64__ || defined __LP64__
13910 if ac_fn_c_try_compile "$LINENO"
13912 gl_cv_host_cpu_c_abi_32bit=no
13914 gl_cv_host_cpu_c_abi_32bit=yes
13916 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13920 gl_cv_host_cpu_c_abi_32bit=yes
13923 riscv32 | riscv64 )
13924 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
13925 # Size of 'long' and 'void *':
13926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13927 /* end confdefs.h. */
13928 #if defined __LP64__
13935 if ac_fn_c_try_compile "$LINENO"
13937 gl_cv_host_cpu_c_abi_32bit=no
13939 gl_cv_host_cpu_c_abi_32bit=yes
13941 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13945 # On s390x, the C compiler may be generating 64-bit (= s390x) code
13946 # or 31-bit (= s390) code.
13947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13948 /* end confdefs.h. */
13949 #if defined __LP64__ || defined __s390x__
13956 if ac_fn_c_try_compile "$LINENO"
13958 gl_cv_host_cpu_c_abi_32bit=no
13960 gl_cv_host_cpu_c_abi_32bit=yes
13962 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13966 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
13967 # C compiler still generates 32-bit code.
13968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13969 /* end confdefs.h. */
13970 #if defined __sparcv9 || defined __arch64__
13977 if ac_fn_c_try_compile "$LINENO"
13979 gl_cv_host_cpu_c_abi_32bit=no
13981 gl_cv_host_cpu_c_abi_32bit=yes
13983 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13987 gl_cv_host_cpu_c_abi_32bit=unknown
13993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
13994 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
13996 HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
14002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
14003 printf %s "checking for ELF binary format... " >&6; }
14004 if test ${gl_cv_elf+y}
14006 printf %s "(cached) " >&6
14008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14009 /* end confdefs.h. */
14011 Extensible Linking Format
14015 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14016 $EGREP "Extensible Linking Format" >/dev/null 2>&1
14026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
14027 printf "%s\n" "$gl_cv_elf" >&6; }
14028 if test $gl_cv_elf = yes; then
14029 # Extract the ELF class of a file (5th byte) in decimal.
14030 # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
14031 if od -A x < /dev/null >/dev/null 2>/dev/null; then
14035 od -A n -t d1 -j 4 -N 1
14041 dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
14045 # Use 'expr', not 'test', to compare the values of func_elfclass, because on
14046 # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002,
14048 case $HOST_CPU_C_ABI_32BIT in
14051 acl_is_expected_elfclass ()
14053 expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null
14058 acl_is_expected_elfclass ()
14060 expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null
14065 acl_is_expected_elfclass ()
14072 acl_is_expected_elfclass ()
14078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
14079 printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
14080 if test ${acl_cv_libdirstems+y}
14082 printf %s "(cached) " >&6
14089 if test $HOST_CPU_C_ABI_32BIT = no; then
14090 acl_libdirstem2=lib/64
14091 case "$host_cpu" in
14092 sparc*) acl_libdirstem3=lib/sparcv9 ;;
14093 i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
14098 searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
14099 | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
14100 if test $HOST_CPU_C_ABI_32BIT != no; then
14101 # 32-bit or unknown ABI.
14102 if test -d /usr/lib32; then
14103 acl_libdirstem2=lib32
14106 if test $HOST_CPU_C_ABI_32BIT != yes; then
14107 # 64-bit or unknown ABI.
14108 if test -d /usr/lib64; then
14109 acl_libdirstem3=lib64
14112 if test -n "$searchpath"; then
14113 acl_save_IFS="${IFS= }"; IFS=":"
14114 for searchdir in $searchpath; do
14115 if test -d "$searchdir"; then
14116 case "$searchdir" in
14117 */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
14118 */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
14120 # Better ignore directories of this form. They are misleading.
14122 *) searchdir=`cd "$searchdir" && pwd`
14123 case "$searchdir" in
14124 */lib32 ) acl_libdirstem2=lib32 ;;
14125 */lib64 ) acl_libdirstem3=lib64 ;;
14130 IFS="$acl_save_IFS"
14131 if test $HOST_CPU_C_ABI_32BIT = yes; then
14135 if test $HOST_CPU_C_ABI_32BIT = no; then
14142 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
14143 test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
14144 acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
14147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
14148 printf "%s\n" "$acl_cv_libdirstems" >&6; }
14149 acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
14150 acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
14151 acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
14165 acl_save_prefix="$prefix"
14166 prefix="$acl_final_prefix"
14167 acl_save_exec_prefix="$exec_prefix"
14168 exec_prefix="$acl_final_exec_prefix"
14170 eval additional_includedir=\"$includedir\"
14171 eval additional_libdir=\"$libdir\"
14172 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
14173 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
14175 exec_prefix="$acl_save_exec_prefix"
14176 prefix="$acl_save_prefix"
14179 # Check whether --with-libiconv-prefix was given.
14180 if test ${with_libiconv_prefix+y}
14182 withval=$with_libiconv_prefix;
14183 if test "X$withval" = "Xno"; then
14186 if test "X$withval" = "X"; then
14188 acl_save_prefix="$prefix"
14189 prefix="$acl_final_prefix"
14190 acl_save_exec_prefix="$exec_prefix"
14191 exec_prefix="$acl_final_exec_prefix"
14193 eval additional_includedir=\"$includedir\"
14194 eval additional_libdir=\"$libdir\"
14195 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
14196 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
14198 exec_prefix="$acl_save_exec_prefix"
14199 prefix="$acl_save_prefix"
14202 additional_includedir="$withval/include"
14203 additional_libdir="$withval/$acl_libdirstem"
14204 additional_libdir2="$withval/$acl_libdirstem2"
14205 additional_libdir3="$withval/$acl_libdirstem3"
14211 if test "X$additional_libdir2" = "X$additional_libdir"; then
14212 additional_libdir2=
14214 if test "X$additional_libdir3" = "X$additional_libdir"; then
14215 additional_libdir3=
14224 names_already_handled=
14225 names_next_round='iconv '
14226 while test -n "$names_next_round"; do
14227 names_this_round="$names_next_round"
14229 for name in $names_this_round; do
14231 for n in $names_already_handled; do
14232 if test "$n" = "$name"; then
14233 already_handled=yes
14237 if test -z "$already_handled"; then
14238 names_already_handled="$names_already_handled $name"
14239 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
14240 eval value=\"\$HAVE_LIB$uppername\"
14241 if test -n "$value"; then
14242 if test "$value" = yes; then
14243 eval value=\"\$LIB$uppername\"
14244 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
14245 eval value=\"\$LTLIB$uppername\"
14246 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
14255 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
14256 if test -n "$acl_shlibext"; then
14257 shrext=".$acl_shlibext" # typically: shrext=.so
14261 if test $use_additional = yes; then
14262 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
14263 if test "X$found_dir" = "X"; then
14264 eval dir=\$$additional_libdir_variable
14265 if test -n "$dir"; then
14266 if test -n "$acl_shlibext"; then
14267 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
14269 found_so="$dir/$libname$shrext"
14271 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14272 ver=`(cd "$dir" && \
14273 for f in "$libname$shrext".*; do echo "$f"; done \
14274 | sed -e "s,^$libname$shrext\\\\.,," \
14275 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14276 | sed 1q ) 2>/dev/null`
14277 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
14279 found_so="$dir/$libname$shrext.$ver"
14282 eval library_names=\"$acl_library_names_spec\"
14283 for f in $library_names; do
14284 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
14293 if test "X$found_dir" = "X"; then
14294 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
14296 found_a="$dir/$libname.$acl_libext"
14299 if test "X$found_dir" != "X"; then
14300 if test -f "$dir/$libname.la"; then
14301 found_la="$dir/$libname.la"
14308 if test "X$found_dir" = "X"; then
14309 for x in $LDFLAGS $LTLIBICONV; do
14311 acl_save_prefix="$prefix"
14312 prefix="$acl_final_prefix"
14313 acl_save_exec_prefix="$exec_prefix"
14314 exec_prefix="$acl_final_exec_prefix"
14316 exec_prefix="$acl_save_exec_prefix"
14317 prefix="$acl_save_prefix"
14321 dir=`echo "X$x" | sed -e 's/^X-L//'`
14322 if test -n "$acl_shlibext"; then
14323 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
14325 found_so="$dir/$libname$shrext"
14327 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14328 ver=`(cd "$dir" && \
14329 for f in "$libname$shrext".*; do echo "$f"; done \
14330 | sed -e "s,^$libname$shrext\\\\.,," \
14331 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14332 | sed 1q ) 2>/dev/null`
14333 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
14335 found_so="$dir/$libname$shrext.$ver"
14338 eval library_names=\"$acl_library_names_spec\"
14339 for f in $library_names; do
14340 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
14349 if test "X$found_dir" = "X"; then
14350 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
14352 found_a="$dir/$libname.$acl_libext"
14355 if test "X$found_dir" != "X"; then
14356 if test -f "$dir/$libname.la"; then
14357 found_la="$dir/$libname.la"
14362 if test "X$found_dir" != "X"; then
14367 if test "X$found_dir" != "X"; then
14368 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
14369 if test "X$found_so" != "X"; then
14370 if test "$enable_rpath" = no \
14371 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
14372 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
14373 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
14374 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
14377 for x in $ltrpathdirs; do
14378 if test "X$x" = "X$found_dir"; then
14383 if test -z "$haveit"; then
14384 ltrpathdirs="$ltrpathdirs $found_dir"
14386 if test "$acl_hardcode_direct" = yes; then
14387 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
14389 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
14390 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
14392 for x in $rpathdirs; do
14393 if test "X$x" = "X$found_dir"; then
14398 if test -z "$haveit"; then
14399 rpathdirs="$rpathdirs $found_dir"
14403 for x in $LDFLAGS $LIBICONV; do
14405 acl_save_prefix="$prefix"
14406 prefix="$acl_final_prefix"
14407 acl_save_exec_prefix="$exec_prefix"
14408 exec_prefix="$acl_final_exec_prefix"
14410 exec_prefix="$acl_save_exec_prefix"
14411 prefix="$acl_save_prefix"
14413 if test "X$x" = "X-L$found_dir"; then
14418 if test -z "$haveit"; then
14419 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
14421 if test "$acl_hardcode_minus_L" != no; then
14422 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
14424 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
14430 if test "X$found_a" != "X"; then
14431 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
14433 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
14436 additional_includedir=
14437 case "$found_dir" in
14438 */$acl_libdirstem | */$acl_libdirstem/)
14439 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
14440 if test "$name" = 'iconv'; then
14441 LIBICONV_PREFIX="$basedir"
14443 additional_includedir="$basedir/include"
14445 */$acl_libdirstem2 | */$acl_libdirstem2/)
14446 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
14447 if test "$name" = 'iconv'; then
14448 LIBICONV_PREFIX="$basedir"
14450 additional_includedir="$basedir/include"
14452 */$acl_libdirstem3 | */$acl_libdirstem3/)
14453 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
14454 if test "$name" = 'iconv'; then
14455 LIBICONV_PREFIX="$basedir"
14457 additional_includedir="$basedir/include"
14460 if test "X$additional_includedir" != "X"; then
14461 if test "X$additional_includedir" != "X/usr/include"; then
14463 if test "X$additional_includedir" = "X/usr/local/include"; then
14464 if test -n "$GCC"; then
14466 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14470 if test -z "$haveit"; then
14471 for x in $CPPFLAGS $INCICONV; do
14473 acl_save_prefix="$prefix"
14474 prefix="$acl_final_prefix"
14475 acl_save_exec_prefix="$exec_prefix"
14476 exec_prefix="$acl_final_exec_prefix"
14478 exec_prefix="$acl_save_exec_prefix"
14479 prefix="$acl_save_prefix"
14481 if test "X$x" = "X-I$additional_includedir"; then
14486 if test -z "$haveit"; then
14487 if test -d "$additional_includedir"; then
14488 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
14494 if test -n "$found_la"; then
14495 save_libdir="$libdir"
14496 case "$found_la" in
14497 */* | *\\*) . "$found_la" ;;
14498 *) . "./$found_la" ;;
14500 libdir="$save_libdir"
14501 for dep in $dependency_libs; do
14504 dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14505 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
14506 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
14507 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
14509 if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
14510 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
14511 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
14512 if test -n "$GCC"; then
14514 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14518 if test -z "$haveit"; then
14520 for x in $LDFLAGS $LIBICONV; do
14522 acl_save_prefix="$prefix"
14523 prefix="$acl_final_prefix"
14524 acl_save_exec_prefix="$exec_prefix"
14525 exec_prefix="$acl_final_exec_prefix"
14527 exec_prefix="$acl_save_exec_prefix"
14528 prefix="$acl_save_prefix"
14530 if test "X$x" = "X-L$dependency_libdir"; then
14535 if test -z "$haveit"; then
14536 if test -d "$dependency_libdir"; then
14537 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
14541 for x in $LDFLAGS $LTLIBICONV; do
14543 acl_save_prefix="$prefix"
14544 prefix="$acl_final_prefix"
14545 acl_save_exec_prefix="$exec_prefix"
14546 exec_prefix="$acl_final_exec_prefix"
14548 exec_prefix="$acl_save_exec_prefix"
14549 prefix="$acl_save_prefix"
14551 if test "X$x" = "X-L$dependency_libdir"; then
14556 if test -z "$haveit"; then
14557 if test -d "$dependency_libdir"; then
14558 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
14565 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14566 if test "$enable_rpath" != no; then
14568 for x in $rpathdirs; do
14569 if test "X$x" = "X$dir"; then
14574 if test -z "$haveit"; then
14575 rpathdirs="$rpathdirs $dir"
14578 for x in $ltrpathdirs; do
14579 if test "X$x" = "X$dir"; then
14584 if test -z "$haveit"; then
14585 ltrpathdirs="$ltrpathdirs $dir"
14590 dep=`echo "X$dep" | sed -e 's/^X-l//'`
14591 if test "X$dep" != Xc \
14592 || case $host_os in
14593 linux* | gnu* | k*bsd*-gnu) false ;;
14596 names_next_round="$names_next_round $dep"
14600 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14603 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
14604 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
14610 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
14611 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
14617 if test "X$rpathdirs" != "X"; then
14618 if test -n "$acl_hardcode_libdir_separator"; then
14620 for found_dir in $rpathdirs; do
14621 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
14623 acl_save_libdir="$libdir"
14625 eval flag=\"$acl_hardcode_libdir_flag_spec\"
14626 libdir="$acl_save_libdir"
14627 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
14629 for found_dir in $rpathdirs; do
14630 acl_save_libdir="$libdir"
14631 libdir="$found_dir"
14632 eval flag=\"$acl_hardcode_libdir_flag_spec\"
14633 libdir="$acl_save_libdir"
14634 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
14638 if test "X$ltrpathdirs" != "X"; then
14639 for found_dir in $ltrpathdirs; do
14640 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
14653 REPLACE_ICONV_OPEN=0;
14654 REPLACE_ICONV_UTF=0;
14660 if test -n "$ICONV_H"; then
14661 GL_GENERATE_ICONV_H_TRUE=
14662 GL_GENERATE_ICONV_H_FALSE='#'
14664 GL_GENERATE_ICONV_H_TRUE='#'
14665 GL_GENERATE_ICONV_H_FALSE=
14674 am_save_CPPFLAGS="$CPPFLAGS"
14676 for element in $INCICONV; do
14678 for x in $CPPFLAGS; do
14680 acl_save_prefix="$prefix"
14681 prefix="$acl_final_prefix"
14682 acl_save_exec_prefix="$exec_prefix"
14683 exec_prefix="$acl_final_exec_prefix"
14685 exec_prefix="$acl_save_exec_prefix"
14686 prefix="$acl_save_prefix"
14688 if test "X$x" = "X$element"; then
14693 if test -z "$haveit"; then
14694 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
14700 printf %s "checking for iconv... " >&6; }
14701 if test ${am_cv_func_iconv+y}
14703 printf %s "(cached) " >&6
14706 am_cv_func_iconv="no, consider installing GNU libiconv"
14708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14709 /* end confdefs.h. */
14711 #include <stdlib.h>
14717 iconv_t cd = iconv_open("","");
14718 iconv(cd,NULL,NULL,NULL,NULL);
14724 if ac_fn_c_try_link "$LINENO"
14726 am_cv_func_iconv=yes
14728 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14729 conftest$ac_exeext conftest.$ac_ext
14730 if test "$am_cv_func_iconv" != yes; then
14731 am_save_LIBS="$LIBS"
14732 LIBS="$LIBS $LIBICONV"
14733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14734 /* end confdefs.h. */
14736 #include <stdlib.h>
14742 iconv_t cd = iconv_open("","");
14743 iconv(cd,NULL,NULL,NULL,NULL);
14749 if ac_fn_c_try_link "$LINENO"
14751 am_cv_lib_iconv=yes
14752 am_cv_func_iconv=yes
14754 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14755 conftest$ac_exeext conftest.$ac_ext
14756 LIBS="$am_save_LIBS"
14760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
14761 printf "%s\n" "$am_cv_func_iconv" >&6; }
14762 if test "$am_cv_func_iconv" = yes; then
14763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
14764 printf %s "checking for working iconv... " >&6; }
14765 if test ${am_cv_func_iconv_works+y}
14767 printf %s "(cached) " >&6
14770 am_save_LIBS="$LIBS"
14771 if test $am_cv_lib_iconv = yes; then
14772 LIBS="$LIBS $LIBICONV"
14774 am_cv_func_iconv_works=no
14775 for ac_iconv_const in '' 'const'; do
14776 if test "$cross_compiling" = yes
14779 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
14780 *) am_cv_func_iconv_works="guessing yes" ;;
14783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14784 /* end confdefs.h. */
14787 #include <string.h>
14789 #ifndef ICONV_CONST
14790 # define ICONV_CONST $ac_iconv_const
14797 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
14798 successful returns. This is even documented in
14799 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
14801 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
14802 if (cd_utf8_to_88591 != (iconv_t)(-1))
14804 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
14806 ICONV_CONST char *inptr = input;
14807 size_t inbytesleft = strlen (input);
14808 char *outptr = buf;
14809 size_t outbytesleft = sizeof (buf);
14810 size_t res = iconv (cd_utf8_to_88591,
14811 &inptr, &inbytesleft,
14812 &outptr, &outbytesleft);
14815 iconv_close (cd_utf8_to_88591);
14818 /* Test against Solaris 10 bug: Failures are not distinguishable from
14819 successful returns. */
14821 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
14822 if (cd_ascii_to_88591 != (iconv_t)(-1))
14824 static ICONV_CONST char input[] = "\263";
14826 ICONV_CONST char *inptr = input;
14827 size_t inbytesleft = strlen (input);
14828 char *outptr = buf;
14829 size_t outbytesleft = sizeof (buf);
14830 size_t res = iconv (cd_ascii_to_88591,
14831 &inptr, &inbytesleft,
14832 &outptr, &outbytesleft);
14835 iconv_close (cd_ascii_to_88591);
14838 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
14840 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
14841 if (cd_88591_to_utf8 != (iconv_t)(-1))
14843 static ICONV_CONST char input[] = "\304";
14844 static char buf[2] = { (char)0xDE, (char)0xAD };
14845 ICONV_CONST char *inptr = input;
14846 size_t inbytesleft = 1;
14847 char *outptr = buf;
14848 size_t outbytesleft = 1;
14849 size_t res = iconv (cd_88591_to_utf8,
14850 &inptr, &inbytesleft,
14851 &outptr, &outbytesleft);
14852 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
14854 iconv_close (cd_88591_to_utf8);
14857 #if 0 /* This bug could be worked around by the caller. */
14858 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
14860 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
14861 if (cd_88591_to_utf8 != (iconv_t)(-1))
14863 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
14865 ICONV_CONST char *inptr = input;
14866 size_t inbytesleft = strlen (input);
14867 char *outptr = buf;
14868 size_t outbytesleft = sizeof (buf);
14869 size_t res = iconv (cd_88591_to_utf8,
14870 &inptr, &inbytesleft,
14871 &outptr, &outbytesleft);
14874 iconv_close (cd_88591_to_utf8);
14878 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
14881 /* Try standardized names. */
14882 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
14883 /* Try IRIX, OSF/1 names. */
14884 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
14885 /* Try AIX names. */
14886 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
14887 /* Try HP-UX names. */
14888 iconv_t cd4 = iconv_open ("utf8", "eucJP");
14889 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
14890 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
14892 if (cd1 != (iconv_t)(-1))
14894 if (cd2 != (iconv_t)(-1))
14896 if (cd3 != (iconv_t)(-1))
14898 if (cd4 != (iconv_t)(-1))
14907 if ac_fn_c_try_run "$LINENO"
14909 am_cv_func_iconv_works=yes
14911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14912 conftest.$ac_objext conftest.beam conftest.$ac_ext
14915 test "$am_cv_func_iconv_works" = no || break
14917 LIBS="$am_save_LIBS"
14920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
14921 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
14922 case "$am_cv_func_iconv_works" in
14923 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
14924 *) am_func_iconv=yes ;;
14927 am_func_iconv=no am_cv_lib_iconv=no
14929 if test "$am_func_iconv" = yes; then
14931 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
14934 if test "$am_cv_lib_iconv" = yes; then
14935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
14936 printf %s "checking how to link with libiconv... " >&6; }
14937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
14938 printf "%s\n" "$LIBICONV" >&6; }
14940 CPPFLAGS="$am_save_CPPFLAGS"
14947 if test "$am_cv_func_iconv" = yes; then
14948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
14949 printf %s "checking whether iconv is compatible with its POSIX signature... " >&6; }
14950 if test ${gl_cv_iconv_nonconst+y}
14952 printf %s "(cached) " >&6
14954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14955 /* end confdefs.h. */
14957 #include <stdlib.h>
14963 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
14973 if ac_fn_c_try_compile "$LINENO"
14975 gl_cv_iconv_nonconst=yes
14977 gl_cv_iconv_nonconst=no
14979 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
14983 printf "%s\n" "$gl_cv_iconv_nonconst" >&6; }
14985 gl_cv_iconv_nonconst=yes
14987 if test $gl_cv_iconv_nonconst = yes; then
14993 printf "%s\n" "#define ICONV_CONST $iconv_arg1" >>confdefs.h
14996 if test $gl_cv_iconv_nonconst != yes; then
14997 ICONV_CONST="const"
15020 if test $gl_cv_have_include_next = yes; then
15021 gl_cv_next_iconv_h='<'iconv.h'>'
15023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
15024 printf %s "checking absolute name of <iconv.h>... " >&6; }
15025 if test ${gl_cv_next_iconv_h+y}
15027 printf %s "(cached) " >&6
15030 if test $ac_cv_header_iconv_h = yes; then
15035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15036 /* end confdefs.h. */
15040 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15041 *) gl_absname_cpp="$ac_cpp" ;;
15046 gl_dirsep_regex='[/\\]'
15049 gl_dirsep_regex='\/'
15052 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15053 gl_header_literal_regex=`echo 'iconv.h' \
15054 | sed -e "$gl_make_literal_regex_sed"`
15055 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15056 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15062 gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15063 sed -n "$gl_absolute_header_sed"`
15065 gl_header=$gl_cv_absolute_iconv_h
15066 gl_cv_next_iconv_h='"'$gl_header'"'
15068 gl_cv_next_iconv_h='<'iconv.h'>'
15073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
15074 printf "%s\n" "$gl_cv_next_iconv_h" >&6; }
15076 NEXT_ICONV_H=$gl_cv_next_iconv_h
15078 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15079 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15080 gl_next_as_first_directive='<'iconv.h'>'
15082 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15083 gl_next_as_first_directive=$gl_cv_next_iconv_h
15085 NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
15097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
15098 printf %s "checking for inline... " >&6; }
15099 if test ${ac_cv_c_inline+y}
15101 printf %s "(cached) " >&6
15104 for ac_kw in inline __inline__ __inline; do
15105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15106 /* end confdefs.h. */
15107 #ifndef __cplusplus
15109 static $ac_kw foo_t static_foo (void) {return 0; }
15110 $ac_kw foo_t foo (void) {return 0; }
15114 if ac_fn_c_try_compile "$LINENO"
15116 ac_cv_c_inline=$ac_kw
15118 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15119 test "$ac_cv_c_inline" != no && break
15123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
15124 printf "%s\n" "$ac_cv_c_inline" >&6; }
15126 case $ac_cv_c_inline in
15129 case $ac_cv_c_inline in
15131 *) ac_val=$ac_cv_c_inline;;
15133 cat >>confdefs.h <<_ACEOF
15134 #ifndef __cplusplus
15135 #define inline $ac_val
15141 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
15142 if test "x$ac_cv_type_off_t" = xyes
15147 printf "%s\n" "#define off_t long int" >>confdefs.h
15162 if test $gl_cv_have_include_next = yes; then
15163 gl_cv_next_limits_h='<'limits.h'>'
15165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
15166 printf %s "checking absolute name of <limits.h>... " >&6; }
15167 if test ${gl_cv_next_limits_h+y}
15169 printf %s "(cached) " >&6
15172 if test $ac_cv_header_limits_h = yes; then
15177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15178 /* end confdefs.h. */
15179 #include <limits.h>
15182 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15183 *) gl_absname_cpp="$ac_cpp" ;;
15188 gl_dirsep_regex='[/\\]'
15191 gl_dirsep_regex='\/'
15194 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15195 gl_header_literal_regex=`echo 'limits.h' \
15196 | sed -e "$gl_make_literal_regex_sed"`
15197 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15198 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15204 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15205 sed -n "$gl_absolute_header_sed"`
15207 gl_header=$gl_cv_absolute_limits_h
15208 gl_cv_next_limits_h='"'$gl_header'"'
15210 gl_cv_next_limits_h='<'limits.h'>'
15215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
15216 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
15218 NEXT_LIMITS_H=$gl_cv_next_limits_h
15220 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15221 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15222 gl_next_as_first_directive='<'limits.h'>'
15224 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15225 gl_next_as_first_directive=$gl_cv_next_limits_h
15227 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
15233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has WORD_BIT, BOOL_WIDTH etc." >&5
15234 printf %s "checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... " >&6; }
15235 if test ${gl_cv_header_limits_width+y}
15237 printf %s "(cached) " >&6
15239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15240 /* end confdefs.h. */
15241 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
15242 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
15244 #include <limits.h>
15245 long long llm = LLONG_MAX;
15247 int ullw = ULLONG_WIDTH;
15248 int bw = BOOL_WIDTH;
15258 if ac_fn_c_try_compile "$LINENO"
15260 gl_cv_header_limits_width=yes
15262 gl_cv_header_limits_width=no
15264 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
15267 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
15268 if test "$gl_cv_header_limits_width" = yes; then
15274 if test -n "$LIMITS_H"; then
15275 GL_GENERATE_LIMITS_H_TRUE=
15276 GL_GENERATE_LIMITS_H_FALSE='#'
15278 GL_GENERATE_LIMITS_H_TRUE='#'
15279 GL_GENERATE_LIMITS_H_FALSE=
15284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
15285 printf %s "checking for wint_t... " >&6; }
15286 if test ${gt_cv_c_wint_t+y}
15288 printf %s "(cached) " >&6
15290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15291 /* end confdefs.h. */
15293 wint_t foo = (wchar_t)'\0';
15302 if ac_fn_c_try_compile "$LINENO"
15308 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
15311 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
15312 if test $gt_cv_c_wint_t = yes; then
15314 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
15317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
15318 printf %s "checking whether wint_t is large enough... " >&6; }
15319 if test ${gl_cv_type_wint_t_large_enough+y}
15321 printf %s "(cached) " >&6
15323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15324 /* end confdefs.h. */
15326 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
15336 if ac_fn_c_try_compile "$LINENO"
15338 gl_cv_type_wint_t_large_enough=yes
15340 gl_cv_type_wint_t_large_enough=no
15342 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
15345 printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; }
15346 if test $gl_cv_type_wint_t_large_enough = no; then
15347 GNULIBHEADERS_OVERRIDE_WINT_T=1
15349 GNULIBHEADERS_OVERRIDE_WINT_T=0
15352 GNULIBHEADERS_OVERRIDE_WINT_T=0
15357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
15358 printf %s "checking whether the compiler produces multi-arch binaries... " >&6; }
15359 if test ${gl_cv_c_multiarch+y}
15361 printf %s "(cached) " >&6
15363 gl_cv_c_multiarch=no
15364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15365 /* end confdefs.h. */
15366 #ifndef __APPLE_CC__
15367 not a universal capable compiler
15372 if ac_fn_c_try_compile "$LINENO"
15377 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
15378 if test -n "$prev"; then
15380 i?86 | x86_64 | ppc | ppc64 | arm | arm64)
15381 if test -z "$arch" || test "$arch" = "$word"; then
15384 gl_cv_c_multiarch=yes
15390 if test "x$word" = "x-arch"; then
15397 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
15401 printf "%s\n" "$gl_cv_c_multiarch" >&6; }
15402 if test $gl_cv_c_multiarch = yes; then
15403 APPLE_UNIVERSAL_BUILD=1
15405 APPLE_UNIVERSAL_BUILD=0
15415 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
15418 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
15422 if test $ac_cv_header_wchar_h = yes; then
15430 if test $ac_cv_header_inttypes_h = yes; then
15438 if test $ac_cv_header_sys_types_h = yes; then
15454 if test $gl_cv_have_include_next = yes; then
15455 gl_cv_next_stdint_h='<'stdint.h'>'
15457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
15458 printf %s "checking absolute name of <stdint.h>... " >&6; }
15459 if test ${gl_cv_next_stdint_h+y}
15461 printf %s "(cached) " >&6
15464 if test $ac_cv_header_stdint_h = yes; then
15469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15470 /* end confdefs.h. */
15471 #include <stdint.h>
15474 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15475 *) gl_absname_cpp="$ac_cpp" ;;
15480 gl_dirsep_regex='[/\\]'
15483 gl_dirsep_regex='\/'
15486 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15487 gl_header_literal_regex=`echo 'stdint.h' \
15488 | sed -e "$gl_make_literal_regex_sed"`
15489 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15490 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15496 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15497 sed -n "$gl_absolute_header_sed"`
15499 gl_header=$gl_cv_absolute_stdint_h
15500 gl_cv_next_stdint_h='"'$gl_header'"'
15502 gl_cv_next_stdint_h='<'stdint.h'>'
15507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
15508 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
15510 NEXT_STDINT_H=$gl_cv_next_stdint_h
15512 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15513 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15514 gl_next_as_first_directive='<'stdint.h'>'
15516 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15517 gl_next_as_first_directive=$gl_cv_next_stdint_h
15519 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
15524 if test $ac_cv_header_stdint_h = yes; then
15531 if test $ac_cv_header_stdint_h = yes; then
15532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
15533 printf %s "checking whether stdint.h conforms to C99... " >&6; }
15534 if test ${gl_cv_header_working_stdint_h+y}
15536 printf %s "(cached) " >&6
15538 gl_cv_header_working_stdint_h=no
15539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15540 /* end confdefs.h. */
15543 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15544 #define __STDC_CONSTANT_MACROS 1
15545 #define __STDC_LIMIT_MACROS 1
15546 #include <stdint.h>
15547 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
15548 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
15549 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
15553 #include <stddef.h>
15554 #include <signal.h>
15556 # include <wchar.h>
15561 int8_t a1 = INT8_MAX;
15562 int8_t a1min = INT8_MIN;
15565 int16_t a2 = INT16_MAX;
15566 int16_t a2min = INT16_MIN;
15569 int32_t a3 = INT32_MAX;
15570 int32_t a3min = INT32_MIN;
15573 int64_t a4 = INT64_MAX;
15574 int64_t a4min = INT64_MIN;
15577 uint8_t b1 = UINT8_MAX;
15579 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
15582 uint16_t b2 = UINT16_MAX;
15585 uint32_t b3 = UINT32_MAX;
15588 uint64_t b4 = UINT64_MAX;
15590 int_least8_t c1 = INT8_C (0x7f);
15591 int_least8_t c1max = INT_LEAST8_MAX;
15592 int_least8_t c1min = INT_LEAST8_MIN;
15593 int_least16_t c2 = INT16_C (0x7fff);
15594 int_least16_t c2max = INT_LEAST16_MAX;
15595 int_least16_t c2min = INT_LEAST16_MIN;
15596 int_least32_t c3 = INT32_C (0x7fffffff);
15597 int_least32_t c3max = INT_LEAST32_MAX;
15598 int_least32_t c3min = INT_LEAST32_MIN;
15599 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
15600 int_least64_t c4max = INT_LEAST64_MAX;
15601 int_least64_t c4min = INT_LEAST64_MIN;
15602 uint_least8_t d1 = UINT8_C (0xff);
15603 uint_least8_t d1max = UINT_LEAST8_MAX;
15604 uint_least16_t d2 = UINT16_C (0xffff);
15605 uint_least16_t d2max = UINT_LEAST16_MAX;
15606 uint_least32_t d3 = UINT32_C (0xffffffff);
15607 uint_least32_t d3max = UINT_LEAST32_MAX;
15608 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
15609 uint_least64_t d4max = UINT_LEAST64_MAX;
15610 int_fast8_t e1 = INT_FAST8_MAX;
15611 int_fast8_t e1min = INT_FAST8_MIN;
15612 int_fast16_t e2 = INT_FAST16_MAX;
15613 int_fast16_t e2min = INT_FAST16_MIN;
15614 int_fast32_t e3 = INT_FAST32_MAX;
15615 int_fast32_t e3min = INT_FAST32_MIN;
15616 int_fast64_t e4 = INT_FAST64_MAX;
15617 int_fast64_t e4min = INT_FAST64_MIN;
15618 uint_fast8_t f1 = UINT_FAST8_MAX;
15619 uint_fast16_t f2 = UINT_FAST16_MAX;
15620 uint_fast32_t f3 = UINT_FAST32_MAX;
15621 uint_fast64_t f4 = UINT_FAST64_MAX;
15623 intptr_t g = INTPTR_MAX;
15624 intptr_t gmin = INTPTR_MIN;
15627 uintptr_t h = UINTPTR_MAX;
15629 intmax_t i = INTMAX_MAX;
15630 uintmax_t j = UINTMAX_MAX;
15632 /* Check that SIZE_MAX has the correct type, if possible. */
15633 #if 201112 <= __STDC_VERSION__
15634 int k = _Generic (SIZE_MAX, size_t: 0);
15635 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
15636 || (0x5110 <= __SUNPRO_C && !__STDC__))
15638 extern __typeof__ (SIZE_MAX) k;
15641 #include <limits.h> /* for CHAR_BIT */
15642 #define TYPE_MINIMUM(t) \
15643 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
15644 #define TYPE_MAXIMUM(t) \
15645 ((t) ((t) 0 < (t) -1 \
15647 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
15650 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
15651 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
15653 /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64. */
15654 int check_SIG_ATOMIC:
15655 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
15656 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
15658 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
15660 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
15661 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
15663 /* Detect bug in mingw. */
15665 WINT_MIN == TYPE_MINIMUM (wint_t)
15666 && WINT_MAX == TYPE_MAXIMUM (wint_t)
15669 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
15671 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
15672 int check_UINT16_C:
15673 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
15675 /* Detect bugs in OpenBSD 3.9 stdint.h. */
15677 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
15680 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
15683 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
15686 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
15688 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
15689 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
15690 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
15691 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
15692 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
15693 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
15694 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
15695 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
15696 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
15697 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
15698 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
15709 if ac_fn_c_try_compile "$LINENO"
15711 if test "$cross_compiling" = yes
15714 # Guess yes on native Windows.
15715 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
15716 # In general, assume it works.
15717 *) gl_cv_header_working_stdint_h="guessing yes" ;;
15721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15722 /* end confdefs.h. */
15725 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15726 #define __STDC_CONSTANT_MACROS 1
15727 #define __STDC_LIMIT_MACROS 1
15728 #include <stdint.h>
15731 #include <stddef.h>
15732 #include <signal.h>
15734 # include <wchar.h>
15739 #include <string.h>
15740 #define MVAL(macro) MVAL1(macro)
15741 #define MVAL1(expression) #expression
15742 static const char *macro_values[] =
15776 for (mv = macro_values; *mv != NULL; mv++)
15778 const char *value = *mv;
15779 /* Test whether it looks like a cast expression. */
15780 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
15781 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
15782 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
15783 || strncmp (value, "((int)"/*)*/, 6) == 0
15784 || strncmp (value, "((signed short)"/*)*/, 15) == 0
15785 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
15786 return mv - macro_values + 1;
15794 if ac_fn_c_try_run "$LINENO"
15796 gl_cv_header_working_stdint_h=yes
15798 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15799 conftest.$ac_objext conftest.beam conftest.$ac_ext
15804 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
15808 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
15811 HAVE_C99_STDINT_H=0
15812 HAVE_SYS_BITYPES_H=0
15813 HAVE_SYS_INTTYPES_H=0
15815 case "$gl_cv_header_working_stdint_h" in
15817 HAVE_C99_STDINT_H=1
15818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
15819 printf %s "checking whether stdint.h works without ISO C predefines... " >&6; }
15820 if test ${gl_cv_header_stdint_without_STDC_macros+y}
15822 printf %s "(cached) " >&6
15824 gl_cv_header_stdint_without_STDC_macros=no
15825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15826 /* end confdefs.h. */
15829 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15830 #include <stdint.h>
15833 #include <stddef.h>
15834 #include <signal.h>
15836 # include <wchar.h>
15840 intmax_t im = INTMAX_MAX;
15841 int32_t i32 = INT32_C (0x7fffffff);
15851 if ac_fn_c_try_compile "$LINENO"
15853 gl_cv_header_stdint_without_STDC_macros=yes
15855 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
15859 printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; }
15861 if test $gl_cv_header_stdint_without_STDC_macros = no; then
15863 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
15866 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
15869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
15870 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
15871 if test ${gl_cv_header_stdint_width+y}
15873 printf %s "(cached) " >&6
15875 gl_cv_header_stdint_width=no
15876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15877 /* end confdefs.h. */
15879 /* Work if build is not clean. */
15880 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
15881 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
15882 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
15884 #include <stdint.h>
15886 #include <stddef.h>
15887 #include <signal.h>
15889 # include <wchar.h>
15892 int iw = UINTMAX_WIDTH;
15902 if ac_fn_c_try_compile "$LINENO"
15904 gl_cv_header_stdint_width=yes
15906 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
15909 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
15910 if test "$gl_cv_header_stdint_width" = yes; then
15915 ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
15916 if test "x$ac_cv_header_sys_inttypes_h" = xyes
15918 printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
15921 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
15922 if test "x$ac_cv_header_sys_bitypes_h" = xyes
15924 printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
15928 if test $ac_cv_header_sys_inttypes_h = yes; then
15929 HAVE_SYS_INTTYPES_H=1
15931 if test $ac_cv_header_sys_bitypes_h = yes; then
15932 HAVE_SYS_BITYPES_H=1
15936 if test $APPLE_UNIVERSAL_BUILD = 0; then
15939 for gltype in ptrdiff_t size_t ; do
15940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
15941 printf %s "checking for bit size of $gltype... " >&6; }
15942 if eval test \${gl_cv_bitsizeof_${gltype}+y}
15944 printf %s "(cached) " >&6
15946 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
15947 #include <stddef.h>
15948 #include <signal.h>
15950 # include <wchar.h>
15953 #include <limits.h>"
15960 eval gl_cv_bitsizeof_${gltype}=\$result
15963 eval ac_res=\$gl_cv_bitsizeof_${gltype}
15964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15965 printf "%s\n" "$ac_res" >&6; }
15966 eval result=\$gl_cv_bitsizeof_${gltype}
15967 if test $result = unknown; then
15970 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15971 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
15973 eval BITSIZEOF_${GLTYPE}=\$result
15980 for gltype in sig_atomic_t wchar_t wint_t ; do
15981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
15982 printf %s "checking for bit size of $gltype... " >&6; }
15983 if eval test \${gl_cv_bitsizeof_${gltype}+y}
15985 printf %s "(cached) " >&6
15987 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
15988 #include <stddef.h>
15989 #include <signal.h>
15991 # include <wchar.h>
15994 #include <limits.h>"
16001 eval gl_cv_bitsizeof_${gltype}=\$result
16004 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16006 printf "%s\n" "$ac_res" >&6; }
16007 eval result=\$gl_cv_bitsizeof_${gltype}
16008 if test $result = unknown; then
16011 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16012 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
16014 eval BITSIZEOF_${GLTYPE}=\$result
16020 for gltype in sig_atomic_t wchar_t wint_t ; do
16021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
16022 printf %s "checking whether $gltype is signed... " >&6; }
16023 if eval test \${gl_cv_type_${gltype}_signed+y}
16025 printf %s "(cached) " >&6
16027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16028 /* end confdefs.h. */
16030 #include <stddef.h>
16031 #include <signal.h>
16033 # include <wchar.h>
16036 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
16045 if ac_fn_c_try_compile "$LINENO"
16051 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16052 eval gl_cv_type_${gltype}_signed=\$result
16055 eval ac_res=\$gl_cv_type_${gltype}_signed
16056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16057 printf "%s\n" "$ac_res" >&6; }
16058 eval result=\$gl_cv_type_${gltype}_signed
16059 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16060 if test "$result" = yes; then
16061 printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
16063 eval HAVE_SIGNED_${GLTYPE}=1
16065 eval HAVE_SIGNED_${GLTYPE}=0
16070 gl_cv_type_ptrdiff_t_signed=yes
16071 gl_cv_type_size_t_signed=no
16072 if test $APPLE_UNIVERSAL_BUILD = 0; then
16075 for gltype in ptrdiff_t size_t ; do
16076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16077 printf %s "checking for $gltype integer literal suffix... " >&6; }
16078 if eval test \${gl_cv_type_${gltype}_suffix+y}
16080 printf %s "(cached) " >&6
16082 eval gl_cv_type_${gltype}_suffix=no
16083 eval result=\$gl_cv_type_${gltype}_signed
16084 if test "$result" = yes; then
16089 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16091 '') gltype1='int';;
16092 l) gltype1='long int';;
16093 ll) gltype1='long long int';;
16094 i64) gltype1='__int64';;
16095 u) gltype1='unsigned int';;
16096 ul) gltype1='unsigned long int';;
16097 ull) gltype1='unsigned long long int';;
16098 ui64)gltype1='unsigned __int64';;
16100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16101 /* end confdefs.h. */
16103 #include <stddef.h>
16104 #include <signal.h>
16106 # include <wchar.h>
16109 extern $gltype foo;
16110 extern $gltype1 foo;
16119 if ac_fn_c_try_compile "$LINENO"
16121 eval gl_cv_type_${gltype}_suffix=\$glsuf
16123 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16124 eval result=\$gl_cv_type_${gltype}_suffix
16125 test "$result" != no && break
16128 eval ac_res=\$gl_cv_type_${gltype}_suffix
16129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16130 printf "%s\n" "$ac_res" >&6; }
16131 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16132 eval result=\$gl_cv_type_${gltype}_suffix
16133 test "$result" = no && result=
16134 eval ${GLTYPE}_SUFFIX=\$result
16135 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
16143 for gltype in sig_atomic_t wchar_t wint_t ; do
16144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16145 printf %s "checking for $gltype integer literal suffix... " >&6; }
16146 if eval test \${gl_cv_type_${gltype}_suffix+y}
16148 printf %s "(cached) " >&6
16150 eval gl_cv_type_${gltype}_suffix=no
16151 eval result=\$gl_cv_type_${gltype}_signed
16152 if test "$result" = yes; then
16157 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16159 '') gltype1='int';;
16160 l) gltype1='long int';;
16161 ll) gltype1='long long int';;
16162 i64) gltype1='__int64';;
16163 u) gltype1='unsigned int';;
16164 ul) gltype1='unsigned long int';;
16165 ull) gltype1='unsigned long long int';;
16166 ui64)gltype1='unsigned __int64';;
16168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16169 /* end confdefs.h. */
16171 #include <stddef.h>
16172 #include <signal.h>
16174 # include <wchar.h>
16177 extern $gltype foo;
16178 extern $gltype1 foo;
16187 if ac_fn_c_try_compile "$LINENO"
16189 eval gl_cv_type_${gltype}_suffix=\$glsuf
16191 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16192 eval result=\$gl_cv_type_${gltype}_suffix
16193 test "$result" != no && break
16196 eval ac_res=\$gl_cv_type_${gltype}_suffix
16197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16198 printf "%s\n" "$ac_res" >&6; }
16199 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16200 eval result=\$gl_cv_type_${gltype}_suffix
16201 test "$result" = no && result=
16202 eval ${GLTYPE}_SUFFIX=\$result
16203 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
16209 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
16210 BITSIZEOF_WINT_T=32
16218 LIMITS_H='limits.h'
16219 if test -n "$LIMITS_H"; then
16220 GL_GENERATE_LIMITS_H_TRUE=
16221 GL_GENERATE_LIMITS_H_FALSE='#'
16223 GL_GENERATE_LIMITS_H_TRUE='#'
16224 GL_GENERATE_LIMITS_H_FALSE=
16233 if test -n "$STDINT_H"; then
16234 GL_GENERATE_STDINT_H_TRUE=
16235 GL_GENERATE_STDINT_H_FALSE='#'
16237 GL_GENERATE_STDINT_H_TRUE='#'
16238 GL_GENERATE_STDINT_H_FALSE=
16243 HAVE_DECL_IMAXABS=1;
16244 HAVE_DECL_IMAXDIV=1;
16245 HAVE_DECL_STRTOIMAX=1;
16246 HAVE_DECL_STRTOUMAX=1;
16248 REPLACE_STRTOIMAX=0;
16249 REPLACE_STRTOUMAX=0;
16250 INT32_MAX_LT_INTMAX_MAX=1;
16251 INT64_MAX_EQ_LONG_MAX='defined _LP64';
16252 PRIPTR_PREFIX=__PRIPTR_PREFIX;
16253 UINT32_MAX_LT_UINTMAX_MAX=1;
16254 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
16270 if test $gl_cv_have_include_next = yes; then
16271 gl_cv_next_inttypes_h='<'inttypes.h'>'
16273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
16274 printf %s "checking absolute name of <inttypes.h>... " >&6; }
16275 if test ${gl_cv_next_inttypes_h+y}
16277 printf %s "(cached) " >&6
16280 if test $ac_cv_header_inttypes_h = yes; then
16285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16286 /* end confdefs.h. */
16287 #include <inttypes.h>
16290 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16291 *) gl_absname_cpp="$ac_cpp" ;;
16296 gl_dirsep_regex='[/\\]'
16299 gl_dirsep_regex='\/'
16302 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16303 gl_header_literal_regex=`echo 'inttypes.h' \
16304 | sed -e "$gl_make_literal_regex_sed"`
16305 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16306 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16312 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16313 sed -n "$gl_absolute_header_sed"`
16315 gl_header=$gl_cv_absolute_inttypes_h
16316 gl_cv_next_inttypes_h='"'$gl_header'"'
16318 gl_cv_next_inttypes_h='<'inttypes.h'>'
16323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
16324 printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
16326 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
16328 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16329 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16330 gl_next_as_first_directive='<'inttypes.h'>'
16332 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16333 gl_next_as_first_directive=$gl_cv_next_inttypes_h
16335 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
16353 if test -n "$STDINT_H"; then
16354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16355 /* end confdefs.h. */
16370 if ac_fn_c_try_compile "$LINENO"
16372 PRIPTR_PREFIX='"l"'
16374 PRIPTR_PREFIX='"ll"'
16376 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16378 for glpfx in '' l ll I64; do
16380 '') gltype1='int';;
16381 l) gltype1='long int';;
16382 ll) gltype1='long long int';;
16383 I64) gltype1='__int64';;
16385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16386 /* end confdefs.h. */
16387 #include <stdint.h>
16388 extern intptr_t foo;
16389 extern $gltype1 foo;
16398 if ac_fn_c_try_compile "$LINENO"
16400 PRIPTR_PREFIX='"'$glpfx'"'
16402 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16403 test -n "$PRIPTR_PREFIX" && break
16409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
16410 printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
16411 if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
16413 printf %s "(cached) " >&6
16415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16416 /* end confdefs.h. */
16417 /* Work also in C++ mode. */
16418 #define __STDC_LIMIT_MACROS 1
16420 /* Work if build is not clean. */
16421 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
16423 #include <limits.h>
16425 #include <stdint.h>
16428 #if defined INT32_MAX && defined INTMAX_MAX
16429 #define CONDITION (INT32_MAX < INTMAX_MAX)
16431 #define CONDITION (sizeof (int) < sizeof (long long int))
16433 int test[CONDITION ? 1 : -1];
16442 if ac_fn_c_try_compile "$LINENO"
16444 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
16446 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
16448 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
16451 printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
16452 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
16453 INT32_MAX_LT_INTMAX_MAX=1;
16455 INT32_MAX_LT_INTMAX_MAX=0;
16459 if test $APPLE_UNIVERSAL_BUILD = 0; then
16461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
16462 printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
16463 if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
16465 printf %s "(cached) " >&6
16467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16468 /* end confdefs.h. */
16469 /* Work also in C++ mode. */
16470 #define __STDC_LIMIT_MACROS 1
16472 /* Work if build is not clean. */
16473 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
16475 #include <limits.h>
16477 #include <stdint.h>
16480 #if defined INT64_MAX
16481 #define CONDITION (INT64_MAX == LONG_MAX)
16483 #define CONDITION (sizeof (long long int) == sizeof (long int))
16485 int test[CONDITION ? 1 : -1];
16494 if ac_fn_c_try_compile "$LINENO"
16496 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
16498 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
16500 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
16503 printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
16504 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
16505 INT64_MAX_EQ_LONG_MAX=1;
16507 INT64_MAX_EQ_LONG_MAX=0;
16512 INT64_MAX_EQ_LONG_MAX=-1
16515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
16516 printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
16517 if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
16519 printf %s "(cached) " >&6
16521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16522 /* end confdefs.h. */
16523 /* Work also in C++ mode. */
16524 #define __STDC_LIMIT_MACROS 1
16526 /* Work if build is not clean. */
16527 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
16529 #include <limits.h>
16531 #include <stdint.h>
16534 #if defined UINT32_MAX && defined UINTMAX_MAX
16535 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
16537 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
16539 int test[CONDITION ? 1 : -1];
16548 if ac_fn_c_try_compile "$LINENO"
16550 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
16552 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
16554 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
16557 printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
16558 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
16559 UINT32_MAX_LT_UINTMAX_MAX=1;
16561 UINT32_MAX_LT_UINTMAX_MAX=0;
16565 if test $APPLE_UNIVERSAL_BUILD = 0; then
16567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
16568 printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
16569 if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
16571 printf %s "(cached) " >&6
16573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16574 /* end confdefs.h. */
16575 /* Work also in C++ mode. */
16576 #define __STDC_LIMIT_MACROS 1
16578 /* Work if build is not clean. */
16579 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
16581 #include <limits.h>
16583 #include <stdint.h>
16586 #if defined UINT64_MAX
16587 #define CONDITION (UINT64_MAX == ULONG_MAX)
16589 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
16591 int test[CONDITION ? 1 : -1];
16600 if ac_fn_c_try_compile "$LINENO"
16602 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
16604 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
16606 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
16609 printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
16610 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
16611 UINT64_MAX_EQ_ULONG_MAX=1;
16613 UINT64_MAX_EQ_ULONG_MAX=0;
16618 UINT64_MAX_EQ_ULONG_MAX=-1
16624 GL_GNULIB_IMAXABS=0
16628 GL_GNULIB_IMAXDIV=0
16632 GL_GNULIB_STRTOIMAX=0
16636 GL_GNULIB_STRTOUMAX=0
16645 REPLACE_ISWBLANK=0;
16646 REPLACE_ISWDIGIT=0;
16647 REPLACE_ISWXDIGIT=0;
16653 if test $ac_cv_header_crtdefs_h = yes; then
16666 if test $ac_cv_func_iswcntrl = yes; then
16674 if test $gt_cv_c_wint_t = yes; then
16692 if test $gl_cv_have_include_next = yes; then
16693 gl_cv_next_wctype_h='<'wctype.h'>'
16695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
16696 printf %s "checking absolute name of <wctype.h>... " >&6; }
16697 if test ${gl_cv_next_wctype_h+y}
16699 printf %s "(cached) " >&6
16702 if test $ac_cv_header_wctype_h = yes; then
16707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16708 /* end confdefs.h. */
16709 #include <wctype.h>
16712 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16713 *) gl_absname_cpp="$ac_cpp" ;;
16718 gl_dirsep_regex='[/\\]'
16721 gl_dirsep_regex='\/'
16724 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16725 gl_header_literal_regex=`echo 'wctype.h' \
16726 | sed -e "$gl_make_literal_regex_sed"`
16727 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16728 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16734 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16735 sed -n "$gl_absolute_header_sed"`
16737 gl_header=$gl_cv_absolute_wctype_h
16738 gl_cv_next_wctype_h='"'$gl_header'"'
16740 gl_cv_next_wctype_h='<'wctype.h'>'
16745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
16746 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
16748 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
16750 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16751 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16752 gl_next_as_first_directive='<'wctype.h'>'
16754 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16755 gl_next_as_first_directive=$gl_cv_next_wctype_h
16757 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
16762 if test $ac_cv_header_wctype_h = yes; then
16763 if test $ac_cv_func_iswcntrl = yes; then
16764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
16765 printf %s "checking whether iswcntrl works... " >&6; }
16766 if test ${gl_cv_func_iswcntrl_works+y}
16768 printf %s "(cached) " >&6
16771 if test "$cross_compiling" = yes
16773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16774 /* end confdefs.h. */
16775 #include <stdlib.h>
16776 #if __GNU_LIBRARY__ == 1
16777 Linux libc5 i18n is broken.
16787 if ac_fn_c_try_compile "$LINENO"
16789 gl_cv_func_iswcntrl_works="guessing yes"
16791 gl_cv_func_iswcntrl_works="guessing no"
16793 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16797 /* end confdefs.h. */
16800 #include <wctype.h>
16801 int main () { return iswprint ('x') == 0; }
16804 if ac_fn_c_try_run "$LINENO"
16806 gl_cv_func_iswcntrl_works=yes
16808 gl_cv_func_iswcntrl_works=no
16810 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16811 conftest.$ac_objext conftest.beam conftest.$ac_ext
16816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
16817 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
16825 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
16828 case "$gl_cv_func_iswcntrl_works" in
16829 *yes) REPLACE_ISWCNTRL=0 ;;
16830 *) REPLACE_ISWCNTRL=1 ;;
16835 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
16839 if test $REPLACE_ISWCNTRL = 1; then
16842 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
16843 if test "x$ac_cv_func_towlower" = xyes
16845 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
16849 if test $ac_cv_func_towlower = yes; then
16852 ac_fn_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
16854 # include <wctype.h>
16857 " "$ac_c_undeclared_builtin_options" "CFLAGS"
16858 if test "x$ac_cv_have_decl_towlower" = xyes
16864 printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
16866 if test $ac_cv_have_decl_towlower = yes; then
16875 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
16879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
16880 printf %s "checking for wctype_t... " >&6; }
16881 if test ${gl_cv_type_wctype_t+y}
16883 printf %s "(cached) " >&6
16885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16886 /* end confdefs.h. */
16889 # include <wctype.h>
16901 if ac_fn_c_try_compile "$LINENO"
16903 gl_cv_type_wctype_t=yes
16905 gl_cv_type_wctype_t=no
16907 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
16911 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
16912 if test $gl_cv_type_wctype_t = no; then
16916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
16917 printf %s "checking for wctrans_t... " >&6; }
16918 if test ${gl_cv_type_wctrans_t+y}
16920 printf %s "(cached) " >&6
16922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16923 /* end confdefs.h. */
16925 #include <wctype.h>
16936 if ac_fn_c_try_compile "$LINENO"
16938 gl_cv_type_wctrans_t=yes
16940 gl_cv_type_wctrans_t=no
16942 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
16946 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
16947 if test $gl_cv_type_wctrans_t = no; then
16958 GL_GNULIB_ISWBLANK=0
16962 GL_GNULIB_ISWDIGIT=0
16966 GL_GNULIB_ISWXDIGIT=0
16974 GL_GNULIB_ISWCTYPE=0
16978 GL_GNULIB_WCTRANS=0
16982 GL_GNULIB_TOWCTRANS=0
16989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
16990 printf %s "checking for a traditional japanese locale... " >&6; }
16991 if test ${gt_cv_locale_ja+y}
16993 printf %s "(cached) " >&6
16996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16997 /* end confdefs.h. */
16999 #include <locale.h>
17001 #if HAVE_LANGINFO_CODESET
17002 # include <langinfo.h>
17004 #include <stdlib.h>
17005 #include <string.h>
17010 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
17011 imitates locale dependent behaviour by looking at the environment
17012 variables, and all locales use the UTF-8 encoding. */
17013 #if defined __BEOS__ || defined __HAIKU__
17016 /* Check whether the given locale name is recognized by the system. */
17017 # if defined _WIN32 && !defined __CYGWIN__
17018 /* On native Windows, setlocale(category, "") looks at the system settings,
17019 not at the environment variables. Also, when an encoding suffix such
17020 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17021 category of the locale to "C". */
17022 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17023 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17026 if (setlocale (LC_ALL, "") == NULL) return 1;
17028 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17029 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17030 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17031 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17032 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17033 some unit tests fail.
17034 On MirBSD 10, when an unsupported locale is specified, setlocale()
17035 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
17036 # if HAVE_LANGINFO_CODESET
17038 const char *cs = nl_langinfo (CODESET);
17039 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
17040 || strcmp (cs, "UTF-8") == 0)
17045 /* On Cygwin, avoid locale names without encoding suffix, because the
17046 locale_charset() function relies on the encoding suffix. Note that
17047 LC_ALL is set on the command line. */
17048 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
17050 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
17051 on Cygwin 1.5.x. */
17052 if (MB_CUR_MAX == 1)
17054 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
17055 This excludes the UTF-8 encoding (except on MirBSD). */
17058 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
17059 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
17060 for (p = buf; *p != '\0'; p++)
17061 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
17069 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17070 (eval $ac_link) 2>&5
17072 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17073 test $ac_status = 0; } && test -s conftest$ac_exeext; then
17075 # Handle native Windows specially, because there setlocale() interprets
17076 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
17077 # "fr" or "fra" as "French" or "French_France.1252",
17078 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
17079 # "ja" as "Japanese" or "Japanese_Japan.932",
17082 # Note that on native Windows, the Japanese locale is
17083 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
17084 # cannot use it here.
17085 gt_cv_locale_ja=none
17088 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17089 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17090 # configure script would override the LC_ALL setting. Likewise for
17091 # LC_CTYPE, which is also set at the beginning of the configure script.
17092 # Test for the AIX locale name.
17093 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17094 gt_cv_locale_ja=ja_JP
17096 # Test for the locale name with explicit encoding suffix.
17097 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17098 gt_cv_locale_ja=ja_JP.EUC-JP
17100 # Test for the HP-UX, OSF/1, NetBSD locale name.
17101 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17102 gt_cv_locale_ja=ja_JP.eucJP
17104 # Test for the IRIX, FreeBSD locale name.
17105 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17106 gt_cv_locale_ja=ja_JP.EUC
17108 # Test for the Solaris 7 locale name.
17109 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17112 # Special test for NetBSD 1.6.
17113 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
17114 gt_cv_locale_ja=ja_JP.eucJP
17117 gt_cv_locale_ja=none
17130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
17131 printf "%s\n" "$gt_cv_locale_ja" >&6; }
17132 LOCALE_JA=$gt_cv_locale_ja
17137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
17138 printf %s "checking for a french Unicode locale... " >&6; }
17139 if test ${gt_cv_locale_fr_utf8+y}
17141 printf %s "(cached) " >&6
17144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17145 /* end confdefs.h. */
17147 #include <locale.h>
17149 #if HAVE_LANGINFO_CODESET
17150 # include <langinfo.h>
17152 #include <stdlib.h>
17153 #include <string.h>
17157 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
17158 imitates locale dependent behaviour by looking at the environment
17159 variables, and all locales use the UTF-8 encoding. */
17160 #if !(defined __BEOS__ || defined __HAIKU__)
17161 /* Check whether the given locale name is recognized by the system. */
17162 # if defined _WIN32 && !defined __CYGWIN__
17163 /* On native Windows, setlocale(category, "") looks at the system settings,
17164 not at the environment variables. Also, when an encoding suffix such
17165 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17166 category of the locale to "C". */
17167 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17168 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17171 if (setlocale (LC_ALL, "") == NULL) return 1;
17173 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17174 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17175 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17176 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17177 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17178 some unit tests fail. */
17179 # if HAVE_LANGINFO_CODESET
17181 const char *cs = nl_langinfo (CODESET);
17182 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
17187 /* On Cygwin, avoid locale names without encoding suffix, because the
17188 locale_charset() function relies on the encoding suffix. Note that
17189 LC_ALL is set on the command line. */
17190 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
17192 /* Check whether in the abbreviation of the second month, the second
17193 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
17194 two bytes long, with UTF-8 encoding. */
17195 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
17196 if (strftime (buf, sizeof (buf), "%b", &t) < 4
17197 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
17200 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
17201 /* Check whether the decimal separator is a comma.
17202 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
17203 are nl_langinfo(RADIXCHAR) are both ".". */
17204 if (localeconv () ->decimal_point[0] != ',') return 1;
17210 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17211 (eval $ac_link) 2>&5
17213 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17214 test $ac_status = 0; } && test -s conftest$ac_exeext; then
17216 # Handle native Windows specially, because there setlocale() interprets
17217 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
17218 # "fr" or "fra" as "French" or "French_France.1252",
17219 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
17220 # "ja" as "Japanese" or "Japanese_Japan.932",
17223 # Test for the hypothetical native Windows locale name.
17224 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17225 gt_cv_locale_fr_utf8=French_France.65001
17228 gt_cv_locale_fr_utf8=none
17232 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17233 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17234 # configure script would override the LC_ALL setting. Likewise for
17235 # LC_CTYPE, which is also set at the beginning of the configure script.
17236 # Test for the usual locale name.
17237 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17238 gt_cv_locale_fr_utf8=fr_FR
17240 # Test for the locale name with explicit encoding suffix.
17241 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17242 gt_cv_locale_fr_utf8=fr_FR.UTF-8
17244 # Test for the Solaris 7 locale name.
17245 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17246 gt_cv_locale_fr_utf8=fr.UTF-8
17249 gt_cv_locale_fr_utf8=none
17259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
17260 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
17261 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
17267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
17268 printf %s "checking for a transitional chinese locale... " >&6; }
17269 if test ${gt_cv_locale_zh_CN+y}
17271 printf %s "(cached) " >&6
17274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17275 /* end confdefs.h. */
17277 #include <locale.h>
17278 #include <stdlib.h>
17280 #if HAVE_LANGINFO_CODESET
17281 # include <langinfo.h>
17283 #include <stdlib.h>
17284 #include <string.h>
17289 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
17290 imitates locale dependent behaviour by looking at the environment
17291 variables, and all locales use the UTF-8 encoding. */
17292 #if defined __BEOS__ || defined __HAIKU__
17295 /* Check whether the given locale name is recognized by the system. */
17296 # if defined _WIN32 && !defined __CYGWIN__
17297 /* On native Windows, setlocale(category, "") looks at the system settings,
17298 not at the environment variables. Also, when an encoding suffix such
17299 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17300 category of the locale to "C". */
17301 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17302 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17305 if (setlocale (LC_ALL, "") == NULL) return 1;
17307 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17308 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17309 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17310 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17311 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17312 some unit tests fail.
17313 On MirBSD 10, when an unsupported locale is specified, setlocale()
17314 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
17315 # if HAVE_LANGINFO_CODESET
17317 const char *cs = nl_langinfo (CODESET);
17318 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
17319 || strcmp (cs, "UTF-8") == 0)
17324 /* On Cygwin, avoid locale names without encoding suffix, because the
17325 locale_charset() function relies on the encoding suffix. Note that
17326 LC_ALL is set on the command line. */
17327 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
17329 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
17330 This excludes the UTF-8 encoding (except on MirBSD). */
17333 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
17334 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
17335 for (p = buf; *p != '\0'; p++)
17336 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
17339 /* Check whether a typical GB18030 multibyte sequence is recognized as a
17340 single wide character. This excludes the GB2312 and GBK encodings. */
17341 if (mblen ("\203\062\332\066", 5) != 4)
17348 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17349 (eval $ac_link) 2>&5
17351 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17352 test $ac_status = 0; } && test -s conftest$ac_exeext; then
17354 # Handle native Windows specially, because there setlocale() interprets
17355 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
17356 # "fr" or "fra" as "French" or "French_France.1252",
17357 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
17358 # "ja" as "Japanese" or "Japanese_Japan.932",
17361 # Test for the hypothetical native Windows locale name.
17362 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17363 gt_cv_locale_zh_CN=Chinese_China.54936
17366 gt_cv_locale_zh_CN=none
17370 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
17371 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
17372 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
17373 gt_cv_locale_zh_CN=none
17376 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17377 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17378 # configure script would override the LC_ALL setting. Likewise for
17379 # LC_CTYPE, which is also set at the beginning of the configure script.
17380 # Test for the locale name without encoding suffix.
17381 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17382 gt_cv_locale_zh_CN=zh_CN
17384 # Test for the locale name with explicit encoding suffix.
17385 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17386 gt_cv_locale_zh_CN=zh_CN.GB18030
17389 gt_cv_locale_zh_CN=none
17395 # If there was a link error, due to mblen(), the system is so old that
17396 # it certainly doesn't have a chinese locale.
17397 gt_cv_locale_zh_CN=none
17402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
17403 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
17404 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
17408 HAVE_NL_LANGINFO=1;
17409 REPLACE_NL_LANGINFO=0;
17426 if test $gl_cv_have_include_next = yes; then
17427 gl_cv_next_langinfo_h='<'langinfo.h'>'
17429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
17430 printf %s "checking absolute name of <langinfo.h>... " >&6; }
17431 if test ${gl_cv_next_langinfo_h+y}
17433 printf %s "(cached) " >&6
17436 if test $ac_cv_header_langinfo_h = yes; then
17441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17442 /* end confdefs.h. */
17443 #include <langinfo.h>
17446 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17447 *) gl_absname_cpp="$ac_cpp" ;;
17452 gl_dirsep_regex='[/\\]'
17455 gl_dirsep_regex='\/'
17458 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17459 gl_header_literal_regex=`echo 'langinfo.h' \
17460 | sed -e "$gl_make_literal_regex_sed"`
17461 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17462 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17468 gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17469 sed -n "$gl_absolute_header_sed"`
17471 gl_header=$gl_cv_absolute_langinfo_h
17472 gl_cv_next_langinfo_h='"'$gl_header'"'
17474 gl_cv_next_langinfo_h='<'langinfo.h'>'
17479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
17480 printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
17482 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
17484 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17485 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17486 gl_next_as_first_directive='<'langinfo.h'>'
17488 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17489 gl_next_as_first_directive=$gl_cv_next_langinfo_h
17491 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
17497 HAVE_LANGINFO_CODESET=0
17498 HAVE_LANGINFO_T_FMT_AMPM=0
17499 HAVE_LANGINFO_ALTMON=0
17500 HAVE_LANGINFO_ERA=0
17501 HAVE_LANGINFO_YESEXPR=0
17503 if test $ac_cv_header_langinfo_h = yes; then
17505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
17506 printf %s "checking whether langinfo.h defines CODESET... " >&6; }
17507 if test ${gl_cv_header_langinfo_codeset+y}
17509 printf %s "(cached) " >&6
17511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17512 /* end confdefs.h. */
17513 #include <langinfo.h>
17524 if ac_fn_c_try_compile "$LINENO"
17526 gl_cv_header_langinfo_codeset=yes
17528 gl_cv_header_langinfo_codeset=no
17530 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
17534 printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
17535 if test $gl_cv_header_langinfo_codeset = yes; then
17536 HAVE_LANGINFO_CODESET=1
17538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
17539 printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
17540 if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
17542 printf %s "(cached) " >&6
17544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17545 /* end confdefs.h. */
17546 #include <langinfo.h>
17547 int a = T_FMT_AMPM;
17557 if ac_fn_c_try_compile "$LINENO"
17559 gl_cv_header_langinfo_t_fmt_ampm=yes
17561 gl_cv_header_langinfo_t_fmt_ampm=no
17563 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
17567 printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
17568 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
17569 HAVE_LANGINFO_T_FMT_AMPM=1
17571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
17572 printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
17573 if test ${gl_cv_header_langinfo_altmon+y}
17575 printf %s "(cached) " >&6
17577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17578 /* end confdefs.h. */
17579 #include <langinfo.h>
17590 if ac_fn_c_try_compile "$LINENO"
17592 gl_cv_header_langinfo_altmon=yes
17594 gl_cv_header_langinfo_altmon=no
17596 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
17600 printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
17601 if test $gl_cv_header_langinfo_altmon = yes; then
17602 HAVE_LANGINFO_ALTMON=1
17604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
17605 printf %s "checking whether langinfo.h defines ERA... " >&6; }
17606 if test ${gl_cv_header_langinfo_era+y}
17608 printf %s "(cached) " >&6
17610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17611 /* end confdefs.h. */
17612 #include <langinfo.h>
17623 if ac_fn_c_try_compile "$LINENO"
17625 gl_cv_header_langinfo_era=yes
17627 gl_cv_header_langinfo_era=no
17629 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
17633 printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
17634 if test $gl_cv_header_langinfo_era = yes; then
17635 HAVE_LANGINFO_ERA=1
17637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
17638 printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
17639 if test ${gl_cv_header_langinfo_yesexpr+y}
17641 printf %s "(cached) " >&6
17643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17644 /* end confdefs.h. */
17645 #include <langinfo.h>
17656 if ac_fn_c_try_compile "$LINENO"
17658 gl_cv_header_langinfo_yesexpr=yes
17660 gl_cv_header_langinfo_yesexpr=no
17662 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
17666 printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
17667 if test $gl_cv_header_langinfo_yesexpr = yes; then
17668 HAVE_LANGINFO_YESEXPR=1
17686 GL_GNULIB_NL_LANGINFO=0
17694 REPLACE_LOCALECONV=0;
17695 REPLACE_SETLOCALE=0;
17696 REPLACE_NEWLOCALE=0;
17697 REPLACE_DUPLOCALE=0;
17698 REPLACE_FREELOCALE=0;
17699 REPLACE_STRUCT_LCONV=0;
17700 LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
17704 HAVE_MAX_ALIGN_T=1;
17708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
17709 printf %s "checking for wchar_t... " >&6; }
17710 if test ${gt_cv_c_wchar_t+y}
17712 printf %s "(cached) " >&6
17714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17715 /* end confdefs.h. */
17716 #include <stddef.h>
17717 wchar_t foo = (wchar_t)'\0';
17726 if ac_fn_c_try_compile "$LINENO"
17728 gt_cv_c_wchar_t=yes
17732 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
17735 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
17736 if test $gt_cv_c_wchar_t = yes; then
17738 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
17750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
17751 printf %s "checking for good max_align_t... " >&6; }
17752 if test ${gl_cv_type_max_align_t+y}
17754 printf %s "(cached) " >&6
17756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17757 /* end confdefs.h. */
17758 #include <stddef.h>
17759 unsigned int s = sizeof (max_align_t);
17760 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
17761 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
17762 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
17764 typedef struct { char a; max_align_t b; } max_helper;
17765 typedef struct { char a; long b; } long_helper;
17766 typedef struct { char a; double b; } double_helper;
17767 typedef struct { char a; long double b; } long_double_helper;
17768 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
17769 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
17770 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
17780 if ac_fn_c_try_compile "$LINENO"
17782 gl_cv_type_max_align_t=yes
17784 gl_cv_type_max_align_t=no
17786 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
17790 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
17791 if test $gl_cv_type_max_align_t = no; then
17796 if test $gt_cv_c_wchar_t = no; then
17801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
17802 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
17803 if test ${gl_cv_decl_null_works+y}
17805 printf %s "(cached) " >&6
17807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17808 /* end confdefs.h. */
17809 #include <stddef.h>
17810 int test[2 * (sizeof NULL == sizeof (void *)) -1];
17820 if ac_fn_c_try_compile "$LINENO"
17822 gl_cv_decl_null_works=yes
17824 gl_cv_decl_null_works=no
17826 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
17829 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
17830 if test $gl_cv_decl_null_works = no; then
17836 if test -n "$STDDEF_H"; then
17837 GL_GENERATE_STDDEF_H_TRUE=
17838 GL_GENERATE_STDDEF_H_FALSE='#'
17840 GL_GENERATE_STDDEF_H_TRUE='#'
17841 GL_GENERATE_STDDEF_H_FALSE=
17844 if test -n "$STDDEF_H"; then
17853 if test $gl_cv_have_include_next = yes; then
17854 gl_cv_next_stddef_h='<'stddef.h'>'
17856 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
17857 printf %s "checking absolute name of <stddef.h>... " >&6; }
17858 if test ${gl_cv_next_stddef_h+y}
17860 printf %s "(cached) " >&6
17865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17866 /* end confdefs.h. */
17867 #include <stddef.h>
17870 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17871 *) gl_absname_cpp="$ac_cpp" ;;
17876 gl_dirsep_regex='[/\\]'
17879 gl_dirsep_regex='\/'
17882 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17883 gl_header_literal_regex=`echo 'stddef.h' \
17884 | sed -e "$gl_make_literal_regex_sed"`
17885 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17886 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17892 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17893 sed -n "$gl_absolute_header_sed"`
17895 gl_header=$gl_cv_absolute_stddef_h
17896 gl_cv_next_stddef_h='"'$gl_header'"'
17900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
17901 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
17903 NEXT_STDDEF_H=$gl_cv_next_stddef_h
17905 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17906 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17907 gl_next_as_first_directive='<'stddef.h'>'
17909 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17910 gl_next_as_first_directive=$gl_cv_next_stddef_h
17912 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
17923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
17924 printf %s "checking whether locale.h defines locale_t... " >&6; }
17925 if test ${gl_cv_header_locale_has_locale_t+y}
17927 printf %s "(cached) " >&6
17929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17930 /* end confdefs.h. */
17931 #include <locale.h>
17941 if ac_fn_c_try_compile "$LINENO"
17943 gl_cv_header_locale_has_locale_t=yes
17945 gl_cv_header_locale_has_locale_t=no
17947 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
17951 printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
17954 if test $ac_cv_header_xlocale_h = yes; then
17956 if test $gl_cv_header_locale_has_locale_t = yes; then
17957 gl_cv_header_locale_h_needs_xlocale_h=no
17959 gl_cv_header_locale_h_needs_xlocale_h=yes
17964 gl_cv_header_locale_h_needs_xlocale_h=no
17965 if test $gl_cv_header_locale_has_locale_t = yes; then
17986 printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
17991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
17992 printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
17993 if test ${gl_cv_header_locale_h_posix2001+y}
17995 printf %s "(cached) " >&6
17997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17998 /* end confdefs.h. */
17999 #include <locale.h>
18000 int x = LC_MESSAGES;
18001 int y = sizeof (((struct lconv *) 0)->decimal_point);
18010 if ac_fn_c_try_compile "$LINENO"
18012 gl_cv_header_locale_h_posix2001=yes
18014 gl_cv_header_locale_h_posix2001=no
18016 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
18019 printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
18021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
18022 printf %s "checking whether struct lconv is properly defined... " >&6; }
18023 if test ${gl_cv_sys_struct_lconv_ok+y}
18025 printf %s "(cached) " >&6
18027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18028 /* end confdefs.h. */
18029 #include <locale.h>
18031 int x = sizeof (l.decimal_point);
18032 int y = sizeof (l.int_p_cs_precedes);
18041 if ac_fn_c_try_compile "$LINENO"
18043 gl_cv_sys_struct_lconv_ok=yes
18045 gl_cv_sys_struct_lconv_ok=no
18047 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
18051 printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
18052 if test $gl_cv_sys_struct_lconv_ok = no; then
18055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18056 /* end confdefs.h. */
18063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18064 $EGREP "Special" >/dev/null 2>&1
18068 REPLACE_STRUCT_LCONV=1
18073 *) REPLACE_STRUCT_LCONV=1 ;;
18085 if test $gl_cv_have_include_next = yes; then
18086 gl_cv_next_locale_h='<'locale.h'>'
18088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
18089 printf %s "checking absolute name of <locale.h>... " >&6; }
18090 if test ${gl_cv_next_locale_h+y}
18092 printf %s "(cached) " >&6
18097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18098 /* end confdefs.h. */
18099 #include <locale.h>
18102 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18103 *) gl_absname_cpp="$ac_cpp" ;;
18108 gl_dirsep_regex='[/\\]'
18111 gl_dirsep_regex='\/'
18114 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18115 gl_header_literal_regex=`echo 'locale.h' \
18116 | sed -e "$gl_make_literal_regex_sed"`
18117 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18118 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18124 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18125 sed -n "$gl_absolute_header_sed"`
18127 gl_header=$gl_cv_absolute_locale_h
18128 gl_cv_next_locale_h='"'$gl_header'"'
18132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
18133 printf "%s\n" "$gl_cv_next_locale_h" >&6; }
18135 NEXT_LOCALE_H=$gl_cv_next_locale_h
18137 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18138 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18139 gl_next_as_first_directive='<'locale.h'>'
18141 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18142 gl_next_as_first_directive=$gl_cv_next_locale_h
18144 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
18156 GL_GNULIB_LOCALECONV=0
18160 GL_GNULIB_SETLOCALE=0
18164 GL_GNULIB_SETLOCALE_NULL=0
18168 GL_GNULIB_DUPLOCALE=0
18172 GL_GNULIB_LOCALENAME=0
18178 gl_threads_api=none
18183 if test "$gl_use_threads" != no; then
18186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
18187 printf %s "checking whether imported symbols can be declared weak... " >&6; }
18188 if test ${gl_cv_have_weak+y}
18190 printf %s "(cached) " >&6
18193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18194 /* end confdefs.h. */
18195 extern void xyzzy ();
18205 if ac_fn_c_try_link "$LINENO"
18207 gl_cv_have_weak=maybe
18209 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18210 conftest$ac_exeext conftest.$ac_ext
18211 if test $gl_cv_have_weak = maybe; then
18212 if test "$cross_compiling" = yes
18214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18215 /* end confdefs.h. */
18217 Extensible Linking Format
18221 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18222 $EGREP "Extensible Linking Format" >/dev/null 2>&1
18224 gl_cv_have_weak="guessing yes"
18226 gl_cv_have_weak="guessing no"
18232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18233 /* end confdefs.h. */
18239 return (fputs == NULL);
18242 if ac_fn_c_try_run "$LINENO"
18244 gl_cv_have_weak=yes
18248 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18249 conftest.$ac_objext conftest.beam conftest.$ac_ext
18253 case " $LDFLAGS " in
18254 *" -static "*) gl_cv_have_weak=no ;;
18256 case "$gl_cv_have_weak" in
18259 freebsd* | dragonfly* | midnightbsd*)
18261 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
18262 cat <<EOF > conftest2.c
18263 #include <pthread.h>
18264 #pragma weak pthread_mutexattr_gettype
18267 return (pthread_mutexattr_gettype != NULL);
18270 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
18271 || gl_cv_have_weak=no
18272 rm -f conftest1.c libempty.so conftest2.c conftest
18279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
18280 printf "%s\n" "$gl_cv_have_weak" >&6; }
18281 case "$gl_cv_have_weak" in
18284 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
18289 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
18293 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
18295 gl_have_isoc_threads="$ac_cv_header_threads_h"
18297 if test "$gl_use_threads" = yes \
18298 || test "$gl_use_threads" = posix \
18299 || test "$gl_use_threads" = isoc+posix; then
18302 if test -z "$gl_pthreadlib_body_done"; then
18306 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
18307 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
18308 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
18309 if test "x$ac_cv_header_pthread_h" = xyes
18311 gl_have_pthread_h=yes
18313 gl_have_pthread_h=no
18316 if test "$gl_have_pthread_h" = yes; then
18317 # Other possible tests:
18318 # -lpthreads (FSU threads, PCthreads)
18320 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
18321 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
18322 # the second one only in libpthread, and lock.c needs it.
18324 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
18325 # needs -pthread for some reason. See:
18326 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
18328 for gl_pthread in '' '-pthread'; do
18329 LIBS="$LIBS $gl_pthread"
18330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18331 /* end confdefs.h. */
18332 #include <pthread.h>
18334 pthread_mutexattr_t ma;
18339 pthread_mutex_lock (&m);
18340 pthread_mutexattr_init (&ma);
18345 if ac_fn_c_try_link "$LINENO"
18348 LIBPTHREAD=$gl_pthread
18349 LIBPMULTITHREAD=$gl_pthread
18351 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18352 conftest$ac_exeext conftest.$ac_ext
18354 test $gl_pthread_api = yes && break
18356 echo "$as_me:18356: gl_pthread_api=$gl_pthread_api" >&5
18357 echo "$as_me:18357: LIBPTHREAD=$LIBPTHREAD" >&5
18359 gl_pthread_in_glibc=no
18360 # On Linux with glibc >= 2.34, libc contains the fully functional
18361 # pthread functions.
18364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18365 /* end confdefs.h. */
18366 #include <features.h>
18367 #ifdef __GNU_LIBRARY__
18368 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
18374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18375 $EGREP "Lucky user" >/dev/null 2>&1
18377 gl_pthread_in_glibc=yes
18383 echo "$as_me:18383: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
18385 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
18386 # since it is defined as a macro on OSF/1.)
18387 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
18388 # The program links fine without libpthread. But it may actually
18389 # need to link with libpthread in order to create multiple threads.
18390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
18391 printf %s "checking for pthread_kill in -lpthread... " >&6; }
18392 if test ${ac_cv_lib_pthread_pthread_kill+y}
18394 printf %s "(cached) " >&6
18396 ac_check_lib_save_LIBS=$LIBS
18397 LIBS="-lpthread $LIBS"
18398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18399 /* end confdefs.h. */
18401 /* Override any GCC internal prototype to avoid an error.
18402 Use char because int might match the return type of a GCC
18403 builtin and then its argument prototype would still apply. */
18404 char pthread_kill ();
18408 return pthread_kill ();
18413 if ac_fn_c_try_link "$LINENO"
18415 ac_cv_lib_pthread_pthread_kill=yes
18417 ac_cv_lib_pthread_pthread_kill=no
18419 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18420 conftest$ac_exeext conftest.$ac_ext
18421 LIBS=$ac_check_lib_save_LIBS
18423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
18424 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
18425 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
18427 if test $gl_pthread_in_glibc = yes; then
18430 LIBPMULTITHREAD=-lpthread
18431 # On Solaris and HP-UX, most pthread functions exist also in libc.
18432 # Therefore pthread_in_use() needs to actually try to create a
18433 # thread: pthread_create from libc will fail, whereas
18434 # pthread_create will actually create a thread.
18435 # On Solaris 10 or newer, this test is no longer needed, because
18436 # libc contains the fully functional pthread functions.
18438 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
18440 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
18447 elif test $gl_pthread_api != yes; then
18448 # Some library is needed. Try libpthread and libc_r.
18449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
18450 printf %s "checking for pthread_kill in -lpthread... " >&6; }
18451 if test ${ac_cv_lib_pthread_pthread_kill+y}
18453 printf %s "(cached) " >&6
18455 ac_check_lib_save_LIBS=$LIBS
18456 LIBS="-lpthread $LIBS"
18457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18458 /* end confdefs.h. */
18460 /* Override any GCC internal prototype to avoid an error.
18461 Use char because int might match the return type of a GCC
18462 builtin and then its argument prototype would still apply. */
18463 char pthread_kill ();
18467 return pthread_kill ();
18472 if ac_fn_c_try_link "$LINENO"
18474 ac_cv_lib_pthread_pthread_kill=yes
18476 ac_cv_lib_pthread_pthread_kill=no
18478 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18479 conftest$ac_exeext conftest.$ac_ext
18480 LIBS=$ac_check_lib_save_LIBS
18482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
18483 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
18484 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
18487 LIBPTHREAD=-lpthread
18488 LIBPMULTITHREAD=-lpthread
18491 if test $gl_pthread_api != yes; then
18493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
18494 printf %s "checking for pthread_kill in -lc_r... " >&6; }
18495 if test ${ac_cv_lib_c_r_pthread_kill+y}
18497 printf %s "(cached) " >&6
18499 ac_check_lib_save_LIBS=$LIBS
18501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18502 /* end confdefs.h. */
18504 /* Override any GCC internal prototype to avoid an error.
18505 Use char because int might match the return type of a GCC
18506 builtin and then its argument prototype would still apply. */
18507 char pthread_kill ();
18511 return pthread_kill ();
18516 if ac_fn_c_try_link "$LINENO"
18518 ac_cv_lib_c_r_pthread_kill=yes
18520 ac_cv_lib_c_r_pthread_kill=no
18522 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18523 conftest$ac_exeext conftest.$ac_ext
18524 LIBS=$ac_check_lib_save_LIBS
18526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
18527 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
18528 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
18532 LIBPMULTITHREAD=-lc_r
18537 echo "$as_me:18537: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
18539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
18540 printf %s "checking whether POSIX threads API is available... " >&6; }
18541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
18542 printf "%s\n" "$gl_pthread_api" >&6; }
18545 if test $gl_pthread_api = yes; then
18547 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
18551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18552 /* end confdefs.h. */
18562 if ac_fn_c_try_link "$LINENO"
18567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
18568 printf %s "checking for sched_yield in -lrt... " >&6; }
18569 if test ${ac_cv_lib_rt_sched_yield+y}
18571 printf %s "(cached) " >&6
18573 ac_check_lib_save_LIBS=$LIBS
18575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18576 /* end confdefs.h. */
18578 /* Override any GCC internal prototype to avoid an error.
18579 Use char because int might match the return type of a GCC
18580 builtin and then its argument prototype would still apply. */
18581 char sched_yield ();
18585 return sched_yield ();
18590 if ac_fn_c_try_link "$LINENO"
18592 ac_cv_lib_rt_sched_yield=yes
18594 ac_cv_lib_rt_sched_yield=no
18596 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18597 conftest$ac_exeext conftest.$ac_ext
18598 LIBS=$ac_check_lib_save_LIBS
18600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
18601 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
18602 if test "x$ac_cv_lib_rt_sched_yield" = xyes
18604 LIB_SCHED_YIELD=-lrt
18606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
18607 printf %s "checking for sched_yield in -lposix4... " >&6; }
18608 if test ${ac_cv_lib_posix4_sched_yield+y}
18610 printf %s "(cached) " >&6
18612 ac_check_lib_save_LIBS=$LIBS
18613 LIBS="-lposix4 $LIBS"
18614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18615 /* end confdefs.h. */
18617 /* Override any GCC internal prototype to avoid an error.
18618 Use char because int might match the return type of a GCC
18619 builtin and then its argument prototype would still apply. */
18620 char sched_yield ();
18624 return sched_yield ();
18629 if ac_fn_c_try_link "$LINENO"
18631 ac_cv_lib_posix4_sched_yield=yes
18633 ac_cv_lib_posix4_sched_yield=no
18635 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18636 conftest$ac_exeext conftest.$ac_ext
18637 LIBS=$ac_check_lib_save_LIBS
18639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
18640 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
18641 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
18643 LIB_SCHED_YIELD=-lposix4
18650 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18651 conftest$ac_exeext conftest.$ac_ext
18654 gl_pthreadlib_body_done=done
18657 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
18658 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
18659 if test $gl_pthread_api = yes; then
18660 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
18661 gl_threads_api='isoc+posix'
18663 printf "%s\n" "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
18665 LIBTHREAD= LTLIBTHREAD=
18667 gl_threads_api=posix
18669 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
18671 if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
18673 printf "%s\n" "#define USE_POSIX_THREADS_FROM_LIBC 1" >>confdefs.h
18676 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
18678 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
18680 LIBTHREAD= LTLIBTHREAD=
18683 freebsd* | dragonfly* | midnightbsd*)
18684 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
18686 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
18696 if test $gl_threads_api = none; then
18697 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
18701 if test -z "$gl_stdthreadlib_body_done"; then
18711 if test -z "$gl_pthreadlib_body_done"; then
18715 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
18716 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
18717 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
18718 if test "x$ac_cv_header_pthread_h" = xyes
18720 gl_have_pthread_h=yes
18722 gl_have_pthread_h=no
18725 if test "$gl_have_pthread_h" = yes; then
18726 # Other possible tests:
18727 # -lpthreads (FSU threads, PCthreads)
18729 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
18730 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
18731 # the second one only in libpthread, and lock.c needs it.
18733 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
18734 # needs -pthread for some reason. See:
18735 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
18737 for gl_pthread in '' '-pthread'; do
18738 LIBS="$LIBS $gl_pthread"
18739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18740 /* end confdefs.h. */
18741 #include <pthread.h>
18743 pthread_mutexattr_t ma;
18748 pthread_mutex_lock (&m);
18749 pthread_mutexattr_init (&ma);
18754 if ac_fn_c_try_link "$LINENO"
18757 LIBPTHREAD=$gl_pthread
18758 LIBPMULTITHREAD=$gl_pthread
18760 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18761 conftest$ac_exeext conftest.$ac_ext
18763 test $gl_pthread_api = yes && break
18765 echo "$as_me:18765: gl_pthread_api=$gl_pthread_api" >&5
18766 echo "$as_me:18766: LIBPTHREAD=$LIBPTHREAD" >&5
18768 gl_pthread_in_glibc=no
18769 # On Linux with glibc >= 2.34, libc contains the fully functional
18770 # pthread functions.
18773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18774 /* end confdefs.h. */
18775 #include <features.h>
18776 #ifdef __GNU_LIBRARY__
18777 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
18783 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18784 $EGREP "Lucky user" >/dev/null 2>&1
18786 gl_pthread_in_glibc=yes
18792 echo "$as_me:18792: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
18794 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
18795 # since it is defined as a macro on OSF/1.)
18796 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
18797 # The program links fine without libpthread. But it may actually
18798 # need to link with libpthread in order to create multiple threads.
18799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
18800 printf %s "checking for pthread_kill in -lpthread... " >&6; }
18801 if test ${ac_cv_lib_pthread_pthread_kill+y}
18803 printf %s "(cached) " >&6
18805 ac_check_lib_save_LIBS=$LIBS
18806 LIBS="-lpthread $LIBS"
18807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18808 /* end confdefs.h. */
18810 /* Override any GCC internal prototype to avoid an error.
18811 Use char because int might match the return type of a GCC
18812 builtin and then its argument prototype would still apply. */
18813 char pthread_kill ();
18817 return pthread_kill ();
18822 if ac_fn_c_try_link "$LINENO"
18824 ac_cv_lib_pthread_pthread_kill=yes
18826 ac_cv_lib_pthread_pthread_kill=no
18828 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18829 conftest$ac_exeext conftest.$ac_ext
18830 LIBS=$ac_check_lib_save_LIBS
18832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
18833 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
18834 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
18836 if test $gl_pthread_in_glibc = yes; then
18839 LIBPMULTITHREAD=-lpthread
18840 # On Solaris and HP-UX, most pthread functions exist also in libc.
18841 # Therefore pthread_in_use() needs to actually try to create a
18842 # thread: pthread_create from libc will fail, whereas
18843 # pthread_create will actually create a thread.
18844 # On Solaris 10 or newer, this test is no longer needed, because
18845 # libc contains the fully functional pthread functions.
18847 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
18849 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
18856 elif test $gl_pthread_api != yes; then
18857 # Some library is needed. Try libpthread and libc_r.
18858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
18859 printf %s "checking for pthread_kill in -lpthread... " >&6; }
18860 if test ${ac_cv_lib_pthread_pthread_kill+y}
18862 printf %s "(cached) " >&6
18864 ac_check_lib_save_LIBS=$LIBS
18865 LIBS="-lpthread $LIBS"
18866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18867 /* end confdefs.h. */
18869 /* Override any GCC internal prototype to avoid an error.
18870 Use char because int might match the return type of a GCC
18871 builtin and then its argument prototype would still apply. */
18872 char pthread_kill ();
18876 return pthread_kill ();
18881 if ac_fn_c_try_link "$LINENO"
18883 ac_cv_lib_pthread_pthread_kill=yes
18885 ac_cv_lib_pthread_pthread_kill=no
18887 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18888 conftest$ac_exeext conftest.$ac_ext
18889 LIBS=$ac_check_lib_save_LIBS
18891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
18892 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
18893 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
18896 LIBPTHREAD=-lpthread
18897 LIBPMULTITHREAD=-lpthread
18900 if test $gl_pthread_api != yes; then
18902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
18903 printf %s "checking for pthread_kill in -lc_r... " >&6; }
18904 if test ${ac_cv_lib_c_r_pthread_kill+y}
18906 printf %s "(cached) " >&6
18908 ac_check_lib_save_LIBS=$LIBS
18910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18911 /* end confdefs.h. */
18913 /* Override any GCC internal prototype to avoid an error.
18914 Use char because int might match the return type of a GCC
18915 builtin and then its argument prototype would still apply. */
18916 char pthread_kill ();
18920 return pthread_kill ();
18925 if ac_fn_c_try_link "$LINENO"
18927 ac_cv_lib_c_r_pthread_kill=yes
18929 ac_cv_lib_c_r_pthread_kill=no
18931 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18932 conftest$ac_exeext conftest.$ac_ext
18933 LIBS=$ac_check_lib_save_LIBS
18935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
18936 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
18937 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
18941 LIBPMULTITHREAD=-lc_r
18946 echo "$as_me:18946: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
18948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
18949 printf %s "checking whether POSIX threads API is available... " >&6; }
18950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
18951 printf "%s\n" "$gl_pthread_api" >&6; }
18954 if test $gl_pthread_api = yes; then
18956 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
18960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18961 /* end confdefs.h. */
18971 if ac_fn_c_try_link "$LINENO"
18976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
18977 printf %s "checking for sched_yield in -lrt... " >&6; }
18978 if test ${ac_cv_lib_rt_sched_yield+y}
18980 printf %s "(cached) " >&6
18982 ac_check_lib_save_LIBS=$LIBS
18984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18985 /* end confdefs.h. */
18987 /* Override any GCC internal prototype to avoid an error.
18988 Use char because int might match the return type of a GCC
18989 builtin and then its argument prototype would still apply. */
18990 char sched_yield ();
18994 return sched_yield ();
18999 if ac_fn_c_try_link "$LINENO"
19001 ac_cv_lib_rt_sched_yield=yes
19003 ac_cv_lib_rt_sched_yield=no
19005 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19006 conftest$ac_exeext conftest.$ac_ext
19007 LIBS=$ac_check_lib_save_LIBS
19009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19010 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
19011 if test "x$ac_cv_lib_rt_sched_yield" = xyes
19013 LIB_SCHED_YIELD=-lrt
19015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
19016 printf %s "checking for sched_yield in -lposix4... " >&6; }
19017 if test ${ac_cv_lib_posix4_sched_yield+y}
19019 printf %s "(cached) " >&6
19021 ac_check_lib_save_LIBS=$LIBS
19022 LIBS="-lposix4 $LIBS"
19023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19024 /* end confdefs.h. */
19026 /* Override any GCC internal prototype to avoid an error.
19027 Use char because int might match the return type of a GCC
19028 builtin and then its argument prototype would still apply. */
19029 char sched_yield ();
19033 return sched_yield ();
19038 if ac_fn_c_try_link "$LINENO"
19040 ac_cv_lib_posix4_sched_yield=yes
19042 ac_cv_lib_posix4_sched_yield=no
19044 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19045 conftest$ac_exeext conftest.$ac_ext
19046 LIBS=$ac_check_lib_save_LIBS
19048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
19049 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
19050 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
19052 LIB_SCHED_YIELD=-lposix4
19059 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19060 conftest$ac_exeext conftest.$ac_ext
19063 gl_pthreadlib_body_done=done
19066 if test $ac_cv_header_threads_h = yes; then
19067 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
19068 if test "x$ac_cv_func_thrd_create" = xyes
19070 printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h
19074 if test $ac_cv_func_thrd_create = yes; then
19077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
19078 printf %s "checking for thrd_create in -lstdthreads... " >&6; }
19079 if test ${ac_cv_lib_stdthreads_thrd_create+y}
19081 printf %s "(cached) " >&6
19083 ac_check_lib_save_LIBS=$LIBS
19084 LIBS="-lstdthreads $LIBS"
19085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19086 /* end confdefs.h. */
19088 /* Override any GCC internal prototype to avoid an error.
19089 Use char because int might match the return type of a GCC
19090 builtin and then its argument prototype would still apply. */
19091 char thrd_create ();
19095 return thrd_create ();
19100 if ac_fn_c_try_link "$LINENO"
19102 ac_cv_lib_stdthreads_thrd_create=yes
19104 ac_cv_lib_stdthreads_thrd_create=no
19106 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19107 conftest$ac_exeext conftest.$ac_ext
19108 LIBS=$ac_check_lib_save_LIBS
19110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
19111 printf "%s\n" "$ac_cv_lib_stdthreads_thrd_create" >&6; }
19112 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes
19115 LIBSTDTHREAD='-lstdthreads -lpthread'
19119 LIBSTDTHREAD="$LIBPMULTITHREAD"
19125 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
19131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
19132 printf %s "checking whether ISO C threads API is available... " >&6; }
19133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
19134 printf "%s\n" "$ac_cv_header_threads_h" >&6; }
19135 gl_stdthreadlib_body_done=done
19138 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
19139 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
19140 gl_threads_api=isoc
19142 printf "%s\n" "#define USE_ISOC_THREADS 1" >>confdefs.h
19146 if test $gl_threads_api = none; then
19147 case "$gl_use_threads" in
19148 yes | windows | win32) # The 'win32' is for backward compatibility.
19149 if { case "$host_os" in
19154 gl_threads_api=windows
19156 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
19163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
19164 printf %s "checking for multithread API to use... " >&6; }
19165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
19166 printf "%s\n" "$gl_threads_api" >&6; }
19178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
19179 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
19180 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
19182 printf %s "(cached) " >&6
19184 rm -f conftest.sym conftest.file
19185 echo >conftest.file
19186 if test "$cross_compiling" = yes
19190 # Guess yes on Linux systems.
19191 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
19193 # Guess yes on glibc systems.
19194 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
19196 # Guess no on native Windows.
19197 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
19199 # If we don't know, obey --enable-cross-guesses.
19200 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
19204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19205 /* end confdefs.h. */
19206 $ac_includes_default
19211 if (symlink ("conftest.file", "conftest.sym") != 0)
19213 /* Linux will dereference the symlink and fail, as required by
19214 POSIX. That is better in the sense that it means we will not
19215 have to compile and use the lstat wrapper. */
19216 return lstat ("conftest.sym/", &sbuf) == 0;
19222 if ac_fn_c_try_run "$LINENO"
19224 gl_cv_func_lstat_dereferences_slashed_symlink=yes
19226 gl_cv_func_lstat_dereferences_slashed_symlink=no
19228 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19229 conftest.$ac_objext conftest.beam conftest.$ac_ext
19232 rm -f conftest.sym conftest.file
19235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
19236 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
19237 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
19240 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
19245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
19246 printf %s "checking for a sed that does not truncate output... " >&6; }
19247 if test ${ac_cv_path_SED+y}
19249 printf %s "(cached) " >&6
19251 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
19252 for ac_i in 1 2 3 4 5 6 7; do
19253 ac_script="$ac_script$as_nl$ac_script"
19255 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
19256 { ac_script=; unset ac_script;}
19257 if test -z "$SED"; then
19258 ac_path_SED_found=false
19259 # Loop through the user's path and test for each of PROGNAME-LIST
19260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19261 for as_dir in $PATH
19264 case $as_dir in #(((
19267 *) as_dir=$as_dir/ ;;
19269 for ac_prog in sed gsed
19271 for ac_exec_ext in '' $ac_executable_extensions; do
19272 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
19273 as_fn_executable_p "$ac_path_SED" || continue
19274 # Check for GNU ac_path_SED and select it if it is found.
19275 # Check for GNU $ac_path_SED
19276 case `"$ac_path_SED" --version 2>&1` in
19278 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
19281 printf %s 0123456789 >"conftest.in"
19284 cat "conftest.in" "conftest.in" >"conftest.tmp"
19285 mv "conftest.tmp" "conftest.in"
19286 cp "conftest.in" "conftest.nl"
19287 printf "%s\n" '' >> "conftest.nl"
19288 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
19289 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
19290 as_fn_arith $ac_count + 1 && ac_count=$as_val
19291 if test $ac_count -gt ${ac_path_SED_max-0}; then
19292 # Best one so far, save it but keep looking for a better one
19293 ac_cv_path_SED="$ac_path_SED"
19294 ac_path_SED_max=$ac_count
19296 # 10*(2^10) chars as input seems more than enough
19297 test $ac_count -gt 10 && break
19299 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
19302 $ac_path_SED_found && break 3
19307 if test -z "$ac_cv_path_SED"; then
19308 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
19311 ac_cv_path_SED=$SED
19315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
19316 printf "%s\n" "$ac_cv_path_SED" >&6; }
19317 SED="$ac_cv_path_SED"
19322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
19323 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
19324 if test ${ac_cv_func_malloc_0_nonnull+y}
19326 printf %s "(cached) " >&6
19328 if test "$cross_compiling" = yes
19331 # Guess yes on platforms where we know the result.
19332 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
19333 | gnu* | *-musl* | midnightbsd* \
19334 | hpux* | solaris* | cygwin* | mingw* | msys* )
19335 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
19336 # If we don't know, obey --enable-cross-guesses.
19337 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
19341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19342 /* end confdefs.h. */
19343 #include <stdlib.h>
19348 void *p = malloc (0);
19357 if ac_fn_c_try_run "$LINENO"
19359 ac_cv_func_malloc_0_nonnull=yes
19361 ac_cv_func_malloc_0_nonnull=no
19363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19364 conftest.$ac_objext conftest.beam conftest.$ac_ext
19369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
19370 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
19371 case $ac_cv_func_malloc_0_nonnull in #(
19373 gl_cv_func_malloc_0_nonnull=1 ;; #(
19375 gl_cv_func_malloc_0_nonnull=0 ;;
19379 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
19386 GL_GNULIB_EXPLICIT_BZERO=0
19406 GL_GNULIB_MEMPCPY=0
19410 GL_GNULIB_MEMRCHR=0
19414 GL_GNULIB_RAWMEMCHR=0
19422 GL_GNULIB_STPNCPY=0
19426 GL_GNULIB_STRCHRNUL=0
19434 GL_GNULIB_STRNCAT=0
19438 GL_GNULIB_STRNDUP=0
19442 GL_GNULIB_STRNLEN=0
19446 GL_GNULIB_STRPBRK=0
19458 GL_GNULIB_STRCASESTR=0
19462 GL_GNULIB_STRTOK_R=0
19470 GL_GNULIB_MBSNLEN=0
19478 GL_GNULIB_MBSRCHR=0
19486 GL_GNULIB_MBSCASECMP=0
19490 GL_GNULIB_MBSNCASECMP=0
19494 GL_GNULIB_MBSPCASECMP=0
19498 GL_GNULIB_MBSCASESTR=0
19502 GL_GNULIB_MBSCSPN=0
19506 GL_GNULIB_MBSPBRK=0
19518 GL_GNULIB_MBSTOK_R=0
19522 GL_GNULIB_STRERROR=0
19526 GL_GNULIB_STRERROR_R=0
19530 GL_GNULIB_STRERRORNAME_NP=0
19534 GL_GNULIB_SIGABBREV_NP=0
19538 GL_GNULIB_SIGDESCR_NP=0
19542 GL_GNULIB_STRSIGNAL=0
19546 GL_GNULIB_STRVERSCMP=0
19550 GL_GNULIB_MDA_MEMCCPY=1
19554 GL_GNULIB_MDA_STRDUP=1
19560 HAVE_EXPLICIT_BZERO=1;
19563 HAVE_DECL_MEMMEM=1;
19565 HAVE_DECL_MEMRCHR=1;
19570 HAVE_DECL_STRDUP=1;
19571 HAVE_DECL_STRNDUP=1;
19572 HAVE_DECL_STRNLEN=1;
19576 HAVE_DECL_STRTOK_R=1;
19577 HAVE_DECL_STRERROR_R=1;
19578 HAVE_STRERRORNAME_NP=1;
19579 HAVE_SIGABBREV_NP=1;
19580 HAVE_SIGDESCR_NP=1;
19581 HAVE_DECL_STRSIGNAL=1;
19587 REPLACE_STRCHRNUL=0;
19593 REPLACE_STRCASESTR=0;
19594 REPLACE_STRTOK_R=0;
19595 REPLACE_STRERROR=0;
19596 REPLACE_STRERROR_R=0;
19597 REPLACE_STRERRORNAME_NP=0;
19598 REPLACE_STRSIGNAL=0;
19599 UNDEFINE_STRTOK_R=0;
19605 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
19606 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
19607 # irrelevant for anonymous mappings.
19608 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
19609 if test "x$ac_cv_func_mmap" = xyes
19617 # Try to allow MAP_ANONYMOUS.
19618 gl_have_mmap_anonymous=no
19619 if test $gl_have_mmap = yes; then
19620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
19621 printf %s "checking for MAP_ANONYMOUS... " >&6; }
19622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19623 /* end confdefs.h. */
19625 #include <sys/mman.h>
19626 #ifdef MAP_ANONYMOUS
19627 I cannot identify this map
19631 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19632 $EGREP "I cannot identify this map" >/dev/null 2>&1
19634 gl_have_mmap_anonymous=yes
19638 if test $gl_have_mmap_anonymous != yes; then
19639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19640 /* end confdefs.h. */
19642 #include <sys/mman.h>
19644 I cannot identify this map
19648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19649 $EGREP "I cannot identify this map" >/dev/null 2>&1
19652 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
19654 gl_have_mmap_anonymous=yes
19659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
19660 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
19661 if test $gl_have_mmap_anonymous = yes; then
19663 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
19677 # Detect platform-specific bugs in some versions of glibc:
19678 # memchr should not dereference anything with length 0
19679 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
19680 # memchr should not dereference overestimated length after a match
19681 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
19682 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
19683 # memchr should cast the second argument to 'unsigned char'.
19684 # This bug exists in Android 4.3.
19685 # Assume that memchr works on platforms that lack mprotect.
19686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
19687 printf %s "checking whether memchr works... " >&6; }
19688 if test ${gl_cv_func_memchr_works+y}
19690 printf %s "(cached) " >&6
19692 if test "$cross_compiling" = yes
19695 # Guess no on Android.
19696 linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
19697 # Guess yes on native Windows.
19698 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
19699 # If we don't know, obey --enable-cross-guesses.
19700 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
19704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19705 /* end confdefs.h. */
19707 #include <string.h>
19708 #if HAVE_SYS_MMAN_H
19709 # include <fcntl.h>
19710 # include <unistd.h>
19711 # include <sys/types.h>
19712 # include <sys/mman.h>
19714 # define MAP_FILE 0
19723 char *fence = NULL;
19724 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
19725 # if HAVE_MAP_ANONYMOUS
19726 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
19728 # else /* !HAVE_MAP_ANONYMOUS */
19729 const int flags = MAP_FILE | MAP_PRIVATE;
19730 int fd = open ("/dev/zero", O_RDONLY, 0666);
19734 int pagesize = getpagesize ();
19736 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
19738 if (two_pages != (char *)(-1)
19739 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
19740 fence = two_pages + pagesize;
19745 /* Test against bugs on glibc systems. */
19746 if (memchr (fence, 0, 0))
19748 strcpy (fence - 9, "12345678");
19749 if (memchr (fence - 9, 0, 79) != fence - 1)
19751 if (memchr (fence - 1, 0, 3) != fence - 1)
19753 /* Test against bug on AIX 7.2. */
19754 if (memchr (fence - 4, '6', 16) != fence - 4)
19757 /* Test against bug on Android 4.3. */
19763 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
19772 if ac_fn_c_try_run "$LINENO"
19774 gl_cv_func_memchr_works=yes
19776 gl_cv_func_memchr_works=no
19778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19779 conftest.$ac_objext conftest.beam conftest.$ac_ext
19784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
19785 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
19786 case "$gl_cv_func_memchr_works" in
19788 *) REPLACE_MEMCHR=1 ;;
19795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
19796 printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
19797 if test ${gl_cv_minmax_in_limits_h+y}
19799 printf %s "(cached) " >&6
19801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19802 /* end confdefs.h. */
19803 #include <limits.h>
19804 int x = MIN (42, 17);
19813 if ac_fn_c_try_compile "$LINENO"
19815 gl_cv_minmax_in_limits_h=yes
19817 gl_cv_minmax_in_limits_h=no
19819 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
19822 printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
19823 if test $gl_cv_minmax_in_limits_h = yes; then
19825 printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
19834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
19835 printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
19836 if test ${gl_cv_minmax_in_sys_param_h+y}
19838 printf %s "(cached) " >&6
19840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19841 /* end confdefs.h. */
19842 #include <sys/param.h>
19843 int x = MIN (42, 17);
19852 if ac_fn_c_try_compile "$LINENO"
19854 gl_cv_minmax_in_sys_param_h=yes
19856 gl_cv_minmax_in_sys_param_h=no
19858 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
19861 printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
19862 if test $gl_cv_minmax_in_sys_param_h = yes; then
19864 printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
19873 HAVE_DECL_LOCALTIME_R=1;
19877 HAVE_TIMESPEC_GET=1;
19879 REPLACE_CTIME=GNULIB_PORTCHECK;
19880 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
19881 REPLACE_MKTIME=GNULIB_PORTCHECK;
19882 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
19883 REPLACE_STRFTIME=GNULIB_PORTCHECK;
19884 REPLACE_TIMEGM=GNULIB_PORTCHECK;
19885 REPLACE_TZSET=GNULIB_PORTCHECK;
19887 : ${GNULIB_GETTIMEOFDAY=0};
19889 REPLACE_LOCALTIME=0;
19892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5
19893 printf %s "checking whether time_t is signed... " >&6; }
19894 if test ${gl_cv_time_t_is_signed+y}
19896 printf %s "(cached) " >&6
19898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19899 /* end confdefs.h. */
19901 char time_t_signed[(time_t) -1 < 0 ? 1 : -1];
19910 if ac_fn_c_try_compile "$LINENO"
19912 gl_cv_time_t_is_signed=yes
19914 gl_cv_time_t_is_signed=no
19916 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_t_is_signed" >&5
19919 printf "%s\n" "$gl_cv_time_t_is_signed" >&6; }
19920 if test $gl_cv_time_t_is_signed = yes; then
19922 printf "%s\n" "#define TIME_T_IS_SIGNED 1" >>confdefs.h
19926 ac_fn_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19927 if test "x$ac_cv_have_decl_alarm" = xyes
19933 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
19941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
19942 printf %s "checking for working mktime... " >&6; }
19943 if test ${gl_cv_func_working_mktime+y}
19945 printf %s "(cached) " >&6
19947 if test $APPLE_UNIVERSAL_BUILD = 1; then
19948 # A universal build on Apple Mac OS X platforms.
19949 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
19950 # But we need a configuration result that is valid in both modes.
19951 gl_cv_func_working_mktime="guessing no"
19953 if test "$cross_compiling" = yes
19956 # Guess no on native Windows.
19957 mingw*) gl_cv_func_working_mktime="guessing no" ;;
19958 *) gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
19962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19963 /* end confdefs.h. */
19964 /* Test program from Paul Eggert and Tony Leneis. */
19965 #include <limits.h>
19966 #include <stdlib.h>
19969 #ifdef HAVE_UNISTD_H
19970 # include <unistd.h>
19973 #if HAVE_DECL_ALARM
19974 # include <signal.h>
19982 #ifndef TIME_T_IS_SIGNED
19983 # define TIME_T_IS_SIGNED 0
19986 static time_t time_t_max;
19987 static time_t time_t_min;
19989 /* Values we'll use to set the TZ environment variable. */
19990 static char *tz_strings[] = {
19991 (char *) 0, "TZ=GMT0", "TZ=JST-9",
19992 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
19994 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
19996 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
19997 Based on a problem report from Andreas Jaeger. */
19999 spring_forward_gap ()
20001 /* glibc (up to about 1998-10-07) failed this test. */
20004 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
20005 instead of "TZ=America/Vancouver" in order to detect the bug even
20006 on systems that don't support the Olson extension, or don't have the
20007 full zoneinfo tables installed. */
20008 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
20017 return mktime (&tm) != (time_t) -1;
20021 mktime_test1 (time_t now)
20024 return ! (lt = localtime (&now)) || mktime (lt) == now;
20028 mktime_test (time_t now)
20030 return (mktime_test1 (now)
20031 && mktime_test1 ((time_t) (time_t_max - now))
20032 && mktime_test1 ((time_t) (time_t_min + now)));
20038 /* Based on code from Ariel Faigon. */
20048 return tm.tm_mon == 2 && tm.tm_mday == 31;
20052 bigtime_test (int j)
20056 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
20057 now = mktime (&tm);
20058 if (now != (time_t) -1)
20060 struct tm *lt = localtime (&now);
20062 && lt->tm_year == tm.tm_year
20063 && lt->tm_mon == tm.tm_mon
20064 && lt->tm_mday == tm.tm_mday
20065 && lt->tm_hour == tm.tm_hour
20066 && lt->tm_min == tm.tm_min
20067 && lt->tm_sec == tm.tm_sec
20068 && lt->tm_yday == tm.tm_yday
20069 && lt->tm_wday == tm.tm_wday
20070 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
20071 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
20080 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
20081 ignoring leap seconds. */
20082 unsigned long int answer = 2527315200UL;
20086 tm.tm_year = 2050 - 1900;
20089 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
20092 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
20093 instead of "TZ=America/Vancouver" in order to detect the bug even
20094 on systems that don't support the Olson extension, or don't have the
20095 full zoneinfo tables installed. */
20096 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
20100 /* Check that the result is either a failure, or close enough
20101 to the correct answer that we can assume the discrepancy is
20102 due to leap seconds. */
20103 return (t == (time_t) -1
20104 || (0 < t && answer - 120 <= t && t <= answer + 120));
20113 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
20115 #if HAVE_DECL_ALARM
20116 /* This test makes some buggy mktime implementations loop.
20117 Give up after 60 seconds; a mktime slower than that
20118 isn't worth using anyway. */
20119 signal (SIGALRM, SIG_DFL);
20123 time_t_max = (! TIME_T_IS_SIGNED
20125 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
20127 time_t_min = (! TIME_T_IS_SIGNED
20129 : time_t_signed_magnitude
20133 delta = time_t_max / 997; /* a suitable prime number */
20134 for (i = 0; i < N_STRINGS; i++)
20137 putenv (tz_strings[i]);
20139 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
20140 if (! mktime_test (t))
20142 if ((result & 2) == 0
20143 && ! (mktime_test ((time_t) 1)
20144 && mktime_test ((time_t) (60 * 60))
20145 && mktime_test ((time_t) (60 * 60 * 24))))
20148 for (j = 1; (result & 4) == 0; j <<= 1)
20150 if (! bigtime_test (j))
20152 if (INT_MAX / 2 < j)
20155 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
20158 if (! irix_6_4_bug ())
20160 if (! spring_forward_gap ())
20162 if (! year_2050_test ())
20167 if ac_fn_c_try_run "$LINENO"
20169 gl_cv_func_working_mktime=yes
20171 gl_cv_func_working_mktime=no
20173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20174 conftest.$ac_objext conftest.beam conftest.$ac_ext
20180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
20181 printf "%s\n" "$gl_cv_func_working_mktime" >&6; }
20193 GL_GNULIB_LOCALTIME=0
20197 GL_GNULIB_NANOSLEEP=0
20201 GL_GNULIB_STRFTIME=0
20205 GL_GNULIB_STRPTIME=0
20213 GL_GNULIB_TIMESPEC_GET=0
20221 GL_GNULIB_TIME_RZ=0
20229 GL_GNULIB_MDA_TZSET=1
20237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
20238 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
20239 if test ${ac_cv_struct_tm+y}
20241 printf %s "(cached) " >&6
20243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20244 /* end confdefs.h. */
20245 #include <sys/types.h>
20252 int *p = &tm.tm_sec;
20258 if ac_fn_c_try_compile "$LINENO"
20260 ac_cv_struct_tm=time.h
20262 ac_cv_struct_tm=sys/time.h
20264 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
20267 printf "%s\n" "$ac_cv_struct_tm" >&6; }
20268 if test $ac_cv_struct_tm = sys/time.h; then
20270 printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
20274 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
20275 #include <$ac_cv_struct_tm>
20278 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
20281 printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
20286 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20288 printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
20291 ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
20292 " "$ac_c_undeclared_builtin_options" "CFLAGS"
20293 if test "x$ac_cv_have_decl_tzname" = xyes
20299 printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
20301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
20302 printf %s "checking for tzname... " >&6; }
20303 if test ${ac_cv_var_tzname+y}
20305 printf %s "(cached) " >&6
20307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20308 /* end confdefs.h. */
20310 #if !HAVE_DECL_TZNAME
20311 extern char *tzname[];
20317 return tzname[0][0];
20322 if ac_fn_c_try_link "$LINENO"
20324 ac_cv_var_tzname=yes
20326 ac_cv_var_tzname=no
20328 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20329 conftest$ac_exeext conftest.$ac_ext
20331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
20332 printf "%s\n" "$ac_cv_var_tzname" >&6; }
20333 if test $ac_cv_var_tzname = yes; then
20335 printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
20341 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
20343 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes
20346 printf "%s\n" "#define HAVE_TM_GMTOFF 1" >>confdefs.h
20352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
20353 printf %s "checking for O_CLOEXEC... " >&6; }
20354 if test ${gl_cv_macro_O_CLOEXEC+y}
20356 printf %s "(cached) " >&6
20358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20359 /* end confdefs.h. */
20373 if ac_fn_c_try_compile "$LINENO"
20375 gl_cv_macro_O_CLOEXEC=yes
20377 gl_cv_macro_O_CLOEXEC=no
20379 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
20382 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
20386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
20387 printf %s "checking for promoted mode_t type... " >&6; }
20388 if test ${gl_cv_promoted_mode_t+y}
20390 printf %s "(cached) " >&6
20393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20394 /* end confdefs.h. */
20395 #include <sys/types.h>
20399 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
20404 if ac_fn_c_try_compile "$LINENO"
20406 gl_cv_promoted_mode_t='int'
20408 gl_cv_promoted_mode_t='mode_t'
20410 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
20414 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
20416 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
20421 HAVE_POSIX_SIGNALBLOCKING=1;
20422 HAVE_PTHREAD_SIGMASK=1;
20427 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
20429 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
20431 HAVE_SIGHANDLER_T=1;
20432 REPLACE_PTHREAD_SIGMASK=0;
20436 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
20437 #include <signal.h>
20438 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
20439 #include <sys/types.h>
20442 if test "x$ac_cv_type_sigset_t" = xyes
20445 printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
20447 gl_cv_type_sigset_t=yes
20449 gl_cv_type_sigset_t=no
20452 if test $gl_cv_type_sigset_t != yes; then
20458 GL_GNULIB_PTHREAD_SIGMASK=0
20466 GL_GNULIB_SIGNAL_H_SIGPIPE=0
20470 GL_GNULIB_SIGPROCMASK=0
20474 GL_GNULIB_SIGACTION=0
20482 if test $REPLACE_MALLOC = 1; then
20488 ac_fn_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20489 if test "x$ac_cv_have_decl_setenv" = xyes
20495 printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h
20501 if test $ac_cv_have_decl_setenv = no; then
20509 ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
20510 if test "x$ac_cv_header_search_h" = xyes
20512 printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h
20516 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
20517 if test "x$ac_cv_func_tsearch" = xyes
20519 printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
20525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
20526 printf %s "checking for uid_t in sys/types.h... " >&6; }
20527 if test ${ac_cv_type_uid_t+y}
20529 printf %s "(cached) " >&6
20531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20532 /* end confdefs.h. */
20533 #include <sys/types.h>
20536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20537 $EGREP "uid_t" >/dev/null 2>&1
20539 ac_cv_type_uid_t=yes
20541 ac_cv_type_uid_t=no
20546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
20547 printf "%s\n" "$ac_cv_type_uid_t" >&6; }
20548 if test $ac_cv_type_uid_t = no; then
20550 printf "%s\n" "#define uid_t int" >>confdefs.h
20553 printf "%s\n" "#define gid_t int" >>confdefs.h
20568 if test $gl_cv_have_include_next = yes; then
20569 gl_cv_next_signal_h='<'signal.h'>'
20571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
20572 printf %s "checking absolute name of <signal.h>... " >&6; }
20573 if test ${gl_cv_next_signal_h+y}
20575 printf %s "(cached) " >&6
20580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20581 /* end confdefs.h. */
20582 #include <signal.h>
20585 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20586 *) gl_absname_cpp="$ac_cpp" ;;
20591 gl_dirsep_regex='[/\\]'
20594 gl_dirsep_regex='\/'
20597 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20598 gl_header_literal_regex=`echo 'signal.h' \
20599 | sed -e "$gl_make_literal_regex_sed"`
20600 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20601 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20607 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20608 sed -n "$gl_absolute_header_sed"`
20610 gl_header=$gl_cv_absolute_signal_h
20611 gl_cv_next_signal_h='"'$gl_header'"'
20615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
20616 printf "%s\n" "$gl_cv_next_signal_h" >&6; }
20618 NEXT_SIGNAL_H=$gl_cv_next_signal_h
20620 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20621 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20622 gl_next_as_first_directive='<'signal.h'>'
20624 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20625 gl_next_as_first_directive=$gl_cv_next_signal_h
20627 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
20633 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
20634 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
20635 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
20636 #include <signal.h>
20639 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
20643 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
20652 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
20653 #include <signal.h>
20656 if test "x$ac_cv_type_sighandler_t" = xyes
20660 HAVE_SIGHANDLER_T=0
20673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
20674 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
20675 if test ${ac_cv_header_stdbool_h+y}
20677 printf %s "(cached) " >&6
20679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20680 /* end confdefs.h. */
20682 #include <stdbool.h>
20687 typedef _Bool Bool;
20689 "error: bool is not defined"
20692 "error: false is not defined"
20695 "error: false is not 0"
20698 "error: true is not defined"
20701 "error: true is not 1"
20705 #ifndef __bool_true_false_are_defined
20706 "error: __bool_true_false_are_defined is not defined"
20709 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
20711 char a[true == 1 ? 1 : -1];
20712 char b[false == 0 ? 1 : -1];
20713 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
20714 char d[(bool) 0.5 == true ? 1 : -1];
20715 /* See body of main program for 'e'. */
20716 char f[(Bool) 0.0 == false ? 1 : -1];
20718 char h[sizeof (Bool)];
20719 char i[sizeof s.t];
20720 enum { j = false, k = true, l = false * true, m = true * 256 };
20721 /* The following fails for
20722 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
20724 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
20725 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
20726 /* Catch a bug in an HP-UX C compiler. See
20727 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
20728 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
20739 *pq |= q; *pq |= ! q;
20740 *qq |= q; *qq |= ! q;
20741 /* Refer to every declared value, to avoid compiler optimizations. */
20742 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
20743 + !m + !n + !o + !p + !q + !pq + !qq);
20749 if ac_fn_c_try_compile "$LINENO"
20751 ac_cv_header_stdbool_h=yes
20753 ac_cv_header_stdbool_h=no
20755 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
20758 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
20759 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
20760 if test "x$ac_cv_type__Bool" = xyes
20763 printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
20771 ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20772 if test "x$ac_cv_have_decl_fcloseall" = xyes
20778 printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
20783 printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
20793 if test $gl_cv_have_include_next = yes; then
20794 gl_cv_next_stdio_h='<'stdio.h'>'
20796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
20797 printf %s "checking absolute name of <stdio.h>... " >&6; }
20798 if test ${gl_cv_next_stdio_h+y}
20800 printf %s "(cached) " >&6
20805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20806 /* end confdefs.h. */
20810 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20811 *) gl_absname_cpp="$ac_cpp" ;;
20816 gl_dirsep_regex='[/\\]'
20819 gl_dirsep_regex='\/'
20822 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20823 gl_header_literal_regex=`echo 'stdio.h' \
20824 | sed -e "$gl_make_literal_regex_sed"`
20825 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20826 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20832 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20833 sed -n "$gl_absolute_header_sed"`
20835 gl_header=$gl_cv_absolute_stdio_h
20836 gl_cv_next_stdio_h='"'$gl_header'"'
20840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
20841 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
20843 NEXT_STDIO_H=$gl_cv_next_stdio_h
20845 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20846 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20847 gl_next_as_first_directive='<'stdio.h'>'
20849 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20850 gl_next_as_first_directive=$gl_cv_next_stdio_h
20852 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
20858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
20859 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
20860 if test ${gl_cv_func_printf_attribute_flavor+y}
20862 printf %s "(cached) " >&6
20864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20865 /* end confdefs.h. */
20867 #define __STDC_FORMAT_MACROS 1
20869 #include <inttypes.h>
20870 /* For non-mingw systems, compilation will trivially succeed.
20871 For mingw, compilation will succeed for older mingw (system
20872 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
20873 #if (defined _WIN32 && ! defined __CYGWIN__) && \
20874 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
20875 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
20886 if ac_fn_c_try_compile "$LINENO"
20888 gl_cv_func_printf_attribute_flavor=system
20890 gl_cv_func_printf_attribute_flavor=gnu
20892 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
20895 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
20896 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
20898 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
20914 if test $ac_cv_have_decl_fcloseall = no; then
20915 HAVE_DECL_FCLOSEALL=0
20918 ac_fn_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20919 if test "x$ac_cv_have_decl_ecvt" = xyes
20925 printf "%s\n" "#define HAVE_DECL_ECVT $ac_have_decl" >>confdefs.h
20927 ac_fn_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20928 if test "x$ac_cv_have_decl_fcvt" = xyes
20934 printf "%s\n" "#define HAVE_DECL_FCVT $ac_have_decl" >>confdefs.h
20936 ac_fn_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20937 if test "x$ac_cv_have_decl_gcvt" = xyes
20943 printf "%s\n" "#define HAVE_DECL_GCVT $ac_have_decl" >>confdefs.h
20955 if test $gl_cv_have_include_next = yes; then
20956 gl_cv_next_stdlib_h='<'stdlib.h'>'
20958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
20959 printf %s "checking absolute name of <stdlib.h>... " >&6; }
20960 if test ${gl_cv_next_stdlib_h+y}
20962 printf %s "(cached) " >&6
20967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20968 /* end confdefs.h. */
20969 #include <stdlib.h>
20972 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20973 *) gl_absname_cpp="$ac_cpp" ;;
20978 gl_dirsep_regex='[/\\]'
20981 gl_dirsep_regex='\/'
20984 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20985 gl_header_literal_regex=`echo 'stdlib.h' \
20986 | sed -e "$gl_make_literal_regex_sed"`
20987 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20988 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20994 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20995 sed -n "$gl_absolute_header_sed"`
20997 gl_header=$gl_cv_absolute_stdlib_h
20998 gl_cv_next_stdlib_h='"'$gl_header'"'
21002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
21003 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
21005 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
21007 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21008 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21009 gl_next_as_first_directive='<'stdlib.h'>'
21011 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21012 gl_next_as_first_directive=$gl_cv_next_stdlib_h
21014 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
21027 if test $ac_cv_have_decl_ecvt = no; then
21031 if test $ac_cv_have_decl_fcvt = no; then
21035 if test $ac_cv_have_decl_gcvt = no; then
21042 HAVE_DECL_STRNCASECMP=1;
21045 REPLACE_STRERROR_0=0
21046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
21047 printf %s "checking whether strerror(0) succeeds... " >&6; }
21048 if test ${gl_cv_func_strerror_0_works+y}
21050 printf %s "(cached) " >&6
21052 if test "$cross_compiling" = yes
21055 # Guess yes on glibc systems.
21056 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
21057 # Guess yes on musl systems.
21058 *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
21059 # Guess yes on native Windows.
21060 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
21061 # If we don't know, obey --enable-cross-guesses.
21062 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
21066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21067 /* end confdefs.h. */
21068 #include <string.h>
21077 str = strerror (0);
21078 if (!*str) result |= 1;
21079 if (errno) result |= 2;
21080 if (strstr (str, "nknown") || strstr (str, "ndefined"))
21087 if ac_fn_c_try_run "$LINENO"
21089 gl_cv_func_strerror_0_works=yes
21091 gl_cv_func_strerror_0_works=no
21093 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21094 conftest.$ac_objext conftest.beam conftest.$ac_ext
21099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
21100 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
21101 case "$gl_cv_func_strerror_0_works" in
21104 REPLACE_STRERROR_0=1
21106 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
21118 if test $ac_cv_func_strerror_r = yes; then
21119 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
21120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
21121 printf %s "checking for strerror_r with POSIX signature... " >&6; }
21122 if test ${gl_cv_func_strerror_r_posix_signature+y}
21124 printf %s "(cached) " >&6
21126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21127 /* end confdefs.h. */
21128 #include <string.h>
21129 int strerror_r (int, char *, size_t);
21139 if ac_fn_c_try_compile "$LINENO"
21141 gl_cv_func_strerror_r_posix_signature=yes
21143 gl_cv_func_strerror_r_posix_signature=no
21145 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
21149 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
21150 if test $gl_cv_func_strerror_r_posix_signature = yes; then
21151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
21152 printf %s "checking whether strerror_r works... " >&6; }
21153 if test ${gl_cv_func_strerror_r_works+y}
21155 printf %s "(cached) " >&6
21157 if test "$cross_compiling" = yes
21162 aix*) gl_cv_func_strerror_r_works="guessing no";;
21163 # Guess no on HP-UX.
21164 hpux*) gl_cv_func_strerror_r_works="guessing no";;
21165 # Guess no on BSD variants.
21166 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
21167 # Guess yes otherwise.
21168 *) gl_cv_func_strerror_r_works="guessing yes";;
21172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21173 /* end confdefs.h. */
21175 #include <string.h>
21182 if (strerror_r (EACCES, buf, 0) < 0)
21185 if (strerror_r (EACCES, buf, sizeof buf) != 0)
21187 strcpy (buf, "Unknown");
21188 if (strerror_r (0, buf, sizeof buf) != 0)
21192 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
21196 if (strerror_r (-3, buf, sizeof buf) < 0)
21208 if ac_fn_c_try_run "$LINENO"
21210 gl_cv_func_strerror_r_works=yes
21212 gl_cv_func_strerror_r_works=no
21214 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21215 conftest.$ac_objext conftest.beam conftest.$ac_ext
21220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
21221 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
21224 if test $ac_cv_func___xpg_strerror_r = yes; then
21225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
21226 printf %s "checking whether __xpg_strerror_r works... " >&6; }
21227 if test ${gl_cv_func_strerror_r_works+y}
21229 printf %s "(cached) " >&6
21231 if test "$cross_compiling" = yes
21233 gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
21236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21237 /* end confdefs.h. */
21239 #include <string.h>
21244 int __xpg_strerror_r(int, char *, size_t);
21250 char buf[256] = "^";
21252 char *str = strerror (-1);
21253 strcpy (copy, str);
21254 if (__xpg_strerror_r (-2, buf, 1) == 0)
21258 __xpg_strerror_r (-2, buf, 256);
21259 if (strcmp (str, copy))
21267 if ac_fn_c_try_run "$LINENO"
21269 gl_cv_func_strerror_r_works=yes
21271 gl_cv_func_strerror_r_works=no
21273 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21274 conftest.$ac_objext conftest.beam conftest.$ac_ext
21279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
21280 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
21296 if test $gl_cv_have_include_next = yes; then
21297 gl_cv_next_string_h='<'string.h'>'
21299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
21300 printf %s "checking absolute name of <string.h>... " >&6; }
21301 if test ${gl_cv_next_string_h+y}
21303 printf %s "(cached) " >&6
21308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21309 /* end confdefs.h. */
21310 #include <string.h>
21313 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21314 *) gl_absname_cpp="$ac_cpp" ;;
21319 gl_dirsep_regex='[/\\]'
21322 gl_dirsep_regex='\/'
21325 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21326 gl_header_literal_regex=`echo 'string.h' \
21327 | sed -e "$gl_make_literal_regex_sed"`
21328 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21329 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21335 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21336 sed -n "$gl_absolute_header_sed"`
21338 gl_header=$gl_cv_absolute_string_h
21339 gl_cv_next_string_h='"'$gl_header'"'
21343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
21344 printf "%s\n" "$gl_cv_next_string_h" >&6; }
21346 NEXT_STRING_H=$gl_cv_next_string_h
21348 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21349 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21350 gl_next_as_first_directive='<'string.h'>'
21352 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21353 gl_next_as_first_directive=$gl_cv_next_string_h
21355 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
21379 if test $gl_cv_have_include_next = yes; then
21380 gl_cv_next_strings_h='<'strings.h'>'
21382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
21383 printf %s "checking absolute name of <strings.h>... " >&6; }
21384 if test ${gl_cv_next_strings_h+y}
21386 printf %s "(cached) " >&6
21389 if test $ac_cv_header_strings_h = yes; then
21394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21395 /* end confdefs.h. */
21396 #include <strings.h>
21399 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21400 *) gl_absname_cpp="$ac_cpp" ;;
21405 gl_dirsep_regex='[/\\]'
21408 gl_dirsep_regex='\/'
21411 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21412 gl_header_literal_regex=`echo 'strings.h' \
21413 | sed -e "$gl_make_literal_regex_sed"`
21414 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21415 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21421 gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21422 sed -n "$gl_absolute_header_sed"`
21424 gl_header=$gl_cv_absolute_strings_h
21425 gl_cv_next_strings_h='"'$gl_header'"'
21427 gl_cv_next_strings_h='<'strings.h'>'
21432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
21433 printf "%s\n" "$gl_cv_next_strings_h" >&6; }
21435 NEXT_STRINGS_H=$gl_cv_next_strings_h
21437 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21438 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21439 gl_next_as_first_directive='<'strings.h'>'
21441 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21442 gl_next_as_first_directive=$gl_cv_next_strings_h
21444 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
21449 if test $ac_cv_header_strings_h = yes; then
21466 ac_fn_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21467 if test "x$ac_cv_have_decl_strnlen" = xyes
21473 printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
21477 ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21478 if test "x$ac_cv_have_decl_strtoimax" = xyes
21484 printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h
21498 if test $gl_cv_have_include_next = yes; then
21499 gl_cv_next_sys_random_h='<'sys/random.h'>'
21501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
21502 printf %s "checking absolute name of <sys/random.h>... " >&6; }
21503 if test ${gl_cv_next_sys_random_h+y}
21505 printf %s "(cached) " >&6
21508 if test $ac_cv_header_sys_random_h = yes; then
21513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21514 /* end confdefs.h. */
21515 #include <sys/random.h>
21518 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21519 *) gl_absname_cpp="$ac_cpp" ;;
21524 gl_dirsep_regex='[/\\]'
21527 gl_dirsep_regex='\/'
21530 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21531 gl_header_literal_regex=`echo 'sys/random.h' \
21532 | sed -e "$gl_make_literal_regex_sed"`
21533 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21534 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21540 gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21541 sed -n "$gl_absolute_header_sed"`
21543 gl_header=$gl_cv_absolute_sys_random_h
21544 gl_cv_next_sys_random_h='"'$gl_header'"'
21546 gl_cv_next_sys_random_h='<'sys/random.h'>'
21551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
21552 printf "%s\n" "$gl_cv_next_sys_random_h" >&6; }
21554 NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
21556 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21557 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21558 gl_next_as_first_directive='<'sys/random.h'>'
21560 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21561 gl_next_as_first_directive=$gl_cv_next_sys_random_h
21563 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
21568 if test $ac_cv_header_sys_random_h = yes; then
21569 HAVE_SYS_RANDOM_H=1
21571 HAVE_SYS_RANDOM_H=0
21576 if test $ac_cv_header_sys_random_h = yes; then
21577 UNISTD_H_HAVE_SYS_RANDOM_H=1
21596 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
21607 if test $gl_cv_have_include_next = yes; then
21608 gl_cv_next_sys_types_h='<'sys/types.h'>'
21610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
21611 printf %s "checking absolute name of <sys/types.h>... " >&6; }
21612 if test ${gl_cv_next_sys_types_h+y}
21614 printf %s "(cached) " >&6
21619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21620 /* end confdefs.h. */
21621 #include <sys/types.h>
21624 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21625 *) gl_absname_cpp="$ac_cpp" ;;
21630 gl_dirsep_regex='[/\\]'
21633 gl_dirsep_regex='\/'
21636 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21637 gl_header_literal_regex=`echo 'sys/types.h' \
21638 | sed -e "$gl_make_literal_regex_sed"`
21639 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21640 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21646 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21647 sed -n "$gl_absolute_header_sed"`
21649 gl_header=$gl_cv_absolute_sys_types_h
21650 gl_cv_next_sys_types_h='"'$gl_header'"'
21654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
21655 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
21657 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
21659 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21660 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21661 gl_next_as_first_directive='<'sys/types.h'>'
21663 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21664 gl_next_as_first_directive=$gl_cv_next_sys_types_h
21666 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
21679 WINDOWS_STAT_INODES=0
21700 if test $gl_cv_have_include_next = yes; then
21701 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
21703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
21704 printf %s "checking absolute name of <sys/wait.h>... " >&6; }
21705 if test ${gl_cv_next_sys_wait_h+y}
21707 printf %s "(cached) " >&6
21710 if test $ac_cv_header_sys_wait_h = yes; then
21715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21716 /* end confdefs.h. */
21717 #include <sys/wait.h>
21720 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21721 *) gl_absname_cpp="$ac_cpp" ;;
21726 gl_dirsep_regex='[/\\]'
21729 gl_dirsep_regex='\/'
21732 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21733 gl_header_literal_regex=`echo 'sys/wait.h' \
21734 | sed -e "$gl_make_literal_regex_sed"`
21735 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21736 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21742 gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21743 sed -n "$gl_absolute_header_sed"`
21745 gl_header=$gl_cv_absolute_sys_wait_h
21746 gl_cv_next_sys_wait_h='"'$gl_header'"'
21748 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
21753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
21754 printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
21756 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
21758 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21759 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21760 gl_next_as_first_directive='<'sys/wait.h'>'
21762 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21763 gl_next_as_first_directive=$gl_cv_next_sys_wait_h
21765 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
21779 GL_GNULIB_WAITPID=0
21785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21786 printf %s "checking for struct timespec in <time.h>... " >&6; }
21787 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
21789 printf %s "(cached) " >&6
21791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21792 /* end confdefs.h. */
21798 static struct timespec x; x.tv_sec = x.tv_nsec;
21803 if ac_fn_c_try_compile "$LINENO"
21805 gl_cv_sys_struct_timespec_in_time_h=yes
21807 gl_cv_sys_struct_timespec_in_time_h=no
21809 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21812 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
21814 TIME_H_DEFINES_STRUCT_TIMESPEC=0
21815 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21816 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21817 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
21818 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21819 TIME_H_DEFINES_STRUCT_TIMESPEC=1
21821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21822 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
21823 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
21825 printf %s "(cached) " >&6
21827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21828 /* end confdefs.h. */
21829 #include <sys/time.h>
21834 static struct timespec x; x.tv_sec = x.tv_nsec;
21839 if ac_fn_c_try_compile "$LINENO"
21841 gl_cv_sys_struct_timespec_in_sys_time_h=yes
21843 gl_cv_sys_struct_timespec_in_sys_time_h=no
21845 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21848 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21849 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21850 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21853 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
21854 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
21856 printf %s "(cached) " >&6
21858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21859 /* end confdefs.h. */
21860 #include <pthread.h>
21865 static struct timespec x; x.tv_sec = x.tv_nsec;
21870 if ac_fn_c_try_compile "$LINENO"
21872 gl_cv_sys_struct_timespec_in_pthread_h=yes
21874 gl_cv_sys_struct_timespec_in_pthread_h=no
21876 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21879 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21880 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21881 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
21884 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
21885 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
21887 printf %s "(cached) " >&6
21889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21890 /* end confdefs.h. */
21891 #include <unistd.h>
21896 static struct timespec x; x.tv_sec = x.tv_nsec;
21901 if ac_fn_c_try_compile "$LINENO"
21903 gl_cv_sys_struct_timespec_in_unistd_h=yes
21905 gl_cv_sys_struct_timespec_in_unistd_h=no
21907 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
21910 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
21911 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
21912 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
21933 if test $gl_cv_have_include_next = yes; then
21934 gl_cv_next_time_h='<'time.h'>'
21936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21937 printf %s "checking absolute name of <time.h>... " >&6; }
21938 if test ${gl_cv_next_time_h+y}
21940 printf %s "(cached) " >&6
21945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21946 /* end confdefs.h. */
21950 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21951 *) gl_absname_cpp="$ac_cpp" ;;
21956 gl_dirsep_regex='[/\\]'
21959 gl_dirsep_regex='\/'
21962 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21963 gl_header_literal_regex=`echo 'time.h' \
21964 | sed -e "$gl_make_literal_regex_sed"`
21965 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21966 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21972 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21973 sed -n "$gl_absolute_header_sed"`
21975 gl_header=$gl_cv_absolute_time_h
21976 gl_cv_next_time_h='"'$gl_header'"'
21980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21981 printf "%s\n" "$gl_cv_next_time_h" >&6; }
21983 NEXT_TIME_H=$gl_cv_next_time_h
21985 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21986 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21987 gl_next_as_first_directive='<'time.h'>'
21989 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21990 gl_next_as_first_directive=$gl_cv_next_time_h
21992 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
22001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
22002 printf %s "checking for TIME_UTC in <time.h>... " >&6; }
22003 if test ${gl_cv_time_h_has_TIME_UTC+y}
22005 printf %s "(cached) " >&6
22007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22008 /* end confdefs.h. */
22014 static int x = TIME_UTC; x++;
22019 if ac_fn_c_try_compile "$LINENO"
22021 gl_cv_time_h_has_TIME_UTC=yes
22023 gl_cv_time_h_has_TIME_UTC=no
22025 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
22028 printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
22029 if test $gl_cv_time_h_has_TIME_UTC = yes; then
22030 TIME_H_DEFINES_TIME_UTC=1
22032 TIME_H_DEFINES_TIME_UTC=0
22038 ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22039 if test "x$ac_cv_have_decl_execvpe" = xyes
22045 printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h
22059 if test $gl_cv_have_include_next = yes; then
22060 gl_cv_next_unistd_h='<'unistd.h'>'
22062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
22063 printf %s "checking absolute name of <unistd.h>... " >&6; }
22064 if test ${gl_cv_next_unistd_h+y}
22066 printf %s "(cached) " >&6
22069 if test $ac_cv_header_unistd_h = yes; then
22074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22075 /* end confdefs.h. */
22076 #include <unistd.h>
22079 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22080 *) gl_absname_cpp="$ac_cpp" ;;
22085 gl_dirsep_regex='[/\\]'
22088 gl_dirsep_regex='\/'
22091 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22092 gl_header_literal_regex=`echo 'unistd.h' \
22093 | sed -e "$gl_make_literal_regex_sed"`
22094 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22095 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22101 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22102 sed -n "$gl_absolute_header_sed"`
22104 gl_header=$gl_cv_absolute_unistd_h
22105 gl_cv_next_unistd_h='"'$gl_header'"'
22107 gl_cv_next_unistd_h='<'unistd.h'>'
22112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
22113 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
22115 NEXT_UNISTD_H=$gl_cv_next_unistd_h
22117 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22118 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22119 gl_next_as_first_directive='<'unistd.h'>'
22121 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22122 gl_next_as_first_directive=$gl_cv_next_unistd_h
22124 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
22129 if test $ac_cv_header_unistd_h = yes; then
22147 if test $ac_cv_have_decl_execvpe = no; then
22148 HAVE_DECL_EXECVPE=0
22157 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
22162 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
22167 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;}
22174 if test "$HAVE_LIBUNISTRING" = yes; then
22175 LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
22176 LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
22177 LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
22180 ac_fn_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22181 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
22187 printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
22189 ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22190 if test "x$ac_cv_have_decl_feof_unlocked" = xyes
22196 printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
22198 ac_fn_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22199 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
22205 printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
22207 ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22208 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
22214 printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
22216 ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22217 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
22223 printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
22225 ac_fn_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22226 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
22232 printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
22234 ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22235 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
22241 printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
22243 ac_fn_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22244 if test "x$ac_cv_have_decl_fread_unlocked" = xyes
22250 printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
22252 ac_fn_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22253 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
22259 printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
22261 ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22262 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
22268 printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
22270 ac_fn_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22271 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
22277 printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
22279 ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22280 if test "x$ac_cv_have_decl_putc_unlocked" = xyes
22286 printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
22288 ac_fn_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22289 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
22295 printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
22297 ac_fn_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22298 if test "x$ac_cv_have_decl_unsetenv" = xyes
22304 printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
22310 if test $ac_cv_header_features_h = yes; then
22318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
22319 printf %s "checking for inttypes.h... " >&6; }
22320 if test ${gl_cv_header_inttypes_h+y}
22322 printf %s "(cached) " >&6
22324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22325 /* end confdefs.h. */
22327 #include <sys/types.h>
22328 #include <inttypes.h>
22333 uintmax_t i = (uintmax_t) -1; return !i;
22338 if ac_fn_c_try_compile "$LINENO"
22340 gl_cv_header_inttypes_h=yes
22342 gl_cv_header_inttypes_h=no
22344 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
22347 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
22348 if test $gl_cv_header_inttypes_h = yes; then
22350 printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
22355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
22356 printf %s "checking for stdint.h... " >&6; }
22357 if test ${gl_cv_header_stdint_h+y}
22359 printf %s "(cached) " >&6
22361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22362 /* end confdefs.h. */
22363 #include <sys/types.h>
22364 #include <stdint.h>
22368 uintmax_t i = (uintmax_t) -1; return !i;
22373 if ac_fn_c_try_compile "$LINENO"
22375 gl_cv_header_stdint_h=yes
22377 gl_cv_header_stdint_h=no
22379 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
22382 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
22383 if test $gl_cv_header_stdint_h = yes; then
22385 printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
22392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
22393 printf %s "checking for intmax_t... " >&6; }
22394 if test ${gt_cv_c_intmax_t+y}
22396 printf %s "(cached) " >&6
22398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22399 /* end confdefs.h. */
22401 #include <stddef.h>
22402 #include <stdlib.h>
22403 #if HAVE_STDINT_H_WITH_UINTMAX
22404 #include <stdint.h>
22406 #if HAVE_INTTYPES_H_WITH_UINTMAX
22407 #include <inttypes.h>
22413 intmax_t x = -1; return !x;
22418 if ac_fn_c_try_compile "$LINENO"
22420 gt_cv_c_intmax_t=yes
22422 gt_cv_c_intmax_t=no
22424 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
22427 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
22428 if test $gt_cv_c_intmax_t = yes; then
22430 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
22434 printf "%s\n" "#define intmax_t long long" >>confdefs.h
22439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
22440 printf %s "checking where to find the exponent in a 'double'... " >&6; }
22441 if test ${gl_cv_cc_double_expbit0+y}
22443 printf %s "(cached) " >&6
22446 if test "$cross_compiling" = yes
22449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22450 /* end confdefs.h. */
22452 #if defined arm || defined __arm || defined __arm__
22457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22458 $EGREP "mixed_endianness" >/dev/null 2>&1
22460 gl_cv_cc_double_expbit0="unknown"
22464 if test ${ac_cv_c_bigendian+y}
22466 printf %s "(cached) " >&6
22468 ac_cv_c_bigendian=unknown
22469 # See if we're dealing with a universal compiler.
22470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22471 /* end confdefs.h. */
22472 #ifndef __APPLE_CC__
22473 not a universal capable compiler
22478 if ac_fn_c_try_compile "$LINENO"
22481 # Check for potential -arch flags. It is not universal unless
22482 # there are at least two -arch flags with different values.
22485 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
22486 if test -n "$ac_prev"; then
22488 i?86 | x86_64 | ppc | ppc64)
22489 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
22492 ac_cv_c_bigendian=universal
22498 elif test "x$ac_word" = "x-arch"; then
22503 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22504 if test $ac_cv_c_bigendian = unknown; then
22505 # See if sys/param.h defines the BYTE_ORDER macro.
22506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22507 /* end confdefs.h. */
22508 #include <sys/types.h>
22509 #include <sys/param.h>
22514 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
22515 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
22517 bogus endian macros
22524 if ac_fn_c_try_compile "$LINENO"
22526 # It does; now see whether it defined to BIG_ENDIAN or not.
22527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22528 /* end confdefs.h. */
22529 #include <sys/types.h>
22530 #include <sys/param.h>
22535 #if BYTE_ORDER != BIG_ENDIAN
22543 if ac_fn_c_try_compile "$LINENO"
22545 ac_cv_c_bigendian=yes
22547 ac_cv_c_bigendian=no
22549 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22551 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22553 if test $ac_cv_c_bigendian = unknown; then
22554 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
22555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22556 /* end confdefs.h. */
22557 #include <limits.h>
22562 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
22563 bogus endian macros
22570 if ac_fn_c_try_compile "$LINENO"
22572 # It does; now see whether it defined to _BIG_ENDIAN or not.
22573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22574 /* end confdefs.h. */
22575 #include <limits.h>
22580 #ifndef _BIG_ENDIAN
22588 if ac_fn_c_try_compile "$LINENO"
22590 ac_cv_c_bigendian=yes
22592 ac_cv_c_bigendian=no
22594 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22596 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22598 if test $ac_cv_c_bigendian = unknown; then
22599 # Compile a test program.
22600 if test "$cross_compiling" = yes
22602 # Try to guess by grepping values from an object file.
22603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22604 /* end confdefs.h. */
22605 unsigned short int ascii_mm[] =
22606 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22607 unsigned short int ascii_ii[] =
22608 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
22609 int use_ascii (int i) {
22610 return ascii_mm[i] + ascii_ii[i];
22612 unsigned short int ebcdic_ii[] =
22613 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22614 unsigned short int ebcdic_mm[] =
22615 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
22616 int use_ebcdic (int i) {
22617 return ebcdic_mm[i] + ebcdic_ii[i];
22624 return use_ascii (foo) == use_ebcdic (foo);
22629 if ac_fn_c_try_compile "$LINENO"
22631 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
22632 ac_cv_c_bigendian=yes
22634 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
22635 if test "$ac_cv_c_bigendian" = unknown; then
22636 ac_cv_c_bigendian=no
22638 # finding both strings is unlikely to happen, but who knows?
22639 ac_cv_c_bigendian=unknown
22643 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22646 /* end confdefs.h. */
22647 $ac_includes_default
22652 /* Are we little or big endian? From Harbison&Steele. */
22656 char c[sizeof (long int)];
22659 return u.c[sizeof (long int) - 1] == 1;
22665 if ac_fn_c_try_run "$LINENO"
22667 ac_cv_c_bigendian=no
22669 ac_cv_c_bigendian=yes
22671 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22672 conftest.$ac_objext conftest.beam conftest.$ac_ext
22678 case $ac_cv_c_bigendian in #(
22680 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
22682 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
22685 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
22689 gl_cv_cc_double_expbit0="unknown" ;;
22698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22699 /* end confdefs.h. */
22702 #include <stddef.h>
22704 #include <string.h>
22706 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22707 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
22708 static unsigned int ored_words[NWORDS];
22709 static unsigned int anded_words[NWORDS];
22710 static void add_to_ored_words (double x)
22714 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
22715 memset (&m, 0, sizeof (memory_double));
22717 for (i = 0; i < NWORDS; i++)
22719 ored_words[i] |= m.word[i];
22720 anded_words[i] &= m.word[i];
22726 FILE *fp = fopen ("conftest.out", "w");
22729 for (j = 0; j < NWORDS; j++)
22730 anded_words[j] = ~ (unsigned int) 0;
22731 add_to_ored_words (0.25);
22732 add_to_ored_words (0.5);
22733 add_to_ored_words (1.0);
22734 add_to_ored_words (2.0);
22735 add_to_ored_words (4.0);
22736 /* Remove bits that are common (e.g. if representation of the first mantissa
22737 bit is explicit). */
22738 for (j = 0; j < NWORDS; j++)
22739 ored_words[j] &= ~anded_words[j];
22740 /* Now find the nonzero word. */
22741 for (j = 0; j < NWORDS; j++)
22742 if (ored_words[j] != 0)
22747 for (i = j + 1; i < NWORDS; i++)
22748 if (ored_words[i] != 0)
22750 fprintf (fp, "unknown");
22751 return (fclose (fp) != 0);
22754 if ((ored_words[j] >> i) & 1)
22756 fprintf (fp, "word %d bit %d", (int) j, (int) i);
22757 return (fclose (fp) != 0);
22760 fprintf (fp, "unknown");
22761 return (fclose (fp) != 0);
22765 if ac_fn_c_try_run "$LINENO"
22767 gl_cv_cc_double_expbit0=`cat conftest.out`
22769 gl_cv_cc_double_expbit0="unknown"
22771 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22772 conftest.$ac_objext conftest.beam conftest.$ac_ext
22778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
22779 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
22780 case "$gl_cv_cc_double_expbit0" in
22782 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
22783 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
22785 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
22788 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
22800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
22801 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
22802 if test ${gl_cv_func_snprintf_retval_c99+y}
22804 printf %s "(cached) " >&6
22807 if test "$cross_compiling" = yes
22810 # Guess yes on glibc systems.
22811 *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
22812 # Guess yes on musl systems.
22813 *-musl*) gl_cv_func_snprintf_retval_c99="guessing yes";;
22814 # Guess yes on FreeBSD >= 5.
22815 freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
22816 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
22817 midnightbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
22818 # Guess yes on Mac OS X >= 10.3.
22819 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
22820 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
22821 # Guess yes on OpenBSD >= 3.9.
22822 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
22823 gl_cv_func_snprintf_retval_c99="guessing no";;
22824 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
22825 # Guess yes on Solaris >= 2.10.
22826 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
22827 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
22828 # Guess yes on AIX >= 4.
22829 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
22830 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
22831 # Guess yes on NetBSD >= 3.
22832 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
22833 gl_cv_func_snprintf_retval_c99="guessing no";;
22834 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
22835 # Guess yes on BeOS.
22836 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
22837 # Guess yes on Android.
22838 linux*-android*) gl_cv_func_snprintf_retval_c99="guessing yes";;
22839 # Guess yes on MSVC, no on mingw.
22840 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22841 /* end confdefs.h. */
22848 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22849 $EGREP "Known" >/dev/null 2>&1
22851 gl_cv_func_snprintf_retval_c99="guessing yes"
22853 gl_cv_func_snprintf_retval_c99="guessing no"
22858 # If we don't know, obey --enable-cross-guesses.
22859 *) gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
22863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22864 /* end confdefs.h. */
22867 #include <string.h>
22869 # define my_snprintf snprintf
22871 # include <stdarg.h>
22872 static int my_snprintf (char *buf, int size, const char *format, ...)
22876 va_start (args, format);
22877 ret = vsnprintf (buf, size, format, args);
22882 static char buf[100];
22885 strcpy (buf, "ABCDEF");
22886 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
22888 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
22890 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
22895 if ac_fn_c_try_run "$LINENO"
22897 gl_cv_func_snprintf_retval_c99=yes
22899 gl_cv_func_snprintf_retval_c99=no
22901 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22902 conftest.$ac_objext conftest.beam conftest.$ac_ext
22907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
22908 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
22913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
22914 printf %s "checking whether snprintf truncates the result as in C99... " >&6; }
22915 if test ${gl_cv_func_snprintf_truncation_c99+y}
22917 printf %s "(cached) " >&6
22920 if test "$cross_compiling" = yes
22924 # Guess yes on glibc systems.
22925 *-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22926 # Guess yes on musl systems.
22927 *-musl*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22928 # Guess yes on FreeBSD >= 5.
22929 freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
22930 freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22931 midnightbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22932 # Guess yes on Mac OS X >= 10.3.
22933 darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
22934 darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22935 # Guess yes on OpenBSD >= 3.9.
22936 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
22937 gl_cv_func_snprintf_truncation_c99="guessing no";;
22938 openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22939 # Guess yes on Solaris >= 2.6.
22940 solaris2.[0-5] | solaris2.[0-5].*)
22941 gl_cv_func_snprintf_truncation_c99="guessing no";;
22942 solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22943 # Guess yes on AIX >= 4.
22944 aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
22945 aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22946 # Guess yes on HP-UX >= 11.
22947 hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
22948 hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22949 # Guess yes on IRIX >= 6.5.
22950 irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22951 # Guess yes on OSF/1 >= 5.
22952 osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
22953 osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22954 # Guess yes on NetBSD >= 3.
22955 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
22956 gl_cv_func_snprintf_truncation_c99="guessing no";;
22957 netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22958 # Guess yes on BeOS.
22959 beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22960 # Guess yes on Android.
22961 linux*-android*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
22962 # Guess no on native Windows.
22963 mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";;
22964 # If we don't know, obey --enable-cross-guesses.
22965 *) gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
22969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22970 /* end confdefs.h. */
22973 #include <string.h>
22975 # define my_snprintf snprintf
22977 # include <stdarg.h>
22978 static int my_snprintf (char *buf, int size, const char *format, ...)
22982 va_start (args, format);
22983 ret = vsnprintf (buf, size, format, args);
22988 static char buf[100];
22991 strcpy (buf, "ABCDEF");
22992 my_snprintf (buf, 3, "%d %d", 4567, 89);
22993 if (memcmp (buf, "45\0DEF", 6) != 0)
22998 if ac_fn_c_try_run "$LINENO"
23000 gl_cv_func_snprintf_truncation_c99=yes
23002 gl_cv_func_snprintf_truncation_c99=no
23004 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23005 conftest.$ac_objext conftest.beam conftest.$ac_ext
23010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
23011 printf "%s\n" "$gl_cv_func_snprintf_truncation_c99" >&6; }
23017 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
23018 if test "x$ac_cv_func_snprintf" = xyes
23020 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
23023 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
23024 if test "x$ac_cv_func_strnlen" = xyes
23026 printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
23029 ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
23030 if test "x$ac_cv_func_wcslen" = xyes
23032 printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
23035 ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
23036 if test "x$ac_cv_func_wcsnlen" = xyes
23038 printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
23041 ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
23042 if test "x$ac_cv_func_mbrtowc" = xyes
23044 printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
23047 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
23048 if test "x$ac_cv_func_wcrtomb" = xyes
23050 printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
23054 ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
23055 " "$ac_c_undeclared_builtin_options" "CFLAGS"
23056 if test "x$ac_cv_have_decl__snprintf" = xyes
23062 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
23066 case "$gl_cv_func_snprintf_retval_c99" in
23069 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
23074 case "$gl_cv_func_snprintf_truncation_c99" in
23077 printf "%s\n" "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h
23094 if test $gl_cv_have_include_next = yes; then
23095 gl_cv_next_wchar_h='<'wchar.h'>'
23097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
23098 printf %s "checking absolute name of <wchar.h>... " >&6; }
23099 if test ${gl_cv_next_wchar_h+y}
23101 printf %s "(cached) " >&6
23104 if test $ac_cv_header_wchar_h = yes; then
23109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23110 /* end confdefs.h. */
23114 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23115 *) gl_absname_cpp="$ac_cpp" ;;
23120 gl_dirsep_regex='[/\\]'
23123 gl_dirsep_regex='\/'
23126 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23127 gl_header_literal_regex=`echo 'wchar.h' \
23128 | sed -e "$gl_make_literal_regex_sed"`
23129 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23130 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23136 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23137 sed -n "$gl_absolute_header_sed"`
23139 gl_header=$gl_cv_absolute_wchar_h
23140 gl_cv_next_wchar_h='"'$gl_header'"'
23142 gl_cv_next_wchar_h='<'wchar.h'>'
23147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
23148 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
23150 NEXT_WCHAR_H=$gl_cv_next_wchar_h
23152 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23153 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23154 gl_next_as_first_directive='<'wchar.h'>'
23156 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23157 gl_next_as_first_directive=$gl_cv_next_wchar_h
23159 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
23164 if test $ac_cv_header_wchar_h = yes; then
23174 if test $gt_cv_c_wint_t = yes; then
23189 ac_fn_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
23192 " "$ac_c_undeclared_builtin_options" "CFLAGS"
23193 if test "x$ac_cv_have_decl_wcsdup" = xyes
23199 printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h
23201 if test $ac_cv_have_decl_wcsdup = no; then
23210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler option to allow warnings" >&5
23211 printf %s "checking for C compiler option to allow warnings... " >&6; }
23212 if test ${gl_cv_cc_wallow+y}
23214 printf %s "(cached) " >&6
23217 echo 'int dummy;' > conftest.c
23218 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err'
23219 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23220 (eval $ac_try) 2>&5
23222 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23223 test $ac_status = 0; }; } >/dev/null
23224 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err'
23225 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23226 (eval $ac_try) 2>&5
23228 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23229 test $ac_status = 0; }; } >/dev/null
23230 if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
23231 gl_cv_cc_wallow='-Wno-error'
23233 gl_cv_cc_wallow=none
23238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_wallow" >&5
23239 printf "%s\n" "$gl_cv_cc_wallow" >&6; }
23240 case "$gl_cv_cc_wallow" in
23241 none) GL_CFLAG_ALLOW_WARNINGS='' ;;
23242 *) GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;;
23247 if test -n "$CXX" && test "$CXX" != no; then
23248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler option to allow warnings" >&5
23249 printf %s "checking for C++ compiler option to allow warnings... " >&6; }
23250 if test ${gl_cv_cxx_wallow+y}
23252 printf %s "(cached) " >&6
23255 echo 'int dummy;' > conftest.cc
23256 { ac_try='${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>conftest1.err'
23257 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23258 (eval $ac_try) 2>&5
23260 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23261 test $ac_status = 0; }; } >/dev/null
23262 { ac_try='${CXX-c++} $CXXFLAGS $CPPFLAGS -Wno-error -c conftest.cc 2>conftest2.err'
23263 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23264 (eval $ac_try) 2>&5
23266 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23267 test $ac_status = 0; }; } >/dev/null
23268 if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
23269 gl_cv_cxx_wallow='-Wno-error'
23271 gl_cv_cxx_wallow=none
23276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cxx_wallow" >&5
23277 printf "%s\n" "$gl_cv_cxx_wallow" >&6; }
23278 case "$gl_cv_cxx_wallow" in
23279 none) GL_CXXFLAG_ALLOW_WARNINGS='' ;;
23280 *) GL_CXXFLAG_ALLOW_WARNINGS="$gl_cv_cxx_wallow" ;;
23283 GL_CXXFLAG_ALLOW_WARNINGS=''
23288 HAVE_STRUCT_SOCKADDR_STORAGE=1;
23289 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
23291 HAVE_SA_FAMILY_T=1;
23295 if test $ac_cv_header_sys_socket_h = no; then
23296 ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
23297 if test "x$ac_cv_header_ws2tcpip_h" = xyes
23299 printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
23312 printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
23317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
23318 printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
23319 if test ${gl_cv_header_sys_socket_h_selfcontained+y}
23321 printf %s "(cached) " >&6
23324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23325 /* end confdefs.h. */
23326 #include <sys/socket.h>
23335 if ac_fn_c_try_compile "$LINENO"
23337 gl_cv_header_sys_socket_h_selfcontained=yes
23339 gl_cv_header_sys_socket_h_selfcontained=no
23341 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
23345 printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
23346 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
23347 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
23348 if test "x$ac_cv_func_shutdown" = xyes
23350 printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
23354 if test $ac_cv_func_shutdown = yes; then
23355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
23356 printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
23357 if test ${gl_cv_header_sys_socket_h_shut+y}
23359 printf %s "(cached) " >&6
23362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23363 /* end confdefs.h. */
23364 #include <sys/socket.h>
23368 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
23373 if ac_fn_c_try_compile "$LINENO"
23375 gl_cv_header_sys_socket_h_shut=yes
23377 gl_cv_header_sys_socket_h_shut=no
23379 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
23383 printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
23384 if test $gl_cv_header_sys_socket_h_shut = no; then
23385 SYS_SOCKET_H='sys/socket.h'
23389 # We need to check for ws2tcpip.h now.
23401 if test $gl_cv_have_include_next = yes; then
23402 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
23404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
23405 printf %s "checking absolute name of <sys/socket.h>... " >&6; }
23406 if test ${gl_cv_next_sys_socket_h+y}
23408 printf %s "(cached) " >&6
23411 if test $ac_cv_header_sys_socket_h = yes; then
23416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23417 /* end confdefs.h. */
23418 #include <sys/socket.h>
23421 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23422 *) gl_absname_cpp="$ac_cpp" ;;
23427 gl_dirsep_regex='[/\\]'
23430 gl_dirsep_regex='\/'
23433 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23434 gl_header_literal_regex=`echo 'sys/socket.h' \
23435 | sed -e "$gl_make_literal_regex_sed"`
23436 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23437 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23443 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23444 sed -n "$gl_absolute_header_sed"`
23446 gl_header=$gl_cv_absolute_sys_socket_h
23447 gl_cv_next_sys_socket_h='"'$gl_header'"'
23449 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
23454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
23455 printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
23457 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
23459 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23460 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23461 gl_next_as_first_directive='<'sys/socket.h'>'
23463 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23464 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
23466 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
23471 if test $ac_cv_header_sys_socket_h = yes; then
23472 HAVE_SYS_SOCKET_H=1
23474 HAVE_SYS_SOCKET_H=0
23479 if test $ac_cv_header_sys_socket_h = yes; then
23482 if test $ac_cv_header_ws2tcpip_h = yes; then
23491 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
23492 /* sys/types.h is not needed according to POSIX, but the
23493 sys/socket.h in i386-unknown-freebsd4.10 and
23494 powerpc-apple-darwin5.5 required it. */
23495 #include <sys/types.h>
23496 #ifdef HAVE_SYS_SOCKET_H
23497 #include <sys/socket.h>
23499 #ifdef HAVE_WS2TCPIP_H
23500 #include <ws2tcpip.h>
23504 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
23507 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
23511 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
23512 /* sys/types.h is not needed according to POSIX, but the
23513 sys/socket.h in i386-unknown-freebsd4.10 and
23514 powerpc-apple-darwin5.5 required it. */
23515 #include <sys/types.h>
23516 #ifdef HAVE_SYS_SOCKET_H
23517 #include <sys/socket.h>
23519 #ifdef HAVE_WS2TCPIP_H
23520 #include <ws2tcpip.h>
23524 if test "x$ac_cv_type_sa_family_t" = xyes
23527 printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
23532 if test $ac_cv_type_struct_sockaddr_storage = no; then
23533 HAVE_STRUCT_SOCKADDR_STORAGE=0
23535 if test $ac_cv_type_sa_family_t = no; then
23538 if test $ac_cv_type_struct_sockaddr_storage != no; then
23539 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
23540 #ifdef HAVE_SYS_SOCKET_H
23541 #include <sys/socket.h>
23543 #ifdef HAVE_WS2TCPIP_H
23544 #include <ws2tcpip.h>
23548 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
23551 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
23555 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
23559 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
23560 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
23561 SYS_SOCKET_H='sys/socket.h'
23567 if test $ac_cv_header_sys_socket_h != yes; then
23568 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
23569 if test "x$ac_cv_header_winsock2_h" = xyes
23571 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
23576 if test "$ac_cv_header_winsock2_h" = yes; then
23578 UNISTD_H_HAVE_WINSOCK2_H=1
23579 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
23598 GL_GNULIB_CONNECT=0
23610 GL_GNULIB_GETPEERNAME=0
23614 GL_GNULIB_GETSOCKNAME=0
23618 GL_GNULIB_GETSOCKOPT=0
23634 GL_GNULIB_RECVFROM=0
23642 GL_GNULIB_SETSOCKOPT=0
23646 GL_GNULIB_SHUTDOWN=0
23650 GL_GNULIB_ACCEPT4=0
23655 HAVE_DECL_INET_NTOP=1;
23656 HAVE_DECL_INET_PTON=1;
23657 REPLACE_INET_NTOP=0;
23658 REPLACE_INET_PTON=0;
23665 if test $ac_cv_header_arpa_inet_h = yes; then
23680 if test $gl_cv_have_include_next = yes; then
23681 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
23683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
23684 printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
23685 if test ${gl_cv_next_arpa_inet_h+y}
23687 printf %s "(cached) " >&6
23690 if test $ac_cv_header_arpa_inet_h = yes; then
23695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23696 /* end confdefs.h. */
23697 #include <arpa/inet.h>
23700 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23701 *) gl_absname_cpp="$ac_cpp" ;;
23706 gl_dirsep_regex='[/\\]'
23709 gl_dirsep_regex='\/'
23712 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23713 gl_header_literal_regex=`echo 'arpa/inet.h' \
23714 | sed -e "$gl_make_literal_regex_sed"`
23715 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23716 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23722 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23723 sed -n "$gl_absolute_header_sed"`
23725 gl_header=$gl_cv_absolute_arpa_inet_h
23726 gl_cv_next_arpa_inet_h='"'$gl_header'"'
23728 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
23733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
23734 printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
23736 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
23738 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23739 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23740 gl_next_as_first_directive='<'arpa/inet.h'>'
23742 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23743 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
23745 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
23755 if test $ac_cv_header_sys_socket_h = yes; then
23758 if test $ac_cv_header_ws2tcpip_h = yes; then
23773 GL_GNULIB_INET_NTOP=0
23777 GL_GNULIB_INET_PTON=0
23784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
23785 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
23786 if test ${gl_cv_func_getcwd_null+y}
23788 printf %s "(cached) " >&6
23790 if test "$cross_compiling" = yes
23793 # Guess yes on glibc systems.
23794 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
23795 # Guess yes on musl systems.
23796 *-musl*) gl_cv_func_getcwd_null="guessing yes";;
23797 # Guess yes on Cygwin.
23798 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
23799 # If we don't know, obey --enable-cross-guesses.
23800 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
23804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23805 /* end confdefs.h. */
23807 # include <stdlib.h>
23809 # include <unistd.h>
23810 # else /* on Windows with MSVC */
23811 # include <direct.h>
23825 #if defined _WIN32 && ! defined __CYGWIN__
23826 /* mingw cwd does not start with '/', but _getcwd does allocate.
23827 However, mingw fails to honor non-zero size. */
23829 if (chdir ("/") != 0)
23833 char *f = getcwd (NULL, 0);
23837 { free (f); return 3; }
23839 { free (f); return 4; }
23849 if ac_fn_c_try_run "$LINENO"
23851 gl_cv_func_getcwd_null=yes
23853 gl_cv_func_getcwd_null=no
23855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23856 conftest.$ac_objext conftest.beam conftest.$ac_ext
23860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
23861 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
23864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
23865 printf %s "checking for getcwd with POSIX signature... " >&6; }
23866 if test ${gl_cv_func_getcwd_posix_signature+y}
23868 printf %s "(cached) " >&6
23870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23871 /* end confdefs.h. */
23872 #include <unistd.h>
23884 char *getcwd (char *, size_t);
23891 if ac_fn_c_try_compile "$LINENO"
23893 gl_cv_func_getcwd_posix_signature=yes
23895 gl_cv_func_getcwd_posix_signature=no
23897 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
23901 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
23907 printf "%s\n" "#define MUSL_LIBC 1" >>confdefs.h
23918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
23919 printf %s "checking for IPv4 sockets... " >&6; }
23920 if test ${gl_cv_socket_ipv4+y}
23922 printf %s "(cached) " >&6
23924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23925 /* end confdefs.h. */
23926 #include <sys/types.h>
23927 #ifdef HAVE_SYS_SOCKET_H
23928 #include <sys/socket.h>
23930 #ifdef HAVE_NETINET_IN_H
23931 #include <netinet/in.h>
23933 #ifdef HAVE_WINSOCK2_H
23934 #include <winsock2.h>
23939 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
23940 if (&x && &y && &z) return 0;
23945 if ac_fn_c_try_compile "$LINENO"
23947 gl_cv_socket_ipv4=yes
23949 gl_cv_socket_ipv4=no
23951 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
23954 printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
23955 if test $gl_cv_socket_ipv4 = yes; then
23957 printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
23961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
23962 printf %s "checking for IPv6 sockets... " >&6; }
23963 if test ${gl_cv_socket_ipv6+y}
23965 printf %s "(cached) " >&6
23967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23968 /* end confdefs.h. */
23969 #include <sys/types.h>
23970 #ifdef HAVE_SYS_SOCKET_H
23971 #include <sys/socket.h>
23973 #ifdef HAVE_NETINET_IN_H
23974 #include <netinet/in.h>
23976 #ifdef HAVE_WINSOCK2_H
23977 #include <winsock2.h>
23979 #ifdef HAVE_WS2TCPIP_H
23980 #include <ws2tcpip.h>
23985 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
23986 if (&x && &y && &z) return 0;
23991 if ac_fn_c_try_compile "$LINENO"
23993 gl_cv_socket_ipv6=yes
23995 gl_cv_socket_ipv6=no
23997 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
24000 printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
24001 if test $gl_cv_socket_ipv6 = yes; then
24003 printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
24023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
24024 printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
24025 if test ${gl_cv_header_sys_select_h_selfcontained+y}
24027 printf %s "(cached) " >&6
24030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24031 /* end confdefs.h. */
24032 #include <sys/select.h>
24041 if ac_fn_c_try_compile "$LINENO"
24043 gl_cv_header_sys_select_h_selfcontained=yes
24045 gl_cv_header_sys_select_h_selfcontained=no
24047 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24048 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
24049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24050 /* end confdefs.h. */
24051 #include <sys/select.h>
24055 int memset; int bzero;
24061 if ac_fn_c_try_compile "$LINENO"
24063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24064 /* end confdefs.h. */
24065 #include <sys/select.h>
24071 #define memset nonexistent_memset
24076 void *memset (void *, int, unsigned long);
24078 #define bzero nonexistent_bzero
24083 void bzero (void *, unsigned long);
24092 if ac_fn_c_try_link "$LINENO"
24096 gl_cv_header_sys_select_h_selfcontained=no
24098 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24099 conftest$ac_exeext conftest.$ac_ext
24102 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
24107 printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
24117 if test $gl_cv_have_include_next = yes; then
24118 gl_cv_next_sys_select_h='<'sys/select.h'>'
24120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
24121 printf %s "checking absolute name of <sys/select.h>... " >&6; }
24122 if test ${gl_cv_next_sys_select_h+y}
24124 printf %s "(cached) " >&6
24127 if test $ac_cv_header_sys_select_h = yes; then
24132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24133 /* end confdefs.h. */
24134 #include <sys/select.h>
24137 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24138 *) gl_absname_cpp="$ac_cpp" ;;
24143 gl_dirsep_regex='[/\\]'
24146 gl_dirsep_regex='\/'
24149 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24150 gl_header_literal_regex=`echo 'sys/select.h' \
24151 | sed -e "$gl_make_literal_regex_sed"`
24152 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24153 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24159 gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24160 sed -n "$gl_absolute_header_sed"`
24162 gl_header=$gl_cv_absolute_sys_select_h
24163 gl_cv_next_sys_select_h='"'$gl_header'"'
24165 gl_cv_next_sys_select_h='<'sys/select.h'>'
24170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
24171 printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
24173 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
24175 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24176 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24177 gl_next_as_first_directive='<'sys/select.h'>'
24179 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24180 gl_next_as_first_directive=$gl_cv_next_sys_select_h
24182 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
24187 if test $ac_cv_header_sys_select_h = yes; then
24188 HAVE_SYS_SELECT_H=1
24190 HAVE_SYS_SELECT_H=0
24197 if test $ac_cv_header_sys_socket_h != yes; then
24198 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
24199 if test "x$ac_cv_header_winsock2_h" = xyes
24201 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
24206 if test "$ac_cv_header_winsock2_h" = yes; then
24208 UNISTD_H_HAVE_WINSOCK2_H=1
24209 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24225 if test $ac_cv_header_sys_socket_h != yes; then
24226 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
24227 if test "x$ac_cv_header_winsock2_h" = xyes
24229 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
24234 if test "$ac_cv_header_winsock2_h" = yes; then
24236 UNISTD_H_HAVE_WINSOCK2_H=1
24237 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24243 if test $HAVE_WINSOCK2_H = 1; then
24244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
24245 printf %s "checking for WSAStartup... " >&6; }
24246 if test ${gl_cv_func_wsastartup+y}
24248 printf %s "(cached) " >&6
24251 gl_save_LIBS="$LIBS"
24252 LIBS="$LIBS -lws2_32"
24253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24254 /* end confdefs.h. */
24256 #ifdef HAVE_WINSOCK2_H
24257 # include <winsock2.h>
24263 WORD wVersionRequested = MAKEWORD(1, 1);
24265 int err = WSAStartup(wVersionRequested, &wsaData);
24273 if ac_fn_c_try_link "$LINENO"
24275 gl_cv_func_wsastartup=yes
24277 gl_cv_func_wsastartup=no
24279 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24280 conftest$ac_exeext conftest.$ac_ext
24281 LIBS="$gl_save_LIBS"
24284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
24285 printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
24286 if test "$gl_cv_func_wsastartup" = "yes"; then
24288 printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
24290 LIBSOCKET='-lws2_32'
24293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
24294 printf %s "checking for library containing setsockopt... " >&6; }
24295 if test ${gl_cv_lib_socket+y}
24297 printf %s "(cached) " >&6
24301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24302 /* end confdefs.h. */
24316 if ac_fn_c_try_link "$LINENO"
24320 gl_save_LIBS="$LIBS"
24321 LIBS="$gl_save_LIBS -lsocket"
24322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24323 /* end confdefs.h. */
24337 if ac_fn_c_try_link "$LINENO"
24339 gl_cv_lib_socket="-lsocket"
24341 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24342 conftest$ac_exeext conftest.$ac_ext
24343 if test -z "$gl_cv_lib_socket"; then
24344 LIBS="$gl_save_LIBS -lnetwork"
24345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24346 /* end confdefs.h. */
24360 if ac_fn_c_try_link "$LINENO"
24362 gl_cv_lib_socket="-lnetwork"
24364 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24365 conftest$ac_exeext conftest.$ac_ext
24366 if test -z "$gl_cv_lib_socket"; then
24367 LIBS="$gl_save_LIBS -lnet"
24368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24369 /* end confdefs.h. */
24383 if ac_fn_c_try_link "$LINENO"
24385 gl_cv_lib_socket="-lnet"
24387 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24388 conftest$ac_exeext conftest.$ac_ext
24391 LIBS="$gl_save_LIBS"
24394 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24395 conftest$ac_exeext conftest.$ac_ext
24396 if test -z "$gl_cv_lib_socket"; then
24397 gl_cv_lib_socket="none needed"
24401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
24402 printf "%s\n" "$gl_cv_lib_socket" >&6; }
24403 if test "$gl_cv_lib_socket" != "none needed"; then
24404 LIBSOCKET="$gl_cv_lib_socket"
24420 if test "$ac_cv_header_winsock2_h" = yes; then
24424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
24425 printf %s "checking whether select supports a 0 argument... " >&6; }
24426 if test ${gl_cv_func_select_supports0+y}
24428 printf %s "(cached) " >&6
24431 if test "$cross_compiling" = yes
24435 # Guess no on Interix.
24436 interix*) gl_cv_func_select_supports0="guessing no";;
24437 # Guess yes otherwise.
24438 *) gl_cv_func_select_supports0="guessing yes";;
24442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24443 /* end confdefs.h. */
24445 #include <sys/types.h>
24446 #include <sys/time.h>
24447 #if HAVE_SYS_SELECT_H
24448 #include <sys/select.h>
24452 struct timeval timeout;
24453 timeout.tv_sec = 0;
24454 timeout.tv_usec = 5;
24455 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
24458 if ac_fn_c_try_run "$LINENO"
24460 gl_cv_func_select_supports0=yes
24462 gl_cv_func_select_supports0=no
24464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24465 conftest.$ac_objext conftest.beam conftest.$ac_ext
24470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
24471 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
24472 case "$gl_cv_func_select_supports0" in
24474 *) REPLACE_SELECT=1 ;;
24477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
24478 printf %s "checking whether select detects invalid fds... " >&6; }
24479 if test ${gl_cv_func_select_detects_ebadf+y}
24481 printf %s "(cached) " >&6
24484 if test "$cross_compiling" = yes
24488 # Guess yes on Linux systems.
24489 linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
24490 # Guess yes on glibc systems.
24491 *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
24492 # If we don't know, obey --enable-cross-guesses.
24493 *) gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
24497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24498 /* end confdefs.h. */
24500 #include <sys/types.h>
24501 #include <sys/time.h>
24502 #if HAVE_SYS_SELECT_H
24503 # include <sys/select.h>
24505 #include <unistd.h>
24520 struct timeval timeout;
24521 timeout.tv_sec = 0;
24522 timeout.tv_usec = 5;
24523 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
24529 if ac_fn_c_try_run "$LINENO"
24531 gl_cv_func_select_detects_ebadf=yes
24533 gl_cv_func_select_detects_ebadf=no
24535 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24536 conftest.$ac_objext conftest.beam conftest.$ac_ext
24541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
24542 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
24543 case $gl_cv_func_select_detects_ebadf in
24545 *) REPLACE_SELECT=1 ;;
24549 LIB_SELECT="$LIBSOCKET"
24550 if test $REPLACE_SELECT = 1; then
24553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24554 /* end confdefs.h. */
24556 #define WIN32_LEAN_AND_MEAN
24557 #include <windows.h>
24561 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
24565 if ac_fn_c_try_link "$LINENO"
24569 LIB_SELECT="$LIB_SELECT -luser32"
24571 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24572 conftest$ac_exeext conftest.$ac_ext
24585 if test $ac_cv_have_decl_strerror_r = no; then
24586 HAVE_DECL_STRERROR_R=0
24589 if test $ac_cv_func_strerror_r = yes; then
24590 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
24591 if test $gl_cv_func_strerror_r_posix_signature = yes; then
24592 case "$gl_cv_func_strerror_r_works" in
24593 *no) REPLACE_STRERROR_R=1 ;;
24596 REPLACE_STRERROR_R=1
24599 REPLACE_STRERROR_R=1
24606 HAVE_PTHREAD_SPINLOCK_T=1;
24607 HAVE_PTHREAD_CREATE_DETACHED=1;
24608 HAVE_PTHREAD_MUTEX_RECURSIVE=1;
24609 HAVE_PTHREAD_MUTEX_ROBUST=1;
24610 HAVE_PTHREAD_PROCESS_SHARED=1;
24611 HAVE_PTHREAD_CREATE=1;
24612 HAVE_PTHREAD_ATTR_INIT=1;
24613 HAVE_PTHREAD_ATTR_GETDETACHSTATE=1;
24614 HAVE_PTHREAD_ATTR_SETDETACHSTATE=1;
24615 HAVE_PTHREAD_ATTR_DESTROY=1;
24616 HAVE_PTHREAD_SELF=1;
24617 HAVE_PTHREAD_EQUAL=1;
24618 HAVE_PTHREAD_DETACH=1;
24619 HAVE_PTHREAD_JOIN=1;
24620 HAVE_PTHREAD_EXIT=1;
24621 HAVE_PTHREAD_ONCE=1;
24622 HAVE_PTHREAD_MUTEX_INIT=1;
24623 HAVE_PTHREAD_MUTEXATTR_INIT=1;
24624 HAVE_PTHREAD_MUTEXATTR_GETTYPE=1;
24625 HAVE_PTHREAD_MUTEXATTR_SETTYPE=1;
24626 HAVE_PTHREAD_MUTEXATTR_GETROBUST=1;
24627 HAVE_PTHREAD_MUTEXATTR_SETROBUST=1;
24628 HAVE_PTHREAD_MUTEXATTR_DESTROY=1;
24629 HAVE_PTHREAD_MUTEX_LOCK=1;
24630 HAVE_PTHREAD_MUTEX_TRYLOCK=1;
24631 HAVE_PTHREAD_MUTEX_TIMEDLOCK=1;
24632 HAVE_PTHREAD_MUTEX_UNLOCK=1;
24633 HAVE_PTHREAD_MUTEX_DESTROY=1;
24634 HAVE_PTHREAD_RWLOCK_INIT=1;
24635 HAVE_PTHREAD_RWLOCKATTR_INIT=1;
24636 HAVE_PTHREAD_RWLOCKATTR_DESTROY=1;
24637 HAVE_PTHREAD_RWLOCK_RDLOCK=1;
24638 HAVE_PTHREAD_RWLOCK_WRLOCK=1;
24639 HAVE_PTHREAD_RWLOCK_TRYRDLOCK=1;
24640 HAVE_PTHREAD_RWLOCK_TRYWRLOCK=1;
24641 HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=1;
24642 HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=1;
24643 HAVE_PTHREAD_RWLOCK_UNLOCK=1;
24644 HAVE_PTHREAD_RWLOCK_DESTROY=1;
24645 HAVE_PTHREAD_COND_INIT=1;
24646 HAVE_PTHREAD_CONDATTR_INIT=1;
24647 HAVE_PTHREAD_CONDATTR_DESTROY=1;
24648 HAVE_PTHREAD_COND_WAIT=1;
24649 HAVE_PTHREAD_COND_TIMEDWAIT=1;
24650 HAVE_PTHREAD_COND_SIGNAL=1;
24651 HAVE_PTHREAD_COND_BROADCAST=1;
24652 HAVE_PTHREAD_COND_DESTROY=1;
24653 HAVE_PTHREAD_KEY_CREATE=1;
24654 HAVE_PTHREAD_SETSPECIFIC=1;
24655 HAVE_PTHREAD_GETSPECIFIC=1;
24656 HAVE_PTHREAD_KEY_DELETE=1;
24657 HAVE_PTHREAD_SPIN_INIT=1;
24658 HAVE_PTHREAD_SPIN_LOCK=1;
24659 HAVE_PTHREAD_SPIN_TRYLOCK=1;
24660 HAVE_PTHREAD_SPIN_UNLOCK=1;
24661 HAVE_PTHREAD_SPIN_DESTROY=1;
24662 REPLACE_PTHREAD_CREATE=0;
24663 REPLACE_PTHREAD_ATTR_INIT=0;
24664 REPLACE_PTHREAD_ATTR_GETDETACHSTATE=0;
24665 REPLACE_PTHREAD_ATTR_SETDETACHSTATE=0;
24666 REPLACE_PTHREAD_ATTR_DESTROY=0;
24667 REPLACE_PTHREAD_SELF=0;
24668 REPLACE_PTHREAD_EQUAL=0;
24669 REPLACE_PTHREAD_DETACH=0;
24670 REPLACE_PTHREAD_JOIN=0;
24671 REPLACE_PTHREAD_EXIT=0;
24672 REPLACE_PTHREAD_ONCE=0;
24673 REPLACE_PTHREAD_MUTEX_INIT=0;
24674 REPLACE_PTHREAD_MUTEXATTR_INIT=0;
24675 REPLACE_PTHREAD_MUTEXATTR_GETTYPE=0;
24676 REPLACE_PTHREAD_MUTEXATTR_SETTYPE=0;
24677 REPLACE_PTHREAD_MUTEXATTR_GETROBUST=0;
24678 REPLACE_PTHREAD_MUTEXATTR_SETROBUST=0;
24679 REPLACE_PTHREAD_MUTEXATTR_DESTROY=0;
24680 REPLACE_PTHREAD_MUTEX_LOCK=0;
24681 REPLACE_PTHREAD_MUTEX_TRYLOCK=0;
24682 REPLACE_PTHREAD_MUTEX_TIMEDLOCK=0;
24683 REPLACE_PTHREAD_MUTEX_UNLOCK=0;
24684 REPLACE_PTHREAD_MUTEX_DESTROY=0;
24685 REPLACE_PTHREAD_RWLOCK_INIT=0;
24686 REPLACE_PTHREAD_RWLOCKATTR_INIT=0;
24687 REPLACE_PTHREAD_RWLOCKATTR_DESTROY=0;
24688 REPLACE_PTHREAD_RWLOCK_RDLOCK=0;
24689 REPLACE_PTHREAD_RWLOCK_WRLOCK=0;
24690 REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=0;
24691 REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=0;
24692 REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=0;
24693 REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=0;
24694 REPLACE_PTHREAD_RWLOCK_UNLOCK=0;
24695 REPLACE_PTHREAD_RWLOCK_DESTROY=0;
24696 REPLACE_PTHREAD_COND_INIT=0;
24697 REPLACE_PTHREAD_CONDATTR_INIT=0;
24698 REPLACE_PTHREAD_CONDATTR_DESTROY=0;
24699 REPLACE_PTHREAD_COND_WAIT=0;
24700 REPLACE_PTHREAD_COND_TIMEDWAIT=0;
24701 REPLACE_PTHREAD_COND_SIGNAL=0;
24702 REPLACE_PTHREAD_COND_BROADCAST=0;
24703 REPLACE_PTHREAD_COND_DESTROY=0;
24704 REPLACE_PTHREAD_KEY_CREATE=0;
24705 REPLACE_PTHREAD_SETSPECIFIC=0;
24706 REPLACE_PTHREAD_GETSPECIFIC=0;
24707 REPLACE_PTHREAD_KEY_DELETE=0;
24708 REPLACE_PTHREAD_SPIN_INIT=0;
24709 REPLACE_PTHREAD_SPIN_LOCK=0;
24710 REPLACE_PTHREAD_SPIN_TRYLOCK=0;
24711 REPLACE_PTHREAD_SPIN_UNLOCK=0;
24712 REPLACE_PTHREAD_SPIN_DESTROY=0;
24730 if test $gl_cv_have_include_next = yes; then
24731 gl_cv_next_pthread_h='<'pthread.h'>'
24733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <pthread.h>" >&5
24734 printf %s "checking absolute name of <pthread.h>... " >&6; }
24735 if test ${gl_cv_next_pthread_h+y}
24737 printf %s "(cached) " >&6
24740 if test $ac_cv_header_pthread_h = yes; then
24745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24746 /* end confdefs.h. */
24747 #include <pthread.h>
24750 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24751 *) gl_absname_cpp="$ac_cpp" ;;
24756 gl_dirsep_regex='[/\\]'
24759 gl_dirsep_regex='\/'
24762 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24763 gl_header_literal_regex=`echo 'pthread.h' \
24764 | sed -e "$gl_make_literal_regex_sed"`
24765 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24766 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24772 gl_cv_absolute_pthread_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24773 sed -n "$gl_absolute_header_sed"`
24775 gl_header=$gl_cv_absolute_pthread_h
24776 gl_cv_next_pthread_h='"'$gl_header'"'
24778 gl_cv_next_pthread_h='<'pthread.h'>'
24783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_pthread_h" >&5
24784 printf "%s\n" "$gl_cv_next_pthread_h" >&6; }
24786 NEXT_PTHREAD_H=$gl_cv_next_pthread_h
24788 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24789 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24790 gl_next_as_first_directive='<'pthread.h'>'
24792 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24793 gl_next_as_first_directive=$gl_cv_next_pthread_h
24795 NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H=$gl_next_as_first_directive
24800 if test $ac_cv_header_pthread_h = yes; then
24804 if { case "$host_os" in mingw*) true;; *) false;; esac; } \
24805 && test $gl_threads_api = windows; then
24814 ac_fn_c_check_type "$LINENO" "pthread_t" "ac_cv_type_pthread_t" "$ac_includes_default
24816 #include <pthread.h>
24819 if test "x$ac_cv_type_pthread_t" = xyes
24822 printf "%s\n" "#define HAVE_PTHREAD_T 1" >>confdefs.h
24826 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "$ac_includes_default
24828 #include <pthread.h>
24831 if test "x$ac_cv_type_pthread_spinlock_t" = xyes
24834 printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
24839 if test $ac_cv_type_pthread_t != yes; then
24842 if test $ac_cv_type_pthread_spinlock_t != yes; then
24843 HAVE_PTHREAD_SPINLOCK_T=0
24847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_CREATE_DETACHED" >&5
24848 printf %s "checking for PTHREAD_CREATE_DETACHED... " >&6; }
24849 if test ${gl_cv_const_PTHREAD_CREATE_DETACHED+y}
24851 printf %s "(cached) " >&6
24853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24854 /* end confdefs.h. */
24855 #include <pthread.h>
24856 int x = PTHREAD_CREATE_DETACHED;
24866 if ac_fn_c_try_compile "$LINENO"
24868 gl_cv_const_PTHREAD_CREATE_DETACHED=yes
24870 gl_cv_const_PTHREAD_CREATE_DETACHED=no
24872 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_CREATE_DETACHED" >&5
24876 printf "%s\n" "$gl_cv_const_PTHREAD_CREATE_DETACHED" >&6; }
24877 if test $gl_cv_const_PTHREAD_CREATE_DETACHED != yes; then
24878 HAVE_PTHREAD_CREATE_DETACHED=0
24881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_RECURSIVE" >&5
24882 printf %s "checking for PTHREAD_MUTEX_RECURSIVE... " >&6; }
24883 if test ${gl_cv_const_PTHREAD_MUTEX_RECURSIVE+y}
24885 printf %s "(cached) " >&6
24887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24888 /* end confdefs.h. */
24889 #include <pthread.h>
24890 int x = PTHREAD_MUTEX_RECURSIVE;
24900 if ac_fn_c_try_compile "$LINENO"
24902 gl_cv_const_PTHREAD_MUTEX_RECURSIVE=yes
24904 gl_cv_const_PTHREAD_MUTEX_RECURSIVE=no
24906 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&5
24910 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&6; }
24911 if test $gl_cv_const_PTHREAD_MUTEX_RECURSIVE != yes; then
24912 HAVE_PTHREAD_MUTEX_RECURSIVE=0
24915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_ROBUST" >&5
24916 printf %s "checking for PTHREAD_MUTEX_ROBUST... " >&6; }
24917 if test ${gl_cv_const_PTHREAD_MUTEX_ROBUST+y}
24919 printf %s "(cached) " >&6
24921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24922 /* end confdefs.h. */
24923 #include <pthread.h>
24924 int x = PTHREAD_MUTEX_ROBUST;
24934 if ac_fn_c_try_compile "$LINENO"
24936 gl_cv_const_PTHREAD_MUTEX_ROBUST=yes
24938 gl_cv_const_PTHREAD_MUTEX_ROBUST=no
24940 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_ROBUST" >&5
24944 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_ROBUST" >&6; }
24945 if test $gl_cv_const_PTHREAD_MUTEX_ROBUST != yes; then
24946 HAVE_PTHREAD_MUTEX_ROBUST=0
24949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PROCESS_SHARED" >&5
24950 printf %s "checking for PTHREAD_PROCESS_SHARED... " >&6; }
24951 if test ${gl_cv_const_PTHREAD_PROCESS_SHARED+y}
24953 printf %s "(cached) " >&6
24955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24956 /* end confdefs.h. */
24957 #include <pthread.h>
24958 int x = PTHREAD_PROCESS_SHARED;
24968 if ac_fn_c_try_compile "$LINENO"
24970 gl_cv_const_PTHREAD_PROCESS_SHARED=yes
24972 gl_cv_const_PTHREAD_PROCESS_SHARED=no
24974 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_PROCESS_SHARED" >&5
24978 printf "%s\n" "$gl_cv_const_PTHREAD_PROCESS_SHARED" >&6; }
24979 if test $gl_cv_const_PTHREAD_PROCESS_SHARED != yes; then
24980 HAVE_PTHREAD_PROCESS_SHARED=0
24989 LIB_PTHREAD="$LIBPMULTITHREAD"
24994 GL_GNULIB_PTHREAD_THREAD=0
24998 GL_GNULIB_PTHREAD_ONCE=0
25002 GL_GNULIB_PTHREAD_MUTEX=0
25006 GL_GNULIB_PTHREAD_RWLOCK=0
25010 GL_GNULIB_PTHREAD_COND=0
25014 GL_GNULIB_PTHREAD_TSS=0
25018 GL_GNULIB_PTHREAD_SPIN=0
25022 GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK=0
25028 HAVE_SCHED_YIELD=1;
25029 REPLACE_SCHED_YIELD=0;
25037 ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
25038 #include <sys/cdefs.h>
25042 if test "x$ac_cv_header_sched_h" = xyes
25044 printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
25056 if test $gl_cv_have_include_next = yes; then
25057 gl_cv_next_sched_h='<'sched.h'>'
25059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
25060 printf %s "checking absolute name of <sched.h>... " >&6; }
25061 if test ${gl_cv_next_sched_h+y}
25063 printf %s "(cached) " >&6
25068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25069 /* end confdefs.h. */
25073 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25074 *) gl_absname_cpp="$ac_cpp" ;;
25079 gl_dirsep_regex='[/\\]'
25082 gl_dirsep_regex='\/'
25085 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25086 gl_header_literal_regex=`echo 'sched.h' \
25087 | sed -e "$gl_make_literal_regex_sed"`
25088 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25089 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25095 gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25096 sed -n "$gl_absolute_header_sed"`
25098 gl_header=$gl_cv_absolute_sched_h
25099 gl_cv_next_sched_h='"'$gl_header'"'
25103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
25104 printf "%s\n" "$gl_cv_next_sched_h" >&6; }
25106 NEXT_SCHED_H=$gl_cv_next_sched_h
25108 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25109 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25110 gl_next_as_first_directive='<'sched.h'>'
25112 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25113 gl_next_as_first_directive=$gl_cv_next_sched_h
25115 NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
25121 if test "$ac_cv_header_sched_h" = yes; then
25128 if test "$HAVE_SCHED_H" = 1; then
25129 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
25130 #include <sys/cdefs.h>
25135 if test "x$ac_cv_type_struct_sched_param" = xyes
25137 HAVE_STRUCT_SCHED_PARAM=1
25139 HAVE_STRUCT_SCHED_PARAM=0
25143 HAVE_STRUCT_SCHED_PARAM=0
25146 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
25148 if test "x$ac_cv_type_struct_sched_param" = xyes
25150 HAVE_STRUCT_SCHED_PARAM=1
25155 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
25157 if test "x$ac_cv_type_struct_sched_param" = xyes
25159 HAVE_STRUCT_SCHED_PARAM=1
25167 if test "$ac_cv_header_sys_cdefs_h" = yes; then
25182 GL_GNULIB_SCHED_YIELD=0
25188 GL_GNULIB_PSELECT=0
25199 ac_fn_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25200 if test "x$ac_cv_have_decl_snprintf" = xyes
25206 printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
25214 if test $ac_cv_header_sys_ioctl_h = yes; then
25216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
25217 printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
25218 if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
25220 printf %s "(cached) " >&6
25222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25223 /* end confdefs.h. */
25224 #include <sys/ioctl.h>
25233 if ac_fn_c_try_compile "$LINENO"
25235 gl_cv_decl_ioctl_in_sys_ioctl_h=yes
25237 gl_cv_decl_ioctl_in_sys_ioctl_h=no
25239 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
25243 printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
25257 if test $gl_cv_have_include_next = yes; then
25258 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
25260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
25261 printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
25262 if test ${gl_cv_next_sys_ioctl_h+y}
25264 printf %s "(cached) " >&6
25267 if test $ac_cv_header_sys_ioctl_h = yes; then
25272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25273 /* end confdefs.h. */
25274 #include <sys/ioctl.h>
25277 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25278 *) gl_absname_cpp="$ac_cpp" ;;
25283 gl_dirsep_regex='[/\\]'
25286 gl_dirsep_regex='\/'
25289 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25290 gl_header_literal_regex=`echo 'sys/ioctl.h' \
25291 | sed -e "$gl_make_literal_regex_sed"`
25292 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25293 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25299 gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25300 sed -n "$gl_absolute_header_sed"`
25302 gl_header=$gl_cv_absolute_sys_ioctl_h
25303 gl_cv_next_sys_ioctl_h='"'$gl_header'"'
25305 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
25310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
25311 printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
25313 NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
25315 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25316 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25317 gl_next_as_first_directive='<'sys/ioctl.h'>'
25319 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25320 gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
25322 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
25347 if test $gl_cv_have_include_next = yes; then
25348 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
25350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
25351 printf %s "checking absolute name of <sys/uio.h>... " >&6; }
25352 if test ${gl_cv_next_sys_uio_h+y}
25354 printf %s "(cached) " >&6
25357 if test $ac_cv_header_sys_uio_h = yes; then
25362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25363 /* end confdefs.h. */
25364 #include <sys/uio.h>
25367 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25368 *) gl_absname_cpp="$ac_cpp" ;;
25373 gl_dirsep_regex='[/\\]'
25376 gl_dirsep_regex='\/'
25379 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25380 gl_header_literal_regex=`echo 'sys/uio.h' \
25381 | sed -e "$gl_make_literal_regex_sed"`
25382 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25383 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25389 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25390 sed -n "$gl_absolute_header_sed"`
25392 gl_header=$gl_cv_absolute_sys_uio_h
25393 gl_cv_next_sys_uio_h='"'$gl_header'"'
25395 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
25400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
25401 printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
25403 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
25405 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25406 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25407 gl_next_as_first_directive='<'sys/uio.h'>'
25409 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25410 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
25412 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
25417 if test $ac_cv_header_sys_uio_h = yes; then
25429 GL_COND_LIBTOOL_TRUE=
25430 GL_COND_LIBTOOL_FALSE='#'
25432 GL_COND_LIBTOOL_TRUE='#'
25433 GL_COND_LIBTOOL_FALSE=
25436 gl_cond_libtool=false
25452 gl_source_base='lib'
25455 if test $ac_cv_func_alloca_works = no; then
25459 # Define an additional variable used in the Makefile substitution.
25460 if test $ac_cv_working_alloca_h = yes; then
25461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
25462 printf %s "checking for alloca as a compiler built-in... " >&6; }
25463 if test ${gl_cv_rpl_alloca+y}
25465 printf %s "(cached) " >&6
25468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25469 /* end confdefs.h. */
25471 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
25476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25477 $EGREP "Need own alloca" >/dev/null 2>&1
25479 gl_cv_rpl_alloca=yes
25481 gl_cv_rpl_alloca=no
25487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
25488 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
25489 if test $gl_cv_rpl_alloca = yes; then
25491 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
25501 if test -n "$ALLOCA_H"; then
25502 GL_GENERATE_ALLOCA_H_TRUE=
25503 GL_GENERATE_ALLOCA_H_FALSE='#'
25505 GL_GENERATE_ALLOCA_H_TRUE='#'
25506 GL_GENERATE_ALLOCA_H_FALSE=
25510 if test $ac_cv_working_alloca_h = yes; then
25523 if test $ac_cv_func_btowc = no; then
25530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
25531 printf %s "checking whether btowc(0) is correct... " >&6; }
25532 if test ${gl_cv_func_btowc_nul+y}
25534 printf %s "(cached) " >&6
25537 if test "$cross_compiling" = yes
25541 # Guess no on Cygwin.
25542 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
25543 # Guess yes on native Windows.
25544 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
25545 # Guess yes otherwise.
25546 *) gl_cv_func_btowc_nul="guessing yes" ;;
25550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25551 /* end confdefs.h. */
25556 if (btowc ('\0') != 0)
25561 if ac_fn_c_try_run "$LINENO"
25563 gl_cv_func_btowc_nul=yes
25565 gl_cv_func_btowc_nul=no
25567 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25568 conftest.$ac_objext conftest.beam conftest.$ac_ext
25573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
25574 printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
25576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
25577 printf %s "checking whether btowc(EOF) is correct... " >&6; }
25578 if test ${gl_cv_func_btowc_eof+y}
25580 printf %s "(cached) " >&6
25584 # Guess no on IRIX.
25585 irix*) gl_cv_func_btowc_eof="guessing no" ;;
25586 # Guess yes on native Windows.
25587 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
25588 # Guess yes otherwise.
25589 *) gl_cv_func_btowc_eof="guessing yes" ;;
25591 if test $LOCALE_FR != none; then
25592 if test "$cross_compiling" = yes
25596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25597 /* end confdefs.h. */
25599 #include <locale.h>
25604 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
25606 if (btowc (EOF) != WEOF)
25612 if ac_fn_c_try_run "$LINENO"
25614 gl_cv_func_btowc_eof=yes
25616 gl_cv_func_btowc_eof=no
25618 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25619 conftest.$ac_objext conftest.beam conftest.$ac_ext
25625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
25626 printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
25628 case "$gl_cv_func_btowc_nul" in
25630 *) REPLACE_BTOWC=1 ;;
25632 case "$gl_cv_func_btowc_eof" in
25634 *) REPLACE_BTOWC=1 ;;
25638 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
25647 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
25668 printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
25673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
25674 printf %s "checking for __builtin_expect... " >&6; }
25675 if test ${gl_cv___builtin_expect+y}
25677 printf %s "(cached) " >&6
25679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25680 /* end confdefs.h. */
25683 main (int argc, char **argv)
25685 argc = __builtin_expect (argc, 100);
25686 return argv[argc != 100][0];
25689 if ac_fn_c_try_link "$LINENO"
25691 gl_cv___builtin_expect=yes
25693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25694 /* end confdefs.h. */
25696 #include <builtins.h>
25698 main (int argc, char **argv)
25700 argc = __builtin_expect (argc, 100);
25701 return argv[argc != 100][0];
25704 if ac_fn_c_try_link "$LINENO"
25706 gl_cv___builtin_expect="in <builtins.h>"
25708 gl_cv___builtin_expect=no
25710 rm -f core conftest.err conftest.$ac_objext conftest.beam \
25711 conftest$ac_exeext conftest.$ac_ext
25713 rm -f core conftest.err conftest.$ac_objext conftest.beam \
25714 conftest$ac_exeext conftest.$ac_ext
25716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
25717 printf "%s\n" "$gl_cv___builtin_expect" >&6; }
25718 if test "$gl_cv___builtin_expect" = yes; then
25719 printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
25721 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
25722 printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
25728 if test "$with_libsigsegv" = yes; then
25729 if test "$gl_cv_lib_sigsegv" = yes; then
25730 LIBCSTACK=$LIBSIGSEGV
25732 LTLIBCSTACK=$LTLIBSIGSEGV
25740 if test $REPLACE_CALLOC = 0; then
25742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether calloc (0, n) and calloc (n, 0) return nonnull" >&5
25743 printf %s "checking whether calloc (0, n) and calloc (n, 0) return nonnull... " >&6; }
25744 if test ${ac_cv_func_calloc_0_nonnull+y}
25746 printf %s "(cached) " >&6
25748 if test $cross_compiling != yes; then
25749 ac_cv_func_calloc_0_nonnull=yes
25750 if test "$cross_compiling" = yes
25752 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25753 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
25754 as_fn_error $? "cannot run test program while cross compiling
25755 See \`config.log' for more details" "$LINENO" 5; }
25757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25758 /* end confdefs.h. */
25759 $ac_includes_default
25764 char * volatile p = calloc (0, 0);
25774 if ac_fn_c_try_run "$LINENO"
25778 ac_cv_func_calloc_0_nonnull=no
25780 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25781 conftest.$ac_objext conftest.beam conftest.$ac_ext
25786 # Guess yes on glibc systems.
25787 *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
25788 # Guess yes on musl systems.
25789 *-musl*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
25790 # Guess yes on native Windows.
25791 mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
25792 # If we don't know, obey --enable-cross-guesses.
25793 *) ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
25798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
25799 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
25800 case $ac_cv_func_calloc_0_nonnull in #(
25804 REPLACE_CALLOC=1 ;;
25809 if test $REPLACE_CALLOC = 1; then
25818 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
25824 if test $REPLACE_MALLOC = 1; then
25828 if test $REPLACE_CALLOC = 1; then
25837 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
25849 GL_GNULIB_CALLOC_POSIX=1
25855 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
25864 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
25865 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
25867 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
25868 # programs in the package would end up linked with that potentially-shared
25869 # library, inducing unnecessary run-time overhead.
25872 gl_saved_libs=$LIBS
25873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
25874 printf %s "checking for library containing clock_gettime... " >&6; }
25875 if test ${ac_cv_search_clock_gettime+y}
25877 printf %s "(cached) " >&6
25879 ac_func_search_save_LIBS=$LIBS
25880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25881 /* end confdefs.h. */
25883 /* Override any GCC internal prototype to avoid an error.
25884 Use char because int might match the return type of a GCC
25885 builtin and then its argument prototype would still apply. */
25886 char clock_gettime ();
25890 return clock_gettime ();
25895 for ac_lib in '' rt posix4
25897 if test -z "$ac_lib"; then
25898 ac_res="none required"
25901 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25903 if ac_fn_c_try_link "$LINENO"
25905 ac_cv_search_clock_gettime=$ac_res
25907 rm -f core conftest.err conftest.$ac_objext conftest.beam \
25909 if test ${ac_cv_search_clock_gettime+y}
25914 if test ${ac_cv_search_clock_gettime+y}
25918 ac_cv_search_clock_gettime=no
25920 rm conftest.$ac_ext
25921 LIBS=$ac_func_search_save_LIBS
25923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
25924 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
25925 ac_res=$ac_cv_search_clock_gettime
25926 if test "$ac_res" != no
25928 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25929 test "$ac_cv_search_clock_gettime" = "none required" ||
25930 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
25933 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
25934 if test "x$ac_cv_func_clock_gettime" = xyes
25936 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
25939 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
25940 if test "x$ac_cv_func_clock_settime" = xyes
25942 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
25946 LIBS=$gl_saved_libs
25950 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
25957 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25966 if test $ac_cv_header_sys_socket_h != yes; then
25967 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
25968 if test "x$ac_cv_header_winsock2_h" = xyes
25970 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
25975 if test "$ac_cv_header_winsock2_h" = yes; then
25977 UNISTD_H_HAVE_WINSOCK2_H=1
25978 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
25984 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
25990 if test $REPLACE_CLOSE = 1; then
25999 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
26017 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
26030 printf "%s\n" "#define GNULIB_DIRNAME 1" >>confdefs.h
26035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
26036 printf %s "checking whether // is distinct from /... " >&6; }
26037 if test ${gl_cv_double_slash_root+y}
26039 printf %s "(cached) " >&6
26041 if test x"$cross_compiling" = xyes ; then
26042 # When cross-compiling, there is no way to tell whether // is special
26043 # short of a list of hosts. However, the only known hosts to date
26044 # that have a distinct // are Apollo DomainOS (too old to port to),
26045 # Cygwin, and z/OS. If anyone knows of another system for which // has
26046 # special semantics and is distinct from /, please report it to
26047 # <bug-gnulib@gnu.org>.
26049 *-cygwin | i370-ibm-openedition)
26050 gl_cv_double_slash_root=yes ;;
26052 # Be optimistic and assume that / and // are the same when we
26054 gl_cv_double_slash_root='unknown, assuming no' ;;
26057 set x `ls -di / // 2>/dev/null`
26058 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
26059 gl_cv_double_slash_root=no
26061 gl_cv_double_slash_root=yes
26065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
26066 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
26067 if test "$gl_cv_double_slash_root" = yes; then
26069 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
26076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
26077 printf %s "checking whether dup2 works... " >&6; }
26078 if test ${gl_cv_func_dup2_works+y}
26080 printf %s "(cached) " >&6
26082 if test "$cross_compiling" = yes
26085 mingw*) # on this platform, dup2 always returns 0 for success
26086 gl_cv_func_dup2_works="guessing no" ;;
26087 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
26088 gl_cv_func_dup2_works="guessing no" ;;
26090 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
26092 gl_cv_func_dup2_works="guessing no" ;;
26093 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
26094 gl_cv_func_dup2_works="guessing no" ;;
26095 *-android*) # implemented using dup3(), which fails if oldfd == newfd
26096 gl_cv_func_dup2_works="guessing no" ;;
26097 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
26098 gl_cv_func_dup2_works="guessing no" ;;
26099 *) gl_cv_func_dup2_works="guessing yes" ;;
26102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26103 /* end confdefs.h. */
26107 #include <limits.h>
26108 #include <sys/resource.h>
26109 #include <unistd.h>
26114 #ifndef RLIM_SAVED_CUR
26115 # define RLIM_SAVED_CUR RLIM_INFINITY
26117 #ifndef RLIM_SAVED_MAX
26118 # define RLIM_SAVED_MAX RLIM_INFINITY
26125 int bad_fd = INT_MAX;
26126 struct rlimit rlim;
26127 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
26128 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
26129 && rlim.rlim_cur != RLIM_INFINITY
26130 && rlim.rlim_cur != RLIM_SAVED_MAX
26131 && rlim.rlim_cur != RLIM_SAVED_CUR)
26132 bad_fd = rlim.rlim_cur;
26134 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
26137 if (dup2 (1, 1) != 1)
26140 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
26144 if (dup2 (0, 0) != -1)
26146 /* Many gnulib modules require POSIX conformance of EBADF. */
26147 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
26149 /* Flush out some cygwin core dumps. */
26150 if (dup2 (2, -1) != -1 || errno != EBADF)
26154 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
26156 int fd = open (".", O_RDONLY);
26159 else if (dup2 (fd, fd + 1) == -1)
26169 if ac_fn_c_try_run "$LINENO"
26171 gl_cv_func_dup2_works=yes
26173 gl_cv_func_dup2_works=no
26175 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26176 conftest.$ac_objext conftest.beam conftest.$ac_ext
26181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
26182 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
26183 case "$gl_cv_func_dup2_works" in
26187 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
26188 if test "x$ac_cv_func_setdtablesize" = xyes
26190 printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
26198 if test $REPLACE_DUP2 = 1; then
26207 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
26226 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
26241 GL_GNULIB_ENVIRON=1
26247 printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
26253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
26254 printf %s "checking for error_at_line... " >&6; }
26255 if test ${ac_cv_lib_error_at_line+y}
26257 printf %s "(cached) " >&6
26259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26260 /* end confdefs.h. */
26265 error_at_line (0, 0, "", 0, "an error occurred");
26270 if ac_fn_c_try_link "$LINENO"
26272 ac_cv_lib_error_at_line=yes
26274 ac_cv_lib_error_at_line=no
26276 rm -f core conftest.err conftest.$ac_objext conftest.beam \
26277 conftest$ac_exeext conftest.$ac_ext
26279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
26280 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
26282 if test $ac_cv_lib_error_at_line = no; then
26291 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
26300 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
26304 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
26312 if test $ac_cv_func_fcntl = no; then
26316 if test $ac_cv_func_fcntl = no; then
26323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
26324 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
26325 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
26327 printf %s "(cached) " >&6
26329 if test "$cross_compiling" = yes
26332 aix* | cygwin* | haiku*)
26333 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
26334 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
26337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26338 /* end confdefs.h. */
26341 #include <limits.h>
26342 #include <sys/resource.h>
26343 #include <unistd.h>
26348 #ifndef RLIM_SAVED_CUR
26349 # define RLIM_SAVED_CUR RLIM_INFINITY
26351 #ifndef RLIM_SAVED_MAX
26352 # define RLIM_SAVED_MAX RLIM_INFINITY
26359 int bad_fd = INT_MAX;
26360 struct rlimit rlim;
26361 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
26362 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
26363 && rlim.rlim_cur != RLIM_INFINITY
26364 && rlim.rlim_cur != RLIM_SAVED_MAX
26365 && rlim.rlim_cur != RLIM_SAVED_CUR)
26366 bad_fd = rlim.rlim_cur;
26367 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
26368 if (errno != EINVAL) result |= 2;
26369 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
26370 if (errno != EINVAL) result |= 8;
26371 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
26374 fd = open (".", O_RDONLY);
26377 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
26387 if ac_fn_c_try_run "$LINENO"
26389 gl_cv_func_fcntl_f_dupfd_works=yes
26391 gl_cv_func_fcntl_f_dupfd_works=no
26393 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26394 conftest.$ac_objext conftest.beam conftest.$ac_ext
26398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
26399 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
26400 case $gl_cv_func_fcntl_f_dupfd_works in
26405 if test $ac_cv_func_fcntl = no; then
26412 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
26416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
26417 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
26418 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
26420 printf %s "(cached) " >&6
26422 if test "$cross_compiling" = yes
26425 # Guess no on NetBSD.
26426 netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
26427 *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
26431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26432 /* end confdefs.h. */
26434 #include <unistd.h>
26435 int main (int argc, char *argv[])
26438 /* parent process */
26440 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
26442 return execl ("./conftest", "./conftest", "child", NULL);
26445 /* child process */
26446 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
26451 if ac_fn_c_try_run "$LINENO"
26453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26454 /* end confdefs.h. */
26457 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
26458 it to support the semantics on older kernels that failed with EINVAL. */
26470 if ac_fn_c_try_compile "$LINENO"
26472 gl_cv_func_fcntl_f_dupfd_cloexec=yes
26474 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
26476 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26479 gl_cv_func_fcntl_f_dupfd_cloexec=no
26481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26482 conftest.$ac_objext conftest.beam conftest.$ac_ext
26487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
26488 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
26489 case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
26494 if test $ac_cv_func_fcntl = no; then
26505 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
26514 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
26532 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
26547 printf "%s\n" "#define GNULIB_FILENAMECAT 1" >>confdefs.h
26554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
26555 printf %s "checking for flexible array member... " >&6; }
26556 if test ${ac_cv_c_flexmember+y}
26558 printf %s "(cached) " >&6
26560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26561 /* end confdefs.h. */
26562 #include <stdlib.h>
26564 #include <stddef.h>
26565 struct m { struct m *next, **list; char name[]; };
26566 struct s { struct s *p; struct m *m; int n; double d[]; };
26570 int m = getchar ();
26571 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
26572 nbytes += sizeof (struct s) - 1;
26573 nbytes -= nbytes % sizeof (struct s);
26574 struct s *p = malloc (nbytes);
26578 return p->d != (double *) NULL;
26583 if ac_fn_c_try_compile "$LINENO"
26585 ac_cv_c_flexmember=yes
26587 ac_cv_c_flexmember=no
26589 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
26592 printf "%s\n" "$ac_cv_c_flexmember" >&6; }
26593 if test $ac_cv_c_flexmember = yes; then
26595 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
26598 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
26606 REPLACE_FLOAT_LDBL=0
26608 aix* | beos* | openbsd* | mirbsd* | irix*)
26611 freebsd* | dragonfly*)
26612 case "$host_cpu" in
26617 # On x86_64 systems, the C compiler may still be generating
26619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26620 /* end confdefs.h. */
26621 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
26628 if ac_fn_c_try_compile "$LINENO"
26634 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26639 case "$host_cpu" in
26647 aix* | freebsd* | dragonfly* | linux*)
26648 if test -n "$FLOAT_H"; then
26649 REPLACE_FLOAT_LDBL=1
26655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
26656 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
26657 if test ${gl_cv_func_itold_works+y}
26659 printf %s "(cached) " >&6
26662 if test "$cross_compiling" = yes
26666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26667 /* end confdefs.h. */
26668 #if defined __LP64__ || defined __arch64__
26675 if ac_fn_c_try_compile "$LINENO"
26677 gl_cv_func_itold_works="guessing no"
26679 gl_cv_func_itold_works="guessing yes"
26681 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26683 # Guess yes on native Windows.
26684 mingw*) gl_cv_func_itold_works="guessing yes" ;;
26685 *) gl_cv_func_itold_works="guessing yes" ;;
26689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26690 /* end confdefs.h. */
26693 volatile long double ld;
26702 if ac_fn_c_try_run "$LINENO"
26704 gl_cv_func_itold_works=yes
26706 gl_cv_func_itold_works=no
26708 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26709 conftest.$ac_objext conftest.beam conftest.$ac_ext
26714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
26715 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
26716 case "$gl_cv_func_itold_works" in
26723 if test -n "$FLOAT_H"; then
26732 if test $gl_cv_have_include_next = yes; then
26733 gl_cv_next_float_h='<'float.h'>'
26735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
26736 printf %s "checking absolute name of <float.h>... " >&6; }
26737 if test ${gl_cv_next_float_h+y}
26739 printf %s "(cached) " >&6
26744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26745 /* end confdefs.h. */
26749 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26750 *) gl_absname_cpp="$ac_cpp" ;;
26755 gl_dirsep_regex='[/\\]'
26758 gl_dirsep_regex='\/'
26761 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26762 gl_header_literal_regex=`echo 'float.h' \
26763 | sed -e "$gl_make_literal_regex_sed"`
26764 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26765 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26771 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26772 sed -n "$gl_absolute_header_sed"`
26774 gl_header=$gl_cv_absolute_float_h
26775 gl_cv_next_float_h='"'$gl_header'"'
26779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
26780 printf "%s\n" "$gl_cv_next_float_h" >&6; }
26782 NEXT_FLOAT_H=$gl_cv_next_float_h
26784 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26785 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26786 gl_next_as_first_directive='<'float.h'>'
26788 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26789 gl_next_as_first_directive=$gl_cv_next_float_h
26791 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
26798 if test -n "$FLOAT_H"; then
26799 GL_GENERATE_FLOAT_H_TRUE=
26800 GL_GENERATE_FLOAT_H_FALSE='#'
26802 GL_GENERATE_FLOAT_H_TRUE='#'
26803 GL_GENERATE_FLOAT_H_FALSE=
26808 if test $REPLACE_FLOAT_LDBL = 1; then
26817 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
26820 if test $REPLACE_ITOLD = 1; then
26829 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
26836 gl_fnmatch_required_lowercase=`
26837 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
26840 if test $ac_cv_func_fnmatch = no; then
26843 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
26844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
26845 printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; }
26846 if eval test \${$gl_fnmatch_cache_var+y}
26848 printf %s "(cached) " >&6
26850 if test $gl_fnmatch_required = GNU; then
26851 gl_fnmatch_gnu_start=
26852 gl_fnmatch_gnu_end=
26854 gl_fnmatch_gnu_start='#if 0'
26855 gl_fnmatch_gnu_end='#endif'
26857 if test "$cross_compiling" = yes
26860 # Guess yes on musl systems.
26861 *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
26862 # Guess no otherwise, even on glibc systems.
26863 *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
26867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26868 /* end confdefs.h. */
26869 #include <fnmatch.h>
26871 y (char const *pattern, char const *string, int flags)
26873 return fnmatch (pattern, string, flags) == 0;
26876 n (char const *pattern, char const *string, int flags)
26878 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
26884 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
26885 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
26886 static char const A_1[] = { 'A' - 1, 0 };
26887 static char const A01[] = { 'A' + 1, 0 };
26888 static char const a_1[] = { 'a' - 1, 0 };
26889 static char const a01[] = { 'a' + 1, 0 };
26890 static char const bs_1[] = { '\\\\' - 1, 0 };
26891 static char const bs01[] = { '\\\\' + 1, 0 };
26893 if (!n ("a*", "", 0))
26895 if (!y ("a*", "abc", 0))
26897 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
26899 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
26901 if (!y ("a\\\\bc", "abc", 0))
26903 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
26905 if (!y ("*x", ".x", 0))
26907 if (!n ("*x", ".x", FNM_PERIOD))
26909 if (!y (Apat, "\\\\", 0))
26911 if (!y (Apat, "A", 0))
26913 if (!y (apat, "\\\\", 0))
26915 if (!y (apat, "a", 0))
26917 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
26919 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
26921 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
26923 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
26925 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
26927 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
26929 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
26931 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
26933 $gl_fnmatch_gnu_start
26934 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
26936 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
26938 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
26940 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
26942 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
26944 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
26946 $gl_fnmatch_gnu_end
26953 if ac_fn_c_try_run "$LINENO"
26955 eval "$gl_fnmatch_cache_var=yes"
26957 eval "$gl_fnmatch_cache_var=no"
26959 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26960 conftest.$ac_objext conftest.beam conftest.$ac_ext
26965 eval ac_res=\$$gl_fnmatch_cache_var
26966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26967 printf "%s\n" "$ac_res" >&6; }
26968 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
26969 case "$gl_fnmatch_result" in
26971 *) REPLACE_FNMATCH=1 ;;
26974 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
26981 FNMATCH_H='fnmatch.h'
26982 if test -n "$FNMATCH_H"; then
26983 GL_GENERATE_FNMATCH_H_TRUE=
26984 GL_GENERATE_FNMATCH_H_FALSE='#'
26986 GL_GENERATE_FNMATCH_H_TRUE='#'
26987 GL_GENERATE_FNMATCH_H_FALSE=
26993 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
27002 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
27018 GL_GNULIB_FNMATCH=1
27024 printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
27033 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
27042 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
27051 printf "%s\n" "#define GNULIB_FNMATCH_GNU 1" >>confdefs.h
27066 gl_cv_func_fopen_slash="guessing no"
27069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
27070 printf %s "checking whether fopen recognizes a trailing slash... " >&6; }
27071 if test ${gl_cv_func_fopen_slash+y}
27073 printf %s "(cached) " >&6
27076 if test "$cross_compiling" = yes
27080 aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
27081 gl_cv_func_fopen_slash="guessing no" ;;
27083 gl_cv_func_fopen_slash="guessing yes" ;;
27087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27088 /* end confdefs.h. */
27090 #include <stddef.h>
27094 FILE *fp = fopen ("conftest.sl/", "w");
27095 int result = (fp != NULL);
27101 if ac_fn_c_try_run "$LINENO"
27103 gl_cv_func_fopen_slash=yes
27105 gl_cv_func_fopen_slash=no
27107 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27108 conftest.$ac_objext conftest.beam conftest.$ac_ext
27114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
27115 printf "%s\n" "$gl_cv_func_fopen_slash" >&6; }
27118 case "$gl_cv_func_fopen_slash" in
27121 printf "%s\n" "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
27127 if test $REPLACE_FOPEN = 1; then
27136 gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
27155 printf "%s\n" "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
27161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'x'" >&5
27162 printf %s "checking whether fopen supports the mode character 'x'... " >&6; }
27163 if test ${gl_cv_func_fopen_mode_x+y}
27165 printf %s "(cached) " >&6
27168 if test "$cross_compiling" = yes
27171 # Guess yes on glibc and musl systems.
27172 linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
27173 gl_cv_func_fopen_mode_x="guessing yes" ;;
27174 # If we don't know, obey --enable-cross-guesses.
27176 gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
27180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27181 /* end confdefs.h. */
27188 fp = fopen ("conftest.x", "w");
27190 fp = fopen ("conftest.x", "wx");
27194 else if (errno == EEXIST)
27201 if ac_fn_c_try_run "$LINENO"
27203 gl_cv_func_fopen_mode_x=yes
27205 gl_cv_func_fopen_mode_x=no
27207 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27208 conftest.$ac_objext conftest.beam conftest.$ac_ext
27214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_x" >&5
27215 printf "%s\n" "$gl_cv_func_fopen_mode_x" >&6; }
27216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'e'" >&5
27217 printf %s "checking whether fopen supports the mode character 'e'... " >&6; }
27218 if test ${gl_cv_func_fopen_mode_e+y}
27220 printf %s "(cached) " >&6
27222 echo foo > conftest.x
27223 if test "$cross_compiling" = yes
27226 # Guess yes on glibc and musl systems.
27227 linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
27228 gl_cv_func_fopen_mode_e="guessing yes" ;;
27229 # Guess no on native Windows.
27231 gl_cv_func_fopen_mode_e="guessing no" ;;
27232 # If we don't know, obey --enable-cross-guesses.
27234 gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
27238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27239 /* end confdefs.h. */
27250 FILE *fp = fopen ("conftest.x", "re");
27253 if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
27264 if ac_fn_c_try_run "$LINENO"
27266 gl_cv_func_fopen_mode_e=yes
27268 gl_cv_func_fopen_mode_e=no
27270 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27271 conftest.$ac_objext conftest.beam conftest.$ac_ext
27277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_e" >&5
27278 printf "%s\n" "$gl_cv_func_fopen_mode_e" >&6; }
27279 case "$gl_cv_func_fopen_mode_x" in
27280 *no) REPLACE_FOPEN=1 ;;
27282 case "$gl_cv_func_fopen_mode_e" in
27283 *no) REPLACE_FOPEN=1 ;;
27286 if test $REPLACE_FOPEN = 1; then
27295 gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
27301 printf "%s\n" "#define GNULIB_FOPEN_GNU 1" >>confdefs.h
27307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
27308 printf %s "checking whether free is known to preserve errno... " >&6; }
27309 if test ${gl_cv_func_free_preserves_errno+y}
27311 printf %s "(cached) " >&6
27313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27314 /* end confdefs.h. */
27315 #include <stdlib.h>
27320 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
27321 #elif defined __OpenBSD__
27322 #elif defined __sun
27324 #error "'free' is not known to preserve errno"
27331 if ac_fn_c_try_compile "$LINENO"
27333 gl_cv_func_free_preserves_errno=yes
27335 gl_cv_func_free_preserves_errno=no
27337 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
27341 printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; }
27343 case $gl_cv_func_free_preserves_errno in
27346 printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h
27349 *) REPLACE_FREE=1 ;;
27352 if test $REPLACE_FREE = 1; then
27361 gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
27374 GL_GNULIB_FREE_POSIX=1
27380 printf "%s\n" "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
27388 mingw* | pw* | os2*)
27392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether freopen works on closed fds" >&5
27393 printf %s "checking whether freopen works on closed fds... " >&6; }
27394 if test ${gl_cv_func_freopen_works_on_closed+y}
27396 printf %s "(cached) " >&6
27398 if test "$cross_compiling" = yes
27401 *gnu*) gl_cv_func_freopen_works_on_closed="guessing no" ;;
27402 *) gl_cv_func_freopen_works_on_closed="guessing yes";;
27405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27406 /* end confdefs.h. */
27408 #include <unistd.h>
27417 return !(freopen ("/dev/null", "r", stdin)
27418 && getchar () == EOF
27419 && !ferror (stdin) && feof (stdin));
27424 if ac_fn_c_try_run "$LINENO"
27426 gl_cv_func_freopen_works_on_closed=yes
27428 gl_cv_func_freopen_works_on_closed=no
27430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27431 conftest.$ac_objext conftest.beam conftest.$ac_ext
27435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_freopen_works_on_closed" >&5
27436 printf "%s\n" "$gl_cv_func_freopen_works_on_closed" >&6; }
27437 case $gl_cv_func_freopen_works_on_closed in
27438 *no) REPLACE_FREOPEN=1;;
27442 if test $REPLACE_FREOPEN = 1; then
27451 gl_LIBOBJS="$gl_LIBOBJS freopen.$ac_objext"
27464 GL_GNULIB_FREOPEN=1
27470 printf "%s\n" "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h
27486 if test $REPLACE_FSTAT = 1; then
27495 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
27507 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
27532 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
27541 if test $ac_cv_func_getdtablesize = yes &&
27542 test $ac_cv_have_decl_getdtablesize = yes; then
27543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
27544 printf %s "checking whether getdtablesize works... " >&6; }
27545 if test ${gl_cv_func_getdtablesize_works+y}
27547 printf %s "(cached) " >&6
27550 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
27552 if test "$cross_compiling" = yes
27555 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
27556 gl_cv_func_getdtablesize_works="guessing no" ;;
27557 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
27561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27562 /* end confdefs.h. */
27564 #include <unistd.h>
27573 int size = getdtablesize();
27574 if (dup2 (0, getdtablesize()) != -1)
27576 if (size != getdtablesize())
27583 if ac_fn_c_try_run "$LINENO"
27585 gl_cv_func_getdtablesize_works=yes
27587 gl_cv_func_getdtablesize_works=no
27589 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27590 conftest.$ac_objext conftest.beam conftest.$ac_ext
27597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
27598 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
27599 case "$gl_cv_func_getdtablesize_works" in
27600 *yes | "no (limitation)") ;;
27601 *) REPLACE_GETDTABLESIZE=1 ;;
27604 HAVE_GETDTABLESIZE=0
27607 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
27616 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
27629 GL_GNULIB_GETDTABLESIZE=1
27635 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
27649 if test -n "$gl_replace_getopt"; then
27653 if test $REPLACE_GETOPT = 1; then
27656 if test $ac_cv_header_sys_cdefs_h = yes; then
27664 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
27667 GETOPT_CDEFS_H=getopt-cdefs.h
27673 if test $REPLACE_GETOPT = 1; then
27682 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
27692 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
27700 GL_GNULIB_UNISTD_H_GETOPT=1
27713 GL_GNULIB_GETOPT_POSIX=1
27719 printf "%s\n" "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h
27727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
27728 printf %s "checking for getpagesize... " >&6; }
27729 if test ${gl_cv_func_getpagesize+y}
27731 printf %s "(cached) " >&6
27733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27734 /* end confdefs.h. */
27735 #include <unistd.h>
27739 return getpagesize();
27745 if ac_fn_c_try_link "$LINENO"
27747 gl_cv_func_getpagesize=yes
27749 gl_cv_func_getpagesize=no
27751 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27752 conftest$ac_exeext conftest.$ac_ext
27755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
27756 printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
27758 if test $gl_cv_func_getpagesize = no; then
27760 ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
27761 if test "x$ac_cv_header_OS_h" = xyes
27763 printf "%s\n" "#define HAVE_OS_H 1" >>confdefs.h
27767 if test $ac_cv_header_OS_h = yes; then
27770 ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
27771 if test "x$ac_cv_header_sys_param_h" = xyes
27773 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
27777 if test $ac_cv_header_sys_param_h = yes; then
27783 REPLACE_GETPAGESIZE=1
27786 ac_fn_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27787 if test "x$ac_cv_have_decl_getpagesize" = xyes
27791 HAVE_DECL_GETPAGESIZE=0
27794 if test $REPLACE_GETPAGESIZE = 1; then
27803 gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext"
27815 GL_GNULIB_GETPAGESIZE=1
27821 printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
27829 ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
27830 " "$ac_c_undeclared_builtin_options" "CFLAGS"
27831 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
27837 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
27838 if test $ac_have_decl = 1
27843 ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
27844 " "$ac_c_undeclared_builtin_options" "CFLAGS"
27845 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
27851 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
27852 if test $ac_have_decl = 1
27857 ac_fn_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
27858 " "$ac_c_undeclared_builtin_options" "CFLAGS"
27859 if test "x$ac_cv_have_decl___argv" = xyes
27865 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
27866 if test $ac_have_decl = 1
27872 # Incur the cost of this test only if none of the above worked.
27873 if test $ac_found = 0; then
27874 # On OpenBSD 5.1, using the global __progname variable appears to be
27875 # the only way to implement getprogname.
27876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
27877 printf %s "checking whether __progname is defined in default libraries... " >&6; }
27878 if test ${gl_cv_var___progname+y}
27880 printf %s "(cached) " >&6
27883 gl_cv_var___progname=
27884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27885 /* end confdefs.h. */
27886 extern char *__progname;
27890 return *__progname;
27896 if ac_fn_c_try_link "$LINENO"
27898 gl_cv_var___progname=yes
27901 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27902 conftest$ac_exeext conftest.$ac_ext
27906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
27907 printf "%s\n" "$gl_cv_var___progname" >&6; }
27908 if test "$gl_cv_var___progname" = yes; then
27910 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
27919 if test "$ac_cv_func_getrandom" != yes; then
27922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
27923 printf %s "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
27924 if test ${gl_cv_func_getrandom_ok+y}
27926 printf %s "(cached) " >&6
27928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27929 /* end confdefs.h. */
27930 /* Additional includes are needed before <sys/random.h> on uClibc
27932 #include <sys/types.h>
27933 #include <stdlib.h>
27934 #include <sys/random.h>
27935 ssize_t getrandom (void *, size_t, unsigned int);
27946 if ac_fn_c_try_compile "$LINENO"
27948 gl_cv_func_getrandom_ok=yes
27950 gl_cv_func_getrandom_ok=no
27952 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
27956 printf "%s\n" "$gl_cv_func_getrandom_ok" >&6; }
27957 if test $gl_cv_func_getrandom_ok = no; then
27958 REPLACE_GETRANDOM=1
27964 ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
27967 if test "x$ac_cv_header_bcrypt_h" = xyes
27969 printf "%s\n" "#define HAVE_BCRYPT_H 1" >>confdefs.h
27973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
27974 printf %s "checking whether the bcrypt library is guaranteed to be present... " >&6; }
27975 if test ${gl_cv_lib_assume_bcrypt+y}
27977 printf %s "(cached) " >&6
27979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27980 /* end confdefs.h. */
27981 #include <windows.h>
27985 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
27994 if ac_fn_c_try_compile "$LINENO"
27996 gl_cv_lib_assume_bcrypt=yes
27998 gl_cv_lib_assume_bcrypt=no
28000 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
28004 printf "%s\n" "$gl_cv_lib_assume_bcrypt" >&6; }
28005 if test $gl_cv_lib_assume_bcrypt = yes; then
28007 printf "%s\n" "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
28009 LIB_GETRANDOM='-lbcrypt'
28011 LIB_GETRANDOM='-ladvapi32'
28019 if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
28028 gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
28040 GL_GNULIB_GETRANDOM=1
28046 printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
28064 gl_gettimeofday_timezone=void
28065 if test $ac_cv_func_gettimeofday != yes; then
28066 HAVE_GETTIMEOFDAY=0
28068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
28069 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
28070 if test ${gl_cv_func_gettimeofday_posix_signature+y}
28072 printf %s "(cached) " >&6
28074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28075 /* end confdefs.h. */
28076 #include <sys/time.h>
28078 int gettimeofday (struct timeval *restrict, void *restrict);
28083 /* glibc uses struct timezone * rather than the POSIX void *
28084 if _GNU_SOURCE is defined. However, since the only portable
28085 use of gettimeofday uses NULL as the second parameter, and
28086 since the glibc definition is actually more typesafe, it is
28087 not worth wrapping this to get a compliant signature. */
28088 int (*f) (struct timeval *restrict, void *restrict)
28091 return !(x | c.tv_sec | c.tv_usec);
28097 if ac_fn_c_try_compile "$LINENO"
28099 gl_cv_func_gettimeofday_posix_signature=yes
28101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28102 /* end confdefs.h. */
28103 #include <sys/time.h>
28104 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
28114 if ac_fn_c_try_compile "$LINENO"
28116 gl_cv_func_gettimeofday_posix_signature=almost
28118 gl_cv_func_gettimeofday_posix_signature=no
28120 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28122 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28124 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
28125 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
28126 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
28127 gl_gettimeofday_timezone='struct timezone'
28128 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
28129 REPLACE_GETTIMEOFDAY=1
28131 if test $REPLACE_STRUCT_TIMEVAL = 1; then
28132 REPLACE_GETTIMEOFDAY=1
28135 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
28139 printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
28142 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
28151 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
28164 GL_GNULIB_GETTIMEOFDAY=1
28170 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
28175 if LC_ALL=C ${MAKE-make} --version 2>/dev/null | sed -e '2,$d' | grep GNU >/dev/null; then
28184 # Autoconf 2.61a.99 and earlier don't support linking a file only
28185 # in VPATH builds. But since GNUmakefile is for maintainer use
28186 # only, it does not matter if we skip the link with older autoconf.
28187 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
28188 # builds, so use a shell variable to bypass this.
28189 GNUmakefile=GNUmakefile
28190 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
28193 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
28222 if test "$am_cv_func_iconv" = yes; then
28230 if test -n "$ICONV_H"; then
28231 GL_GENERATE_ICONV_H_TRUE=
28232 GL_GENERATE_ICONV_H_FALSE='#'
28234 GL_GENERATE_ICONV_H_TRUE='#'
28235 GL_GENERATE_ICONV_H_FALSE=
28239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28240 /* end confdefs.h. */
28243 #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
28248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28249 $EGREP "gnu_iconv" >/dev/null 2>&1
28251 gl_func_iconv_gnu=yes
28253 gl_func_iconv_gnu=no
28257 if test $gl_func_iconv_gnu = no; then
28260 aix*) iconv_flavor=ICONV_FLAVOR_AIX ;;
28261 irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
28262 hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
28263 osf*) iconv_flavor=ICONV_FLAVOR_OSF ;;
28264 solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
28265 openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;;
28267 if test -n "$iconv_flavor"; then
28269 printf "%s\n" "#define ICONV_FLAVOR $iconv_flavor" >>confdefs.h
28279 if test -n "$ICONV_H"; then
28280 GL_GENERATE_ICONV_H_TRUE=
28281 GL_GENERATE_ICONV_H_FALSE='#'
28283 GL_GENERATE_ICONV_H_TRUE='#'
28284 GL_GENERATE_ICONV_H_FALSE=
28288 REPLACE_ICONV_OPEN=1
28295 if test $REPLACE_ICONV_OPEN = 1; then
28304 gl_LIBOBJS="$gl_LIBOBJS iconv_open.$ac_objext"
28307 if test $REPLACE_ICONV = 1; then
28316 gl_LIBOBJS="$gl_LIBOBJS iconv.$ac_objext"
28326 gl_LIBOBJS="$gl_LIBOBJS iconv_close.$ac_objext"
28331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
28332 printf %s "checking whether the compiler generally respects inline... " >&6; }
28333 if test ${gl_cv_c_inline_effective+y}
28335 printf %s "(cached) " >&6
28337 if test $ac_cv_c_inline = no; then
28338 gl_cv_c_inline_effective=no
28340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28341 /* end confdefs.h. */
28346 #ifdef __NO_INLINE__
28347 #error "inline is not effective"
28353 if ac_fn_c_try_compile "$LINENO"
28355 gl_cv_c_inline_effective=yes
28357 gl_cv_c_inline_effective=no
28359 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
28364 printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
28365 if test $gl_cv_c_inline_effective = yes; then
28367 printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
28393 if test $ac_cv_func_isblank = no; then
28397 if test $HAVE_ISBLANK = 0; then
28406 gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
28411 printf "%s\n" "#define GNULIB_ISBLANK 1" >>confdefs.h
28423 GL_GNULIB_ISBLANK=1
28433 ac_fn_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
28435 #include <wctype.h>
28437 " "$ac_c_undeclared_builtin_options" "CFLAGS"
28438 if test "x$ac_cv_have_decl_iswblank" = xyes
28444 printf "%s\n" "#define HAVE_DECL_ISWBLANK $ac_have_decl" >>confdefs.h
28446 if test $ac_cv_func_iswblank = no; then
28448 if test $ac_cv_have_decl_iswblank = yes; then
28452 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28455 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
28461 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28464 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
28473 gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
28486 GL_GNULIB_ISWBLANK=1
28492 printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
28504 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28505 REPLACE_ISWDIGIT="$REPLACE_ISWCNTRL"
28507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswdigit is ISO C compliant" >&5
28508 printf %s "checking whether iswdigit is ISO C compliant... " >&6; }
28509 if test ${gl_cv_func_iswdigit_works+y}
28511 printf %s "(cached) " >&6
28515 # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
28516 freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
28517 gl_cv_func_iswdigit_works="guessing no" ;;
28518 # Guess yes otherwise.
28519 *) gl_cv_func_iswdigit_works="guessing yes" ;;
28521 if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
28522 if test "$cross_compiling" = yes
28526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28527 /* end confdefs.h. */
28529 #include <locale.h>
28530 #include <stdlib.h>
28531 #include <string.h>
28533 #include <wctype.h>
28535 /* Returns the value of iswdigit for the multibyte character s[0..n-1]. */
28537 for_character (const char *s, size_t n)
28543 memset (&state, '\0', sizeof (mbstate_t));
28544 wc = (wchar_t) 0xBADFACE;
28545 ret = mbrtowc (&wc, s, n, &state);
28549 return iswdigit (wc);
28553 main (int argc, char *argv[])
28558 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
28560 /* This fails on mingw, MSVC 14. */
28561 /* U+00B2 SUPERSCRIPT TWO */
28562 is = for_character ("\262", 1);
28566 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28568 /* This fails on NetBSD 8.0. */
28569 /* U+FF11 FULLWIDTH DIGIT ONE */
28570 is = for_character ("\243\261", 2);
28574 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28576 /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14. */
28577 /* U+0663 ARABIC-INDIC DIGIT THREE */
28578 is = for_character ("\331\243", 2);
28581 /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14. */
28582 /* U+FF11 FULLWIDTH DIGIT ONE */
28583 is = for_character ("\357\274\221", 3);
28587 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28589 /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4. */
28590 /* U+FF11 FULLWIDTH DIGIT ONE */
28591 is = for_character ("\243\261", 2);
28598 if ac_fn_c_try_run "$LINENO"
28600 gl_cv_func_iswdigit_works=yes
28602 gl_cv_func_iswdigit_works=no
28604 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28605 conftest.$ac_objext conftest.beam conftest.$ac_ext
28611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswdigit_works" >&5
28612 printf "%s\n" "$gl_cv_func_iswdigit_works" >&6; }
28613 case "$gl_cv_func_iswdigit_works" in
28615 *) REPLACE_ISWDIGIT=1 ;;
28619 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28622 if test $REPLACE_ISWDIGIT = 1; then
28631 gl_LIBOBJS="$gl_LIBOBJS iswdigit.$ac_objext"
28644 GL_GNULIB_ISWDIGIT=1
28650 printf "%s\n" "#define GNULIB_TEST_ISWDIGIT 1" >>confdefs.h
28661 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28662 REPLACE_ISWXDIGIT="$REPLACE_ISWCNTRL"
28664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswxdigit is ISO C compliant" >&5
28665 printf %s "checking whether iswxdigit is ISO C compliant... " >&6; }
28666 if test ${gl_cv_func_iswxdigit_works+y}
28668 printf %s "(cached) " >&6
28672 # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
28673 freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
28674 gl_cv_func_iswxdigit_works="guessing no" ;;
28675 # Guess yes otherwise.
28676 *) gl_cv_func_iswxdigit_works="guessing yes" ;;
28678 if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
28679 if test "$cross_compiling" = yes
28683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28684 /* end confdefs.h. */
28686 #include <locale.h>
28687 #include <stdlib.h>
28688 #include <string.h>
28690 #include <wctype.h>
28692 /* Returns the value of iswxdigit for the multibyte character s[0..n-1]. */
28694 for_character (const char *s, size_t n)
28700 memset (&state, '\0', sizeof (mbstate_t));
28701 wc = (wchar_t) 0xBADFACE;
28702 ret = mbrtowc (&wc, s, n, &state);
28706 return iswxdigit (wc);
28710 main (int argc, char *argv[])
28715 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28717 /* This fails on NetBSD 8.0. */
28718 /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
28719 is = for_character ("\243\301", 2);
28723 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28725 /* This fails on FreeBSD 13.0. */
28726 /* U+0663 ARABIC-INDIC DIGIT THREE */
28727 is = for_character ("\331\243", 2);
28730 /* This fails on MSVC 14. */
28731 /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
28732 is = for_character ("\357\274\241", 3);
28736 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28738 /* This fails on Solaris 10, Solaris 11.4. */
28739 /* U+FF11 FULLWIDTH DIGIT ONE */
28740 is = for_character ("\243\261", 2);
28747 if ac_fn_c_try_run "$LINENO"
28749 gl_cv_func_iswxdigit_works=yes
28751 gl_cv_func_iswxdigit_works=no
28753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28754 conftest.$ac_objext conftest.beam conftest.$ac_ext
28760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswxdigit_works" >&5
28761 printf "%s\n" "$gl_cv_func_iswxdigit_works" >&6; }
28762 case "$gl_cv_func_iswxdigit_works" in
28764 *) REPLACE_ISWXDIGIT=1 ;;
28768 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28771 if test $REPLACE_ISWXDIGIT = 1; then
28780 gl_LIBOBJS="$gl_LIBOBJS iswxdigit.$ac_objext"
28793 GL_GNULIB_ISWXDIGIT=1
28799 printf "%s\n" "#define GNULIB_TEST_ISWXDIGIT 1" >>confdefs.h
28811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
28812 printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
28813 if test ${gl_cv_c___inline+y}
28815 printf %s "(cached) " >&6
28817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28818 /* end confdefs.h. */
28820 static __inline foo_t foo (void) { return 0; }
28829 if ac_fn_c_try_compile "$LINENO"
28831 gl_cv_c___inline=yes
28833 gl_cv_c___inline=no
28835 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
28838 printf "%s\n" "$gl_cv_c___inline" >&6; }
28839 if test $gl_cv_c___inline = yes; then
28841 printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
28849 LOCALCHARSET_TESTS_ENVIRONMENT=
28861 if test $REPLACE_STRUCT_LCONV = 1; then
28862 REPLACE_LOCALECONV=1
28865 if test $REPLACE_LOCALECONV = 1; then
28874 gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
28877 ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
28879 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
28882 printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
28898 GL_GNULIB_LOCALECONV=1
28904 printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
28910 if test "$gl_threads_api" = posix; then
28911 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
28912 # pthread_rwlock_* functions.
28914 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
28916 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
28920 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
28924 if $has_rwlock; then
28927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
28928 printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
28929 if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
28931 printf %s "(cached) " >&6
28934 LIBS="$LIBS $LIBMULTITHREAD"
28935 if test "$cross_compiling" = yes
28938 # Guess no on glibc systems.
28939 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
28940 # Guess no on musl systems.
28941 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
28942 # Guess no on bionic systems.
28943 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
28944 # Guess yes on native Windows with the mingw-w64 winpthreads library.
28945 # Guess no on native Windows with the gnulib windows-rwlock module.
28946 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
28947 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
28949 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
28952 # If we don't know, obey --enable-cross-guesses.
28953 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
28957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28958 /* end confdefs.h. */
28961 #include <pthread.h>
28962 #include <stdlib.h>
28963 #include <unistd.h>
28965 #define SUCCEED() exit (0)
28966 #define FAILURE() exit (1)
28967 #define UNEXPECTED(n) (exit (10 + (n)))
28969 /* The main thread creates the waiting writer and the requesting reader threads
28970 in the default way; this guarantees that they have the same priority.
28971 We can reuse the main thread as first reader thread. */
28973 static pthread_rwlock_t lock;
28974 static pthread_t reader1;
28975 static pthread_t writer;
28976 static pthread_t reader2;
28977 static pthread_t timer;
28978 /* Used to pass control from writer to reader2 and from reader2 to timer,
28979 as in a relay race.
28980 Passing control from one running thread to another running thread
28981 is most likely faster than to create the second thread. */
28982 static pthread_mutex_t baton;
28985 timer_func (void *ignored)
28987 /* Step 13 (can be before or after step 12):
28988 The timer thread takes the baton, then waits a moment to make sure
28989 it can tell whether the second reader thread is blocked at step 12. */
28990 if (pthread_mutex_lock (&baton))
28993 /* By the time we get here, it's clear that the second reader thread is
28994 blocked at step 12. This is the desired behaviour. */
28999 reader2_func (void *ignored)
29003 /* Step 8 (can be before or after step 7):
29004 The second reader thread takes the baton, then waits a moment to make sure
29005 the writer thread has reached step 7. */
29006 if (pthread_mutex_lock (&baton))
29009 /* Step 9: The second reader thread requests the lock. */
29010 err = pthread_rwlock_tryrdlock (&lock);
29013 else if (err != EBUSY)
29015 /* Step 10: Launch a timer, to test whether the next call blocks. */
29016 if (pthread_create (&timer, NULL, timer_func, NULL))
29018 /* Step 11: Release the baton. */
29019 if (pthread_mutex_unlock (&baton))
29021 /* Step 12: The second reader thread requests the lock. */
29022 err = pthread_rwlock_rdlock (&lock);
29030 writer_func (void *ignored)
29032 /* Step 4: Take the baton, so that the second reader thread does not go ahead
29034 if (pthread_mutex_lock (&baton))
29036 /* Step 5: Create the second reader thread. */
29037 if (pthread_create (&reader2, NULL, reader2_func, NULL))
29039 /* Step 6: Release the baton. */
29040 if (pthread_mutex_unlock (&baton))
29042 /* Step 7: The writer thread requests the lock. */
29043 if (pthread_rwlock_wrlock (&lock))
29051 reader1 = pthread_self ();
29053 /* Step 1: The main thread initializes the lock and the baton. */
29054 if (pthread_rwlock_init (&lock, NULL))
29056 if (pthread_mutex_init (&baton, NULL))
29058 /* Step 2: The main thread acquires the lock as a reader. */
29059 if (pthread_rwlock_rdlock (&lock))
29061 /* Step 3: Create the writer thread. */
29062 if (pthread_create (&writer, NULL, writer_func, NULL))
29064 /* Job done. Go to sleep. */
29072 if ac_fn_c_try_run "$LINENO"
29074 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
29076 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
29078 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29079 conftest.$ac_objext conftest.beam conftest.$ac_ext
29085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
29086 printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
29087 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
29090 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
29096 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
29097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29098 /* end confdefs.h. */
29100 #include <pthread.h>
29105 #if __FreeBSD__ == 4
29106 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
29107 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
29108 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
29109 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
29111 int x = (int)PTHREAD_MUTEX_RECURSIVE;
29119 if ac_fn_c_try_compile "$LINENO"
29122 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
29125 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29131 printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
29138 if test $ac_cv_func_lstat = yes; then
29140 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
29149 if test $REPLACE_LSTAT = 1; then
29158 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
29177 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
29187 if test $REPLACE_MALLOC = 0; then
29189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
29190 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
29191 if test ${ac_cv_func_malloc_0_nonnull+y}
29193 printf %s "(cached) " >&6
29195 if test "$cross_compiling" = yes
29198 # Guess yes on platforms where we know the result.
29199 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
29200 | gnu* | *-musl* | midnightbsd* \
29201 | hpux* | solaris* | cygwin* | mingw* | msys* )
29202 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
29203 # If we don't know, obey --enable-cross-guesses.
29204 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
29208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29209 /* end confdefs.h. */
29210 #include <stdlib.h>
29215 void *p = malloc (0);
29224 if ac_fn_c_try_run "$LINENO"
29226 ac_cv_func_malloc_0_nonnull=yes
29228 ac_cv_func_malloc_0_nonnull=no
29230 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29231 conftest.$ac_objext conftest.beam conftest.$ac_ext
29236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
29237 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
29238 case $ac_cv_func_malloc_0_nonnull in #(
29242 REPLACE_MALLOC=1 ;;
29247 if test $REPLACE_MALLOC = 1; then
29256 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
29260 if test $REPLACE_MALLOC = 1; then
29269 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
29281 GL_GNULIB_MALLOC_POSIX=1
29287 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
29314 if case "$host_os" in
29316 *) test $ac_cv_func_mbsinit = yes ;;
29318 && test $ac_cv_func_mbrtowc = yes; then
29323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29324 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
29325 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
29327 printf %s "(cached) " >&6
29331 # Guess no on AIX and OSF/1.
29332 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29333 # Guess yes otherwise.
29334 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29336 if test $LOCALE_JA != none; then
29337 if test "$cross_compiling" = yes
29341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29342 /* end confdefs.h. */
29344 #include <locale.h>
29345 #include <string.h>
29349 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29351 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29355 memset (&state, '\0', sizeof (mbstate_t));
29356 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29357 if (mbsinit (&state))
29363 if ac_fn_c_try_run "$LINENO"
29365 gl_cv_func_mbrtowc_incomplete_state=yes
29367 gl_cv_func_mbrtowc_incomplete_state=no
29369 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29370 conftest.$ac_objext conftest.beam conftest.$ac_ext
29374 if test $LOCALE_FR_UTF8 != none; then
29375 if test "$cross_compiling" = yes
29379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29380 /* end confdefs.h. */
29382 #include <locale.h>
29383 #include <string.h>
29387 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29389 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
29393 memset (&state, '\0', sizeof (mbstate_t));
29394 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29395 if (mbsinit (&state))
29401 if ac_fn_c_try_run "$LINENO"
29403 gl_cv_func_mbrtowc_incomplete_state=yes
29405 gl_cv_func_mbrtowc_incomplete_state=no
29407 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29408 conftest.$ac_objext conftest.beam conftest.$ac_ext
29415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29416 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29422 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
29423 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
29425 printf %s "(cached) " >&6
29429 # Guess no on Solaris 8.
29430 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29431 # Guess yes otherwise.
29432 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29434 if test $LOCALE_ZH_CN != none; then
29435 if test "$cross_compiling" = yes
29439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29440 /* end confdefs.h. */
29442 #include <locale.h>
29443 #include <stdlib.h>
29444 #include <string.h>
29448 /* This fails on Solaris 8:
29449 mbrtowc returns 2, and sets wc to 0x00F0.
29450 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
29451 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29453 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29457 memset (&state, '\0', sizeof (mbstate_t));
29458 if (mbrtowc (&wc, input + 3, 6, &state) != 4
29459 && mbtowc (&wc, input + 3, 6) == 4)
29465 if ac_fn_c_try_run "$LINENO"
29467 gl_cv_func_mbrtowc_sanitycheck=yes
29469 gl_cv_func_mbrtowc_sanitycheck=no
29471 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29472 conftest.$ac_objext conftest.beam conftest.$ac_ext
29478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29479 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29481 REPLACE_MBSTATE_T=0
29482 case "$gl_cv_func_mbrtowc_incomplete_state" in
29484 *) REPLACE_MBSTATE_T=1 ;;
29486 case "$gl_cv_func_mbrtowc_sanitycheck" in
29488 *) REPLACE_MBSTATE_T=1 ;;
29491 REPLACE_MBSTATE_T=1
29496 if test $ac_cv_func_mbrtowc = no; then
29498 ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
29501 " "$ac_c_undeclared_builtin_options" "CFLAGS"
29502 if test "x$ac_cv_have_decl_mbrtowc" = xyes
29508 printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
29510 if test $ac_cv_have_decl_mbrtowc = yes; then
29514 if test $REPLACE_MBSTATE_T = 1; then
29520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
29521 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
29522 if test ${gl_cv_func_mbrtowc_null_arg1+y}
29524 printf %s "(cached) " >&6
29528 # Guess no on Solaris.
29529 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
29530 # Guess yes otherwise.
29531 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
29533 if test $LOCALE_FR_UTF8 != none; then
29534 if test "$cross_compiling" = yes
29538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29539 /* end confdefs.h. */
29541 #include <locale.h>
29542 #include <stdlib.h>
29543 #include <string.h>
29549 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29551 char input[] = "\303\237er";
29556 memset (&state, '\0', sizeof (mbstate_t));
29557 wc = (wchar_t) 0xBADFACE;
29558 ret = mbrtowc (&wc, input, 5, &state);
29561 if (!mbsinit (&state))
29564 memset (&state, '\0', sizeof (mbstate_t));
29565 ret = mbrtowc (NULL, input, 5, &state);
29566 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
29568 if (!mbsinit (&state))
29574 if ac_fn_c_try_run "$LINENO"
29576 gl_cv_func_mbrtowc_null_arg1=yes
29578 gl_cv_func_mbrtowc_null_arg1=no
29580 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29581 conftest.$ac_objext conftest.beam conftest.$ac_ext
29587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
29588 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
29593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
29594 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
29595 if test ${gl_cv_func_mbrtowc_null_arg2+y}
29597 printf %s "(cached) " >&6
29601 # Guess no on OSF/1.
29602 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
29603 # Guess yes otherwise.
29604 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
29606 if test $LOCALE_FR_UTF8 != none; then
29607 if test "$cross_compiling" = yes
29611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29612 /* end confdefs.h. */
29614 #include <locale.h>
29615 #include <string.h>
29619 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29625 memset (&state, '\0', sizeof (mbstate_t));
29626 wc = (wchar_t) 0xBADFACE;
29627 mbrtowc (&wc, NULL, 5, &state);
29628 /* Check that wc was not modified. */
29629 if (wc != (wchar_t) 0xBADFACE)
29635 if ac_fn_c_try_run "$LINENO"
29637 gl_cv_func_mbrtowc_null_arg2=yes
29639 gl_cv_func_mbrtowc_null_arg2=no
29641 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29642 conftest.$ac_objext conftest.beam conftest.$ac_ext
29648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
29649 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
29656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
29657 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
29658 if test ${gl_cv_func_mbrtowc_retval+y}
29660 printf %s "(cached) " >&6
29664 # Guess no on HP-UX, Solaris, native Windows.
29665 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
29666 # Guess yes otherwise.
29667 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
29669 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
29670 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
29671 if test "$cross_compiling" = yes
29675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29676 /* end confdefs.h. */
29678 #include <locale.h>
29679 #include <string.h>
29684 int found_some_locale = 0;
29685 /* This fails on Solaris. */
29686 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29688 char input[] = "B\303\274\303\237er"; /* "Büßer" */
29692 memset (&state, '\0', sizeof (mbstate_t));
29693 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29696 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
29699 found_some_locale = 1;
29701 /* This fails on HP-UX 11.11. */
29702 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29704 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29708 memset (&state, '\0', sizeof (mbstate_t));
29709 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29712 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
29715 found_some_locale = 1;
29717 /* This fails on native Windows. */
29718 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
29720 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
29724 memset (&state, '\0', sizeof (mbstate_t));
29725 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
29728 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
29731 found_some_locale = 1;
29733 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
29735 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
29739 memset (&state, '\0', sizeof (mbstate_t));
29740 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
29743 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
29746 found_some_locale = 1;
29748 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
29750 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
29754 memset (&state, '\0', sizeof (mbstate_t));
29755 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
29758 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
29761 found_some_locale = 1;
29763 return (found_some_locale ? result : 77);
29766 if ac_fn_c_try_run "$LINENO"
29768 gl_cv_func_mbrtowc_retval=yes
29770 if test $? != 77; then
29771 gl_cv_func_mbrtowc_retval=no
29775 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29776 conftest.$ac_objext conftest.beam conftest.$ac_ext
29782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
29783 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
29788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
29789 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
29790 if test ${gl_cv_func_mbrtowc_nul_retval+y}
29792 printf %s "(cached) " >&6
29796 # Guess no on Solaris 8 and 9.
29797 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
29798 # Guess yes otherwise.
29799 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
29801 if test $LOCALE_ZH_CN != none; then
29802 if test "$cross_compiling" = yes
29806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29807 /* end confdefs.h. */
29809 #include <locale.h>
29810 #include <string.h>
29814 /* This fails on Solaris 8 and 9. */
29815 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29820 memset (&state, '\0', sizeof (mbstate_t));
29821 if (mbrtowc (&wc, "", 1, &state) != 0)
29827 if ac_fn_c_try_run "$LINENO"
29829 gl_cv_func_mbrtowc_nul_retval=yes
29831 gl_cv_func_mbrtowc_nul_retval=no
29833 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29834 conftest.$ac_objext conftest.beam conftest.$ac_ext
29840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
29841 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
29845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
29846 printf %s "checking whether mbrtowc stores incomplete characters... " >&6; }
29847 if test ${gl_cv_func_mbrtowc_stores_incomplete+y}
29849 printf %s "(cached) " >&6
29853 # Guess yes on native Windows.
29854 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
29855 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
29859 if test "$cross_compiling" = yes
29863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29864 /* end confdefs.h. */
29866 #include <locale.h>
29867 #include <string.h>
29872 if (setlocale (LC_ALL, "French_France.65001") != NULL)
29874 wchar_t wc = (wchar_t) 0xBADFACE;
29877 memset (&state, '\0', sizeof (mbstate_t));
29878 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
29879 && wc != (wchar_t) 0xBADFACE)
29882 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
29884 wchar_t wc = (wchar_t) 0xBADFACE;
29887 memset (&state, '\0', sizeof (mbstate_t));
29888 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
29889 && wc != (wchar_t) 0xBADFACE)
29892 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
29894 wchar_t wc = (wchar_t) 0xBADFACE;
29897 memset (&state, '\0', sizeof (mbstate_t));
29898 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
29899 && wc != (wchar_t) 0xBADFACE)
29902 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
29904 wchar_t wc = (wchar_t) 0xBADFACE;
29907 memset (&state, '\0', sizeof (mbstate_t));
29908 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
29909 && wc != (wchar_t) 0xBADFACE)
29915 if ac_fn_c_try_run "$LINENO"
29917 gl_cv_func_mbrtowc_stores_incomplete=no
29919 gl_cv_func_mbrtowc_stores_incomplete=yes
29921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29922 conftest.$ac_objext conftest.beam conftest.$ac_ext
29928 if test $LOCALE_FR_UTF8 != none; then
29929 if test "$cross_compiling" = yes
29933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29934 /* end confdefs.h. */
29936 #include <locale.h>
29937 #include <string.h>
29941 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29943 wchar_t wc = (wchar_t) 0xBADFACE;
29946 memset (&state, '\0', sizeof (mbstate_t));
29947 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
29948 && wc != (wchar_t) 0xBADFACE)
29954 if ac_fn_c_try_run "$LINENO"
29956 gl_cv_func_mbrtowc_stores_incomplete=no
29958 gl_cv_func_mbrtowc_stores_incomplete=yes
29960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29961 conftest.$ac_objext conftest.beam conftest.$ac_ext
29969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
29970 printf "%s\n" "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
29974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
29975 printf %s "checking whether mbrtowc works on empty input... " >&6; }
29976 if test ${gl_cv_func_mbrtowc_empty_input+y}
29978 printf %s "(cached) " >&6
29982 # Guess no on AIX and glibc systems.
29983 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
29984 # Guess yes on native Windows.
29985 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
29986 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
29988 if test "$cross_compiling" = yes
29992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29993 /* end confdefs.h. */
29997 static mbstate_t mbs;
30001 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
30004 if ac_fn_c_try_run "$LINENO"
30006 gl_cv_func_mbrtowc_empty_input=yes
30008 gl_cv_func_mbrtowc_empty_input=no
30010 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30011 conftest.$ac_objext conftest.beam conftest.$ac_ext
30016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
30017 printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
30020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
30021 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
30022 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
30024 printf %s "(cached) " >&6
30027 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
30029 if test "$cross_compiling" = yes
30032 # Guess yes on native Windows.
30033 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
30037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30038 /* end confdefs.h. */
30039 #include <limits.h>
30040 #include <locale.h>
30048 char *locale = setlocale (LC_ALL, "C");
30051 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
30055 mbstate_t mbs = { 0, };
30056 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
30066 if ac_fn_c_try_run "$LINENO"
30068 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
30070 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
30072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30073 conftest.$ac_objext conftest.beam conftest.$ac_ext
30078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
30079 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
30081 case "$gl_cv_func_mbrtowc_null_arg1" in
30084 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
30089 case "$gl_cv_func_mbrtowc_null_arg2" in
30092 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
30097 case "$gl_cv_func_mbrtowc_retval" in
30100 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
30105 case "$gl_cv_func_mbrtowc_nul_retval" in
30108 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
30113 case "$gl_cv_func_mbrtowc_stores_incomplete" in
30116 printf "%s\n" "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
30121 case "$gl_cv_func_mbrtowc_empty_input" in
30124 printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
30129 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
30132 printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
30139 if test $REPLACE_MBSTATE_T = 1; then
30141 mingw*) LIB_MBRTOWC= ;;
30145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
30146 printf %s "checking whether imported symbols can be declared weak... " >&6; }
30147 if test ${gl_cv_have_weak+y}
30149 printf %s "(cached) " >&6
30152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30153 /* end confdefs.h. */
30154 extern void xyzzy ();
30164 if ac_fn_c_try_link "$LINENO"
30166 gl_cv_have_weak=maybe
30168 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30169 conftest$ac_exeext conftest.$ac_ext
30170 if test $gl_cv_have_weak = maybe; then
30171 if test "$cross_compiling" = yes
30173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30174 /* end confdefs.h. */
30176 Extensible Linking Format
30180 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30181 $EGREP "Extensible Linking Format" >/dev/null 2>&1
30183 gl_cv_have_weak="guessing yes"
30185 gl_cv_have_weak="guessing no"
30191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30192 /* end confdefs.h. */
30198 return (fputs == NULL);
30201 if ac_fn_c_try_run "$LINENO"
30203 gl_cv_have_weak=yes
30207 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30208 conftest.$ac_objext conftest.beam conftest.$ac_ext
30212 case " $LDFLAGS " in
30213 *" -static "*) gl_cv_have_weak=no ;;
30215 case "$gl_cv_have_weak" in
30218 freebsd* | dragonfly* | midnightbsd*)
30220 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
30221 cat <<EOF > conftest2.c
30222 #include <pthread.h>
30223 #pragma weak pthread_mutexattr_gettype
30226 return (pthread_mutexattr_gettype != NULL);
30229 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
30230 || gl_cv_have_weak=no
30231 rm -f conftest1.c libempty.so conftest2.c conftest
30238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
30239 printf "%s\n" "$gl_cv_have_weak" >&6; }
30240 case "$gl_cv_have_weak" in
30243 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
30248 case "$gl_cv_have_weak" in
30249 *yes) LIB_MBRTOWC= ;;
30250 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
30259 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
30268 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
30270 if test $REPLACE_MBSTATE_T = 1; then
30279 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
30289 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
30296 if test -n "$GCC"; then
30297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
30298 printf %s "checking whether the -Werror option is usable... " >&6; }
30299 if test ${gl_cv_cc_vis_werror+y}
30301 printf %s "(cached) " >&6
30303 gl_save_CFLAGS="$CFLAGS"
30304 CFLAGS="$CFLAGS -Werror"
30305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30306 /* end confdefs.h. */
30316 if ac_fn_c_try_compile "$LINENO"
30318 gl_cv_cc_vis_werror=yes
30320 gl_cv_cc_vis_werror=no
30322 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30323 CFLAGS="$gl_save_CFLAGS"
30326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
30327 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
30328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
30329 printf %s "checking for simple visibility declarations... " >&6; }
30330 if test ${gl_cv_cc_visibility+y}
30332 printf %s "(cached) " >&6
30334 gl_save_CFLAGS="$CFLAGS"
30335 CFLAGS="$CFLAGS -fvisibility=hidden"
30336 if test $gl_cv_cc_vis_werror = yes; then
30337 CFLAGS="$CFLAGS -Werror"
30339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30340 /* end confdefs.h. */
30341 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
30342 extern __attribute__((__visibility__("default"))) int exportedvar;
30343 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
30344 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
30345 void dummyfunc (void);
30348 int hiddenfunc (void) { return 51; }
30349 int exportedfunc (void) { return 1225736919; }
30350 void dummyfunc (void) {}
30360 if ac_fn_c_try_compile "$LINENO"
30362 gl_cv_cc_visibility=yes
30364 gl_cv_cc_visibility=no
30366 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30367 CFLAGS="$gl_save_CFLAGS"
30370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
30371 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
30372 if test $gl_cv_cc_visibility = yes; then
30373 CFLAG_VISIBILITY="-fvisibility=hidden"
30380 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
30399 GL_GNULIB_MBRTOWC=1
30405 printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
30418 GL_GNULIB_MBSCASECMP=1
30424 printf "%s\n" "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
30440 if case "$host_os" in
30442 *) test $ac_cv_func_mbsinit = yes ;;
30444 && test $ac_cv_func_mbrtowc = yes; then
30449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
30450 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
30451 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
30453 printf %s "(cached) " >&6
30457 # Guess no on AIX and OSF/1.
30458 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
30459 # Guess yes otherwise.
30460 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
30462 if test $LOCALE_JA != none; then
30463 if test "$cross_compiling" = yes
30467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30468 /* end confdefs.h. */
30470 #include <locale.h>
30471 #include <string.h>
30475 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
30477 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
30481 memset (&state, '\0', sizeof (mbstate_t));
30482 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30483 if (mbsinit (&state))
30489 if ac_fn_c_try_run "$LINENO"
30491 gl_cv_func_mbrtowc_incomplete_state=yes
30493 gl_cv_func_mbrtowc_incomplete_state=no
30495 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30496 conftest.$ac_objext conftest.beam conftest.$ac_ext
30500 if test $LOCALE_FR_UTF8 != none; then
30501 if test "$cross_compiling" = yes
30505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30506 /* end confdefs.h. */
30508 #include <locale.h>
30509 #include <string.h>
30513 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30515 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
30519 memset (&state, '\0', sizeof (mbstate_t));
30520 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30521 if (mbsinit (&state))
30527 if ac_fn_c_try_run "$LINENO"
30529 gl_cv_func_mbrtowc_incomplete_state=yes
30531 gl_cv_func_mbrtowc_incomplete_state=no
30533 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30534 conftest.$ac_objext conftest.beam conftest.$ac_ext
30541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
30542 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
30547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
30548 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
30549 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
30551 printf %s "(cached) " >&6
30555 # Guess no on Solaris 8.
30556 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
30557 # Guess yes otherwise.
30558 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
30560 if test $LOCALE_ZH_CN != none; then
30561 if test "$cross_compiling" = yes
30565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30566 /* end confdefs.h. */
30568 #include <locale.h>
30569 #include <stdlib.h>
30570 #include <string.h>
30574 /* This fails on Solaris 8:
30575 mbrtowc returns 2, and sets wc to 0x00F0.
30576 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
30577 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
30579 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
30583 memset (&state, '\0', sizeof (mbstate_t));
30584 if (mbrtowc (&wc, input + 3, 6, &state) != 4
30585 && mbtowc (&wc, input + 3, 6) == 4)
30591 if ac_fn_c_try_run "$LINENO"
30593 gl_cv_func_mbrtowc_sanitycheck=yes
30595 gl_cv_func_mbrtowc_sanitycheck=no
30597 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30598 conftest.$ac_objext conftest.beam conftest.$ac_ext
30604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
30605 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
30607 REPLACE_MBSTATE_T=0
30608 case "$gl_cv_func_mbrtowc_incomplete_state" in
30610 *) REPLACE_MBSTATE_T=1 ;;
30612 case "$gl_cv_func_mbrtowc_sanitycheck" in
30614 *) REPLACE_MBSTATE_T=1 ;;
30617 REPLACE_MBSTATE_T=1
30622 if test $ac_cv_func_mbsinit = no; then
30624 ac_fn_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
30627 " "$ac_c_undeclared_builtin_options" "CFLAGS"
30628 if test "x$ac_cv_have_decl_mbsinit" = xyes
30634 printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
30636 if test $ac_cv_have_decl_mbsinit = yes; then
30640 if test $REPLACE_MBSTATE_T = 1; then
30644 mingw*) REPLACE_MBSINIT=1 ;;
30649 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
30658 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
30673 GL_GNULIB_MBSINIT=1
30679 printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
30686 if test $ac_cv_func_mbslen = yes; then
30707 printf "%s\n" "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
30722 if case "$host_os" in
30724 *) test $ac_cv_func_mbsinit = yes ;;
30726 && test $ac_cv_func_mbrtowc = yes; then
30731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
30732 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
30733 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
30735 printf %s "(cached) " >&6
30739 # Guess no on AIX and OSF/1.
30740 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
30741 # Guess yes otherwise.
30742 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
30744 if test $LOCALE_JA != none; then
30745 if test "$cross_compiling" = yes
30749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30750 /* end confdefs.h. */
30752 #include <locale.h>
30753 #include <string.h>
30757 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
30759 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
30763 memset (&state, '\0', sizeof (mbstate_t));
30764 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30765 if (mbsinit (&state))
30771 if ac_fn_c_try_run "$LINENO"
30773 gl_cv_func_mbrtowc_incomplete_state=yes
30775 gl_cv_func_mbrtowc_incomplete_state=no
30777 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30778 conftest.$ac_objext conftest.beam conftest.$ac_ext
30782 if test $LOCALE_FR_UTF8 != none; then
30783 if test "$cross_compiling" = yes
30787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30788 /* end confdefs.h. */
30790 #include <locale.h>
30791 #include <string.h>
30795 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30797 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
30801 memset (&state, '\0', sizeof (mbstate_t));
30802 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30803 if (mbsinit (&state))
30809 if ac_fn_c_try_run "$LINENO"
30811 gl_cv_func_mbrtowc_incomplete_state=yes
30813 gl_cv_func_mbrtowc_incomplete_state=no
30815 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30816 conftest.$ac_objext conftest.beam conftest.$ac_ext
30823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
30824 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
30829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
30830 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
30831 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
30833 printf %s "(cached) " >&6
30837 # Guess no on Solaris 8.
30838 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
30839 # Guess yes otherwise.
30840 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
30842 if test $LOCALE_ZH_CN != none; then
30843 if test "$cross_compiling" = yes
30847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30848 /* end confdefs.h. */
30850 #include <locale.h>
30851 #include <stdlib.h>
30852 #include <string.h>
30856 /* This fails on Solaris 8:
30857 mbrtowc returns 2, and sets wc to 0x00F0.
30858 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
30859 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
30861 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
30865 memset (&state, '\0', sizeof (mbstate_t));
30866 if (mbrtowc (&wc, input + 3, 6, &state) != 4
30867 && mbtowc (&wc, input + 3, 6) == 4)
30873 if ac_fn_c_try_run "$LINENO"
30875 gl_cv_func_mbrtowc_sanitycheck=yes
30877 gl_cv_func_mbrtowc_sanitycheck=no
30879 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30880 conftest.$ac_objext conftest.beam conftest.$ac_ext
30886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
30887 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
30889 REPLACE_MBSTATE_T=0
30890 case "$gl_cv_func_mbrtowc_incomplete_state" in
30892 *) REPLACE_MBSTATE_T=1 ;;
30894 case "$gl_cv_func_mbrtowc_sanitycheck" in
30896 *) REPLACE_MBSTATE_T=1 ;;
30899 REPLACE_MBSTATE_T=1
30904 if test $ac_cv_func_mbsrtowcs = no; then
30906 ac_fn_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
30909 " "$ac_c_undeclared_builtin_options" "CFLAGS"
30910 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes
30916 printf "%s\n" "#define HAVE_DECL_MBSRTOWCS $ac_have_decl" >>confdefs.h
30918 if test $ac_cv_have_decl_mbsrtowcs = yes; then
30919 REPLACE_MBSRTOWCS=1
30922 if test $REPLACE_MBSTATE_T = 1; then
30923 REPLACE_MBSRTOWCS=1
30931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
30932 printf %s "checking whether mbsrtowcs works... " >&6; }
30933 if test ${gl_cv_func_mbsrtowcs_works+y}
30935 printf %s "(cached) " >&6
30939 # Guess no on HP-UX, Solaris, mingw.
30940 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
30941 # Guess yes otherwise.
30942 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
30944 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
30945 if test "$cross_compiling" = yes
30949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30950 /* end confdefs.h. */
30952 #include <locale.h>
30953 #include <string.h>
30958 /* Test whether the function supports a NULL destination argument.
30959 This fails on native Windows. */
30960 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
30962 const char input[] = "\337er";
30963 const char *src = input;
30966 memset (&state, '\0', sizeof (mbstate_t));
30967 if (mbsrtowcs (NULL, &src, 1, &state) != 3
30971 /* Test whether the function works when started with a conversion state
30972 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
30973 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30975 const char input[] = "B\303\274\303\237er";
30978 memset (&state, '\0', sizeof (mbstate_t));
30979 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
30980 if (!mbsinit (&state))
30982 const char *src = input + 2;
30983 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
30987 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
30989 const char input[] = "<\306\374\313\334\270\354>";
30992 memset (&state, '\0', sizeof (mbstate_t));
30993 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
30994 if (!mbsinit (&state))
30996 const char *src = input + 4;
30997 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
31001 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31003 const char input[] = "B\250\271\201\060\211\070er";
31006 memset (&state, '\0', sizeof (mbstate_t));
31007 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
31008 if (!mbsinit (&state))
31010 const char *src = input + 2;
31011 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
31018 if ac_fn_c_try_run "$LINENO"
31020 gl_cv_func_mbsrtowcs_works=yes
31022 gl_cv_func_mbsrtowcs_works=no
31024 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31025 conftest.$ac_objext conftest.beam conftest.$ac_ext
31031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
31032 printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
31034 case "$gl_cv_func_mbsrtowcs_works" in
31036 *) REPLACE_MBSRTOWCS=1 ;;
31041 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
31050 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
31060 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
31075 GL_GNULIB_MBSRTOWCS=1
31081 printf "%s\n" "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
31100 printf "%s\n" "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
31107 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
31108 if test "x$ac_cv_func_mbtowc" = xyes
31110 printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
31114 if test $ac_cv_func_mbtowc = no; then
31122 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
31131 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
31152 printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
31161 if test $REPLACE_MEMCHR = 1; then
31170 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
31173 ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
31174 if test "x$ac_cv_header_bp_sym_h" = xyes
31176 printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
31197 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
31207 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
31208 if test "x$ac_cv_func_mempcpy" = xyes
31210 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
31214 if test $ac_cv_func_mempcpy = no; then
31218 if test $HAVE_MEMPCPY = 0; then
31227 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
31242 GL_GNULIB_MEMPCPY=1
31248 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
31257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
31258 printf %s "checking whether mkdir handles trailing slash... " >&6; }
31259 if test ${gl_cv_func_mkdir_trailing_slash_works+y}
31261 printf %s "(cached) " >&6
31263 rm -rf conftest.dir
31264 if test "$cross_compiling" = yes
31267 # Guess yes on Linux systems.
31268 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
31269 # Guess yes on glibc systems.
31270 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
31271 # Guess yes on MSVC, no on mingw.
31272 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31273 /* end confdefs.h. */
31280 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31281 $EGREP "Known" >/dev/null 2>&1
31283 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
31285 gl_cv_func_mkdir_trailing_slash_works="guessing no"
31290 # If we don't know, obey --enable-cross-guesses.
31291 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
31295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31296 /* end confdefs.h. */
31298 #include <sys/types.h>
31299 #include <sys/stat.h>
31307 return mkdir ("conftest.dir/", 0700);
31312 if ac_fn_c_try_run "$LINENO"
31314 gl_cv_func_mkdir_trailing_slash_works=yes
31316 gl_cv_func_mkdir_trailing_slash_works=no
31318 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31319 conftest.$ac_objext conftest.beam conftest.$ac_ext
31322 rm -rf conftest.dir
31325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
31326 printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
31327 case "$gl_cv_func_mkdir_trailing_slash_works" in
31334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
31335 printf %s "checking whether mkdir handles trailing dot... " >&6; }
31336 if test ${gl_cv_func_mkdir_trailing_dot_works+y}
31338 printf %s "(cached) " >&6
31340 rm -rf conftest.dir
31341 if test "$cross_compiling" = yes
31344 # Guess yes on glibc systems.
31345 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
31346 # Guess yes on musl systems.
31347 *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
31348 # Guess no on native Windows.
31349 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
31350 # If we don't know, obey --enable-cross-guesses.
31351 *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
31355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31356 /* end confdefs.h. */
31358 #include <sys/types.h>
31359 #include <sys/stat.h>
31367 return !mkdir ("conftest.dir/./", 0700);
31372 if ac_fn_c_try_run "$LINENO"
31374 gl_cv_func_mkdir_trailing_dot_works=yes
31376 gl_cv_func_mkdir_trailing_dot_works=no
31378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31379 conftest.$ac_objext conftest.beam conftest.$ac_ext
31382 rm -rf conftest.dir
31386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
31387 printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
31388 case "$gl_cv_func_mkdir_trailing_dot_works" in
31393 printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
31398 if test $REPLACE_MKDIR = 1; then
31407 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
31425 printf "%s\n" "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
31433 if test $ac_cv_func_mkstemp = yes; then
31434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
31435 printf %s "checking for working mkstemp... " >&6; }
31436 if test ${gl_cv_func_working_mkstemp+y}
31438 printf %s "(cached) " >&6
31441 mkdir conftest.mkstemp
31442 if test "$cross_compiling" = yes
31445 # Guess yes on glibc systems.
31446 *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
31447 # Guess yes on musl systems.
31448 *-musl*) gl_cv_func_working_mkstemp="guessing yes" ;;
31449 # Guess no on native Windows.
31450 mingw*) gl_cv_func_working_mkstemp="guessing no" ;;
31451 # If we don't know, obey --enable-cross-guesses.
31452 *) gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
31456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31457 /* end confdefs.h. */
31458 $ac_includes_default
31468 off_t large = (off_t) 4294967295u;
31470 large = 2147483647;
31472 for (i = 0; i < 70; i++)
31474 char templ[] = "conftest.mkstemp/coXXXXXX";
31475 int (*mkstemp_function) (char *) = mkstemp;
31476 int fd = mkstemp_function (templ);
31482 if (lseek (fd, large, SEEK_SET) != large)
31484 if (fstat (fd, &st) < 0)
31486 else if (st.st_mode & 0077)
31497 if ac_fn_c_try_run "$LINENO"
31499 gl_cv_func_working_mkstemp=yes
31501 gl_cv_func_working_mkstemp=no
31503 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31504 conftest.$ac_objext conftest.beam conftest.$ac_ext
31507 rm -rf conftest.mkstemp
31510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
31511 printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
31512 case "$gl_cv_func_working_mkstemp" in
31522 if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
31531 gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
31545 GL_GNULIB_MKSTEMP=1
31551 printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
31561 if test "$gl_cv_func_working_mktime" != yes; then
31564 printf "%s\n" "#define NEED_MKTIME_WORKING 1" >>confdefs.h
31571 printf "%s\n" "#define NEED_MKTIME_WINDOWS 1" >>confdefs.h
31576 if test $REPLACE_MKTIME = 1; then
31585 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
31604 printf "%s\n" "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
31611 WANT_MKTIME_INTERNAL=0
31612 ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
31613 if test "x$ac_cv_func___mktime_internal" = xyes
31616 printf "%s\n" "#define mktime_internal __mktime_internal" >>confdefs.h
31620 WANT_MKTIME_INTERNAL=1
31622 printf "%s\n" "#define NEED_MKTIME_INTERNAL 1" >>confdefs.h
31628 if test $WANT_MKTIME_INTERNAL = 1; then
31637 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
31642 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
31651 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
31655 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
31664 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
31669 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
31681 if test $ac_cv_func_nl_langinfo = yes; then
31682 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
31683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
31684 printf %s "checking whether YESEXPR works... " >&6; }
31685 if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
31687 printf %s "(cached) " >&6
31689 if test "$cross_compiling" = yes
31693 # Guess no on irix systems.
31694 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
31695 # Guess yes elsewhere.
31696 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
31700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31701 /* end confdefs.h. */
31702 #include <langinfo.h>
31707 return !*nl_langinfo(YESEXPR);
31713 if ac_fn_c_try_run "$LINENO"
31715 gl_cv_func_nl_langinfo_yesexpr_works=yes
31717 gl_cv_func_nl_langinfo_yesexpr_works=no
31719 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31720 conftest.$ac_objext conftest.beam conftest.$ac_ext
31725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
31726 printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
31727 case $gl_cv_func_nl_langinfo_yesexpr_works in
31728 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
31729 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
31732 printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
31734 # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
31736 solaris*) NL_LANGINFO_MTSAFE=0 ;;
31737 *) NL_LANGINFO_MTSAFE=1 ;;
31740 printf "%s\n" "#define NL_LANGINFO_MTSAFE $NL_LANGINFO_MTSAFE" >>confdefs.h
31742 if test $HAVE_LANGINFO_CODESET = 1 \
31743 && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
31744 && test $HAVE_LANGINFO_ALTMON = 1 \
31745 && test $HAVE_LANGINFO_ERA = 1 \
31746 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
31747 && test $NL_LANGINFO_MTSAFE = 1; then
31750 REPLACE_NL_LANGINFO=1
31752 printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
31758 if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
31759 LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
31765 if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
31774 gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
31777 if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
31786 gl_LIBOBJS="$gl_LIBOBJS nl_langinfo-lock.$ac_objext"
31793 if test -n "$GCC"; then
31794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
31795 printf %s "checking whether the -Werror option is usable... " >&6; }
31796 if test ${gl_cv_cc_vis_werror+y}
31798 printf %s "(cached) " >&6
31800 gl_save_CFLAGS="$CFLAGS"
31801 CFLAGS="$CFLAGS -Werror"
31802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31803 /* end confdefs.h. */
31813 if ac_fn_c_try_compile "$LINENO"
31815 gl_cv_cc_vis_werror=yes
31817 gl_cv_cc_vis_werror=no
31819 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31820 CFLAGS="$gl_save_CFLAGS"
31823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
31824 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
31825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
31826 printf %s "checking for simple visibility declarations... " >&6; }
31827 if test ${gl_cv_cc_visibility+y}
31829 printf %s "(cached) " >&6
31831 gl_save_CFLAGS="$CFLAGS"
31832 CFLAGS="$CFLAGS -fvisibility=hidden"
31833 if test $gl_cv_cc_vis_werror = yes; then
31834 CFLAGS="$CFLAGS -Werror"
31836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31837 /* end confdefs.h. */
31838 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
31839 extern __attribute__((__visibility__("default"))) int exportedvar;
31840 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
31841 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
31842 void dummyfunc (void);
31845 int hiddenfunc (void) { return 51; }
31846 int exportedfunc (void) { return 1225736919; }
31847 void dummyfunc (void) {}
31857 if ac_fn_c_try_compile "$LINENO"
31859 gl_cv_cc_visibility=yes
31861 gl_cv_cc_visibility=no
31863 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31864 CFLAGS="$gl_save_CFLAGS"
31867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
31868 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
31869 if test $gl_cv_cc_visibility = yes; then
31870 CFLAG_VISIBILITY="-fvisibility=hidden"
31877 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
31891 GL_GNULIB_NL_LANGINFO=1
31897 printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
31904 # This defines (or not) HAVE_TZNAME and HAVE_STRUCT_TM_TM_ZONE.
31910 printf "%s\n" "#define my_strftime nstrftime" >>confdefs.h
31922 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
31927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
31928 printf %s "checking whether open recognizes a trailing slash... " >&6; }
31929 if test ${gl_cv_func_open_slash+y}
31931 printf %s "(cached) " >&6
31933 # Assume that if we have lstat, we can also check symlinks.
31934 if test $ac_cv_func_lstat = yes; then
31936 ln -s conftest.tmp conftest.lnk
31938 if test "$cross_compiling" = yes
31942 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
31943 gl_cv_func_open_slash="guessing no" ;;
31945 gl_cv_func_open_slash="guessing yes" ;;
31949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31950 /* end confdefs.h. */
31954 # include <unistd.h>
31964 if (open ("conftest.lnk/", O_RDONLY) != -1)
31967 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
31972 if ac_fn_c_try_run "$LINENO"
31974 gl_cv_func_open_slash=yes
31976 gl_cv_func_open_slash=no
31978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31979 conftest.$ac_objext conftest.beam conftest.$ac_ext
31982 rm -f conftest.sl conftest.tmp conftest.lnk
31985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
31986 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
31987 case "$gl_cv_func_open_slash" in
31990 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
31995 case "$gl_cv_func_open_slash" in
32005 if test $REPLACE_OPEN = 1; then
32014 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
32036 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
32043 ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
32044 " "$ac_c_undeclared_builtin_options" "CFLAGS"
32045 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
32051 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
32053 ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
32054 " "$ac_c_undeclared_builtin_options" "CFLAGS"
32055 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
32061 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
32065 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
32069 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
32081 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
32082 if test "x$ac_cv_func_raise" = xyes
32084 printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
32088 if test $ac_cv_func_raise = no; then
32093 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32101 HAVE_POSIX_SIGNALBLOCKING=0
32102 if test "$gl_cv_type_sigset_t" = yes; then
32103 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
32104 if test "x$ac_cv_func_sigprocmask" = xyes
32106 HAVE_POSIX_SIGNALBLOCKING=1
32111 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
32117 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
32126 gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
32145 printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
32153 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
32154 if test "x$ac_cv_func_rawmemchr" = xyes
32156 printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
32160 if test $ac_cv_func_rawmemchr = no; then
32164 if test $HAVE_RAWMEMCHR = 0; then
32173 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
32186 GL_GNULIB_RAWMEMCHR=1
32192 printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
32199 if test $ac_cv_func_readlink = no; then
32202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
32203 printf %s "checking whether readlink signature is correct... " >&6; }
32204 if test ${gl_cv_decl_readlink_works+y}
32206 printf %s "(cached) " >&6
32208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32209 /* end confdefs.h. */
32210 #include <unistd.h>
32211 /* Cause compilation failure if original declaration has wrong type. */
32212 ssize_t readlink (const char *, char *, size_t);
32221 if ac_fn_c_try_compile "$LINENO"
32223 gl_cv_decl_readlink_works=yes
32225 gl_cv_decl_readlink_works=no
32227 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
32230 printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
32231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
32232 printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
32233 if test ${gl_cv_func_readlink_trailing_slash+y}
32235 printf %s "(cached) " >&6
32237 # We have readlink, so assume ln -s works.
32238 ln -s conftest.no-such conftest.link
32239 ln -s conftest.link conftest.lnk2
32240 if test "$cross_compiling" = yes
32243 # Guess yes on Linux or glibc systems.
32244 linux-* | linux | *-gnu* | gnu*)
32245 gl_cv_func_readlink_trailing_slash="guessing yes" ;;
32246 # Guess no on AIX or HP-UX.
32248 gl_cv_func_readlink_trailing_slash="guessing no" ;;
32249 # If we don't know, obey --enable-cross-guesses.
32251 gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
32255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32256 /* end confdefs.h. */
32257 #include <unistd.h>
32263 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
32268 if ac_fn_c_try_run "$LINENO"
32270 gl_cv_func_readlink_trailing_slash=yes
32272 gl_cv_func_readlink_trailing_slash=no
32274 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32275 conftest.$ac_objext conftest.beam conftest.$ac_ext
32278 rm -f conftest.link conftest.lnk2
32280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
32281 printf "%s\n" "$gl_cv_func_readlink_trailing_slash" >&6; }
32282 case "$gl_cv_func_readlink_trailing_slash" in
32284 if test "$gl_cv_decl_readlink_works" != yes; then
32290 printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
32296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
32297 printf %s "checking whether readlink truncates results correctly... " >&6; }
32298 if test ${gl_cv_func_readlink_truncate+y}
32300 printf %s "(cached) " >&6
32302 # We have readlink, so assume ln -s works.
32303 ln -s ab conftest.link
32304 if test "$cross_compiling" = yes
32307 # Guess yes on Linux or glibc systems.
32308 linux-* | linux | *-gnu* | gnu*)
32309 gl_cv_func_readlink_truncate="guessing yes" ;;
32310 # Guess no on AIX or HP-UX.
32312 gl_cv_func_readlink_truncate="guessing no" ;;
32313 # If we don't know, obey --enable-cross-guesses.
32315 gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
32319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32320 /* end confdefs.h. */
32321 #include <unistd.h>
32327 return readlink ("conftest.link", &c, 1) != 1;
32332 if ac_fn_c_try_run "$LINENO"
32334 gl_cv_func_readlink_truncate=yes
32336 gl_cv_func_readlink_truncate=no
32338 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32339 conftest.$ac_objext conftest.beam conftest.$ac_ext
32342 rm -f conftest.link conftest.lnk2
32344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
32345 printf "%s\n" "$gl_cv_func_readlink_truncate" >&6; }
32346 case $gl_cv_func_readlink_truncate in
32348 if test "$gl_cv_decl_readlink_works" != yes; then
32354 printf "%s\n" "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
32361 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
32370 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
32385 GL_GNULIB_READLINK=1
32391 printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
32398 if test $REPLACE_REALLOC = 0; then
32400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realloc (0, 0) returns nonnull" >&5
32401 printf %s "checking whether realloc (0, 0) returns nonnull... " >&6; }
32402 if test ${ac_cv_func_realloc_0_nonnull+y}
32404 printf %s "(cached) " >&6
32406 if test "$cross_compiling" = yes
32409 # Guess yes on platforms where we know the result.
32410 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
32411 | gnu* | *-musl* | midnightbsd* \
32412 | hpux* | solaris* | cygwin* | mingw* | msys* )
32413 ac_cv_func_realloc_0_nonnull="guessing yes" ;;
32414 # If we don't know, obey --enable-cross-guesses.
32415 *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
32419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32420 /* end confdefs.h. */
32421 #include <stdlib.h>
32426 void *p = realloc (0, 0);
32435 if ac_fn_c_try_run "$LINENO"
32437 ac_cv_func_realloc_0_nonnull=yes
32439 ac_cv_func_realloc_0_nonnull=no
32441 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32442 conftest.$ac_objext conftest.beam conftest.$ac_ext
32447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
32448 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
32449 case $ac_cv_func_realloc_0_nonnull in #(
32453 REPLACE_REALLOC=1 ;;
32458 if test $REPLACE_REALLOC = 1; then
32467 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
32473 if test $REPLACE_MALLOC = 1; then
32477 if test $REPLACE_REALLOC = 1; then
32486 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
32498 GL_GNULIB_REALLOC_POSIX=1
32504 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
32513 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
32514 if test "x$ac_cv_func_reallocarray" = xyes
32516 printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
32520 if test "$ac_cv_func_reallocarray" = no; then
32521 HAVE_REALLOCARRAY=0
32522 elif test "$gl_cv_malloc_ptrdiff" = no; then
32523 REPLACE_REALLOCARRAY=1
32526 if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then
32535 gl_LIBOBJS="$gl_LIBOBJS reallocarray.$ac_objext"
32541 printf "%s\n" "#define GNULIB_REALLOCARRAY 1" >>confdefs.h
32553 GL_GNULIB_REALLOCARRAY=1
32559 printf "%s\n" "#define GNULIB_TEST_REALLOCARRAY 1" >>confdefs.h
32565 # Check whether --with-included-regex was given.
32566 if test ${with_included_regex+y}
32568 withval=$with_included_regex;
32572 case $with_included_regex in #(
32573 yes|no) ac_use_included_regex=$with_included_regex
32576 # If the system regex support is good enough that it passes the
32577 # following run test, then default to *not* using the included regex.c.
32578 # If cross compiling, assume the test would fail and use the included
32582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
32583 printf %s "checking for working re_compile_pattern... " >&6; }
32584 if test ${gl_cv_func_re_compile_pattern_working+y}
32586 printf %s "(cached) " >&6
32588 if test "$cross_compiling" = yes
32591 # Guess no on native Windows.
32592 mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
32593 # Otherwise obey --enable-cross-guesses.
32594 *) gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
32598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32599 /* end confdefs.h. */
32602 #include <locale.h>
32603 #include <limits.h>
32604 #include <string.h>
32606 #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
32607 # include <signal.h>
32608 # include <unistd.h>
32612 # include <malloc.h>
32615 #ifdef M_CHECK_ACTION
32616 /* Exit with distinguishable exit code. */
32617 static void sigabrt_no_core (int sig) { raise (SIGTERM); }
32624 static struct re_pattern_buffer regex;
32625 unsigned char folded_chars[UCHAR_MAX + 1];
32628 struct re_registers regs;
32630 /* Some builds of glibc go into an infinite loop on this
32631 test. Use alarm to force death, and mallopt to avoid
32632 malloc recursion in diagnosing the corrupted heap. */
32633 #if HAVE_DECL_ALARM
32634 signal (SIGALRM, SIG_DFL);
32637 #ifdef M_CHECK_ACTION
32638 signal (SIGABRT, sigabrt_no_core);
32639 mallopt (M_CHECK_ACTION, 2);
32642 if (setlocale (LC_ALL, "en_US.UTF-8"))
32645 /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
32646 This test needs valgrind to catch the bug on Debian
32647 GNU/Linux 3.1 x86, but it might catch the bug better
32648 on other platforms and it shouldn't hurt to try the
32650 static char const pat[] = "insert into";
32651 static char const data[] =
32652 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
32653 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
32655 memset (®ex, 0, sizeof regex);
32656 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
32661 if (re_search (®ex, data, sizeof data - 1,
32662 0, sizeof data - 1, ®s)
32670 /* This test is from glibc bug 15078.
32671 The test case is from Andreas Schwab in
32672 <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
32674 static char const pat[] = "[^x]x";
32675 static char const data[] =
32676 /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
32687 memset (®ex, 0, sizeof regex);
32688 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
32693 i = re_search (®ex, data, sizeof data - 1,
32694 0, sizeof data - 1, 0);
32695 if (i != 0 && i != 21)
32701 if (! setlocale (LC_ALL, "C"))
32705 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
32706 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
32707 memset (®ex, 0, sizeof regex);
32708 s = re_compile_pattern ("a[^x]b", 6, ®ex);
32713 /* This should fail, but succeeds for glibc-2.5. */
32714 if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1)
32719 /* This regular expression is from Spencer ere test number 75
32721 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
32722 memset (®ex, 0, sizeof regex);
32723 for (i = 0; i <= UCHAR_MAX; i++)
32724 folded_chars[i] = i;
32725 regex.translate = folded_chars;
32726 s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex);
32727 /* This should fail with _Invalid character class name_ error. */
32734 /* Ensure that [b-a] is diagnosed as invalid, when
32735 using RE_NO_EMPTY_RANGES. */
32736 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
32737 memset (®ex, 0, sizeof regex);
32738 s = re_compile_pattern ("a[b-a]", 6, ®ex);
32745 /* This should succeed, but does not for glibc-2.1.3. */
32746 memset (®ex, 0, sizeof regex);
32747 s = re_compile_pattern ("{1", 2, ®ex);
32753 /* The following example is derived from a problem report
32754 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
32755 memset (®ex, 0, sizeof regex);
32756 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
32761 /* This should match, but does not for glibc-2.2.1. */
32762 if (re_match (®ex, "an", 2, 0, ®s) != 2)
32772 memset (®ex, 0, sizeof regex);
32773 s = re_compile_pattern ("x", 1, ®ex);
32778 /* glibc-2.2.93 does not work with a negative RANGE argument. */
32779 if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
32789 /* The version of regex.c in older versions of gnulib
32790 ignored RE_ICASE. Detect that problem too. */
32791 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
32792 memset (®ex, 0, sizeof regex);
32793 s = re_compile_pattern ("x", 1, ®ex);
32798 if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0)
32808 /* Catch a bug reported by Vin Shelton in
32809 https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
32811 re_set_syntax (RE_SYNTAX_POSIX_BASIC
32812 & ~RE_CONTEXT_INVALID_DUP
32813 & ~RE_NO_EMPTY_RANGES);
32814 memset (®ex, 0, sizeof regex);
32815 s = re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, ®ex);
32821 /* REG_STARTEND was added to glibc on 2004-01-15.
32822 Reject older versions. */
32823 if (! REG_STARTEND)
32826 /* Matching with the compiled form of this regexp would provoke
32827 an assertion failure prior to glibc-2.28:
32828 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
32829 With glibc-2.28, compilation fails and reports the invalid
32831 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
32832 memset (®ex, 0, sizeof regex);
32833 s = re_compile_pattern ("0|()0|\\\\1|0", 10, ®ex);
32836 memset (®s, 0, sizeof regs);
32837 i = re_search (®ex, "x", 1, 0, 1, ®s);
32849 if (strcmp (s, "Invalid back reference"))
32853 /* glibc bug 11053. */
32854 re_set_syntax (RE_SYNTAX_POSIX_BASIC);
32855 memset (®ex, 0, sizeof regex);
32856 static char const pat_sub2[] = "\\\\(a*\\\\)*a*\\\\1";
32857 s = re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, ®ex);
32862 memset (®s, 0, sizeof regs);
32863 static char const data[] = "a";
32864 int datalen = sizeof data - 1;
32865 i = re_search (®ex, data, datalen, 0, datalen, ®s);
32868 else if (regs.num_regs < 2)
32870 else if (! (regs.start[0] == 0 && regs.end[0] == 1))
32872 else if (! (regs.start[1] == 0 && regs.end[1] == 0))
32880 /* It would be nice to reject hosts whose regoff_t values are too
32881 narrow (including glibc on hosts with 64-bit ptrdiff_t and
32882 32-bit int), but we should wait until glibc implements this
32883 feature. Otherwise, support for equivalence classes and
32884 multibyte collation symbols would always be broken except
32885 when compiling --without-included-regex. */
32886 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
32887 || sizeof (regoff_t) < sizeof (ssize_t))
32897 if ac_fn_c_try_run "$LINENO"
32899 gl_cv_func_re_compile_pattern_working=yes
32901 gl_cv_func_re_compile_pattern_working=no
32903 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32904 conftest.$ac_objext conftest.beam conftest.$ac_ext
32909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
32910 printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
32911 case "$gl_cv_func_re_compile_pattern_working" in #(
32912 *yes) ac_use_included_regex=no;; #(
32913 *no) ac_use_included_regex=yes;;
32916 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
32920 if test $ac_use_included_regex = yes; then
32922 printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
32925 printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
32928 printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
32931 printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
32934 printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
32937 printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
32940 printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
32943 printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
32946 printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
32949 printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
32952 printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
32955 printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
32958 printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
32961 printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
32964 printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
32967 printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
32970 printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
32974 if test $ac_use_included_regex = yes; then
32983 gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
32991 ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
32992 if test "x$ac_cv_header_libintl_h" = xyes
32994 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
32999 ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
33000 " "$ac_c_undeclared_builtin_options" "CFLAGS"
33001 if test "x$ac_cv_have_decl_isblank" = xyes
33007 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
33013 if test $ac_cv_func_setenv = no; then
33016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
33017 printf %s "checking whether setenv validates arguments... " >&6; }
33018 if test ${gl_cv_func_setenv_works+y}
33020 printf %s "(cached) " >&6
33022 if test "$cross_compiling" = yes
33025 # Guess yes on glibc systems.
33026 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
33027 # Guess yes on musl systems.
33028 *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
33029 # If we don't know, obey --enable-cross-guesses.
33030 *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
33034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33035 /* end confdefs.h. */
33037 #include <stdlib.h>
33039 #include <string.h>
33047 if (setenv ("", "", 0) != -1)
33049 else if (errno != EINVAL)
33053 if (setenv ("a", "=", 1) != 0)
33055 else if (strcmp (getenv ("a"), "=") != 0)
33064 if ac_fn_c_try_run "$LINENO"
33066 gl_cv_func_setenv_works=yes
33068 gl_cv_func_setenv_works=no
33070 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33071 conftest.$ac_objext conftest.beam conftest.$ac_ext
33075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
33076 printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
33077 case "$gl_cv_func_setenv_works" in
33085 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
33094 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
33112 printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
33121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
33122 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
33123 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
33125 printf %s "(cached) " >&6
33128 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
33129 *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
33130 gl_cv_func_setlocale_null_all_mtsafe=no ;;
33131 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
33132 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
33133 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
33134 # If we don't know, obey --enable-cross-guesses.
33136 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
33140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
33141 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
33145 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
33146 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
33150 case "$gl_cv_func_setlocale_null_all_mtsafe" in
33151 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
33152 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
33155 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
33158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
33159 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
33160 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
33162 printf %s "(cached) " >&6
33165 # Guess no on OpenBSD, AIX.
33167 gl_cv_func_setlocale_null_one_mtsafe=no ;;
33168 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
33169 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
33170 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
33171 # If we don't know, obey --enable-cross-guesses.
33173 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
33177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
33178 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
33182 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
33183 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
33187 case "$gl_cv_func_setlocale_null_one_mtsafe" in
33188 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
33189 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
33192 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
33195 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
33197 mingw*) LIB_SETLOCALE_NULL= ;;
33201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
33202 printf %s "checking whether imported symbols can be declared weak... " >&6; }
33203 if test ${gl_cv_have_weak+y}
33205 printf %s "(cached) " >&6
33208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33209 /* end confdefs.h. */
33210 extern void xyzzy ();
33220 if ac_fn_c_try_link "$LINENO"
33222 gl_cv_have_weak=maybe
33224 rm -f core conftest.err conftest.$ac_objext conftest.beam \
33225 conftest$ac_exeext conftest.$ac_ext
33226 if test $gl_cv_have_weak = maybe; then
33227 if test "$cross_compiling" = yes
33229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33230 /* end confdefs.h. */
33232 Extensible Linking Format
33236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33237 $EGREP "Extensible Linking Format" >/dev/null 2>&1
33239 gl_cv_have_weak="guessing yes"
33241 gl_cv_have_weak="guessing no"
33247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33248 /* end confdefs.h. */
33254 return (fputs == NULL);
33257 if ac_fn_c_try_run "$LINENO"
33259 gl_cv_have_weak=yes
33263 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33264 conftest.$ac_objext conftest.beam conftest.$ac_ext
33268 case " $LDFLAGS " in
33269 *" -static "*) gl_cv_have_weak=no ;;
33271 case "$gl_cv_have_weak" in
33274 freebsd* | dragonfly* | midnightbsd*)
33276 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
33277 cat <<EOF > conftest2.c
33278 #include <pthread.h>
33279 #pragma weak pthread_mutexattr_gettype
33282 return (pthread_mutexattr_gettype != NULL);
33285 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
33286 || gl_cv_have_weak=no
33287 rm -f conftest1.c libempty.so conftest2.c conftest
33294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
33295 printf "%s\n" "$gl_cv_have_weak" >&6; }
33296 case "$gl_cv_have_weak" in
33299 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
33304 case "$gl_cv_have_weak" in
33305 *yes) LIB_SETLOCALE_NULL= ;;
33306 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
33311 LIB_SETLOCALE_NULL=
33315 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
33324 gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
33331 if test -n "$GCC"; then
33332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
33333 printf %s "checking whether the -Werror option is usable... " >&6; }
33334 if test ${gl_cv_cc_vis_werror+y}
33336 printf %s "(cached) " >&6
33338 gl_save_CFLAGS="$CFLAGS"
33339 CFLAGS="$CFLAGS -Werror"
33340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33341 /* end confdefs.h. */
33351 if ac_fn_c_try_compile "$LINENO"
33353 gl_cv_cc_vis_werror=yes
33355 gl_cv_cc_vis_werror=no
33357 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33358 CFLAGS="$gl_save_CFLAGS"
33361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
33362 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
33363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
33364 printf %s "checking for simple visibility declarations... " >&6; }
33365 if test ${gl_cv_cc_visibility+y}
33367 printf %s "(cached) " >&6
33369 gl_save_CFLAGS="$CFLAGS"
33370 CFLAGS="$CFLAGS -fvisibility=hidden"
33371 if test $gl_cv_cc_vis_werror = yes; then
33372 CFLAGS="$CFLAGS -Werror"
33374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33375 /* end confdefs.h. */
33376 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
33377 extern __attribute__((__visibility__("default"))) int exportedvar;
33378 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
33379 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
33380 void dummyfunc (void);
33383 int hiddenfunc (void) { return 51; }
33384 int exportedfunc (void) { return 1225736919; }
33385 void dummyfunc (void) {}
33395 if ac_fn_c_try_compile "$LINENO"
33397 gl_cv_cc_visibility=yes
33399 gl_cv_cc_visibility=no
33401 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33402 CFLAGS="$gl_save_CFLAGS"
33405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
33406 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
33407 if test $gl_cv_cc_visibility = yes; then
33408 CFLAG_VISIBILITY="-fvisibility=hidden"
33415 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
33429 GL_GNULIB_SETLOCALE_NULL=1
33435 printf "%s\n" "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
33447 # Check whether --with-libsigsegv was given.
33448 if test ${with_libsigsegv+y}
33450 withval=$with_libsigsegv;
33453 SIGSEGV_H=sigsegv.h
33454 if test "$with_libsigsegv" = yes; then
33470 acl_save_prefix="$prefix"
33471 prefix="$acl_final_prefix"
33472 acl_save_exec_prefix="$exec_prefix"
33473 exec_prefix="$acl_final_exec_prefix"
33475 eval additional_includedir=\"$includedir\"
33476 eval additional_libdir=\"$libdir\"
33477 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
33478 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
33480 exec_prefix="$acl_save_exec_prefix"
33481 prefix="$acl_save_prefix"
33484 # Check whether --with-libsigsegv-prefix was given.
33485 if test ${with_libsigsegv_prefix+y}
33487 withval=$with_libsigsegv_prefix;
33488 if test "X$withval" = "Xno"; then
33491 if test "X$withval" = "X"; then
33493 acl_save_prefix="$prefix"
33494 prefix="$acl_final_prefix"
33495 acl_save_exec_prefix="$exec_prefix"
33496 exec_prefix="$acl_final_exec_prefix"
33498 eval additional_includedir=\"$includedir\"
33499 eval additional_libdir=\"$libdir\"
33500 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
33501 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
33503 exec_prefix="$acl_save_exec_prefix"
33504 prefix="$acl_save_prefix"
33507 additional_includedir="$withval/include"
33508 additional_libdir="$withval/$acl_libdirstem"
33509 additional_libdir2="$withval/$acl_libdirstem2"
33510 additional_libdir3="$withval/$acl_libdirstem3"
33516 if test "X$additional_libdir2" = "X$additional_libdir"; then
33517 additional_libdir2=
33519 if test "X$additional_libdir3" = "X$additional_libdir"; then
33520 additional_libdir3=
33529 names_already_handled=
33530 names_next_round='sigsegv '
33531 while test -n "$names_next_round"; do
33532 names_this_round="$names_next_round"
33534 for name in $names_this_round; do
33536 for n in $names_already_handled; do
33537 if test "$n" = "$name"; then
33538 already_handled=yes
33542 if test -z "$already_handled"; then
33543 names_already_handled="$names_already_handled $name"
33544 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
33545 eval value=\"\$HAVE_LIB$uppername\"
33546 if test -n "$value"; then
33547 if test "$value" = yes; then
33548 eval value=\"\$LIB$uppername\"
33549 test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
33550 eval value=\"\$LTLIB$uppername\"
33551 test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
33560 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
33561 if test -n "$acl_shlibext"; then
33562 shrext=".$acl_shlibext" # typically: shrext=.so
33566 if test $use_additional = yes; then
33567 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
33568 if test "X$found_dir" = "X"; then
33569 eval dir=\$$additional_libdir_variable
33570 if test -n "$dir"; then
33571 if test -n "$acl_shlibext"; then
33572 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
33574 found_so="$dir/$libname$shrext"
33576 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
33577 ver=`(cd "$dir" && \
33578 for f in "$libname$shrext".*; do echo "$f"; done \
33579 | sed -e "s,^$libname$shrext\\\\.,," \
33580 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
33581 | sed 1q ) 2>/dev/null`
33582 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
33584 found_so="$dir/$libname$shrext.$ver"
33587 eval library_names=\"$acl_library_names_spec\"
33588 for f in $library_names; do
33589 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
33598 if test "X$found_dir" = "X"; then
33599 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
33601 found_a="$dir/$libname.$acl_libext"
33604 if test "X$found_dir" != "X"; then
33605 if test -f "$dir/$libname.la"; then
33606 found_la="$dir/$libname.la"
33613 if test "X$found_dir" = "X"; then
33614 for x in $LDFLAGS $LTLIBSIGSEGV; do
33616 acl_save_prefix="$prefix"
33617 prefix="$acl_final_prefix"
33618 acl_save_exec_prefix="$exec_prefix"
33619 exec_prefix="$acl_final_exec_prefix"
33621 exec_prefix="$acl_save_exec_prefix"
33622 prefix="$acl_save_prefix"
33626 dir=`echo "X$x" | sed -e 's/^X-L//'`
33627 if test -n "$acl_shlibext"; then
33628 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
33630 found_so="$dir/$libname$shrext"
33632 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
33633 ver=`(cd "$dir" && \
33634 for f in "$libname$shrext".*; do echo "$f"; done \
33635 | sed -e "s,^$libname$shrext\\\\.,," \
33636 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
33637 | sed 1q ) 2>/dev/null`
33638 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
33640 found_so="$dir/$libname$shrext.$ver"
33643 eval library_names=\"$acl_library_names_spec\"
33644 for f in $library_names; do
33645 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
33654 if test "X$found_dir" = "X"; then
33655 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
33657 found_a="$dir/$libname.$acl_libext"
33660 if test "X$found_dir" != "X"; then
33661 if test -f "$dir/$libname.la"; then
33662 found_la="$dir/$libname.la"
33667 if test "X$found_dir" != "X"; then
33672 if test "X$found_dir" != "X"; then
33673 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
33674 if test "X$found_so" != "X"; then
33675 if test "$enable_rpath" = no \
33676 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
33677 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
33678 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
33679 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
33682 for x in $ltrpathdirs; do
33683 if test "X$x" = "X$found_dir"; then
33688 if test -z "$haveit"; then
33689 ltrpathdirs="$ltrpathdirs $found_dir"
33691 if test "$acl_hardcode_direct" = yes; then
33692 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
33694 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
33695 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
33697 for x in $rpathdirs; do
33698 if test "X$x" = "X$found_dir"; then
33703 if test -z "$haveit"; then
33704 rpathdirs="$rpathdirs $found_dir"
33708 for x in $LDFLAGS $LIBSIGSEGV; do
33710 acl_save_prefix="$prefix"
33711 prefix="$acl_final_prefix"
33712 acl_save_exec_prefix="$exec_prefix"
33713 exec_prefix="$acl_final_exec_prefix"
33715 exec_prefix="$acl_save_exec_prefix"
33716 prefix="$acl_save_prefix"
33718 if test "X$x" = "X-L$found_dir"; then
33723 if test -z "$haveit"; then
33724 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
33726 if test "$acl_hardcode_minus_L" != no; then
33727 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
33729 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
33735 if test "X$found_a" != "X"; then
33736 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
33738 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
33741 additional_includedir=
33742 case "$found_dir" in
33743 */$acl_libdirstem | */$acl_libdirstem/)
33744 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
33745 if test "$name" = 'sigsegv'; then
33746 LIBSIGSEGV_PREFIX="$basedir"
33748 additional_includedir="$basedir/include"
33750 */$acl_libdirstem2 | */$acl_libdirstem2/)
33751 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
33752 if test "$name" = 'sigsegv'; then
33753 LIBSIGSEGV_PREFIX="$basedir"
33755 additional_includedir="$basedir/include"
33757 */$acl_libdirstem3 | */$acl_libdirstem3/)
33758 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
33759 if test "$name" = 'sigsegv'; then
33760 LIBSIGSEGV_PREFIX="$basedir"
33762 additional_includedir="$basedir/include"
33765 if test "X$additional_includedir" != "X"; then
33766 if test "X$additional_includedir" != "X/usr/include"; then
33768 if test "X$additional_includedir" = "X/usr/local/include"; then
33769 if test -n "$GCC"; then
33771 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
33775 if test -z "$haveit"; then
33776 for x in $CPPFLAGS $INCSIGSEGV; do
33778 acl_save_prefix="$prefix"
33779 prefix="$acl_final_prefix"
33780 acl_save_exec_prefix="$exec_prefix"
33781 exec_prefix="$acl_final_exec_prefix"
33783 exec_prefix="$acl_save_exec_prefix"
33784 prefix="$acl_save_prefix"
33786 if test "X$x" = "X-I$additional_includedir"; then
33791 if test -z "$haveit"; then
33792 if test -d "$additional_includedir"; then
33793 INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
33799 if test -n "$found_la"; then
33800 save_libdir="$libdir"
33801 case "$found_la" in
33802 */* | *\\*) . "$found_la" ;;
33803 *) . "./$found_la" ;;
33805 libdir="$save_libdir"
33806 for dep in $dependency_libs; do
33809 dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
33810 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
33811 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
33812 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
33814 if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
33815 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
33816 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
33817 if test -n "$GCC"; then
33819 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
33823 if test -z "$haveit"; then
33825 for x in $LDFLAGS $LIBSIGSEGV; do
33827 acl_save_prefix="$prefix"
33828 prefix="$acl_final_prefix"
33829 acl_save_exec_prefix="$exec_prefix"
33830 exec_prefix="$acl_final_exec_prefix"
33832 exec_prefix="$acl_save_exec_prefix"
33833 prefix="$acl_save_prefix"
33835 if test "X$x" = "X-L$dependency_libdir"; then
33840 if test -z "$haveit"; then
33841 if test -d "$dependency_libdir"; then
33842 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$dependency_libdir"
33846 for x in $LDFLAGS $LTLIBSIGSEGV; do
33848 acl_save_prefix="$prefix"
33849 prefix="$acl_final_prefix"
33850 acl_save_exec_prefix="$exec_prefix"
33851 exec_prefix="$acl_final_exec_prefix"
33853 exec_prefix="$acl_save_exec_prefix"
33854 prefix="$acl_save_prefix"
33856 if test "X$x" = "X-L$dependency_libdir"; then
33861 if test -z "$haveit"; then
33862 if test -d "$dependency_libdir"; then
33863 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$dependency_libdir"
33870 dir=`echo "X$dep" | sed -e 's/^X-R//'`
33871 if test "$enable_rpath" != no; then
33873 for x in $rpathdirs; do
33874 if test "X$x" = "X$dir"; then
33879 if test -z "$haveit"; then
33880 rpathdirs="$rpathdirs $dir"
33883 for x in $ltrpathdirs; do
33884 if test "X$x" = "X$dir"; then
33889 if test -z "$haveit"; then
33890 ltrpathdirs="$ltrpathdirs $dir"
33895 dep=`echo "X$dep" | sed -e 's/^X-l//'`
33896 if test "X$dep" != Xc \
33897 || case $host_os in
33898 linux* | gnu* | k*bsd*-gnu) false ;;
33901 names_next_round="$names_next_round $dep"
33905 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
33908 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
33909 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
33915 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
33916 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
33922 if test "X$rpathdirs" != "X"; then
33923 if test -n "$acl_hardcode_libdir_separator"; then
33925 for found_dir in $rpathdirs; do
33926 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
33928 acl_save_libdir="$libdir"
33930 eval flag=\"$acl_hardcode_libdir_flag_spec\"
33931 libdir="$acl_save_libdir"
33932 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
33934 for found_dir in $rpathdirs; do
33935 acl_save_libdir="$libdir"
33936 libdir="$found_dir"
33937 eval flag=\"$acl_hardcode_libdir_flag_spec\"
33938 libdir="$acl_save_libdir"
33939 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
33943 if test "X$ltrpathdirs" != "X"; then
33944 for found_dir in $ltrpathdirs; do
33945 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
33954 ac_save_CPPFLAGS="$CPPFLAGS"
33956 for element in $INCSIGSEGV; do
33958 for x in $CPPFLAGS; do
33960 acl_save_prefix="$prefix"
33961 prefix="$acl_final_prefix"
33962 acl_save_exec_prefix="$exec_prefix"
33963 exec_prefix="$acl_final_exec_prefix"
33965 exec_prefix="$acl_save_exec_prefix"
33966 prefix="$acl_save_prefix"
33968 if test "X$x" = "X$element"; then
33973 if test -z "$haveit"; then
33974 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
33979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
33980 printf %s "checking for libsigsegv... " >&6; }
33981 if test ${ac_cv_libsigsegv+y}
33983 printf %s "(cached) " >&6
33986 ac_save_LIBS="$LIBS"
33987 case " $LIBSIGSEGV" in
33988 *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
33989 *) LIBS="$LIBSIGSEGV $LIBS" ;;
33991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33992 /* end confdefs.h. */
33993 #include <sigsegv.h>
33997 sigsegv_deinstall_handler();
34002 if ac_fn_c_try_link "$LINENO"
34004 ac_cv_libsigsegv=yes
34006 ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
34008 rm -f core conftest.err conftest.$ac_objext conftest.beam \
34009 conftest$ac_exeext conftest.$ac_ext
34010 LIBS="$ac_save_LIBS"
34013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
34014 printf "%s\n" "$ac_cv_libsigsegv" >&6; }
34015 if test "$ac_cv_libsigsegv" = yes; then
34016 HAVE_LIBSIGSEGV=yes
34018 printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
34020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
34021 printf %s "checking how to link with libsigsegv... " >&6; }
34022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
34023 printf "%s\n" "$LIBSIGSEGV" >&6; }
34026 CPPFLAGS="$ac_save_CPPFLAGS"
34038 gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
34040 if test "$gl_cv_lib_sigsegv" = yes; then
34045 if test -n "$SIGSEGV_H"; then
34046 GL_GENERATE_SIGSEGV_H_TRUE=
34047 GL_GENERATE_SIGSEGV_H_FALSE='#'
34049 GL_GENERATE_SIGSEGV_H_TRUE='#'
34050 GL_GENERATE_SIGSEGV_H_FALSE=
34053 if test -n "$SIGSEGV_H"; then
34059 printf "%s\n" "#define SOLARIS11 1" >>confdefs.h
34066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack direction" >&5
34067 printf %s "checking for stack direction... " >&6; }
34068 if test ${sv_cv_stack_direction_msg+y}
34070 printf %s "(cached) " >&6
34073 case "$host_cpu" in
34078 arm* | strongarm* | xscale* | \
34081 c1 | c2 | c32 | c34 | c38 | \
34105 powerpc* | rs6000 | \
34114 sv_cv_stack_direction=-1 ;;
34118 hppa* | parisc* | \
34121 sv_cv_stack_direction=1 ;;
34123 if test $cross_compiling = no; then
34124 cat > conftest.c <<EOF
34127 find_stack_direction (int *addr, int depth)
34129 int dir, dummy = 0;
34132 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
34133 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
34134 return dir + dummy;
34137 main (int argc, char *argv)
34139 printf ("%d\n", find_stack_direction (NULL, argc + 20));
34143 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34144 (eval $ac_link) 2>&5
34146 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34147 test $ac_status = 0; }
34148 sv_cv_stack_direction=`./conftest`
34150 sv_cv_stack_direction=0
34154 case $sv_cv_stack_direction in
34155 1) sv_cv_stack_direction_msg="grows up";;
34156 -1) sv_cv_stack_direction_msg="grows down";;
34157 *) sv_cv_stack_direction_msg="unknown";;
34161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_stack_direction_msg" >&5
34162 printf "%s\n" "$sv_cv_stack_direction_msg" >&6; }
34164 printf "%s\n" "#define STACK_DIRECTION $sv_cv_stack_direction" >>confdefs.h
34173 if test "$ac_cv_func_sigaltstack" = yes; then
34174 ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "
34175 #include <signal.h>
34176 #if HAVE_SYS_SIGNAL_H
34177 # include <sys/signal.h>
34181 if test "x$ac_cv_type_stack_t" = xyes
34186 printf "%s\n" "#define stack_t struct sigaltstack" >>confdefs.h
34193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sigaltstack" >&5
34194 printf %s "checking for working sigaltstack... " >&6; }
34195 if test ${sv_cv_sigaltstack+y}
34197 printf %s "(cached) " >&6
34200 if test "$ac_cv_func_sigaltstack" = yes; then
34202 macos* | darwin[6-9]* | darwin[1-9][0-9]*)
34203 # On MacOS X 10.2 or newer, just assume that if it compiles, it will
34204 # work. If we were to perform the real test, 1 Crash Report dialog
34205 # window would pop up.
34206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34207 /* end confdefs.h. */
34209 #include <signal.h>
34213 int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
34218 if ac_fn_c_try_link "$LINENO"
34220 sv_cv_sigaltstack="guessing yes"
34222 sv_cv_sigaltstack=no
34224 rm -f core conftest.err conftest.$ac_objext conftest.beam \
34225 conftest$ac_exeext conftest.$ac_ext
34228 if test "$cross_compiling" = yes
34233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34234 /* end confdefs.h. */
34236 #include <signal.h>
34240 int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
34245 if ac_fn_c_try_link "$LINENO"
34247 sv_cv_sigaltstack="guessing yes"
34249 sv_cv_sigaltstack=no
34251 rm -f core conftest.err conftest.$ac_objext conftest.beam \
34252 conftest$ac_exeext conftest.$ac_ext
34257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34258 /* end confdefs.h. */
34261 #include <stdlib.h>
34262 #include <signal.h>
34263 #if HAVE_SYS_SIGNAL_H
34264 # include <sys/signal.h>
34267 # include <sys/types.h>
34268 # include <sys/time.h>
34269 # include <sys/resource.h>
34271 void stackoverflow_handler (int sig)
34273 /* If we get here, the stack overflow was caught. */
34276 volatile int * recurse_1 (volatile int n, volatile int *p)
34279 *recurse_1 (n + 1, p) += n;
34282 int recurse (volatile int n)
34285 return *recurse_1 (n, &sum);
34287 char mystack[2 * (1 << 24)];
34291 struct sigaction action;
34292 #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK
34293 /* Before starting the endless recursion, try to be friendly to the user's
34294 machine. On some Linux 2.2.x systems, there is no stack limit for user
34295 processes at all. We don't want to kill such systems. */
34297 rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
34298 setrlimit (RLIMIT_STACK, &rl);
34300 /* Install the alternate stack. Use the midpoint of mystack, to guard
34301 against a buggy interpretation of ss_sp on IRIX. */
34303 if (sizeof mystack / 2 < SIGSTKSZ)
34306 altstack.ss_sp = mystack + sizeof mystack / 2;
34307 altstack.ss_size = sizeof mystack / 2;
34308 altstack.ss_flags = 0; /* no SS_DISABLE */
34309 if (sigaltstack (&altstack, NULL) < 0)
34311 /* Install the SIGSEGV handler. */
34312 sigemptyset (&action.sa_mask);
34313 action.sa_handler = &stackoverflow_handler;
34314 action.sa_flags = SA_ONSTACK;
34315 sigaction (SIGSEGV, &action, (struct sigaction *) NULL);
34316 sigaction (SIGBUS, &action, (struct sigaction *) NULL);
34317 /* Provoke a stack overflow. */
34322 if ac_fn_c_try_run "$LINENO"
34324 sv_cv_sigaltstack=yes
34326 sv_cv_sigaltstack=no
34328 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34329 conftest.$ac_objext conftest.beam conftest.$ac_ext
34335 sv_cv_sigaltstack=no
34339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack" >&5
34340 printf "%s\n" "$sv_cv_sigaltstack" >&6; }
34341 if test "$sv_cv_sigaltstack" != no; then
34343 printf "%s\n" "#define HAVE_WORKING_SIGALTSTACK 1" >>confdefs.h
34346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
34347 printf %s "checking for correct stack_t interpretation... " >&6; }
34348 if test ${sv_cv_sigaltstack_low_base+y}
34350 printf %s "(cached) " >&6
34353 if test "$cross_compiling" = yes
34357 irix5*) sv_cv_sigaltstack_low_base="no" ;;
34358 *) sv_cv_sigaltstack_low_base="guessing yes" ;;
34362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34363 /* end confdefs.h. */
34366 #include <stdlib.h>
34367 #include <signal.h>
34368 #if HAVE_SYS_SIGNAL_H
34369 # include <sys/signal.h>
34371 volatile char *stack_lower_bound;
34372 volatile char *stack_upper_bound;
34373 static void check_stack_location (volatile char *addr)
34375 if (addr >= stack_lower_bound && addr <= stack_upper_bound)
34380 static void stackoverflow_handler (int sig)
34383 check_stack_location (&dummy);
34385 char mystack[2 * (1 << 24)];
34389 struct sigaction action;
34390 /* Install the alternate stack. */
34391 altstack.ss_sp = mystack + sizeof mystack / 2;
34392 altstack.ss_size = sizeof mystack / 2;
34393 stack_lower_bound = (char *) altstack.ss_sp;
34394 stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
34395 altstack.ss_flags = 0; /* no SS_DISABLE */
34396 if (sigaltstack (&altstack, NULL) < 0)
34398 /* Install the SIGSEGV handler. */
34399 sigemptyset (&action.sa_mask);
34400 action.sa_handler = &stackoverflow_handler;
34401 action.sa_flags = SA_ONSTACK;
34402 if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
34404 /* Provoke a SIGSEGV. */
34409 if ac_fn_c_try_run "$LINENO"
34411 sv_cv_sigaltstack_low_base=yes
34413 sv_cv_sigaltstack_low_base=no
34415 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34416 conftest.$ac_objext conftest.beam conftest.$ac_ext
34421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack_low_base" >&5
34422 printf "%s\n" "$sv_cv_sigaltstack_low_base" >&6; }
34423 if test "$sv_cv_sigaltstack_low_base" = no; then
34425 printf "%s\n" "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
34433 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
34434 if test "x$ac_cv_header_stdint_h" = xyes
34436 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
34440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
34441 printf %s "checking for SIZE_MAX... " >&6; }
34442 if test ${gl_cv_size_max+y}
34444 printf %s "(cached) " >&6
34448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34449 /* end confdefs.h. */
34451 #include <limits.h>
34453 #include <stdint.h>
34460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34461 $EGREP "Found it" >/dev/null 2>&1
34467 if test $gl_cv_size_max != yes; then
34468 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
34469 #include <limits.h>"
34473 size_t_bits_minus_1=
34476 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"
34483 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
34484 if test $fits_in_uint = 1; then
34485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34486 /* end confdefs.h. */
34487 #include <stddef.h>
34489 extern unsigned long foo;
34499 if ac_fn_c_try_compile "$LINENO"
34503 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34505 if test $fits_in_uint = 1; then
34506 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
34508 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
34511 gl_cv_size_max='((size_t)~(size_t)0)'
34516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
34517 printf "%s\n" "$gl_cv_size_max" >&6; }
34518 if test "$gl_cv_size_max" != yes; then
34520 printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
34526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
34527 printf %s "checking for ssize_t... " >&6; }
34528 if test ${gt_cv_ssize_t+y}
34530 printf %s "(cached) " >&6
34532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34533 /* end confdefs.h. */
34534 #include <sys/types.h>
34538 int x = sizeof (ssize_t *) + sizeof (ssize_t);
34544 if ac_fn_c_try_compile "$LINENO"
34550 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
34553 printf "%s\n" "$gt_cv_ssize_t" >&6; }
34554 if test $gt_cv_ssize_t = no; then
34556 printf "%s\n" "#define ssize_t int" >>confdefs.h
34569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
34570 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
34571 if test ${gl_cv_func_stat_file_slash+y}
34573 printf %s "(cached) " >&6
34576 # Assume that if we have lstat, we can also check symlinks.
34577 if test $ac_cv_func_lstat = yes; then
34578 ln -s conftest.tmp conftest.lnk
34580 if test "$cross_compiling" = yes
34583 # Guess yes on Linux systems.
34584 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
34585 # Guess yes on glibc systems.
34586 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
34587 # If we don't know, obey --enable-cross-guesses.
34588 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
34592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34593 /* end confdefs.h. */
34594 #include <sys/stat.h>
34601 if (!stat ("conftest.tmp/", &st))
34604 if (!stat ("conftest.lnk/", &st))
34613 if ac_fn_c_try_run "$LINENO"
34615 gl_cv_func_stat_file_slash=yes
34617 gl_cv_func_stat_file_slash=no
34619 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34620 conftest.$ac_objext conftest.beam conftest.$ac_ext
34623 rm -f conftest.tmp conftest.lnk
34625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
34626 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
34627 case $gl_cv_func_stat_file_slash in
34631 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
34641 if test $REPLACE_STAT = 1; then
34650 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
34662 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
34687 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
34695 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>
34696 #include <sys/stat.h>
34698 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
34701 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
34703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
34704 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
34705 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
34707 printf %s "(cached) " >&6
34709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34710 /* end confdefs.h. */
34712 #include <sys/types.h>
34713 #include <sys/stat.h>
34714 #if HAVE_SYS_TIME_H
34715 # include <sys/time.h>
34718 struct timespec ts;
34731 if ac_fn_c_try_compile "$LINENO"
34733 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
34735 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
34737 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
34740 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
34741 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
34743 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
34747 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>
34748 #include <sys/stat.h>
34750 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
34753 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
34757 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
34758 #include <sys/stat.h>
34760 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
34763 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
34767 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>
34768 #include <sys/stat.h>
34770 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
34773 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
34788 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>
34789 #include <sys/stat.h>
34791 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
34794 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
34798 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
34799 #include <sys/stat.h>
34801 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
34804 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
34808 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>
34809 #include <sys/stat.h>
34811 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
34814 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
34825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
34826 printf %s "checking for working stdalign.h... " >&6; }
34827 if test ${gl_cv_header_working_stdalign_h+y}
34829 printf %s "(cached) " >&6
34831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34832 /* end confdefs.h. */
34833 #include <stdint.h>
34834 #include <stdalign.h>
34835 #include <stddef.h>
34837 /* Test that alignof yields a result consistent with offsetof.
34838 This catches GCC bug 52023
34839 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
34841 template <class t> struct alignof_helper { char a; t b; };
34842 # define ao(type) offsetof (alignof_helper<type>, b)
34844 # define ao(type) offsetof (struct { char a; type b; }, b)
34846 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
34847 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
34848 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
34850 /* Test _Alignas only on platforms where gnulib can help. */
34852 ((defined __cplusplus && 201103 <= __cplusplus) \
34853 || (__TINYC__ && defined __attribute__) \
34854 || (defined __APPLE__ && defined __MACH__ \
34855 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
34857 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
34858 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
34859 || 1300 <= _MSC_VER)
34860 struct alignas_test { char c; char alignas (8) alignas_8; };
34861 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
34873 if ac_fn_c_try_compile "$LINENO"
34875 gl_cv_header_working_stdalign_h=yes
34877 gl_cv_header_working_stdalign_h=no
34879 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
34882 printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
34884 if test $gl_cv_header_working_stdalign_h = yes; then
34887 STDALIGN_H='stdalign.h'
34891 if test -n "$STDALIGN_H"; then
34892 GL_GENERATE_STDALIGN_H_TRUE=
34893 GL_GENERATE_STDALIGN_H_FALSE='#'
34895 GL_GENERATE_STDALIGN_H_TRUE='#'
34896 GL_GENERATE_STDALIGN_H_FALSE=
34902 NEXT_STDARG_H='<stdarg.h>'
34903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
34904 printf %s "checking for va_copy... " >&6; }
34905 if test ${gl_cv_func_va_copy+y}
34907 printf %s "(cached) " >&6
34909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34910 /* end confdefs.h. */
34911 #include <stdarg.h>
34917 void (*func) (va_list, va_list) = va_copy;
34924 if ac_fn_c_try_compile "$LINENO"
34926 gl_cv_func_va_copy=yes
34928 gl_cv_func_va_copy=no
34930 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
34934 printf "%s\n" "$gl_cv_func_va_copy" >&6; }
34935 if test $gl_cv_func_va_copy = no; then
34936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34937 /* end confdefs.h. */
34938 #if defined _AIX && !defined __GNUC__
34943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34944 $EGREP "vaccine" >/dev/null 2>&1
34952 if test $gl_aixcc = yes; then
34962 if test $gl_cv_have_include_next = yes; then
34963 gl_cv_next_stdarg_h='<'stdarg.h'>'
34965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
34966 printf %s "checking absolute name of <stdarg.h>... " >&6; }
34967 if test ${gl_cv_next_stdarg_h+y}
34969 printf %s "(cached) " >&6
34974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34975 /* end confdefs.h. */
34976 #include <stdarg.h>
34979 aix*) gl_absname_cpp="$ac_cpp -C" ;;
34980 *) gl_absname_cpp="$ac_cpp" ;;
34985 gl_dirsep_regex='[/\\]'
34988 gl_dirsep_regex='\/'
34991 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34992 gl_header_literal_regex=`echo 'stdarg.h' \
34993 | sed -e "$gl_make_literal_regex_sed"`
34994 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34995 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
35001 gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
35002 sed -n "$gl_absolute_header_sed"`
35004 gl_header=$gl_cv_absolute_stdarg_h
35005 gl_cv_next_stdarg_h='"'$gl_header'"'
35009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
35010 printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
35012 NEXT_STDARG_H=$gl_cv_next_stdarg_h
35014 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
35015 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
35016 gl_next_as_first_directive='<'stdarg.h'>'
35018 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
35019 gl_next_as_first_directive=$gl_cv_next_stdarg_h
35021 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
35026 if test "$gl_cv_next_stdarg_h" = '""'; then
35027 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
35028 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
35033 exec 9>&6 6>/dev/null
35035 if test ${gl_cv_func___va_copy+y}
35037 printf %s "(cached) " >&6
35040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35041 /* end confdefs.h. */
35042 #include <stdarg.h>
35055 if ac_fn_c_try_compile "$LINENO"
35057 gl_cv_func___va_copy=yes
35059 gl_cv_func___va_copy=no
35061 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35068 if test $gl_cv_func___va_copy = yes; then
35070 printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
35075 printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
35081 if test -n "$STDARG_H"; then
35082 GL_GENERATE_STDARG_H_TRUE=
35083 GL_GENERATE_STDARG_H_FALSE='#'
35085 GL_GENERATE_STDARG_H_TRUE='#'
35086 GL_GENERATE_STDARG_H_FALSE=
35095 if test "$ac_cv_header_stdbool_h" = yes; then
35098 if test -z "$GCC"; then
35099 STDBOOL_H='stdbool.h'
35109 STDBOOL_H='stdbool.h'
35112 if test -n "$STDBOOL_H"; then
35113 GL_GENERATE_STDBOOL_H_TRUE=
35114 GL_GENERATE_STDBOOL_H_FALSE='#'
35116 GL_GENERATE_STDBOOL_H_TRUE='#'
35117 GL_GENERATE_STDBOOL_H_FALSE=
35121 if test "$ac_cv_type__Bool" = yes; then
35156 printf "%s\n" "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
35162 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
35180 printf "%s\n" "#define GNULIB_TEST_SCANF 1" >>confdefs.h
35186 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
35204 printf "%s\n" "#define GNULIB_TEST_FGETC 1" >>confdefs.h
35223 printf "%s\n" "#define GNULIB_TEST_GETC 1" >>confdefs.h
35236 GL_GNULIB_GETCHAR=1
35242 printf "%s\n" "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
35261 printf "%s\n" "#define GNULIB_TEST_FGETS 1" >>confdefs.h
35280 printf "%s\n" "#define GNULIB_TEST_FREAD 1" >>confdefs.h
35293 GL_GNULIB_FPRINTF=1
35299 printf "%s\n" "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
35318 printf "%s\n" "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
35331 GL_GNULIB_VFPRINTF=1
35337 printf "%s\n" "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
35350 GL_GNULIB_VPRINTF=1
35356 printf "%s\n" "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
35375 printf "%s\n" "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
35394 printf "%s\n" "#define GNULIB_TEST_PUTC 1" >>confdefs.h
35407 GL_GNULIB_PUTCHAR=1
35413 printf "%s\n" "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
35432 printf "%s\n" "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
35451 printf "%s\n" "#define GNULIB_TEST_PUTS 1" >>confdefs.h
35470 printf "%s\n" "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
35483 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
35484 if test "x$ac_cv_func_strcasecmp" = xyes
35486 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
35490 if test $ac_cv_func_strcasecmp = no; then
35496 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
35497 if test "x$ac_cv_func_strncasecmp" = xyes
35499 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
35503 if test $ac_cv_func_strncasecmp = yes; then
35508 ac_fn_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
35509 if test "x$ac_cv_have_decl_strncasecmp" = xyes
35515 printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h
35517 if test $ac_cv_have_decl_strncasecmp = no; then
35518 HAVE_DECL_STRNCASECMP=0
35522 if test $HAVE_STRCASECMP = 0; then
35531 gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
35537 if test $HAVE_STRNCASECMP = 0; then
35546 gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
35559 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
35560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
35561 printf %s "checking for working strerror function... " >&6; }
35562 if test ${gl_cv_func_working_strerror+y}
35564 printf %s "(cached) " >&6
35566 if test "$cross_compiling" = yes
35569 # Guess yes on glibc systems.
35570 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
35571 # Guess yes on musl systems.
35572 *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
35573 # If we don't know, obey --enable-cross-guesses.
35574 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
35578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35579 /* end confdefs.h. */
35580 #include <string.h>
35585 if (!*strerror (-2)) return 1;
35590 if ac_fn_c_try_run "$LINENO"
35592 gl_cv_func_working_strerror=yes
35594 gl_cv_func_working_strerror=no
35596 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35597 conftest.$ac_objext conftest.beam conftest.$ac_ext
35602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
35603 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
35604 case "$gl_cv_func_working_strerror" in
35611 case "$gl_cv_func_strerror_r_works" in
35612 *no) REPLACE_STRERROR=1 ;;
35619 if test $REPLACE_STRERROR = 1; then
35628 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
35633 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
35645 GL_GNULIB_STRERROR=1
35651 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
35657 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
35666 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
35672 if test $ac_cv_header_sys_socket_h != yes; then
35673 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
35674 if test "x$ac_cv_header_winsock2_h" = xyes
35676 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
35681 if test "$ac_cv_header_winsock2_h" = yes; then
35683 UNISTD_H_HAVE_WINSOCK2_H=1
35684 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
35691 if test $gl_cond_libtool = false; then
35692 gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
35693 gl_libdeps="$gl_libdeps $LIBICONV"
35713 if test $ac_cv_have_decl_strnlen = no; then
35714 HAVE_DECL_STRNLEN=0
35717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
35718 printf %s "checking for working strnlen... " >&6; }
35719 if test ${ac_cv_func_strnlen_working+y}
35721 printf %s "(cached) " >&6
35723 if test "$cross_compiling" = yes
35725 # Guess no on AIX systems, yes otherwise.
35727 aix*) ac_cv_func_strnlen_working=no;;
35728 *) ac_cv_func_strnlen_working=yes;;
35731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35732 /* end confdefs.h. */
35733 $ac_includes_default
35739 #define S_LEN (sizeof S - 1)
35741 /* At least one implementation is buggy: that of AIX 4.3 would
35742 give strnlen (S, 1) == 3. */
35745 for (i = 0; i < S_LEN + 1; ++i)
35747 int expected = i <= S_LEN ? i : S_LEN;
35748 if (strnlen (S, i) != expected)
35757 if ac_fn_c_try_run "$LINENO"
35759 ac_cv_func_strnlen_working=yes
35761 ac_cv_func_strnlen_working=no
35763 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35764 conftest.$ac_objext conftest.beam conftest.$ac_ext
35768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
35769 printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
35770 test $ac_cv_func_strnlen_working = no && :
35773 if test $ac_cv_func_strnlen_working = no; then
35778 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
35787 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
35800 GL_GNULIB_STRNLEN=1
35806 printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
35814 if test $ac_cv_func_strptime != yes; then
35818 if test $HAVE_STRPTIME = 0; then
35827 gl_LIBOBJS="$gl_LIBOBJS strptime.$ac_objext"
35843 GL_GNULIB_STRPTIME=1
35849 printf "%s\n" "#define GNULIB_TEST_STRPTIME 1" >>confdefs.h
35858 if test "$ac_cv_have_decl_strtoimax" != yes; then
35859 HAVE_DECL_STRTOIMAX=0
35862 if test "$ac_cv_func_strtoimax" = yes; then
35864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
35865 printf %s "checking whether strtoimax works... " >&6; }
35866 if test ${gl_cv_func_strtoimax+y}
35868 printf %s "(cached) " >&6
35870 if test "$cross_compiling" = yes
35873 # Guess no on AIX 5.
35874 aix5*) gl_cv_func_strtoimax="guessing no" ;;
35875 # Guess yes on native Windows.
35876 mingw*) gl_cv_func_strtoimax="guessing yes" ;;
35877 # Guess yes otherwise.
35878 *) gl_cv_func_strtoimax="guessing yes" ;;
35882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35883 /* end confdefs.h. */
35886 #include <string.h>
35887 #include <inttypes.h>
35890 if (sizeof (intmax_t) > sizeof (int))
35892 const char *s = "4294967295";
35896 res = strtoimax (s, &p, 10);
35897 if (p != s + strlen (s))
35901 if (res != (intmax_t) 65535 * (intmax_t) 65537)
35906 const char *s = "2147483647";
35910 res = strtoimax (s, &p, 10);
35911 if (p != s + strlen (s))
35915 if (res != 2147483647)
35922 if ac_fn_c_try_run "$LINENO"
35924 gl_cv_func_strtoimax=yes
35926 gl_cv_func_strtoimax=no
35928 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35929 conftest.$ac_objext conftest.beam conftest.$ac_ext
35934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
35935 printf "%s\n" "$gl_cv_func_strtoimax" >&6; }
35936 case "$gl_cv_func_strtoimax" in
35937 *no) REPLACE_STRTOIMAX=1 ;;
35940 if test "$ac_cv_have_decl_strtoimax" = yes; then
35941 # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
35942 REPLACE_STRTOIMAX=1
35947 if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
35956 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
35959 ac_fn_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
35960 if test "x$ac_cv_have_decl_strtoll" = xyes
35966 printf "%s\n" "#define HAVE_DECL_STRTOLL $ac_have_decl" >>confdefs.h
35979 GL_GNULIB_STRTOIMAX=1
35987 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
35988 if test "x$ac_cv_func_strtoll" = xyes
35990 printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
35994 if test $ac_cv_func_strtoll = yes; then
35995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoll works" >&5
35996 printf %s "checking whether strtoll works... " >&6; }
35997 if test ${gl_cv_func_strtoll_works+y}
35999 printf %s "(cached) " >&6
36001 if test "$cross_compiling" = yes
36004 # Guess no on native Windows.
36005 mingw*) gl_cv_func_strtoll_works="guessing no" ;;
36006 *) gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
36010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36011 /* end confdefs.h. */
36012 #include <stdlib.h>
36018 /* This test fails on Minix and native Windows. */
36020 const char input[] = "0x";
36021 (void) strtoll (input, &term, 16);
36022 if (term != input + 1)
36032 if ac_fn_c_try_run "$LINENO"
36034 gl_cv_func_strtoll_works=yes
36036 gl_cv_func_strtoll_works=no
36038 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36039 conftest.$ac_objext conftest.beam conftest.$ac_ext
36044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoll_works" >&5
36045 printf "%s\n" "$gl_cv_func_strtoll_works" >&6; }
36046 case "$gl_cv_func_strtoll_works" in
36048 *) REPLACE_STRTOLL=1 ;;
36054 if test $HAVE_STRTOLL = 0 || test $REPLACE_STRTOLL = 1; then
36063 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
36078 GL_GNULIB_STRTOLL=1
36084 printf "%s\n" "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h
36131 printf "%s\n" "#define GNULIB_TEMPNAME 1" >>confdefs.h
36147 ac_fn_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
36148 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
36149 been included before. */
36150 #if defined __MINGW32__
36151 # include <unistd.h>
36155 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36156 if test "x$ac_cv_have_decl_localtime_r" = xyes
36162 printf "%s\n" "#define HAVE_DECL_LOCALTIME_R $ac_have_decl" >>confdefs.h
36164 if test $ac_cv_have_decl_localtime_r = no; then
36165 HAVE_DECL_LOCALTIME_R=0
36169 if test $ac_cv_func_localtime_r = yes; then
36171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
36172 printf %s "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
36173 if test ${gl_cv_time_r_posix+y}
36175 printf %s "(cached) " >&6
36177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36178 /* end confdefs.h. */
36179 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
36180 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
36181 been included before. */
36182 #if defined __MINGW32__
36183 # include <unistd.h>
36190 /* We don't need to append 'restrict's to the argument types,
36191 even though the POSIX signature has the 'restrict's,
36192 since C99 says they can't affect type compatibility. */
36193 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
36195 /* Check the return type is a pointer.
36196 On HP-UX 10 it is 'int'. */
36197 *localtime_r (0, 0);
36203 if ac_fn_c_try_compile "$LINENO"
36205 gl_cv_time_r_posix=yes
36207 gl_cv_time_r_posix=no
36209 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
36212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
36213 printf "%s\n" "$gl_cv_time_r_posix" >&6; }
36214 if test $gl_cv_time_r_posix = yes; then
36215 REPLACE_LOCALTIME_R=0
36217 REPLACE_LOCALTIME_R=1
36221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
36222 printf %s "checking whether localtime_r exists as an inline function... " >&6; }
36223 if test ${gl_cv_func_localtime_r_inline+y}
36225 printf %s "(cached) " >&6
36227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36228 /* end confdefs.h. */
36229 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
36230 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
36231 been included before. */
36232 #if defined __MINGW32__
36233 # include <unistd.h>
36242 localtime_r (&a, &r);
36249 if ac_fn_c_try_link "$LINENO"
36251 gl_cv_func_localtime_r_inline=yes
36253 gl_cv_func_localtime_r_inline=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_localtime_r_inline" >&5
36260 printf "%s\n" "$gl_cv_func_localtime_r_inline" >&6; }
36261 if test $gl_cv_func_localtime_r_inline = yes; then
36262 REPLACE_LOCALTIME_R=1
36266 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
36275 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
36296 printf "%s\n" "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
36305 # On Mac OS X 10.6, localtime loops forever with some time_t values.
36306 # See Bug#27706, Bug#27736, and
36307 # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
36308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime works even near extrema" >&5
36309 printf %s "checking whether localtime works even near extrema... " >&6; }
36310 if test ${gl_cv_func_localtime_works+y}
36312 printf %s "(cached) " >&6
36314 gl_cv_func_localtime_works=yes
36315 if test "$cross_compiling" = yes
36317 gl_cv_func_localtime_works="guessing yes"
36319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36320 /* end confdefs.h. */
36321 #include <stdlib.h>
36322 #include <string.h>
36323 #include <unistd.h>
36330 time_t t = -67768038400666600;
36332 char *tz = getenv ("TZ");
36333 if (! (tz && strcmp (tz, "QQQ0") == 0))
36336 tm = localtime (&t);
36337 /* Use TM and *TM to suppress over-optimization. */
36338 return tm && tm->tm_isdst;
36344 if ac_fn_c_try_run "$LINENO"
36346 (TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
36347 gl_cv_func_localtime_works=no
36349 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36350 conftest.$ac_objext conftest.beam conftest.$ac_ext
36354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_works" >&5
36355 printf "%s\n" "$gl_cv_func_localtime_works" >&6; }
36356 if test "$gl_cv_func_localtime_works" = no; then
36358 printf "%s\n" "#define HAVE_LOCALTIME_INFLOOP_BUG 1" >>confdefs.h
36362 ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include <time.h>
36364 if test "x$ac_cv_type_timezone_t" = xyes
36367 printf "%s\n" "#define HAVE_TIMEZONE_T 1" >>confdefs.h
36372 if test "$ac_cv_type_timezone_t" = yes; then
36376 if test $HAVE_TIMEZONE_T = 0; then
36385 gl_LIBOBJS="$gl_LIBOBJS time_rz.$ac_objext"
36397 GL_GNULIB_TIME_RZ=1
36403 printf "%s\n" "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
36412 if test $ac_cv_func_timegm = yes; then
36413 if test "$gl_cv_func_working_mktime" != yes; then
36414 # Assume that timegm is buggy if mktime is.
36421 if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
36430 gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext"
36451 printf "%s\n" "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h
36461 mingw*) REPLACE_TZSET=1 ;;
36464 if test $REPLACE_TZSET = 1; then
36473 gl_LIBOBJS="$gl_LIBOBJS tzset.$ac_objext"
36491 printf "%s\n" "#define GNULIB_TEST_TZSET 1" >>confdefs.h
36503 if { test "$HAVE_LIBUNISTRING" != yes \
36508 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36509 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36510 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36511 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36512 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
36522 LIBUNISTRING_UNISTR_H='unistr.h'
36524 LIBUNISTRING_UNISTR_H=
36530 printf "%s\n" "#define GNULIB_UNISTR_U8_MBTOUCR 1" >>confdefs.h
36535 if { test "$HAVE_LIBUNISTRING" != yes \
36540 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36541 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36542 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36543 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36544 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
36554 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
36555 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
36557 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
36558 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
36564 printf "%s\n" "#define GNULIB_UNISTR_U8_UCTOMB 1" >>confdefs.h
36569 if { test "$HAVE_LIBUNISTRING" != yes \
36574 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36575 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36576 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36577 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36578 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
36588 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
36589 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
36591 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
36592 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
36598 if { test "$HAVE_LIBUNISTRING" != yes \
36603 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36604 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36605 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36606 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36607 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
36617 LIBUNISTRING_UNITYPES_H='unitypes.h'
36619 LIBUNISTRING_UNITYPES_H=
36626 if { test "$HAVE_LIBUNISTRING" != yes \
36631 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36632 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36633 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36634 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36635 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
36645 LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
36647 LIBUNISTRING_UNIWIDTH_H=
36653 if { test "$HAVE_LIBUNISTRING" != yes \
36658 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
36659 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
36660 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
36661 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
36662 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
36672 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
36673 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
36675 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
36676 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
36681 printf "%s\n" "#define GNULIB_STDIO_SINGLE_THREAD 1" >>confdefs.h
36684 printf "%s\n" "#define USE_UNLOCKED_IO GNULIB_STDIO_SINGLE_THREAD" >>confdefs.h
36706 if test $ac_cv_have_decl_unsetenv = no; then
36707 HAVE_DECL_UNSETENV=0
36709 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
36710 if test "x$ac_cv_func_unsetenv" = xyes
36712 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
36716 if test $ac_cv_func_unsetenv = no; then
36720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
36721 printf %s "checking for unsetenv() return type... " >&6; }
36722 if test ${gt_cv_func_unsetenv_ret+y}
36724 printf %s "(cached) " >&6
36726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36727 /* end confdefs.h. */
36730 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
36731 #include <stdlib.h>
36736 int unsetenv (const char *name);
36746 if ac_fn_c_try_compile "$LINENO"
36748 gt_cv_func_unsetenv_ret='int'
36750 gt_cv_func_unsetenv_ret='void'
36752 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
36754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
36755 printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
36756 if test $gt_cv_func_unsetenv_ret = 'void'; then
36758 printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
36763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
36764 printf %s "checking whether unsetenv obeys POSIX... " >&6; }
36765 if test ${gl_cv_func_unsetenv_works+y}
36767 printf %s "(cached) " >&6
36769 if test "$cross_compiling" = yes
36772 # Guess yes on glibc systems.
36773 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
36774 # If we don't know, obey --enable-cross-guesses.
36775 *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
36779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36780 /* end confdefs.h. */
36782 #include <stdlib.h>
36784 extern char **environ;
36793 char entry1[] = "a=1";
36794 char entry2[] = "b=2";
36795 char *env[] = { entry1, entry2, NULL };
36796 if (putenv ((char *) "a=1")) return 1;
36797 if (putenv (entry2)) return 2;
36800 if (getenv ("a")) return 3;
36801 if (!unsetenv ("") || errno != EINVAL) return 4;
36804 if (!getenv ("a")) return 5;
36807 if (getenv ("a")) return 6;
36813 if ac_fn_c_try_run "$LINENO"
36815 gl_cv_func_unsetenv_works=yes
36817 gl_cv_func_unsetenv_works=no
36819 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36820 conftest.$ac_objext conftest.beam conftest.$ac_ext
36825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
36826 printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
36827 case "$gl_cv_func_unsetenv_works" in
36835 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
36844 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
36860 GL_GNULIB_UNSETENV=1
36866 printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
36873 if test $ac_cv_func_vasnprintf = no; then
36884 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
36894 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
36904 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
36914 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
36916 if test $ac_cv_func_vasnprintf = yes; then
36918 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
36930 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
36931 if test "x$ac_cv_type_ptrdiff_t" = xyes
36936 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
36950 ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
36951 if test "x$ac_cv_func_vasprintf" = xyes
36953 printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
36957 if test $ac_cv_func_vasprintf = no; then
36967 gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
36977 gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
36980 if test $ac_cv_func_vasprintf = yes; then
36981 REPLACE_VASPRINTF=1
37004 GL_GNULIB_VASPRINTF=1
37010 printf "%s\n" "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
37016 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
37020 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
37023 # Check whether --with-packager was given.
37024 if test ${with_packager+y}
37026 withval=$with_packager; case $withval in
37029 printf "%s\n" "#define PACKAGE_PACKAGER \"$withval\"" >>confdefs.h
37037 # Check whether --with-packager-version was given.
37038 if test ${with_packager_version+y}
37040 withval=$with_packager_version; case $withval in
37043 printf "%s\n" "#define PACKAGE_PACKAGER_VERSION \"$withval\"" >>confdefs.h
37051 # Check whether --with-packager-bug-reports was given.
37052 if test ${with_packager_bug_reports+y}
37054 withval=$with_packager_bug_reports; case $withval in
37057 printf "%s\n" "#define PACKAGE_PACKAGER_BUG_REPORTS \"$withval\"" >>confdefs.h
37064 if test "X$with_packager" = "X" && \
37065 test "X$with_packager_version$with_packager_bug_reports" != "X"
37067 as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
37087 if case "$host_os" in
37089 *) test $ac_cv_func_mbsinit = yes ;;
37091 && test $ac_cv_func_mbrtowc = yes; then
37096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
37097 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
37098 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
37100 printf %s "(cached) " >&6
37104 # Guess no on AIX and OSF/1.
37105 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
37106 # Guess yes otherwise.
37107 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
37109 if test $LOCALE_JA != none; then
37110 if test "$cross_compiling" = yes
37114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37115 /* end confdefs.h. */
37117 #include <locale.h>
37118 #include <string.h>
37122 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
37124 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
37128 memset (&state, '\0', sizeof (mbstate_t));
37129 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
37130 if (mbsinit (&state))
37136 if ac_fn_c_try_run "$LINENO"
37138 gl_cv_func_mbrtowc_incomplete_state=yes
37140 gl_cv_func_mbrtowc_incomplete_state=no
37142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37143 conftest.$ac_objext conftest.beam conftest.$ac_ext
37147 if test $LOCALE_FR_UTF8 != none; then
37148 if test "$cross_compiling" = yes
37152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37153 /* end confdefs.h. */
37155 #include <locale.h>
37156 #include <string.h>
37160 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
37162 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
37166 memset (&state, '\0', sizeof (mbstate_t));
37167 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
37168 if (mbsinit (&state))
37174 if ac_fn_c_try_run "$LINENO"
37176 gl_cv_func_mbrtowc_incomplete_state=yes
37178 gl_cv_func_mbrtowc_incomplete_state=no
37180 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37181 conftest.$ac_objext conftest.beam conftest.$ac_ext
37188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
37189 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
37194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
37195 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
37196 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
37198 printf %s "(cached) " >&6
37202 # Guess no on Solaris 8.
37203 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
37204 # Guess yes otherwise.
37205 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
37207 if test $LOCALE_ZH_CN != none; then
37208 if test "$cross_compiling" = yes
37212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37213 /* end confdefs.h. */
37215 #include <locale.h>
37216 #include <stdlib.h>
37217 #include <string.h>
37221 /* This fails on Solaris 8:
37222 mbrtowc returns 2, and sets wc to 0x00F0.
37223 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
37224 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
37226 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
37230 memset (&state, '\0', sizeof (mbstate_t));
37231 if (mbrtowc (&wc, input + 3, 6, &state) != 4
37232 && mbtowc (&wc, input + 3, 6) == 4)
37238 if ac_fn_c_try_run "$LINENO"
37240 gl_cv_func_mbrtowc_sanitycheck=yes
37242 gl_cv_func_mbrtowc_sanitycheck=no
37244 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37245 conftest.$ac_objext conftest.beam conftest.$ac_ext
37251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
37252 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
37254 REPLACE_MBSTATE_T=0
37255 case "$gl_cv_func_mbrtowc_incomplete_state" in
37257 *) REPLACE_MBSTATE_T=1 ;;
37259 case "$gl_cv_func_mbrtowc_sanitycheck" in
37261 *) REPLACE_MBSTATE_T=1 ;;
37264 REPLACE_MBSTATE_T=1
37269 if test $ac_cv_func_wcrtomb = no; then
37271 ac_fn_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
37274 " "$ac_c_undeclared_builtin_options" "CFLAGS"
37275 if test "x$ac_cv_have_decl_wcrtomb" = xyes
37281 printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
37283 if test $ac_cv_have_decl_wcrtomb = yes; then
37287 if test $REPLACE_WCRTOMB = 0; then
37293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
37294 printf %s "checking whether wcrtomb works in the C locale... " >&6; }
37295 if test ${gl_cv_func_wcrtomb_works+y}
37297 printf %s "(cached) " >&6
37299 if test "$cross_compiling" = yes
37302 # Guess no on Android.
37303 linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
37304 # Guess yes otherwise.
37305 *) gl_cv_func_wcrtomb_works="guessing yes";;
37309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37310 /* end confdefs.h. */
37312 #include <string.h>
37313 #include <stdlib.h>
37320 memset (&state, 0, sizeof (state));
37322 count = wcrtomb (out, L'a', &state);
37323 return !(count == 1 && out[0] == 'a');
37326 if ac_fn_c_try_run "$LINENO"
37328 gl_cv_func_wcrtomb_works=yes
37330 gl_cv_func_wcrtomb_works=no
37332 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37333 conftest.$ac_objext conftest.beam conftest.$ac_ext
37338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
37339 printf "%s\n" "$gl_cv_func_wcrtomb_works" >&6; }
37340 case "$gl_cv_func_wcrtomb_works" in
37343 printf "%s\n" "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
37345 REPLACE_WCRTOMB=1 ;;
37348 if test $REPLACE_WCRTOMB = 0; then
37349 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
37350 printf %s "checking whether wcrtomb return value is correct... " >&6; }
37351 if test ${gl_cv_func_wcrtomb_retval+y}
37353 printf %s "(cached) " >&6
37357 # Guess no on AIX 4, OSF/1, Solaris, native Windows.
37358 aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
37359 # Guess yes otherwise.
37360 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
37362 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
37363 if test "$cross_compiling" = yes
37367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37368 /* end confdefs.h. */
37370 #include <locale.h>
37371 #include <string.h>
37373 #include <stdlib.h>
37377 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
37379 if (wcrtomb (NULL, 0, NULL) != 1)
37382 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
37384 if (wcrtomb (NULL, 0, NULL) != 1)
37387 wchar_t wc = (wchar_t) 0xBADFACE;
37388 if (mbtowc (&wc, "\303\274", 2) == 2)
37389 if (wcrtomb (NULL, wc, NULL) != 1)
37393 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
37395 if (wcrtomb (NULL, 0, NULL) != 1)
37398 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
37400 if (wcrtomb (NULL, 0, NULL) != 1)
37406 if ac_fn_c_try_run "$LINENO"
37408 gl_cv_func_wcrtomb_retval=yes
37410 gl_cv_func_wcrtomb_retval=no
37412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37413 conftest.$ac_objext conftest.beam conftest.$ac_ext
37419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
37420 printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
37421 case "$gl_cv_func_wcrtomb_retval" in
37424 printf "%s\n" "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
37426 REPLACE_WCRTOMB=1 ;;
37431 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
37440 gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
37455 GL_GNULIB_WCRTOMB=1
37461 printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
37482 ac_fn_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
37485 " "$ac_c_undeclared_builtin_options" "CFLAGS"
37486 if test "x$ac_cv_have_decl_wcwidth" = xyes
37492 printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
37494 if test $ac_cv_have_decl_wcwidth != yes; then
37495 HAVE_DECL_WCWIDTH=0
37498 if test $ac_cv_func_wcwidth != yes; then
37499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
37500 printf %s "checking whether wcwidth is a macro... " >&6; }
37501 if test ${gl_cv_func_wcwidth_macro+y}
37503 printf %s "(cached) " >&6
37505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37506 /* end confdefs.h. */
37510 wchar_header_defines_wcwidth
37513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37514 $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1
37516 gl_cv_func_wcwidth_macro=yes
37518 gl_cv_func_wcwidth_macro=no
37524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
37525 printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
37528 if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
37530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
37531 printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
37532 if test ${gl_cv_func_wcwidth_works+y}
37534 printf %s "(cached) " >&6
37537 if test "$cross_compiling" = yes
37541 # Guess yes on glibc systems.
37542 *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
37543 # Guess yes on musl systems.
37544 *-musl*) gl_cv_func_wcwidth_works="guessing yes";;
37545 # Guess yes on AIX 7 systems.
37546 aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
37547 *) gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
37551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37552 /* end confdefs.h. */
37554 #include <locale.h>
37556 #if !HAVE_DECL_WCWIDTH
37558 # ifdef __cplusplus
37566 if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
37568 if (wcwidth (0x0301) > 0)
37570 if (wcwidth (0x05B0) > 0)
37572 if (wcwidth (0x200B) > 0)
37574 if (wcwidth (0xFF1A) == 0)
37576 if (wcwidth (0x2202) > 1)
37582 if ac_fn_c_try_run "$LINENO"
37584 gl_cv_func_wcwidth_works=yes
37586 gl_cv_func_wcwidth_works=no
37588 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37589 conftest.$ac_objext conftest.beam conftest.$ac_ext
37594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
37595 printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
37596 case "$gl_cv_func_wcwidth_works" in
37598 *no) REPLACE_WCWIDTH=1 ;;
37604 if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
37613 gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
37629 GL_GNULIB_WCWIDTH=1
37635 printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
37650 gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
37665 gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
37680 gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
37695 gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
37701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
37702 printf %s "checking for wmemchr... " >&6; }
37703 if test ${gl_cv_func_wmemchr+y}
37705 printf %s "(cached) " >&6
37707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37708 /* end confdefs.h. */
37714 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
37720 if ac_fn_c_try_link "$LINENO"
37722 gl_cv_func_wmemchr=yes
37724 gl_cv_func_wmemchr=no
37726 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37727 conftest$ac_exeext conftest.$ac_ext
37730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
37731 printf "%s\n" "$gl_cv_func_wmemchr" >&6; }
37732 if test $gl_cv_func_wmemchr = no; then
37736 if test $HAVE_WMEMCHR = 0; then
37745 gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
37757 GL_GNULIB_WMEMCHR=1
37763 printf "%s\n" "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
37775 if test $ac_cv_func_wmempcpy = no; then
37779 if test $HAVE_WMEMPCPY = 0; then
37788 gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
37800 GL_GNULIB_WMEMPCPY=1
37806 printf "%s\n" "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
37813 printf "%s\n" "#define GNULIB_XALLOC 1" >>confdefs.h
37818 printf "%s\n" "#define GNULIB_XALLOC_DIE 1" >>confdefs.h
37823 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
37824 if test "x$ac_cv_header_stdint_h" = xyes
37826 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
37837 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
37839 # End of code from modules
37867 gl_source_base='gnulib-tests'
37868 gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
37870 gl_module_indicator_condition=$gltests_WITNESS
37873 if test "$ac_cv_header_winsock2_h" = yes; then
37882 gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext"
37894 if test "$GL_GNULIB_ACCEPT" != 1; then
37895 if test "$GL_GNULIB_ACCEPT" = 0; then
37896 GL_GNULIB_ACCEPT=$gl_module_indicator_condition
37898 GL_GNULIB_ACCEPT="($GL_GNULIB_ACCEPT || $gl_module_indicator_condition)"
37906 printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
37919 ac_fn_c_check_func "$LINENO" "atoll" "ac_cv_func_atoll"
37920 if test "x$ac_cv_func_atoll" = xyes
37922 printf "%s\n" "#define HAVE_ATOLL 1" >>confdefs.h
37926 if test $ac_cv_func_atoll = no; then
37930 if test $HAVE_ATOLL = 0; then
37939 gltests_LIBOBJS="$gltests_LIBOBJS atoll.$ac_objext"
37954 if test "$GL_GNULIB_ATOLL" != 1; then
37955 if test "$GL_GNULIB_ATOLL" = 0; then
37956 GL_GNULIB_ATOLL=$gl_module_indicator_condition
37958 GL_GNULIB_ATOLL="($GL_GNULIB_ATOLL || $gl_module_indicator_condition)"
37966 printf "%s\n" "#define GNULIB_TEST_ATOLL 1" >>confdefs.h
37971 if test "$ac_cv_header_winsock2_h" = yes; then
37980 gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext"
37992 if test "$GL_GNULIB_BIND" != 1; then
37993 if test "$GL_GNULIB_BIND" = 0; then
37994 GL_GNULIB_BIND=$gl_module_indicator_condition
37996 GL_GNULIB_BIND="($GL_GNULIB_BIND || $gl_module_indicator_condition)"
38004 printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
38011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
38012 printf %s "checking for a traditional french locale... " >&6; }
38013 if test ${gt_cv_locale_fr+y}
38015 printf %s "(cached) " >&6
38018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38019 /* end confdefs.h. */
38021 #include <locale.h>
38023 #if HAVE_LANGINFO_CODESET
38024 # include <langinfo.h>
38026 #include <stdlib.h>
38027 #include <string.h>
38031 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
38032 imitates locale dependent behaviour by looking at the environment
38033 variables, and all locales use the UTF-8 encoding. */
38034 #if defined __BEOS__ || defined __HAIKU__
38037 /* Check whether the given locale name is recognized by the system. */
38038 # if defined _WIN32 && !defined __CYGWIN__
38039 /* On native Windows, setlocale(category, "") looks at the system settings,
38040 not at the environment variables. Also, when an encoding suffix such
38041 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38042 category of the locale to "C". */
38043 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38044 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38047 if (setlocale (LC_ALL, "") == NULL) return 1;
38049 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38050 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38051 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38052 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38053 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38054 some unit tests fail.
38055 On MirBSD 10, when an unsupported locale is specified, setlocale()
38056 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
38057 # if HAVE_LANGINFO_CODESET
38059 const char *cs = nl_langinfo (CODESET);
38060 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38061 || strcmp (cs, "UTF-8") == 0)
38066 /* On Cygwin, avoid locale names without encoding suffix, because the
38067 locale_charset() function relies on the encoding suffix. Note that
38068 LC_ALL is set on the command line. */
38069 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38071 /* Check whether in the abbreviation of the second month, the second
38072 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
38073 one byte long. This excludes the UTF-8 encoding. */
38074 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38075 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
38076 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
38077 /* Check whether the decimal separator is a comma.
38078 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38079 are nl_langinfo(RADIXCHAR) are both ".". */
38080 if (localeconv () ->decimal_point[0] != ',') return 1;
38087 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38088 (eval $ac_link) 2>&5
38090 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38091 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38093 # Handle native Windows specially, because there setlocale() interprets
38094 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38095 # "fr" or "fra" as "French" or "French_France.1252",
38096 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38097 # "ja" as "Japanese" or "Japanese_Japan.932",
38100 # Test for the native Windows locale name.
38101 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38102 gt_cv_locale_fr=French_France.1252
38105 gt_cv_locale_fr=none
38109 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38110 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38111 # configure script would override the LC_ALL setting. Likewise for
38112 # LC_CTYPE, which is also set at the beginning of the configure script.
38113 # Test for the usual locale name.
38114 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38115 gt_cv_locale_fr=fr_FR
38117 # Test for the locale name with explicit encoding suffix.
38118 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38119 gt_cv_locale_fr=fr_FR.ISO-8859-1
38121 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
38122 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38123 gt_cv_locale_fr=fr_FR.ISO8859-1
38125 # Test for the HP-UX locale name.
38126 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38127 gt_cv_locale_fr=fr_FR.iso88591
38129 # Test for the Solaris 7 locale name.
38130 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38134 gt_cv_locale_fr=none
38146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
38147 printf "%s\n" "$gt_cv_locale_fr" >&6; }
38148 LOCALE_FR=$gt_cv_locale_fr
38153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
38154 printf %s "checking for a french Unicode locale... " >&6; }
38155 if test ${gt_cv_locale_fr_utf8+y}
38157 printf %s "(cached) " >&6
38160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38161 /* end confdefs.h. */
38163 #include <locale.h>
38165 #if HAVE_LANGINFO_CODESET
38166 # include <langinfo.h>
38168 #include <stdlib.h>
38169 #include <string.h>
38173 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
38174 imitates locale dependent behaviour by looking at the environment
38175 variables, and all locales use the UTF-8 encoding. */
38176 #if !(defined __BEOS__ || defined __HAIKU__)
38177 /* Check whether the given locale name is recognized by the system. */
38178 # if defined _WIN32 && !defined __CYGWIN__
38179 /* On native Windows, setlocale(category, "") looks at the system settings,
38180 not at the environment variables. Also, when an encoding suffix such
38181 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38182 category of the locale to "C". */
38183 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38184 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38187 if (setlocale (LC_ALL, "") == NULL) return 1;
38189 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38190 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38191 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38192 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38193 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38194 some unit tests fail. */
38195 # if HAVE_LANGINFO_CODESET
38197 const char *cs = nl_langinfo (CODESET);
38198 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
38203 /* On Cygwin, avoid locale names without encoding suffix, because the
38204 locale_charset() function relies on the encoding suffix. Note that
38205 LC_ALL is set on the command line. */
38206 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38208 /* Check whether in the abbreviation of the second month, the second
38209 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
38210 two bytes long, with UTF-8 encoding. */
38211 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38212 if (strftime (buf, sizeof (buf), "%b", &t) < 4
38213 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
38216 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
38217 /* Check whether the decimal separator is a comma.
38218 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38219 are nl_langinfo(RADIXCHAR) are both ".". */
38220 if (localeconv () ->decimal_point[0] != ',') return 1;
38226 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38227 (eval $ac_link) 2>&5
38229 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38230 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38232 # Handle native Windows specially, because there setlocale() interprets
38233 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38234 # "fr" or "fra" as "French" or "French_France.1252",
38235 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38236 # "ja" as "Japanese" or "Japanese_Japan.932",
38239 # Test for the hypothetical native Windows locale name.
38240 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38241 gt_cv_locale_fr_utf8=French_France.65001
38244 gt_cv_locale_fr_utf8=none
38248 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38249 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38250 # configure script would override the LC_ALL setting. Likewise for
38251 # LC_CTYPE, which is also set at the beginning of the configure script.
38252 # Test for the usual locale name.
38253 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38254 gt_cv_locale_fr_utf8=fr_FR
38256 # Test for the locale name with explicit encoding suffix.
38257 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38258 gt_cv_locale_fr_utf8=fr_FR.UTF-8
38260 # Test for the Solaris 7 locale name.
38261 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38262 gt_cv_locale_fr_utf8=fr.UTF-8
38265 gt_cv_locale_fr_utf8=none
38275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
38276 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
38277 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
38283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
38284 printf %s "checking for a traditional french locale... " >&6; }
38285 if test ${gt_cv_locale_fr+y}
38287 printf %s "(cached) " >&6
38290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38291 /* end confdefs.h. */
38293 #include <locale.h>
38295 #if HAVE_LANGINFO_CODESET
38296 # include <langinfo.h>
38298 #include <stdlib.h>
38299 #include <string.h>
38303 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
38304 imitates locale dependent behaviour by looking at the environment
38305 variables, and all locales use the UTF-8 encoding. */
38306 #if defined __BEOS__ || defined __HAIKU__
38309 /* Check whether the given locale name is recognized by the system. */
38310 # if defined _WIN32 && !defined __CYGWIN__
38311 /* On native Windows, setlocale(category, "") looks at the system settings,
38312 not at the environment variables. Also, when an encoding suffix such
38313 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38314 category of the locale to "C". */
38315 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38316 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38319 if (setlocale (LC_ALL, "") == NULL) return 1;
38321 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38322 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38323 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38324 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38325 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38326 some unit tests fail.
38327 On MirBSD 10, when an unsupported locale is specified, setlocale()
38328 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
38329 # if HAVE_LANGINFO_CODESET
38331 const char *cs = nl_langinfo (CODESET);
38332 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38333 || strcmp (cs, "UTF-8") == 0)
38338 /* On Cygwin, avoid locale names without encoding suffix, because the
38339 locale_charset() function relies on the encoding suffix. Note that
38340 LC_ALL is set on the command line. */
38341 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38343 /* Check whether in the abbreviation of the second month, the second
38344 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
38345 one byte long. This excludes the UTF-8 encoding. */
38346 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38347 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
38348 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
38349 /* Check whether the decimal separator is a comma.
38350 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38351 are nl_langinfo(RADIXCHAR) are both ".". */
38352 if (localeconv () ->decimal_point[0] != ',') return 1;
38359 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38360 (eval $ac_link) 2>&5
38362 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38363 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38365 # Handle native Windows specially, because there setlocale() interprets
38366 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38367 # "fr" or "fra" as "French" or "French_France.1252",
38368 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38369 # "ja" as "Japanese" or "Japanese_Japan.932",
38372 # Test for the native Windows locale name.
38373 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38374 gt_cv_locale_fr=French_France.1252
38377 gt_cv_locale_fr=none
38381 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38382 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38383 # configure script would override the LC_ALL setting. Likewise for
38384 # LC_CTYPE, which is also set at the beginning of the configure script.
38385 # Test for the usual locale name.
38386 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38387 gt_cv_locale_fr=fr_FR
38389 # Test for the locale name with explicit encoding suffix.
38390 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38391 gt_cv_locale_fr=fr_FR.ISO-8859-1
38393 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
38394 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38395 gt_cv_locale_fr=fr_FR.ISO8859-1
38397 # Test for the HP-UX locale name.
38398 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38399 gt_cv_locale_fr=fr_FR.iso88591
38401 # Test for the Solaris 7 locale name.
38402 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38406 gt_cv_locale_fr=none
38418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
38419 printf "%s\n" "$gt_cv_locale_fr" >&6; }
38420 LOCALE_FR=$gt_cv_locale_fr
38426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
38427 printf %s "checking for a turkish Unicode locale... " >&6; }
38428 if test ${gt_cv_locale_tr_utf8+y}
38430 printf %s "(cached) " >&6
38433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38434 /* end confdefs.h. */
38436 #include <locale.h>
38438 #if HAVE_LANGINFO_CODESET
38439 # include <langinfo.h>
38441 #include <stdlib.h>
38442 #include <string.h>
38443 #include <wctype.h>
38447 /* On BeOS, locales are not implemented in libc. Rather, libintl
38448 imitates locale dependent behaviour by looking at the environment
38449 variables, and all locales use the UTF-8 encoding. But BeOS does not
38450 implement the Turkish upper-/lowercase mappings. Therefore, let this
38451 program return 1 on BeOS. */
38452 /* Check whether the given locale name is recognized by the system. */
38453 #if defined _WIN32 && !defined __CYGWIN__
38454 /* On native Windows, setlocale(category, "") looks at the system settings,
38455 not at the environment variables. Also, when an encoding suffix such
38456 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38457 category of the locale to "C". */
38458 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38459 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38462 if (setlocale (LC_ALL, "") == NULL) return 1;
38464 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38465 On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
38466 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38467 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38468 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38469 some unit tests fail. */
38470 #if HAVE_LANGINFO_CODESET
38472 const char *cs = nl_langinfo (CODESET);
38473 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
38478 /* On Cygwin, avoid locale names without encoding suffix, because the
38479 locale_charset() function relies on the encoding suffix. Note that
38480 LC_ALL is set on the command line. */
38481 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38483 /* Check whether in the abbreviation of the eighth month, the second
38484 character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
38485 two bytes long, with UTF-8 encoding. */
38486 t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
38487 if (strftime (buf, sizeof (buf), "%b", &t) < 4
38488 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
38490 /* Check whether the upper-/lowercase mappings are as expected for
38492 if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
38493 || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
38499 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38500 (eval $ac_link) 2>&5
38502 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38503 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38505 # Handle native Windows specially, because there setlocale() interprets
38506 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38507 # "fr" or "fra" as "French" or "French_France.1252",
38508 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38509 # "ja" as "Japanese" or "Japanese_Japan.932",
38512 # Test for the hypothetical native Windows locale name.
38513 if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38514 gt_cv_locale_tr_utf8=Turkish_Turkey.65001
38517 gt_cv_locale_tr_utf8=none
38521 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38522 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38523 # configure script would override the LC_ALL setting. Likewise for
38524 # LC_CTYPE, which is also set at the beginning of the configure script.
38525 # Test for the usual locale name.
38526 if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38527 gt_cv_locale_tr_utf8=tr_TR
38529 # Test for the locale name with explicit encoding suffix.
38530 if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38531 gt_cv_locale_tr_utf8=tr_TR.UTF-8
38533 # Test for the Solaris 7 locale name.
38534 if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38535 gt_cv_locale_tr_utf8=tr.UTF-8
38538 gt_cv_locale_tr_utf8=none
38545 gt_cv_locale_tr_utf8=none
38550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
38551 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
38552 LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
38556 if test "$ac_cv_header_winsock2_h" = yes; then
38565 gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext"
38577 if test "$GL_GNULIB_CONNECT" != 1; then
38578 if test "$GL_GNULIB_CONNECT" = 0; then
38579 GL_GNULIB_CONNECT=$gl_module_indicator_condition
38581 GL_GNULIB_CONNECT="($GL_GNULIB_CONNECT || $gl_module_indicator_condition)"
38589 printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
38597 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
38601 if test $REPLACE_FDOPEN = 0; then
38602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
38603 printf %s "checking whether fdopen sets errno... " >&6; }
38604 if test ${gl_cv_func_fdopen_works+y}
38606 printf %s "(cached) " >&6
38609 if test "$cross_compiling" = yes
38612 mingw*) gl_cv_func_fdopen_works="guessing no" ;;
38613 *) gl_cv_func_fdopen_works="guessing yes" ;;
38617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38618 /* end confdefs.h. */
38631 fp = fdopen (-1, "r");
38632 if (fp == NULL && errno == 0)
38637 if ac_fn_c_try_run "$LINENO"
38639 gl_cv_func_fdopen_works=yes
38641 gl_cv_func_fdopen_works=no
38643 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38644 conftest.$ac_objext conftest.beam conftest.$ac_ext
38649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
38650 printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
38651 case "$gl_cv_func_fdopen_works" in
38652 *no) REPLACE_FDOPEN=1 ;;
38656 if test $REPLACE_FDOPEN = 1; then
38665 gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext"
38678 if test "$GL_GNULIB_FDOPEN" != 1; then
38679 if test "$GL_GNULIB_FDOPEN" = 0; then
38680 GL_GNULIB_FDOPEN=$gl_module_indicator_condition
38682 GL_GNULIB_FDOPEN="($GL_GNULIB_FDOPEN || $gl_module_indicator_condition)"
38690 printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
38697 if test $ac_cv_func_ftruncate = yes; then
38702 REPLACE_FTRUNCATE=1
38710 if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
38719 gltests_LIBOBJS="$gltests_LIBOBJS ftruncate.$ac_objext"
38722 ac_fn_c_check_func "$LINENO" "_chsize" "ac_cv_func__chsize"
38723 if test "x$ac_cv_func__chsize" = xyes
38725 printf "%s\n" "#define HAVE__CHSIZE 1" >>confdefs.h
38740 if test "$GL_GNULIB_FTRUNCATE" != 1; then
38741 if test "$GL_GNULIB_FTRUNCATE" = 0; then
38742 GL_GNULIB_FTRUNCATE=$gl_module_indicator_condition
38744 GL_GNULIB_FTRUNCATE="($GL_GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
38752 printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
38761 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
38768 if test $REPLACE_GETCWD = 1; then
38777 gltests_LIBOBJS="$gltests_LIBOBJS getcwd-lgpl.$ac_objext"
38789 if test "$GL_GNULIB_GETCWD" != 1; then
38790 if test "$GL_GNULIB_GETCWD" = 0; then
38791 GL_GNULIB_GETCWD=$gl_module_indicator_condition
38793 GL_GNULIB_GETCWD="($GL_GNULIB_GETCWD || $gl_module_indicator_condition)"
38801 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
38820 if test $ac_cv_header_sys_socket_h != yes; then
38821 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
38822 if test "x$ac_cv_header_winsock2_h" = xyes
38824 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
38829 if test "$ac_cv_header_winsock2_h" = yes; then
38831 UNISTD_H_HAVE_WINSOCK2_H=1
38832 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
38838 if test $HAVE_WINSOCK2_H = 1; then
38839 REPLACE_INET_PTON=1
38840 ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
38841 " "$ac_c_undeclared_builtin_options" "CFLAGS"
38842 if test "x$ac_cv_have_decl_inet_pton" = xyes
38848 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
38850 if test $ac_cv_have_decl_inet_pton = yes; then
38851 INET_PTON_LIB="-lws2_32"
38853 HAVE_DECL_INET_PTON=0
38857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
38858 printf %s "checking for library containing inet_pton... " >&6; }
38859 if test ${ac_cv_search_inet_pton+y}
38861 printf %s "(cached) " >&6
38863 ac_func_search_save_LIBS=$LIBS
38864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38865 /* end confdefs.h. */
38867 /* Override any GCC internal prototype to avoid an error.
38868 Use char because int might match the return type of a GCC
38869 builtin and then its argument prototype would still apply. */
38874 return inet_pton ();
38879 for ac_lib in '' nsl resolv network
38881 if test -z "$ac_lib"; then
38882 ac_res="none required"
38885 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
38887 if ac_fn_c_try_link "$LINENO"
38889 ac_cv_search_inet_pton=$ac_res
38891 rm -f core conftest.err conftest.$ac_objext conftest.beam \
38893 if test ${ac_cv_search_inet_pton+y}
38898 if test ${ac_cv_search_inet_pton+y}
38902 ac_cv_search_inet_pton=no
38904 rm conftest.$ac_ext
38905 LIBS=$ac_func_search_save_LIBS
38907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
38908 printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
38909 ac_res=$ac_cv_search_inet_pton
38910 if test "$ac_res" != no
38912 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
38915 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
38916 if test "x$ac_cv_func_inet_pton" = xyes
38918 printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
38922 if test $ac_cv_func_inet_pton = no; then
38930 if test "$ac_cv_search_inet_pton" != "no" \
38931 && test "$ac_cv_search_inet_pton" != "none required"; then
38932 INET_PTON_LIB="$ac_cv_search_inet_pton"
38936 ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
38938 # include <netdb.h>
38941 " "$ac_c_undeclared_builtin_options" "CFLAGS"
38942 if test "x$ac_cv_have_decl_inet_pton" = xyes
38948 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
38950 if test $ac_cv_have_decl_inet_pton = no; then
38951 HAVE_DECL_INET_PTON=0
38956 if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1; then
38965 gltests_LIBOBJS="$gltests_LIBOBJS inet_pton.$ac_objext"
38980 if test "$GL_GNULIB_INET_PTON" != 1; then
38981 if test "$GL_GNULIB_INET_PTON" = 0; then
38982 GL_GNULIB_INET_PTON=$gl_module_indicator_condition
38984 GL_GNULIB_INET_PTON="($GL_GNULIB_INET_PTON || $gl_module_indicator_condition)"
38991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
38992 printf %s "checking whether byte ordering is bigendian... " >&6; }
38993 if test ${ac_cv_c_bigendian+y}
38995 printf %s "(cached) " >&6
38997 ac_cv_c_bigendian=unknown
38998 # See if we're dealing with a universal compiler.
38999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39000 /* end confdefs.h. */
39001 #ifndef __APPLE_CC__
39002 not a universal capable compiler
39007 if ac_fn_c_try_compile "$LINENO"
39010 # Check for potential -arch flags. It is not universal unless
39011 # there are at least two -arch flags with different values.
39014 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
39015 if test -n "$ac_prev"; then
39017 i?86 | x86_64 | ppc | ppc64)
39018 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
39021 ac_cv_c_bigendian=universal
39027 elif test "x$ac_word" = "x-arch"; then
39032 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39033 if test $ac_cv_c_bigendian = unknown; then
39034 # See if sys/param.h defines the BYTE_ORDER macro.
39035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39036 /* end confdefs.h. */
39037 #include <sys/types.h>
39038 #include <sys/param.h>
39043 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
39044 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
39046 bogus endian macros
39053 if ac_fn_c_try_compile "$LINENO"
39055 # It does; now see whether it defined to BIG_ENDIAN or not.
39056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39057 /* end confdefs.h. */
39058 #include <sys/types.h>
39059 #include <sys/param.h>
39064 #if BYTE_ORDER != BIG_ENDIAN
39072 if ac_fn_c_try_compile "$LINENO"
39074 ac_cv_c_bigendian=yes
39076 ac_cv_c_bigendian=no
39078 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39080 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39082 if test $ac_cv_c_bigendian = unknown; then
39083 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
39084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39085 /* end confdefs.h. */
39086 #include <limits.h>
39091 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
39092 bogus endian macros
39099 if ac_fn_c_try_compile "$LINENO"
39101 # It does; now see whether it defined to _BIG_ENDIAN or not.
39102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39103 /* end confdefs.h. */
39104 #include <limits.h>
39109 #ifndef _BIG_ENDIAN
39117 if ac_fn_c_try_compile "$LINENO"
39119 ac_cv_c_bigendian=yes
39121 ac_cv_c_bigendian=no
39123 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39125 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39127 if test $ac_cv_c_bigendian = unknown; then
39128 # Compile a test program.
39129 if test "$cross_compiling" = yes
39131 # Try to guess by grepping values from an object file.
39132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39133 /* end confdefs.h. */
39134 unsigned short int ascii_mm[] =
39135 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
39136 unsigned short int ascii_ii[] =
39137 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
39138 int use_ascii (int i) {
39139 return ascii_mm[i] + ascii_ii[i];
39141 unsigned short int ebcdic_ii[] =
39142 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
39143 unsigned short int ebcdic_mm[] =
39144 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
39145 int use_ebcdic (int i) {
39146 return ebcdic_mm[i] + ebcdic_ii[i];
39153 return use_ascii (foo) == use_ebcdic (foo);
39158 if ac_fn_c_try_compile "$LINENO"
39160 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
39161 ac_cv_c_bigendian=yes
39163 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
39164 if test "$ac_cv_c_bigendian" = unknown; then
39165 ac_cv_c_bigendian=no
39167 # finding both strings is unlikely to happen, but who knows?
39168 ac_cv_c_bigendian=unknown
39172 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39175 /* end confdefs.h. */
39176 $ac_includes_default
39181 /* Are we little or big endian? From Harbison&Steele. */
39185 char c[sizeof (long int)];
39188 return u.c[sizeof (long int) - 1] == 1;
39194 if ac_fn_c_try_run "$LINENO"
39196 ac_cv_c_bigendian=no
39198 ac_cv_c_bigendian=yes
39200 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39201 conftest.$ac_objext conftest.beam conftest.$ac_ext
39206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
39207 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
39208 case $ac_cv_c_bigendian in #(
39210 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
39216 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
39220 as_fn_error $? "unknown endianness
39221 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
39228 if test "$ac_cv_header_winsock2_h" = yes; then
39231 ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
39232 if test "x$ac_cv_func_ioctl" = xyes
39234 printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
39238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
39239 printf %s "checking for ioctl with POSIX signature... " >&6; }
39240 if test ${gl_cv_func_ioctl_posix_signature+y}
39242 printf %s "(cached) " >&6
39244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39245 /* end confdefs.h. */
39246 #include <sys/ioctl.h>
39247 /* On some platforms, ioctl() is declared in <unistd.h>. */
39248 #include <unistd.h>
39257 int ioctl (int, int, ...);
39264 if ac_fn_c_try_compile "$LINENO"
39266 gl_cv_func_ioctl_posix_signature=yes
39268 gl_cv_func_ioctl_posix_signature=no
39270 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
39274 printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
39275 if test $gl_cv_func_ioctl_posix_signature != yes; then
39280 if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
39289 gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext"
39301 if test "$GL_GNULIB_IOCTL" != 1; then
39302 if test "$GL_GNULIB_IOCTL" = 0; then
39303 GL_GNULIB_IOCTL=$gl_module_indicator_condition
39305 GL_GNULIB_IOCTL="($GL_GNULIB_IOCTL || $gl_module_indicator_condition)"
39313 printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
39320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
39321 printf %s "checking for a traditional french locale... " >&6; }
39322 if test ${gt_cv_locale_fr+y}
39324 printf %s "(cached) " >&6
39327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39328 /* end confdefs.h. */
39330 #include <locale.h>
39332 #if HAVE_LANGINFO_CODESET
39333 # include <langinfo.h>
39335 #include <stdlib.h>
39336 #include <string.h>
39340 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
39341 imitates locale dependent behaviour by looking at the environment
39342 variables, and all locales use the UTF-8 encoding. */
39343 #if defined __BEOS__ || defined __HAIKU__
39346 /* Check whether the given locale name is recognized by the system. */
39347 # if defined _WIN32 && !defined __CYGWIN__
39348 /* On native Windows, setlocale(category, "") looks at the system settings,
39349 not at the environment variables. Also, when an encoding suffix such
39350 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39351 category of the locale to "C". */
39352 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39353 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39356 if (setlocale (LC_ALL, "") == NULL) return 1;
39358 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39359 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39360 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39361 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39362 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39363 some unit tests fail.
39364 On MirBSD 10, when an unsupported locale is specified, setlocale()
39365 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
39366 # if HAVE_LANGINFO_CODESET
39368 const char *cs = nl_langinfo (CODESET);
39369 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
39370 || strcmp (cs, "UTF-8") == 0)
39375 /* On Cygwin, avoid locale names without encoding suffix, because the
39376 locale_charset() function relies on the encoding suffix. Note that
39377 LC_ALL is set on the command line. */
39378 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39380 /* Check whether in the abbreviation of the second month, the second
39381 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
39382 one byte long. This excludes the UTF-8 encoding. */
39383 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39384 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
39385 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
39386 /* Check whether the decimal separator is a comma.
39387 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
39388 are nl_langinfo(RADIXCHAR) are both ".". */
39389 if (localeconv () ->decimal_point[0] != ',') return 1;
39396 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39397 (eval $ac_link) 2>&5
39399 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39400 test $ac_status = 0; } && test -s conftest$ac_exeext; then
39402 # Handle native Windows specially, because there setlocale() interprets
39403 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39404 # "fr" or "fra" as "French" or "French_France.1252",
39405 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39406 # "ja" as "Japanese" or "Japanese_Japan.932",
39409 # Test for the native Windows locale name.
39410 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39411 gt_cv_locale_fr=French_France.1252
39414 gt_cv_locale_fr=none
39418 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39419 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39420 # configure script would override the LC_ALL setting. Likewise for
39421 # LC_CTYPE, which is also set at the beginning of the configure script.
39422 # Test for the usual locale name.
39423 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39424 gt_cv_locale_fr=fr_FR
39426 # Test for the locale name with explicit encoding suffix.
39427 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39428 gt_cv_locale_fr=fr_FR.ISO-8859-1
39430 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
39431 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39432 gt_cv_locale_fr=fr_FR.ISO8859-1
39434 # Test for the HP-UX locale name.
39435 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39436 gt_cv_locale_fr=fr_FR.iso88591
39438 # Test for the Solaris 7 locale name.
39439 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39443 gt_cv_locale_fr=none
39455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
39456 printf "%s\n" "$gt_cv_locale_fr" >&6; }
39457 LOCALE_FR=$gt_cv_locale_fr
39462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
39463 printf %s "checking for a french Unicode locale... " >&6; }
39464 if test ${gt_cv_locale_fr_utf8+y}
39466 printf %s "(cached) " >&6
39469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39470 /* end confdefs.h. */
39472 #include <locale.h>
39474 #if HAVE_LANGINFO_CODESET
39475 # include <langinfo.h>
39477 #include <stdlib.h>
39478 #include <string.h>
39482 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
39483 imitates locale dependent behaviour by looking at the environment
39484 variables, and all locales use the UTF-8 encoding. */
39485 #if !(defined __BEOS__ || defined __HAIKU__)
39486 /* Check whether the given locale name is recognized by the system. */
39487 # if defined _WIN32 && !defined __CYGWIN__
39488 /* On native Windows, setlocale(category, "") looks at the system settings,
39489 not at the environment variables. Also, when an encoding suffix such
39490 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39491 category of the locale to "C". */
39492 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39493 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39496 if (setlocale (LC_ALL, "") == NULL) return 1;
39498 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39499 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39500 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39501 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39502 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39503 some unit tests fail. */
39504 # if HAVE_LANGINFO_CODESET
39506 const char *cs = nl_langinfo (CODESET);
39507 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
39512 /* On Cygwin, avoid locale names without encoding suffix, because the
39513 locale_charset() function relies on the encoding suffix. Note that
39514 LC_ALL is set on the command line. */
39515 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39517 /* Check whether in the abbreviation of the second month, the second
39518 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
39519 two bytes long, with UTF-8 encoding. */
39520 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39521 if (strftime (buf, sizeof (buf), "%b", &t) < 4
39522 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
39525 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
39526 /* Check whether the decimal separator is a comma.
39527 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
39528 are nl_langinfo(RADIXCHAR) are both ".". */
39529 if (localeconv () ->decimal_point[0] != ',') return 1;
39535 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39536 (eval $ac_link) 2>&5
39538 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39539 test $ac_status = 0; } && test -s conftest$ac_exeext; then
39541 # Handle native Windows specially, because there setlocale() interprets
39542 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39543 # "fr" or "fra" as "French" or "French_France.1252",
39544 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39545 # "ja" as "Japanese" or "Japanese_Japan.932",
39548 # Test for the hypothetical native Windows locale name.
39549 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39550 gt_cv_locale_fr_utf8=French_France.65001
39553 gt_cv_locale_fr_utf8=none
39557 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39558 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39559 # configure script would override the LC_ALL setting. Likewise for
39560 # LC_CTYPE, which is also set at the beginning of the configure script.
39561 # Test for the usual locale name.
39562 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39563 gt_cv_locale_fr_utf8=fr_FR
39565 # Test for the locale name with explicit encoding suffix.
39566 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39567 gt_cv_locale_fr_utf8=fr_FR.UTF-8
39569 # Test for the Solaris 7 locale name.
39570 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39571 gt_cv_locale_fr_utf8=fr.UTF-8
39574 gt_cv_locale_fr_utf8=none
39584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
39585 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
39586 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
39592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
39593 printf %s "checking for a traditional japanese locale... " >&6; }
39594 if test ${gt_cv_locale_ja+y}
39596 printf %s "(cached) " >&6
39599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39600 /* end confdefs.h. */
39602 #include <locale.h>
39604 #if HAVE_LANGINFO_CODESET
39605 # include <langinfo.h>
39607 #include <stdlib.h>
39608 #include <string.h>
39613 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
39614 imitates locale dependent behaviour by looking at the environment
39615 variables, and all locales use the UTF-8 encoding. */
39616 #if defined __BEOS__ || defined __HAIKU__
39619 /* Check whether the given locale name is recognized by the system. */
39620 # if defined _WIN32 && !defined __CYGWIN__
39621 /* On native Windows, setlocale(category, "") looks at the system settings,
39622 not at the environment variables. Also, when an encoding suffix such
39623 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39624 category of the locale to "C". */
39625 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39626 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39629 if (setlocale (LC_ALL, "") == NULL) return 1;
39631 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39632 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39633 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39634 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39635 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39636 some unit tests fail.
39637 On MirBSD 10, when an unsupported locale is specified, setlocale()
39638 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
39639 # if HAVE_LANGINFO_CODESET
39641 const char *cs = nl_langinfo (CODESET);
39642 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
39643 || strcmp (cs, "UTF-8") == 0)
39648 /* On Cygwin, avoid locale names without encoding suffix, because the
39649 locale_charset() function relies on the encoding suffix. Note that
39650 LC_ALL is set on the command line. */
39651 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39653 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
39654 on Cygwin 1.5.x. */
39655 if (MB_CUR_MAX == 1)
39657 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
39658 This excludes the UTF-8 encoding (except on MirBSD). */
39661 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39662 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
39663 for (p = buf; *p != '\0'; p++)
39664 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
39672 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39673 (eval $ac_link) 2>&5
39675 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39676 test $ac_status = 0; } && test -s conftest$ac_exeext; then
39678 # Handle native Windows specially, because there setlocale() interprets
39679 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39680 # "fr" or "fra" as "French" or "French_France.1252",
39681 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39682 # "ja" as "Japanese" or "Japanese_Japan.932",
39685 # Note that on native Windows, the Japanese locale is
39686 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
39687 # cannot use it here.
39688 gt_cv_locale_ja=none
39691 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39692 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39693 # configure script would override the LC_ALL setting. Likewise for
39694 # LC_CTYPE, which is also set at the beginning of the configure script.
39695 # Test for the AIX locale name.
39696 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39697 gt_cv_locale_ja=ja_JP
39699 # Test for the locale name with explicit encoding suffix.
39700 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39701 gt_cv_locale_ja=ja_JP.EUC-JP
39703 # Test for the HP-UX, OSF/1, NetBSD locale name.
39704 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39705 gt_cv_locale_ja=ja_JP.eucJP
39707 # Test for the IRIX, FreeBSD locale name.
39708 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39709 gt_cv_locale_ja=ja_JP.EUC
39711 # Test for the Solaris 7 locale name.
39712 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39715 # Special test for NetBSD 1.6.
39716 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
39717 gt_cv_locale_ja=ja_JP.eucJP
39720 gt_cv_locale_ja=none
39733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
39734 printf "%s\n" "$gt_cv_locale_ja" >&6; }
39735 LOCALE_JA=$gt_cv_locale_ja
39741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
39742 printf %s "checking for a transitional chinese locale... " >&6; }
39743 if test ${gt_cv_locale_zh_CN+y}
39745 printf %s "(cached) " >&6
39748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39749 /* end confdefs.h. */
39751 #include <locale.h>
39752 #include <stdlib.h>
39754 #if HAVE_LANGINFO_CODESET
39755 # include <langinfo.h>
39757 #include <stdlib.h>
39758 #include <string.h>
39763 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
39764 imitates locale dependent behaviour by looking at the environment
39765 variables, and all locales use the UTF-8 encoding. */
39766 #if defined __BEOS__ || defined __HAIKU__
39769 /* Check whether the given locale name is recognized by the system. */
39770 # if defined _WIN32 && !defined __CYGWIN__
39771 /* On native Windows, setlocale(category, "") looks at the system settings,
39772 not at the environment variables. Also, when an encoding suffix such
39773 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39774 category of the locale to "C". */
39775 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39776 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39779 if (setlocale (LC_ALL, "") == NULL) return 1;
39781 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39782 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39783 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39784 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39785 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39786 some unit tests fail.
39787 On MirBSD 10, when an unsupported locale is specified, setlocale()
39788 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
39789 # if HAVE_LANGINFO_CODESET
39791 const char *cs = nl_langinfo (CODESET);
39792 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
39793 || strcmp (cs, "UTF-8") == 0)
39798 /* On Cygwin, avoid locale names without encoding suffix, because the
39799 locale_charset() function relies on the encoding suffix. Note that
39800 LC_ALL is set on the command line. */
39801 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39803 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
39804 This excludes the UTF-8 encoding (except on MirBSD). */
39807 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39808 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
39809 for (p = buf; *p != '\0'; p++)
39810 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
39813 /* Check whether a typical GB18030 multibyte sequence is recognized as a
39814 single wide character. This excludes the GB2312 and GBK encodings. */
39815 if (mblen ("\203\062\332\066", 5) != 4)
39822 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39823 (eval $ac_link) 2>&5
39825 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39826 test $ac_status = 0; } && test -s conftest$ac_exeext; then
39828 # Handle native Windows specially, because there setlocale() interprets
39829 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39830 # "fr" or "fra" as "French" or "French_France.1252",
39831 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39832 # "ja" as "Japanese" or "Japanese_Japan.932",
39835 # Test for the hypothetical native Windows locale name.
39836 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39837 gt_cv_locale_zh_CN=Chinese_China.54936
39840 gt_cv_locale_zh_CN=none
39844 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
39845 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
39846 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
39847 gt_cv_locale_zh_CN=none
39850 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39851 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39852 # configure script would override the LC_ALL setting. Likewise for
39853 # LC_CTYPE, which is also set at the beginning of the configure script.
39854 # Test for the locale name without encoding suffix.
39855 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39856 gt_cv_locale_zh_CN=zh_CN
39858 # Test for the locale name with explicit encoding suffix.
39859 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39860 gt_cv_locale_zh_CN=zh_CN.GB18030
39863 gt_cv_locale_zh_CN=none
39869 # If there was a link error, due to mblen(), the system is so old that
39870 # it certainly doesn't have a chinese locale.
39871 gt_cv_locale_zh_CN=none
39876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
39877 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
39878 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
39884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
39885 printf %s "checking for a traditional french locale... " >&6; }
39886 if test ${gt_cv_locale_fr+y}
39888 printf %s "(cached) " >&6
39891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39892 /* end confdefs.h. */
39894 #include <locale.h>
39896 #if HAVE_LANGINFO_CODESET
39897 # include <langinfo.h>
39899 #include <stdlib.h>
39900 #include <string.h>
39904 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
39905 imitates locale dependent behaviour by looking at the environment
39906 variables, and all locales use the UTF-8 encoding. */
39907 #if defined __BEOS__ || defined __HAIKU__
39910 /* Check whether the given locale name is recognized by the system. */
39911 # if defined _WIN32 && !defined __CYGWIN__
39912 /* On native Windows, setlocale(category, "") looks at the system settings,
39913 not at the environment variables. Also, when an encoding suffix such
39914 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39915 category of the locale to "C". */
39916 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39917 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39920 if (setlocale (LC_ALL, "") == NULL) return 1;
39922 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39923 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39924 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39925 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39926 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39927 some unit tests fail.
39928 On MirBSD 10, when an unsupported locale is specified, setlocale()
39929 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
39930 # if HAVE_LANGINFO_CODESET
39932 const char *cs = nl_langinfo (CODESET);
39933 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
39934 || strcmp (cs, "UTF-8") == 0)
39939 /* On Cygwin, avoid locale names without encoding suffix, because the
39940 locale_charset() function relies on the encoding suffix. Note that
39941 LC_ALL is set on the command line. */
39942 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39944 /* Check whether in the abbreviation of the second month, the second
39945 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
39946 one byte long. This excludes the UTF-8 encoding. */
39947 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39948 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
39949 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
39950 /* Check whether the decimal separator is a comma.
39951 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
39952 are nl_langinfo(RADIXCHAR) are both ".". */
39953 if (localeconv () ->decimal_point[0] != ',') return 1;
39960 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39961 (eval $ac_link) 2>&5
39963 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39964 test $ac_status = 0; } && test -s conftest$ac_exeext; then
39966 # Handle native Windows specially, because there setlocale() interprets
39967 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39968 # "fr" or "fra" as "French" or "French_France.1252",
39969 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39970 # "ja" as "Japanese" or "Japanese_Japan.932",
39973 # Test for the native Windows locale name.
39974 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39975 gt_cv_locale_fr=French_France.1252
39978 gt_cv_locale_fr=none
39982 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39983 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39984 # configure script would override the LC_ALL setting. Likewise for
39985 # LC_CTYPE, which is also set at the beginning of the configure script.
39986 # Test for the usual locale name.
39987 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39988 gt_cv_locale_fr=fr_FR
39990 # Test for the locale name with explicit encoding suffix.
39991 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39992 gt_cv_locale_fr=fr_FR.ISO-8859-1
39994 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
39995 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39996 gt_cv_locale_fr=fr_FR.ISO8859-1
39998 # Test for the HP-UX locale name.
39999 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40000 gt_cv_locale_fr=fr_FR.iso88591
40002 # Test for the Solaris 7 locale name.
40003 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40007 gt_cv_locale_fr=none
40019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
40020 printf "%s\n" "$gt_cv_locale_fr" >&6; }
40021 LOCALE_FR=$gt_cv_locale_fr
40026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
40027 printf %s "checking for a french Unicode locale... " >&6; }
40028 if test ${gt_cv_locale_fr_utf8+y}
40030 printf %s "(cached) " >&6
40033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40034 /* end confdefs.h. */
40036 #include <locale.h>
40038 #if HAVE_LANGINFO_CODESET
40039 # include <langinfo.h>
40041 #include <stdlib.h>
40042 #include <string.h>
40046 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
40047 imitates locale dependent behaviour by looking at the environment
40048 variables, and all locales use the UTF-8 encoding. */
40049 #if !(defined __BEOS__ || defined __HAIKU__)
40050 /* Check whether the given locale name is recognized by the system. */
40051 # if defined _WIN32 && !defined __CYGWIN__
40052 /* On native Windows, setlocale(category, "") looks at the system settings,
40053 not at the environment variables. Also, when an encoding suffix such
40054 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40055 category of the locale to "C". */
40056 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40057 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40060 if (setlocale (LC_ALL, "") == NULL) return 1;
40062 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40063 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40064 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40065 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40066 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40067 some unit tests fail. */
40068 # if HAVE_LANGINFO_CODESET
40070 const char *cs = nl_langinfo (CODESET);
40071 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
40076 /* On Cygwin, avoid locale names without encoding suffix, because the
40077 locale_charset() function relies on the encoding suffix. Note that
40078 LC_ALL is set on the command line. */
40079 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40081 /* Check whether in the abbreviation of the second month, the second
40082 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
40083 two bytes long, with UTF-8 encoding. */
40084 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40085 if (strftime (buf, sizeof (buf), "%b", &t) < 4
40086 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
40089 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
40090 /* Check whether the decimal separator is a comma.
40091 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
40092 are nl_langinfo(RADIXCHAR) are both ".". */
40093 if (localeconv () ->decimal_point[0] != ',') return 1;
40099 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40100 (eval $ac_link) 2>&5
40102 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40103 test $ac_status = 0; } && test -s conftest$ac_exeext; then
40105 # Handle native Windows specially, because there setlocale() interprets
40106 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40107 # "fr" or "fra" as "French" or "French_France.1252",
40108 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40109 # "ja" as "Japanese" or "Japanese_Japan.932",
40112 # Test for the hypothetical native Windows locale name.
40113 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40114 gt_cv_locale_fr_utf8=French_France.65001
40117 gt_cv_locale_fr_utf8=none
40121 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40122 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40123 # configure script would override the LC_ALL setting. Likewise for
40124 # LC_CTYPE, which is also set at the beginning of the configure script.
40125 # Test for the usual locale name.
40126 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40127 gt_cv_locale_fr_utf8=fr_FR
40129 # Test for the locale name with explicit encoding suffix.
40130 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40131 gt_cv_locale_fr_utf8=fr_FR.UTF-8
40133 # Test for the Solaris 7 locale name.
40134 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40135 gt_cv_locale_fr_utf8=fr.UTF-8
40138 gt_cv_locale_fr_utf8=none
40148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
40149 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
40150 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
40156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
40157 printf %s "checking for a traditional japanese locale... " >&6; }
40158 if test ${gt_cv_locale_ja+y}
40160 printf %s "(cached) " >&6
40163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40164 /* end confdefs.h. */
40166 #include <locale.h>
40168 #if HAVE_LANGINFO_CODESET
40169 # include <langinfo.h>
40171 #include <stdlib.h>
40172 #include <string.h>
40177 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
40178 imitates locale dependent behaviour by looking at the environment
40179 variables, and all locales use the UTF-8 encoding. */
40180 #if defined __BEOS__ || defined __HAIKU__
40183 /* Check whether the given locale name is recognized by the system. */
40184 # if defined _WIN32 && !defined __CYGWIN__
40185 /* On native Windows, setlocale(category, "") looks at the system settings,
40186 not at the environment variables. Also, when an encoding suffix such
40187 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40188 category of the locale to "C". */
40189 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40190 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40193 if (setlocale (LC_ALL, "") == NULL) return 1;
40195 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40196 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40197 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40198 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40199 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40200 some unit tests fail.
40201 On MirBSD 10, when an unsupported locale is specified, setlocale()
40202 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
40203 # if HAVE_LANGINFO_CODESET
40205 const char *cs = nl_langinfo (CODESET);
40206 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
40207 || strcmp (cs, "UTF-8") == 0)
40212 /* On Cygwin, avoid locale names without encoding suffix, because the
40213 locale_charset() function relies on the encoding suffix. Note that
40214 LC_ALL is set on the command line. */
40215 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40217 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
40218 on Cygwin 1.5.x. */
40219 if (MB_CUR_MAX == 1)
40221 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
40222 This excludes the UTF-8 encoding (except on MirBSD). */
40225 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40226 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
40227 for (p = buf; *p != '\0'; p++)
40228 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
40236 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40237 (eval $ac_link) 2>&5
40239 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40240 test $ac_status = 0; } && test -s conftest$ac_exeext; then
40242 # Handle native Windows specially, because there setlocale() interprets
40243 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40244 # "fr" or "fra" as "French" or "French_France.1252",
40245 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40246 # "ja" as "Japanese" or "Japanese_Japan.932",
40249 # Note that on native Windows, the Japanese locale is
40250 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
40251 # cannot use it here.
40252 gt_cv_locale_ja=none
40255 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40256 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40257 # configure script would override the LC_ALL setting. Likewise for
40258 # LC_CTYPE, which is also set at the beginning of the configure script.
40259 # Test for the AIX locale name.
40260 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40261 gt_cv_locale_ja=ja_JP
40263 # Test for the locale name with explicit encoding suffix.
40264 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40265 gt_cv_locale_ja=ja_JP.EUC-JP
40267 # Test for the HP-UX, OSF/1, NetBSD locale name.
40268 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40269 gt_cv_locale_ja=ja_JP.eucJP
40271 # Test for the IRIX, FreeBSD locale name.
40272 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40273 gt_cv_locale_ja=ja_JP.EUC
40275 # Test for the Solaris 7 locale name.
40276 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40279 # Special test for NetBSD 1.6.
40280 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
40281 gt_cv_locale_ja=ja_JP.eucJP
40284 gt_cv_locale_ja=none
40297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
40298 printf "%s\n" "$gt_cv_locale_ja" >&6; }
40299 LOCALE_JA=$gt_cv_locale_ja
40305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
40306 printf %s "checking for a transitional chinese locale... " >&6; }
40307 if test ${gt_cv_locale_zh_CN+y}
40309 printf %s "(cached) " >&6
40312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40313 /* end confdefs.h. */
40315 #include <locale.h>
40316 #include <stdlib.h>
40318 #if HAVE_LANGINFO_CODESET
40319 # include <langinfo.h>
40321 #include <stdlib.h>
40322 #include <string.h>
40327 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
40328 imitates locale dependent behaviour by looking at the environment
40329 variables, and all locales use the UTF-8 encoding. */
40330 #if defined __BEOS__ || defined __HAIKU__
40333 /* Check whether the given locale name is recognized by the system. */
40334 # if defined _WIN32 && !defined __CYGWIN__
40335 /* On native Windows, setlocale(category, "") looks at the system settings,
40336 not at the environment variables. Also, when an encoding suffix such
40337 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40338 category of the locale to "C". */
40339 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40340 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40343 if (setlocale (LC_ALL, "") == NULL) return 1;
40345 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40346 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40347 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40348 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40349 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40350 some unit tests fail.
40351 On MirBSD 10, when an unsupported locale is specified, setlocale()
40352 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
40353 # if HAVE_LANGINFO_CODESET
40355 const char *cs = nl_langinfo (CODESET);
40356 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
40357 || strcmp (cs, "UTF-8") == 0)
40362 /* On Cygwin, avoid locale names without encoding suffix, because the
40363 locale_charset() function relies on the encoding suffix. Note that
40364 LC_ALL is set on the command line. */
40365 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40367 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
40368 This excludes the UTF-8 encoding (except on MirBSD). */
40371 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40372 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
40373 for (p = buf; *p != '\0'; p++)
40374 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
40377 /* Check whether a typical GB18030 multibyte sequence is recognized as a
40378 single wide character. This excludes the GB2312 and GBK encodings. */
40379 if (mblen ("\203\062\332\066", 5) != 4)
40386 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40387 (eval $ac_link) 2>&5
40389 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40390 test $ac_status = 0; } && test -s conftest$ac_exeext; then
40392 # Handle native Windows specially, because there setlocale() interprets
40393 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40394 # "fr" or "fra" as "French" or "French_France.1252",
40395 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40396 # "ja" as "Japanese" or "Japanese_Japan.932",
40399 # Test for the hypothetical native Windows locale name.
40400 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40401 gt_cv_locale_zh_CN=Chinese_China.54936
40404 gt_cv_locale_zh_CN=none
40408 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
40409 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
40410 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
40411 gt_cv_locale_zh_CN=none
40414 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40415 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40416 # configure script would override the LC_ALL setting. Likewise for
40417 # LC_CTYPE, which is also set at the beginning of the configure script.
40418 # Test for the locale name without encoding suffix.
40419 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40420 gt_cv_locale_zh_CN=zh_CN
40422 # Test for the locale name with explicit encoding suffix.
40423 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40424 gt_cv_locale_zh_CN=zh_CN.GB18030
40427 gt_cv_locale_zh_CN=none
40433 # If there was a link error, due to mblen(), the system is so old that
40434 # it certainly doesn't have a chinese locale.
40435 gt_cv_locale_zh_CN=none
40440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
40441 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
40442 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
40446 if test "$ac_cv_header_winsock2_h" = yes; then
40455 gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext"
40467 if test "$GL_GNULIB_LISTEN" != 1; then
40468 if test "$GL_GNULIB_LISTEN" = 0; then
40469 GL_GNULIB_LISTEN=$gl_module_indicator_condition
40471 GL_GNULIB_LISTEN="($GL_GNULIB_LISTEN || $gl_module_indicator_condition)"
40479 printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
40487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
40488 printf %s "checking for a traditional french locale... " >&6; }
40489 if test ${gt_cv_locale_fr+y}
40491 printf %s "(cached) " >&6
40494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40495 /* end confdefs.h. */
40497 #include <locale.h>
40499 #if HAVE_LANGINFO_CODESET
40500 # include <langinfo.h>
40502 #include <stdlib.h>
40503 #include <string.h>
40507 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
40508 imitates locale dependent behaviour by looking at the environment
40509 variables, and all locales use the UTF-8 encoding. */
40510 #if defined __BEOS__ || defined __HAIKU__
40513 /* Check whether the given locale name is recognized by the system. */
40514 # if defined _WIN32 && !defined __CYGWIN__
40515 /* On native Windows, setlocale(category, "") looks at the system settings,
40516 not at the environment variables. Also, when an encoding suffix such
40517 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40518 category of the locale to "C". */
40519 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40520 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40523 if (setlocale (LC_ALL, "") == NULL) return 1;
40525 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40526 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40527 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40528 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40529 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40530 some unit tests fail.
40531 On MirBSD 10, when an unsupported locale is specified, setlocale()
40532 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
40533 # if HAVE_LANGINFO_CODESET
40535 const char *cs = nl_langinfo (CODESET);
40536 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
40537 || strcmp (cs, "UTF-8") == 0)
40542 /* On Cygwin, avoid locale names without encoding suffix, because the
40543 locale_charset() function relies on the encoding suffix. Note that
40544 LC_ALL is set on the command line. */
40545 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40547 /* Check whether in the abbreviation of the second month, the second
40548 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
40549 one byte long. This excludes the UTF-8 encoding. */
40550 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40551 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
40552 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
40553 /* Check whether the decimal separator is a comma.
40554 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
40555 are nl_langinfo(RADIXCHAR) are both ".". */
40556 if (localeconv () ->decimal_point[0] != ',') return 1;
40563 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40564 (eval $ac_link) 2>&5
40566 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40567 test $ac_status = 0; } && test -s conftest$ac_exeext; then
40569 # Handle native Windows specially, because there setlocale() interprets
40570 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40571 # "fr" or "fra" as "French" or "French_France.1252",
40572 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40573 # "ja" as "Japanese" or "Japanese_Japan.932",
40576 # Test for the native Windows locale name.
40577 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40578 gt_cv_locale_fr=French_France.1252
40581 gt_cv_locale_fr=none
40585 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40586 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40587 # configure script would override the LC_ALL setting. Likewise for
40588 # LC_CTYPE, which is also set at the beginning of the configure script.
40589 # Test for the usual locale name.
40590 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40591 gt_cv_locale_fr=fr_FR
40593 # Test for the locale name with explicit encoding suffix.
40594 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40595 gt_cv_locale_fr=fr_FR.ISO-8859-1
40597 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
40598 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40599 gt_cv_locale_fr=fr_FR.ISO8859-1
40601 # Test for the HP-UX locale name.
40602 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40603 gt_cv_locale_fr=fr_FR.iso88591
40605 # Test for the Solaris 7 locale name.
40606 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40610 gt_cv_locale_fr=none
40622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
40623 printf "%s\n" "$gt_cv_locale_fr" >&6; }
40624 LOCALE_FR=$gt_cv_locale_fr
40629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
40630 printf %s "checking for a french Unicode locale... " >&6; }
40631 if test ${gt_cv_locale_fr_utf8+y}
40633 printf %s "(cached) " >&6
40636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40637 /* end confdefs.h. */
40639 #include <locale.h>
40641 #if HAVE_LANGINFO_CODESET
40642 # include <langinfo.h>
40644 #include <stdlib.h>
40645 #include <string.h>
40649 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
40650 imitates locale dependent behaviour by looking at the environment
40651 variables, and all locales use the UTF-8 encoding. */
40652 #if !(defined __BEOS__ || defined __HAIKU__)
40653 /* Check whether the given locale name is recognized by the system. */
40654 # if defined _WIN32 && !defined __CYGWIN__
40655 /* On native Windows, setlocale(category, "") looks at the system settings,
40656 not at the environment variables. Also, when an encoding suffix such
40657 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40658 category of the locale to "C". */
40659 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40660 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40663 if (setlocale (LC_ALL, "") == NULL) return 1;
40665 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40666 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40667 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40668 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40669 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40670 some unit tests fail. */
40671 # if HAVE_LANGINFO_CODESET
40673 const char *cs = nl_langinfo (CODESET);
40674 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
40679 /* On Cygwin, avoid locale names without encoding suffix, because the
40680 locale_charset() function relies on the encoding suffix. Note that
40681 LC_ALL is set on the command line. */
40682 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40684 /* Check whether in the abbreviation of the second month, the second
40685 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
40686 two bytes long, with UTF-8 encoding. */
40687 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40688 if (strftime (buf, sizeof (buf), "%b", &t) < 4
40689 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
40692 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
40693 /* Check whether the decimal separator is a comma.
40694 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
40695 are nl_langinfo(RADIXCHAR) are both ".". */
40696 if (localeconv () ->decimal_point[0] != ',') return 1;
40702 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40703 (eval $ac_link) 2>&5
40705 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40706 test $ac_status = 0; } && test -s conftest$ac_exeext; then
40708 # Handle native Windows specially, because there setlocale() interprets
40709 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40710 # "fr" or "fra" as "French" or "French_France.1252",
40711 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40712 # "ja" as "Japanese" or "Japanese_Japan.932",
40715 # Test for the hypothetical native Windows locale name.
40716 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40717 gt_cv_locale_fr_utf8=French_France.65001
40720 gt_cv_locale_fr_utf8=none
40724 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40725 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40726 # configure script would override the LC_ALL setting. Likewise for
40727 # LC_CTYPE, which is also set at the beginning of the configure script.
40728 # Test for the usual locale name.
40729 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40730 gt_cv_locale_fr_utf8=fr_FR
40732 # Test for the locale name with explicit encoding suffix.
40733 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40734 gt_cv_locale_fr_utf8=fr_FR.UTF-8
40736 # Test for the Solaris 7 locale name.
40737 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40738 gt_cv_locale_fr_utf8=fr.UTF-8
40741 gt_cv_locale_fr_utf8=none
40751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
40752 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
40753 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
40759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
40760 printf %s "checking for a traditional japanese locale... " >&6; }
40761 if test ${gt_cv_locale_ja+y}
40763 printf %s "(cached) " >&6
40766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40767 /* end confdefs.h. */
40769 #include <locale.h>
40771 #if HAVE_LANGINFO_CODESET
40772 # include <langinfo.h>
40774 #include <stdlib.h>
40775 #include <string.h>
40780 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
40781 imitates locale dependent behaviour by looking at the environment
40782 variables, and all locales use the UTF-8 encoding. */
40783 #if defined __BEOS__ || defined __HAIKU__
40786 /* Check whether the given locale name is recognized by the system. */
40787 # if defined _WIN32 && !defined __CYGWIN__
40788 /* On native Windows, setlocale(category, "") looks at the system settings,
40789 not at the environment variables. Also, when an encoding suffix such
40790 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40791 category of the locale to "C". */
40792 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40793 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40796 if (setlocale (LC_ALL, "") == NULL) return 1;
40798 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40799 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40800 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40801 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40802 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40803 some unit tests fail.
40804 On MirBSD 10, when an unsupported locale is specified, setlocale()
40805 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
40806 # if HAVE_LANGINFO_CODESET
40808 const char *cs = nl_langinfo (CODESET);
40809 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
40810 || strcmp (cs, "UTF-8") == 0)
40815 /* On Cygwin, avoid locale names without encoding suffix, because the
40816 locale_charset() function relies on the encoding suffix. Note that
40817 LC_ALL is set on the command line. */
40818 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40820 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
40821 on Cygwin 1.5.x. */
40822 if (MB_CUR_MAX == 1)
40824 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
40825 This excludes the UTF-8 encoding (except on MirBSD). */
40828 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40829 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
40830 for (p = buf; *p != '\0'; p++)
40831 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
40839 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40840 (eval $ac_link) 2>&5
40842 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40843 test $ac_status = 0; } && test -s conftest$ac_exeext; then
40845 # Handle native Windows specially, because there setlocale() interprets
40846 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40847 # "fr" or "fra" as "French" or "French_France.1252",
40848 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40849 # "ja" as "Japanese" or "Japanese_Japan.932",
40852 # Note that on native Windows, the Japanese locale is
40853 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
40854 # cannot use it here.
40855 gt_cv_locale_ja=none
40858 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40859 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40860 # configure script would override the LC_ALL setting. Likewise for
40861 # LC_CTYPE, which is also set at the beginning of the configure script.
40862 # Test for the AIX locale name.
40863 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40864 gt_cv_locale_ja=ja_JP
40866 # Test for the locale name with explicit encoding suffix.
40867 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40868 gt_cv_locale_ja=ja_JP.EUC-JP
40870 # Test for the HP-UX, OSF/1, NetBSD locale name.
40871 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40872 gt_cv_locale_ja=ja_JP.eucJP
40874 # Test for the IRIX, FreeBSD locale name.
40875 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40876 gt_cv_locale_ja=ja_JP.EUC
40878 # Test for the Solaris 7 locale name.
40879 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40882 # Special test for NetBSD 1.6.
40883 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
40884 gt_cv_locale_ja=ja_JP.eucJP
40887 gt_cv_locale_ja=none
40900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
40901 printf "%s\n" "$gt_cv_locale_ja" >&6; }
40902 LOCALE_JA=$gt_cv_locale_ja
40908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
40909 printf %s "checking for a transitional chinese locale... " >&6; }
40910 if test ${gt_cv_locale_zh_CN+y}
40912 printf %s "(cached) " >&6
40915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40916 /* end confdefs.h. */
40918 #include <locale.h>
40919 #include <stdlib.h>
40921 #if HAVE_LANGINFO_CODESET
40922 # include <langinfo.h>
40924 #include <stdlib.h>
40925 #include <string.h>
40930 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
40931 imitates locale dependent behaviour by looking at the environment
40932 variables, and all locales use the UTF-8 encoding. */
40933 #if defined __BEOS__ || defined __HAIKU__
40936 /* Check whether the given locale name is recognized by the system. */
40937 # if defined _WIN32 && !defined __CYGWIN__
40938 /* On native Windows, setlocale(category, "") looks at the system settings,
40939 not at the environment variables. Also, when an encoding suffix such
40940 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40941 category of the locale to "C". */
40942 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40943 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40946 if (setlocale (LC_ALL, "") == NULL) return 1;
40948 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40949 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40950 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40951 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40952 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40953 some unit tests fail.
40954 On MirBSD 10, when an unsupported locale is specified, setlocale()
40955 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
40956 # if HAVE_LANGINFO_CODESET
40958 const char *cs = nl_langinfo (CODESET);
40959 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
40960 || strcmp (cs, "UTF-8") == 0)
40965 /* On Cygwin, avoid locale names without encoding suffix, because the
40966 locale_charset() function relies on the encoding suffix. Note that
40967 LC_ALL is set on the command line. */
40968 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40970 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
40971 This excludes the UTF-8 encoding (except on MirBSD). */
40974 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40975 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
40976 for (p = buf; *p != '\0'; p++)
40977 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
40980 /* Check whether a typical GB18030 multibyte sequence is recognized as a
40981 single wide character. This excludes the GB2312 and GBK encodings. */
40982 if (mblen ("\203\062\332\066", 5) != 4)
40989 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40990 (eval $ac_link) 2>&5
40992 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40993 test $ac_status = 0; } && test -s conftest$ac_exeext; then
40995 # Handle native Windows specially, because there setlocale() interprets
40996 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40997 # "fr" or "fra" as "French" or "French_France.1252",
40998 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40999 # "ja" as "Japanese" or "Japanese_Japan.932",
41002 # Test for the hypothetical native Windows locale name.
41003 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41004 gt_cv_locale_zh_CN=Chinese_China.54936
41007 gt_cv_locale_zh_CN=none
41011 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
41012 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
41013 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
41014 gt_cv_locale_zh_CN=none
41017 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41018 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41019 # configure script would override the LC_ALL setting. Likewise for
41020 # LC_CTYPE, which is also set at the beginning of the configure script.
41021 # Test for the locale name without encoding suffix.
41022 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41023 gt_cv_locale_zh_CN=zh_CN
41025 # Test for the locale name with explicit encoding suffix.
41026 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41027 gt_cv_locale_zh_CN=zh_CN.GB18030
41030 gt_cv_locale_zh_CN=none
41036 # If there was a link error, due to mblen(), the system is so old that
41037 # it certainly doesn't have a chinese locale.
41038 gt_cv_locale_zh_CN=none
41043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
41044 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
41045 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
41051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
41052 printf %s "checking for a turkish Unicode locale... " >&6; }
41053 if test ${gt_cv_locale_tr_utf8+y}
41055 printf %s "(cached) " >&6
41058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41059 /* end confdefs.h. */
41061 #include <locale.h>
41063 #if HAVE_LANGINFO_CODESET
41064 # include <langinfo.h>
41066 #include <stdlib.h>
41067 #include <string.h>
41068 #include <wctype.h>
41072 /* On BeOS, locales are not implemented in libc. Rather, libintl
41073 imitates locale dependent behaviour by looking at the environment
41074 variables, and all locales use the UTF-8 encoding. But BeOS does not
41075 implement the Turkish upper-/lowercase mappings. Therefore, let this
41076 program return 1 on BeOS. */
41077 /* Check whether the given locale name is recognized by the system. */
41078 #if defined _WIN32 && !defined __CYGWIN__
41079 /* On native Windows, setlocale(category, "") looks at the system settings,
41080 not at the environment variables. Also, when an encoding suffix such
41081 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41082 category of the locale to "C". */
41083 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41084 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41087 if (setlocale (LC_ALL, "") == NULL) return 1;
41089 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41090 On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
41091 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41092 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41093 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41094 some unit tests fail. */
41095 #if HAVE_LANGINFO_CODESET
41097 const char *cs = nl_langinfo (CODESET);
41098 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
41103 /* On Cygwin, avoid locale names without encoding suffix, because the
41104 locale_charset() function relies on the encoding suffix. Note that
41105 LC_ALL is set on the command line. */
41106 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41108 /* Check whether in the abbreviation of the eighth month, the second
41109 character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
41110 two bytes long, with UTF-8 encoding. */
41111 t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
41112 if (strftime (buf, sizeof (buf), "%b", &t) < 4
41113 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
41115 /* Check whether the upper-/lowercase mappings are as expected for
41117 if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
41118 || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
41124 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41125 (eval $ac_link) 2>&5
41127 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41128 test $ac_status = 0; } && test -s conftest$ac_exeext; then
41130 # Handle native Windows specially, because there setlocale() interprets
41131 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41132 # "fr" or "fra" as "French" or "French_France.1252",
41133 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41134 # "ja" as "Japanese" or "Japanese_Japan.932",
41137 # Test for the hypothetical native Windows locale name.
41138 if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41139 gt_cv_locale_tr_utf8=Turkish_Turkey.65001
41142 gt_cv_locale_tr_utf8=none
41146 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41147 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41148 # configure script would override the LC_ALL setting. Likewise for
41149 # LC_CTYPE, which is also set at the beginning of the configure script.
41150 # Test for the usual locale name.
41151 if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41152 gt_cv_locale_tr_utf8=tr_TR
41154 # Test for the locale name with explicit encoding suffix.
41155 if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41156 gt_cv_locale_tr_utf8=tr_TR.UTF-8
41158 # Test for the Solaris 7 locale name.
41159 if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41160 gt_cv_locale_tr_utf8=tr.UTF-8
41163 gt_cv_locale_tr_utf8=none
41170 gt_cv_locale_tr_utf8=none
41175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
41176 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
41177 LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
41182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
41183 printf %s "checking for a french Unicode locale... " >&6; }
41184 if test ${gt_cv_locale_fr_utf8+y}
41186 printf %s "(cached) " >&6
41189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41190 /* end confdefs.h. */
41192 #include <locale.h>
41194 #if HAVE_LANGINFO_CODESET
41195 # include <langinfo.h>
41197 #include <stdlib.h>
41198 #include <string.h>
41202 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
41203 imitates locale dependent behaviour by looking at the environment
41204 variables, and all locales use the UTF-8 encoding. */
41205 #if !(defined __BEOS__ || defined __HAIKU__)
41206 /* Check whether the given locale name is recognized by the system. */
41207 # if defined _WIN32 && !defined __CYGWIN__
41208 /* On native Windows, setlocale(category, "") looks at the system settings,
41209 not at the environment variables. Also, when an encoding suffix such
41210 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41211 category of the locale to "C". */
41212 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41213 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41216 if (setlocale (LC_ALL, "") == NULL) return 1;
41218 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41219 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41220 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41221 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41222 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41223 some unit tests fail. */
41224 # if HAVE_LANGINFO_CODESET
41226 const char *cs = nl_langinfo (CODESET);
41227 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
41232 /* On Cygwin, avoid locale names without encoding suffix, because the
41233 locale_charset() function relies on the encoding suffix. Note that
41234 LC_ALL is set on the command line. */
41235 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41237 /* Check whether in the abbreviation of the second month, the second
41238 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
41239 two bytes long, with UTF-8 encoding. */
41240 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41241 if (strftime (buf, sizeof (buf), "%b", &t) < 4
41242 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
41245 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
41246 /* Check whether the decimal separator is a comma.
41247 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
41248 are nl_langinfo(RADIXCHAR) are both ".". */
41249 if (localeconv () ->decimal_point[0] != ',') return 1;
41255 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41256 (eval $ac_link) 2>&5
41258 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41259 test $ac_status = 0; } && test -s conftest$ac_exeext; then
41261 # Handle native Windows specially, because there setlocale() interprets
41262 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41263 # "fr" or "fra" as "French" or "French_France.1252",
41264 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41265 # "ja" as "Japanese" or "Japanese_Japan.932",
41268 # Test for the hypothetical native Windows locale name.
41269 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41270 gt_cv_locale_fr_utf8=French_France.65001
41273 gt_cv_locale_fr_utf8=none
41277 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41278 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41279 # configure script would override the LC_ALL setting. Likewise for
41280 # LC_CTYPE, which is also set at the beginning of the configure script.
41281 # Test for the usual locale name.
41282 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41283 gt_cv_locale_fr_utf8=fr_FR
41285 # Test for the locale name with explicit encoding suffix.
41286 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41287 gt_cv_locale_fr_utf8=fr_FR.UTF-8
41289 # Test for the Solaris 7 locale name.
41290 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41291 gt_cv_locale_fr_utf8=fr.UTF-8
41294 gt_cv_locale_fr_utf8=none
41304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
41305 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
41306 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
41312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
41313 printf %s "checking for a traditional french locale... " >&6; }
41314 if test ${gt_cv_locale_fr+y}
41316 printf %s "(cached) " >&6
41319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41320 /* end confdefs.h. */
41322 #include <locale.h>
41324 #if HAVE_LANGINFO_CODESET
41325 # include <langinfo.h>
41327 #include <stdlib.h>
41328 #include <string.h>
41332 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
41333 imitates locale dependent behaviour by looking at the environment
41334 variables, and all locales use the UTF-8 encoding. */
41335 #if defined __BEOS__ || defined __HAIKU__
41338 /* Check whether the given locale name is recognized by the system. */
41339 # if defined _WIN32 && !defined __CYGWIN__
41340 /* On native Windows, setlocale(category, "") looks at the system settings,
41341 not at the environment variables. Also, when an encoding suffix such
41342 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41343 category of the locale to "C". */
41344 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41345 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41348 if (setlocale (LC_ALL, "") == NULL) return 1;
41350 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41351 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41352 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41353 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41354 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41355 some unit tests fail.
41356 On MirBSD 10, when an unsupported locale is specified, setlocale()
41357 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
41358 # if HAVE_LANGINFO_CODESET
41360 const char *cs = nl_langinfo (CODESET);
41361 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
41362 || strcmp (cs, "UTF-8") == 0)
41367 /* On Cygwin, avoid locale names without encoding suffix, because the
41368 locale_charset() function relies on the encoding suffix. Note that
41369 LC_ALL is set on the command line. */
41370 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41372 /* Check whether in the abbreviation of the second month, the second
41373 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
41374 one byte long. This excludes the UTF-8 encoding. */
41375 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41376 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
41377 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
41378 /* Check whether the decimal separator is a comma.
41379 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
41380 are nl_langinfo(RADIXCHAR) are both ".". */
41381 if (localeconv () ->decimal_point[0] != ',') return 1;
41388 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41389 (eval $ac_link) 2>&5
41391 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41392 test $ac_status = 0; } && test -s conftest$ac_exeext; then
41394 # Handle native Windows specially, because there setlocale() interprets
41395 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41396 # "fr" or "fra" as "French" or "French_France.1252",
41397 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41398 # "ja" as "Japanese" or "Japanese_Japan.932",
41401 # Test for the native Windows locale name.
41402 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41403 gt_cv_locale_fr=French_France.1252
41406 gt_cv_locale_fr=none
41410 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41411 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41412 # configure script would override the LC_ALL setting. Likewise for
41413 # LC_CTYPE, which is also set at the beginning of the configure script.
41414 # Test for the usual locale name.
41415 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41416 gt_cv_locale_fr=fr_FR
41418 # Test for the locale name with explicit encoding suffix.
41419 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41420 gt_cv_locale_fr=fr_FR.ISO-8859-1
41422 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
41423 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41424 gt_cv_locale_fr=fr_FR.ISO8859-1
41426 # Test for the HP-UX locale name.
41427 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41428 gt_cv_locale_fr=fr_FR.iso88591
41430 # Test for the Solaris 7 locale name.
41431 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41435 gt_cv_locale_fr=none
41447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
41448 printf "%s\n" "$gt_cv_locale_fr" >&6; }
41449 LOCALE_FR=$gt_cv_locale_fr
41454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
41455 printf %s "checking for a french Unicode locale... " >&6; }
41456 if test ${gt_cv_locale_fr_utf8+y}
41458 printf %s "(cached) " >&6
41461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41462 /* end confdefs.h. */
41464 #include <locale.h>
41466 #if HAVE_LANGINFO_CODESET
41467 # include <langinfo.h>
41469 #include <stdlib.h>
41470 #include <string.h>
41474 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
41475 imitates locale dependent behaviour by looking at the environment
41476 variables, and all locales use the UTF-8 encoding. */
41477 #if !(defined __BEOS__ || defined __HAIKU__)
41478 /* Check whether the given locale name is recognized by the system. */
41479 # if defined _WIN32 && !defined __CYGWIN__
41480 /* On native Windows, setlocale(category, "") looks at the system settings,
41481 not at the environment variables. Also, when an encoding suffix such
41482 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41483 category of the locale to "C". */
41484 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41485 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41488 if (setlocale (LC_ALL, "") == NULL) return 1;
41490 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41491 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41492 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41493 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41494 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41495 some unit tests fail. */
41496 # if HAVE_LANGINFO_CODESET
41498 const char *cs = nl_langinfo (CODESET);
41499 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
41504 /* On Cygwin, avoid locale names without encoding suffix, because the
41505 locale_charset() function relies on the encoding suffix. Note that
41506 LC_ALL is set on the command line. */
41507 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41509 /* Check whether in the abbreviation of the second month, the second
41510 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
41511 two bytes long, with UTF-8 encoding. */
41512 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41513 if (strftime (buf, sizeof (buf), "%b", &t) < 4
41514 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
41517 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
41518 /* Check whether the decimal separator is a comma.
41519 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
41520 are nl_langinfo(RADIXCHAR) are both ".". */
41521 if (localeconv () ->decimal_point[0] != ',') return 1;
41527 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41528 (eval $ac_link) 2>&5
41530 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41531 test $ac_status = 0; } && test -s conftest$ac_exeext; then
41533 # Handle native Windows specially, because there setlocale() interprets
41534 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41535 # "fr" or "fra" as "French" or "French_France.1252",
41536 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41537 # "ja" as "Japanese" or "Japanese_Japan.932",
41540 # Test for the hypothetical native Windows locale name.
41541 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41542 gt_cv_locale_fr_utf8=French_France.65001
41545 gt_cv_locale_fr_utf8=none
41549 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41550 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41551 # configure script would override the LC_ALL setting. Likewise for
41552 # LC_CTYPE, which is also set at the beginning of the configure script.
41553 # Test for the usual locale name.
41554 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41555 gt_cv_locale_fr_utf8=fr_FR
41557 # Test for the locale name with explicit encoding suffix.
41558 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41559 gt_cv_locale_fr_utf8=fr_FR.UTF-8
41561 # Test for the Solaris 7 locale name.
41562 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41563 gt_cv_locale_fr_utf8=fr.UTF-8
41566 gt_cv_locale_fr_utf8=none
41576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
41577 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
41578 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
41584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
41585 printf %s "checking for a traditional japanese locale... " >&6; }
41586 if test ${gt_cv_locale_ja+y}
41588 printf %s "(cached) " >&6
41591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41592 /* end confdefs.h. */
41594 #include <locale.h>
41596 #if HAVE_LANGINFO_CODESET
41597 # include <langinfo.h>
41599 #include <stdlib.h>
41600 #include <string.h>
41605 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
41606 imitates locale dependent behaviour by looking at the environment
41607 variables, and all locales use the UTF-8 encoding. */
41608 #if defined __BEOS__ || defined __HAIKU__
41611 /* Check whether the given locale name is recognized by the system. */
41612 # if defined _WIN32 && !defined __CYGWIN__
41613 /* On native Windows, setlocale(category, "") looks at the system settings,
41614 not at the environment variables. Also, when an encoding suffix such
41615 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41616 category of the locale to "C". */
41617 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41618 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41621 if (setlocale (LC_ALL, "") == NULL) return 1;
41623 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41624 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41625 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41626 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41627 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41628 some unit tests fail.
41629 On MirBSD 10, when an unsupported locale is specified, setlocale()
41630 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
41631 # if HAVE_LANGINFO_CODESET
41633 const char *cs = nl_langinfo (CODESET);
41634 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
41635 || strcmp (cs, "UTF-8") == 0)
41640 /* On Cygwin, avoid locale names without encoding suffix, because the
41641 locale_charset() function relies on the encoding suffix. Note that
41642 LC_ALL is set on the command line. */
41643 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41645 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
41646 on Cygwin 1.5.x. */
41647 if (MB_CUR_MAX == 1)
41649 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
41650 This excludes the UTF-8 encoding (except on MirBSD). */
41653 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41654 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
41655 for (p = buf; *p != '\0'; p++)
41656 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
41664 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41665 (eval $ac_link) 2>&5
41667 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41668 test $ac_status = 0; } && test -s conftest$ac_exeext; then
41670 # Handle native Windows specially, because there setlocale() interprets
41671 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41672 # "fr" or "fra" as "French" or "French_France.1252",
41673 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41674 # "ja" as "Japanese" or "Japanese_Japan.932",
41677 # Note that on native Windows, the Japanese locale is
41678 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
41679 # cannot use it here.
41680 gt_cv_locale_ja=none
41683 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41684 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41685 # configure script would override the LC_ALL setting. Likewise for
41686 # LC_CTYPE, which is also set at the beginning of the configure script.
41687 # Test for the AIX locale name.
41688 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41689 gt_cv_locale_ja=ja_JP
41691 # Test for the locale name with explicit encoding suffix.
41692 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41693 gt_cv_locale_ja=ja_JP.EUC-JP
41695 # Test for the HP-UX, OSF/1, NetBSD locale name.
41696 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41697 gt_cv_locale_ja=ja_JP.eucJP
41699 # Test for the IRIX, FreeBSD locale name.
41700 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41701 gt_cv_locale_ja=ja_JP.EUC
41703 # Test for the Solaris 7 locale name.
41704 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41707 # Special test for NetBSD 1.6.
41708 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
41709 gt_cv_locale_ja=ja_JP.eucJP
41712 gt_cv_locale_ja=none
41725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
41726 printf "%s\n" "$gt_cv_locale_ja" >&6; }
41727 LOCALE_JA=$gt_cv_locale_ja
41733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
41734 printf %s "checking for a transitional chinese locale... " >&6; }
41735 if test ${gt_cv_locale_zh_CN+y}
41737 printf %s "(cached) " >&6
41740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41741 /* end confdefs.h. */
41743 #include <locale.h>
41744 #include <stdlib.h>
41746 #if HAVE_LANGINFO_CODESET
41747 # include <langinfo.h>
41749 #include <stdlib.h>
41750 #include <string.h>
41755 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
41756 imitates locale dependent behaviour by looking at the environment
41757 variables, and all locales use the UTF-8 encoding. */
41758 #if defined __BEOS__ || defined __HAIKU__
41761 /* Check whether the given locale name is recognized by the system. */
41762 # if defined _WIN32 && !defined __CYGWIN__
41763 /* On native Windows, setlocale(category, "") looks at the system settings,
41764 not at the environment variables. Also, when an encoding suffix such
41765 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41766 category of the locale to "C". */
41767 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41768 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41771 if (setlocale (LC_ALL, "") == NULL) return 1;
41773 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41774 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41775 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41776 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41777 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41778 some unit tests fail.
41779 On MirBSD 10, when an unsupported locale is specified, setlocale()
41780 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
41781 # if HAVE_LANGINFO_CODESET
41783 const char *cs = nl_langinfo (CODESET);
41784 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
41785 || strcmp (cs, "UTF-8") == 0)
41790 /* On Cygwin, avoid locale names without encoding suffix, because the
41791 locale_charset() function relies on the encoding suffix. Note that
41792 LC_ALL is set on the command line. */
41793 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41795 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
41796 This excludes the UTF-8 encoding (except on MirBSD). */
41799 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41800 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
41801 for (p = buf; *p != '\0'; p++)
41802 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
41805 /* Check whether a typical GB18030 multibyte sequence is recognized as a
41806 single wide character. This excludes the GB2312 and GBK encodings. */
41807 if (mblen ("\203\062\332\066", 5) != 4)
41814 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41815 (eval $ac_link) 2>&5
41817 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41818 test $ac_status = 0; } && test -s conftest$ac_exeext; then
41820 # Handle native Windows specially, because there setlocale() interprets
41821 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41822 # "fr" or "fra" as "French" or "French_France.1252",
41823 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41824 # "ja" as "Japanese" or "Japanese_Japan.932",
41827 # Test for the hypothetical native Windows locale name.
41828 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41829 gt_cv_locale_zh_CN=Chinese_China.54936
41832 gt_cv_locale_zh_CN=none
41836 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
41837 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
41838 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
41839 gt_cv_locale_zh_CN=none
41842 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41843 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41844 # configure script would override the LC_ALL setting. Likewise for
41845 # LC_CTYPE, which is also set at the beginning of the configure script.
41846 # Test for the locale name without encoding suffix.
41847 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41848 gt_cv_locale_zh_CN=zh_CN
41850 # Test for the locale name with explicit encoding suffix.
41851 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41852 gt_cv_locale_zh_CN=zh_CN.GB18030
41855 gt_cv_locale_zh_CN=none
41861 # If there was a link error, due to mblen(), the system is so old that
41862 # it certainly doesn't have a chinese locale.
41863 gt_cv_locale_zh_CN=none
41868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
41869 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
41870 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
41875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
41876 printf %s "checking for a french Unicode locale... " >&6; }
41877 if test ${gt_cv_locale_fr_utf8+y}
41879 printf %s "(cached) " >&6
41882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41883 /* end confdefs.h. */
41885 #include <locale.h>
41887 #if HAVE_LANGINFO_CODESET
41888 # include <langinfo.h>
41890 #include <stdlib.h>
41891 #include <string.h>
41895 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
41896 imitates locale dependent behaviour by looking at the environment
41897 variables, and all locales use the UTF-8 encoding. */
41898 #if !(defined __BEOS__ || defined __HAIKU__)
41899 /* Check whether the given locale name is recognized by the system. */
41900 # if defined _WIN32 && !defined __CYGWIN__
41901 /* On native Windows, setlocale(category, "") looks at the system settings,
41902 not at the environment variables. Also, when an encoding suffix such
41903 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41904 category of the locale to "C". */
41905 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41906 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41909 if (setlocale (LC_ALL, "") == NULL) return 1;
41911 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41912 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41913 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41914 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41915 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41916 some unit tests fail. */
41917 # if HAVE_LANGINFO_CODESET
41919 const char *cs = nl_langinfo (CODESET);
41920 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
41925 /* On Cygwin, avoid locale names without encoding suffix, because the
41926 locale_charset() function relies on the encoding suffix. Note that
41927 LC_ALL is set on the command line. */
41928 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41930 /* Check whether in the abbreviation of the second month, the second
41931 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
41932 two bytes long, with UTF-8 encoding. */
41933 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41934 if (strftime (buf, sizeof (buf), "%b", &t) < 4
41935 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
41938 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
41939 /* Check whether the decimal separator is a comma.
41940 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
41941 are nl_langinfo(RADIXCHAR) are both ".". */
41942 if (localeconv () ->decimal_point[0] != ',') return 1;
41948 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41949 (eval $ac_link) 2>&5
41951 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41952 test $ac_status = 0; } && test -s conftest$ac_exeext; then
41954 # Handle native Windows specially, because there setlocale() interprets
41955 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41956 # "fr" or "fra" as "French" or "French_France.1252",
41957 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41958 # "ja" as "Japanese" or "Japanese_Japan.932",
41961 # Test for the hypothetical native Windows locale name.
41962 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41963 gt_cv_locale_fr_utf8=French_France.65001
41966 gt_cv_locale_fr_utf8=none
41970 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41971 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41972 # configure script would override the LC_ALL setting. Likewise for
41973 # LC_CTYPE, which is also set at the beginning of the configure script.
41974 # Test for the usual locale name.
41975 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41976 gt_cv_locale_fr_utf8=fr_FR
41978 # Test for the locale name with explicit encoding suffix.
41979 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41980 gt_cv_locale_fr_utf8=fr_FR.UTF-8
41982 # Test for the Solaris 7 locale name.
41983 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41984 gt_cv_locale_fr_utf8=fr.UTF-8
41987 gt_cv_locale_fr_utf8=none
41997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
41998 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
41999 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
42005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
42006 printf %s "checking for a transitional chinese locale... " >&6; }
42007 if test ${gt_cv_locale_zh_CN+y}
42009 printf %s "(cached) " >&6
42012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42013 /* end confdefs.h. */
42015 #include <locale.h>
42016 #include <stdlib.h>
42018 #if HAVE_LANGINFO_CODESET
42019 # include <langinfo.h>
42021 #include <stdlib.h>
42022 #include <string.h>
42027 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
42028 imitates locale dependent behaviour by looking at the environment
42029 variables, and all locales use the UTF-8 encoding. */
42030 #if defined __BEOS__ || defined __HAIKU__
42033 /* Check whether the given locale name is recognized by the system. */
42034 # if defined _WIN32 && !defined __CYGWIN__
42035 /* On native Windows, setlocale(category, "") looks at the system settings,
42036 not at the environment variables. Also, when an encoding suffix such
42037 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
42038 category of the locale to "C". */
42039 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
42040 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
42043 if (setlocale (LC_ALL, "") == NULL) return 1;
42045 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42046 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42047 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42048 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42049 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42050 some unit tests fail.
42051 On MirBSD 10, when an unsupported locale is specified, setlocale()
42052 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
42053 # if HAVE_LANGINFO_CODESET
42055 const char *cs = nl_langinfo (CODESET);
42056 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
42057 || strcmp (cs, "UTF-8") == 0)
42062 /* On Cygwin, avoid locale names without encoding suffix, because the
42063 locale_charset() function relies on the encoding suffix. Note that
42064 LC_ALL is set on the command line. */
42065 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42067 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
42068 This excludes the UTF-8 encoding (except on MirBSD). */
42071 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42072 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
42073 for (p = buf; *p != '\0'; p++)
42074 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
42077 /* Check whether a typical GB18030 multibyte sequence is recognized as a
42078 single wide character. This excludes the GB2312 and GBK encodings. */
42079 if (mblen ("\203\062\332\066", 5) != 4)
42086 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42087 (eval $ac_link) 2>&5
42089 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42090 test $ac_status = 0; } && test -s conftest$ac_exeext; then
42092 # Handle native Windows specially, because there setlocale() interprets
42093 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
42094 # "fr" or "fra" as "French" or "French_France.1252",
42095 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
42096 # "ja" as "Japanese" or "Japanese_Japan.932",
42099 # Test for the hypothetical native Windows locale name.
42100 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42101 gt_cv_locale_zh_CN=Chinese_China.54936
42104 gt_cv_locale_zh_CN=none
42108 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
42109 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
42110 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
42111 gt_cv_locale_zh_CN=none
42114 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42115 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
42116 # configure script would override the LC_ALL setting. Likewise for
42117 # LC_CTYPE, which is also set at the beginning of the configure script.
42118 # Test for the locale name without encoding suffix.
42119 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42120 gt_cv_locale_zh_CN=zh_CN
42122 # Test for the locale name with explicit encoding suffix.
42123 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42124 gt_cv_locale_zh_CN=zh_CN.GB18030
42127 gt_cv_locale_zh_CN=none
42133 # If there was a link error, due to mblen(), the system is so old that
42134 # it certainly doesn't have a chinese locale.
42135 gt_cv_locale_zh_CN=none
42140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
42141 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
42142 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
42158 nanosleep_save_libs=$LIBS
42160 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
42161 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
42164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
42165 printf %s "checking for library containing nanosleep... " >&6; }
42166 if test ${ac_cv_search_nanosleep+y}
42168 printf %s "(cached) " >&6
42170 ac_func_search_save_LIBS=$LIBS
42171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42172 /* end confdefs.h. */
42174 /* Override any GCC internal prototype to avoid an error.
42175 Use char because int might match the return type of a GCC
42176 builtin and then its argument prototype would still apply. */
42181 return nanosleep ();
42186 for ac_lib in '' rt posix4
42188 if test -z "$ac_lib"; then
42189 ac_res="none required"
42192 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
42194 if ac_fn_c_try_link "$LINENO"
42196 ac_cv_search_nanosleep=$ac_res
42198 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42200 if test ${ac_cv_search_nanosleep+y}
42205 if test ${ac_cv_search_nanosleep+y}
42209 ac_cv_search_nanosleep=no
42211 rm conftest.$ac_ext
42212 LIBS=$ac_func_search_save_LIBS
42214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
42215 printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
42216 ac_res=$ac_cv_search_nanosleep
42217 if test "$ac_res" != no
42219 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
42220 test "$ac_cv_search_nanosleep" = "none required" ||
42221 LIB_NANOSLEEP=$ac_cv_search_nanosleep
42224 if test "x$ac_cv_search_nanosleep" != xno; then
42227 if test $APPLE_UNIVERSAL_BUILD = 1; then
42228 # A universal build on Apple Mac OS X platforms.
42229 # The test result would be 'no (mishandles large arguments)' in 64-bit
42230 # mode but 'yes' in 32-bit mode. But we need a configuration result that
42231 # is valid in both modes.
42232 gl_cv_func_nanosleep='no (mishandles large arguments)'
42235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
42236 printf %s "checking for working nanosleep... " >&6; }
42237 if test ${gl_cv_func_nanosleep+y}
42239 printf %s "(cached) " >&6
42242 if test "$cross_compiling" = yes
42244 case "$host_os" in linux*) # Guess it halfway works when the kernel is Linux.
42245 gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
42246 mingw*) # Guess no on native Windows.
42247 gl_cv_func_nanosleep='guessing no' ;;
42248 *) # If we don't know, obey --enable-cross-guesses.
42249 gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
42253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42254 /* end confdefs.h. */
42257 #include <limits.h>
42258 #include <signal.h>
42259 #if HAVE_SYS_TIME_H
42260 #include <sys/time.h>
42263 #include <unistd.h>
42264 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
42265 #define TYPE_MAXIMUM(t) \
42266 ((t) (! TYPE_SIGNED (t) \
42268 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
42270 #if HAVE_DECL_ALARM
42272 check_for_SIGALRM (int sig)
42274 if (sig != SIGALRM)
42282 static struct timespec ts_sleep;
42283 static struct timespec ts_remaining;
42284 /* Test for major problems first. */
42287 ts_sleep.tv_sec = 0;
42288 ts_sleep.tv_nsec = 1;
42289 #if HAVE_DECL_ALARM
42291 static struct sigaction act;
42292 act.sa_handler = check_for_SIGALRM;
42293 sigemptyset (&act.sa_mask);
42294 sigaction (SIGALRM, &act, NULL);
42296 if (nanosleep (&ts_sleep, NULL) != 0)
42298 /* Test for a minor problem: the handling of large arguments. */
42299 ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
42300 ts_sleep.tv_nsec = 999999999;
42302 if (nanosleep (&ts_sleep, &ts_remaining) != -1)
42304 if (errno != EINTR)
42306 if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
42309 #else /* A simpler test for native Windows. */
42310 if (nanosleep (&ts_sleep, &ts_remaining) < 0)
42316 if ac_fn_c_try_run "$LINENO"
42318 gl_cv_func_nanosleep=yes
42320 case $? in 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; *) gl_cv_func_nanosleep=no;;
42323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42324 conftest.$ac_objext conftest.beam conftest.$ac_ext
42329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
42330 printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
42331 case "$gl_cv_func_nanosleep" in
42333 REPLACE_NANOSLEEP=0
42336 REPLACE_NANOSLEEP=1
42337 case "$gl_cv_func_nanosleep" in
42338 *"mishandles large arguments"*)
42340 printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
42344 # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
42345 for ac_lib in $LIBSOCKET; do
42346 case " $LIB_NANOSLEEP " in
42348 *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
42358 LIBS=$nanosleep_save_libs
42360 if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
42369 gltests_LIBOBJS="$gltests_LIBOBJS nanosleep.$ac_objext"
42385 if test "$GL_GNULIB_NANOSLEEP" != 1; then
42386 if test "$GL_GNULIB_NANOSLEEP" = 0; then
42387 GL_GNULIB_NANOSLEEP=$gl_module_indicator_condition
42389 GL_GNULIB_NANOSLEEP="($GL_GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
42397 printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
42403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
42404 printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
42405 if test ${gl_cv_header_netinet_in_h_selfcontained+y}
42407 printf %s "(cached) " >&6
42410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42411 /* end confdefs.h. */
42412 #include <netinet/in.h>
42421 if ac_fn_c_try_compile "$LINENO"
42423 gl_cv_header_netinet_in_h_selfcontained=yes
42425 gl_cv_header_netinet_in_h_selfcontained=no
42427 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
42431 printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
42432 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
42435 NETINET_IN_H='netinet/in.h'
42436 ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
42437 if test "x$ac_cv_header_netinet_in_h" = xyes
42439 printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
42452 if test $gl_cv_have_include_next = yes; then
42453 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
42455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
42456 printf %s "checking absolute name of <netinet/in.h>... " >&6; }
42457 if test ${gl_cv_next_netinet_in_h+y}
42459 printf %s "(cached) " >&6
42462 if test $ac_cv_header_netinet_in_h = yes; then
42467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42468 /* end confdefs.h. */
42469 #include <netinet/in.h>
42472 aix*) gl_absname_cpp="$ac_cpp -C" ;;
42473 *) gl_absname_cpp="$ac_cpp" ;;
42478 gl_dirsep_regex='[/\\]'
42481 gl_dirsep_regex='\/'
42484 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
42485 gl_header_literal_regex=`echo 'netinet/in.h' \
42486 | sed -e "$gl_make_literal_regex_sed"`
42487 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
42488 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
42494 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
42495 sed -n "$gl_absolute_header_sed"`
42497 gl_header=$gl_cv_absolute_netinet_in_h
42498 gl_cv_next_netinet_in_h='"'$gl_header'"'
42500 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
42505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
42506 printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; }
42508 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
42510 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
42511 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
42512 gl_next_as_first_directive='<'netinet/in.h'>'
42514 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
42515 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
42517 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
42522 if test $ac_cv_header_netinet_in_h = yes; then
42523 HAVE_NETINET_IN_H=1
42525 HAVE_NETINET_IN_H=0
42530 if test -n "$NETINET_IN_H"; then
42531 GL_GENERATE_NETINET_IN_H_TRUE=
42532 GL_GENERATE_NETINET_IN_H_FALSE='#'
42534 GL_GENERATE_NETINET_IN_H_TRUE='#'
42535 GL_GENERATE_NETINET_IN_H_FALSE=
42543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
42544 printf %s "checking for a traditional french locale... " >&6; }
42545 if test ${gt_cv_locale_fr+y}
42547 printf %s "(cached) " >&6
42550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42551 /* end confdefs.h. */
42553 #include <locale.h>
42555 #if HAVE_LANGINFO_CODESET
42556 # include <langinfo.h>
42558 #include <stdlib.h>
42559 #include <string.h>
42563 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
42564 imitates locale dependent behaviour by looking at the environment
42565 variables, and all locales use the UTF-8 encoding. */
42566 #if defined __BEOS__ || defined __HAIKU__
42569 /* Check whether the given locale name is recognized by the system. */
42570 # if defined _WIN32 && !defined __CYGWIN__
42571 /* On native Windows, setlocale(category, "") looks at the system settings,
42572 not at the environment variables. Also, when an encoding suffix such
42573 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
42574 category of the locale to "C". */
42575 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
42576 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
42579 if (setlocale (LC_ALL, "") == NULL) return 1;
42581 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42582 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42583 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42584 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42585 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42586 some unit tests fail.
42587 On MirBSD 10, when an unsupported locale is specified, setlocale()
42588 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
42589 # if HAVE_LANGINFO_CODESET
42591 const char *cs = nl_langinfo (CODESET);
42592 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
42593 || strcmp (cs, "UTF-8") == 0)
42598 /* On Cygwin, avoid locale names without encoding suffix, because the
42599 locale_charset() function relies on the encoding suffix. Note that
42600 LC_ALL is set on the command line. */
42601 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42603 /* Check whether in the abbreviation of the second month, the second
42604 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
42605 one byte long. This excludes the UTF-8 encoding. */
42606 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42607 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
42608 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
42609 /* Check whether the decimal separator is a comma.
42610 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
42611 are nl_langinfo(RADIXCHAR) are both ".". */
42612 if (localeconv () ->decimal_point[0] != ',') return 1;
42619 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42620 (eval $ac_link) 2>&5
42622 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42623 test $ac_status = 0; } && test -s conftest$ac_exeext; then
42625 # Handle native Windows specially, because there setlocale() interprets
42626 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
42627 # "fr" or "fra" as "French" or "French_France.1252",
42628 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
42629 # "ja" as "Japanese" or "Japanese_Japan.932",
42632 # Test for the native Windows locale name.
42633 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42634 gt_cv_locale_fr=French_France.1252
42637 gt_cv_locale_fr=none
42641 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42642 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
42643 # configure script would override the LC_ALL setting. Likewise for
42644 # LC_CTYPE, which is also set at the beginning of the configure script.
42645 # Test for the usual locale name.
42646 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42647 gt_cv_locale_fr=fr_FR
42649 # Test for the locale name with explicit encoding suffix.
42650 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42651 gt_cv_locale_fr=fr_FR.ISO-8859-1
42653 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
42654 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42655 gt_cv_locale_fr=fr_FR.ISO8859-1
42657 # Test for the HP-UX locale name.
42658 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42659 gt_cv_locale_fr=fr_FR.iso88591
42661 # Test for the Solaris 7 locale name.
42662 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42666 gt_cv_locale_fr=none
42678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
42679 printf "%s\n" "$gt_cv_locale_fr" >&6; }
42680 LOCALE_FR=$gt_cv_locale_fr
42685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
42686 printf %s "checking for a french Unicode locale... " >&6; }
42687 if test ${gt_cv_locale_fr_utf8+y}
42689 printf %s "(cached) " >&6
42692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42693 /* end confdefs.h. */
42695 #include <locale.h>
42697 #if HAVE_LANGINFO_CODESET
42698 # include <langinfo.h>
42700 #include <stdlib.h>
42701 #include <string.h>
42705 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
42706 imitates locale dependent behaviour by looking at the environment
42707 variables, and all locales use the UTF-8 encoding. */
42708 #if !(defined __BEOS__ || defined __HAIKU__)
42709 /* Check whether the given locale name is recognized by the system. */
42710 # if defined _WIN32 && !defined __CYGWIN__
42711 /* On native Windows, setlocale(category, "") looks at the system settings,
42712 not at the environment variables. Also, when an encoding suffix such
42713 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
42714 category of the locale to "C". */
42715 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
42716 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
42719 if (setlocale (LC_ALL, "") == NULL) return 1;
42721 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42722 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42723 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42724 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42725 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42726 some unit tests fail. */
42727 # if HAVE_LANGINFO_CODESET
42729 const char *cs = nl_langinfo (CODESET);
42730 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
42735 /* On Cygwin, avoid locale names without encoding suffix, because the
42736 locale_charset() function relies on the encoding suffix. Note that
42737 LC_ALL is set on the command line. */
42738 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42740 /* Check whether in the abbreviation of the second month, the second
42741 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
42742 two bytes long, with UTF-8 encoding. */
42743 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42744 if (strftime (buf, sizeof (buf), "%b", &t) < 4
42745 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
42748 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
42749 /* Check whether the decimal separator is a comma.
42750 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
42751 are nl_langinfo(RADIXCHAR) are both ".". */
42752 if (localeconv () ->decimal_point[0] != ',') return 1;
42758 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42759 (eval $ac_link) 2>&5
42761 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42762 test $ac_status = 0; } && test -s conftest$ac_exeext; then
42764 # Handle native Windows specially, because there setlocale() interprets
42765 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
42766 # "fr" or "fra" as "French" or "French_France.1252",
42767 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
42768 # "ja" as "Japanese" or "Japanese_Japan.932",
42771 # Test for the hypothetical native Windows locale name.
42772 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42773 gt_cv_locale_fr_utf8=French_France.65001
42776 gt_cv_locale_fr_utf8=none
42780 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42781 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
42782 # configure script would override the LC_ALL setting. Likewise for
42783 # LC_CTYPE, which is also set at the beginning of the configure script.
42784 # Test for the usual locale name.
42785 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42786 gt_cv_locale_fr_utf8=fr_FR
42788 # Test for the locale name with explicit encoding suffix.
42789 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42790 gt_cv_locale_fr_utf8=fr_FR.UTF-8
42792 # Test for the Solaris 7 locale name.
42793 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42794 gt_cv_locale_fr_utf8=fr.UTF-8
42797 gt_cv_locale_fr_utf8=none
42807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
42808 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
42809 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
42817 if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
42820 case ${gl_cv_func_strerror_r_works-unset} in
42822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
42823 printf %s "checking whether perror matches strerror... " >&6; }
42824 if test ${gl_cv_func_perror_works+y}
42826 printf %s "(cached) " >&6
42828 if test "$cross_compiling" = yes
42831 # Guess yes on musl systems.
42832 *-musl*) gl_cv_func_perror_works="guessing yes" ;;
42833 # Guess yes on native Windows.
42834 mingw*) gl_cv_func_perror_works="guessing yes" ;;
42835 # Otherwise obey --enable-cross-guesses.
42836 *) gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
42840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42841 /* end confdefs.h. */
42844 #include <stdlib.h>
42845 #include <string.h>
42850 char *str = strerror (-1);
42851 if (!getenv("CONFTEST_OUTPUT")) return 0;
42852 if (!str) str = "";
42862 if ac_fn_c_try_run "$LINENO"
42864 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
42865 && cmp conftest.txt1 conftest.txt2 >/dev/null; then
42866 gl_cv_func_perror_works=yes
42868 gl_cv_func_perror_works=no
42870 rm -rf conftest.txt1 conftest.txt2
42872 gl_cv_func_perror_works=no
42874 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42875 conftest.$ac_objext conftest.beam conftest.$ac_ext
42880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
42881 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
42882 case "$gl_cv_func_perror_works" in
42884 *) REPLACE_PERROR=1 ;;
42892 if test $REPLACE_PERROR = 1; then
42901 gltests_LIBOBJS="$gltests_LIBOBJS perror.$ac_objext"
42913 if test "$GL_GNULIB_PERROR" != 1; then
42914 if test "$GL_GNULIB_PERROR" = 0; then
42915 GL_GNULIB_PERROR=$gl_module_indicator_condition
42917 GL_GNULIB_PERROR="($GL_GNULIB_PERROR || $gl_module_indicator_condition)"
42925 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
42933 if test $ac_cv_func_pipe != yes; then
42937 if test $HAVE_PIPE = 0; then
42946 gltests_LIBOBJS="$gltests_LIBOBJS pipe.$ac_objext"
42958 if test "$GL_GNULIB_PIPE" != 1; then
42959 if test "$GL_GNULIB_PIPE" = 0; then
42960 GL_GNULIB_PIPE=$gl_module_indicator_condition
42962 GL_GNULIB_PIPE="($GL_GNULIB_PIPE || $gl_module_indicator_condition)"
42970 printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
42984 if { case "$host_os" in mingw*) true;; *) false;; esac; } \
42985 && test $gl_threads_api = windows; then
42986 REPLACE_PTHREAD_CREATE=1
42987 REPLACE_PTHREAD_ATTR_INIT=1
42988 REPLACE_PTHREAD_ATTR_GETDETACHSTATE=1
42989 REPLACE_PTHREAD_ATTR_SETDETACHSTATE=1
42990 REPLACE_PTHREAD_ATTR_DESTROY=1
42991 REPLACE_PTHREAD_SELF=1
42992 REPLACE_PTHREAD_EQUAL=1
42993 REPLACE_PTHREAD_DETACH=1
42994 REPLACE_PTHREAD_JOIN=1
42995 REPLACE_PTHREAD_EXIT=1
42997 if test $HAVE_PTHREAD_H = 0; then
42998 HAVE_PTHREAD_CREATE=0
42999 HAVE_PTHREAD_ATTR_INIT=0
43000 HAVE_PTHREAD_ATTR_GETDETACHSTATE=0
43001 HAVE_PTHREAD_ATTR_SETDETACHSTATE=0
43002 HAVE_PTHREAD_ATTR_DESTROY=0
43003 HAVE_PTHREAD_SELF=0
43004 HAVE_PTHREAD_EQUAL=0
43005 HAVE_PTHREAD_DETACH=0
43006 HAVE_PTHREAD_JOIN=0
43007 HAVE_PTHREAD_EXIT=0
43009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_create exists as a global function" >&5
43010 printf %s "checking whether pthread_create exists as a global function... " >&6; }
43011 if test ${gl_cv_func_pthread_create+y}
43013 printf %s "(cached) " >&6
43016 LIBS="$LIBS $LIBPMULTITHREAD"
43017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43018 /* end confdefs.h. */
43023 int pthread_create (void);
43026 return pthread_create ();
43030 if ac_fn_c_try_link "$LINENO"
43032 gl_cv_func_pthread_create=yes
43034 gl_cv_func_pthread_create=no
43036 rm -f core conftest.err conftest.$ac_objext conftest.beam \
43037 conftest$ac_exeext conftest.$ac_ext
43041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_create" >&5
43042 printf "%s\n" "$gl_cv_func_pthread_create" >&6; }
43043 if test $gl_cv_func_pthread_create = no; then
43044 REPLACE_PTHREAD_CREATE=1
43045 REPLACE_PTHREAD_ATTR_INIT=1
43047 printf "%s\n" "#define PTHREAD_CREATE_IS_INLINE 1" >>confdefs.h
43053 if test $HAVE_PTHREAD_CREATE = 0 || test $REPLACE_PTHREAD_CREATE = 1; then
43062 gltests_LIBOBJS="$gltests_LIBOBJS pthread-thread.$ac_objext"
43074 if test "$GL_GNULIB_PTHREAD_THREAD" != 1; then
43075 if test "$GL_GNULIB_PTHREAD_THREAD" = 0; then
43076 GL_GNULIB_PTHREAD_THREAD=$gl_module_indicator_condition
43078 GL_GNULIB_PTHREAD_THREAD="($GL_GNULIB_PTHREAD_THREAD || $gl_module_indicator_condition)"
43086 printf "%s\n" "#define GNULIB_TEST_PTHREAD_THREAD 1" >>confdefs.h
43095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is a macro" >&5
43096 printf %s "checking whether pthread_sigmask is a macro... " >&6; }
43097 if test ${gl_cv_func_pthread_sigmask_macro+y}
43099 printf %s "(cached) " >&6
43101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43102 /* end confdefs.h. */
43104 #include <pthread.h>
43105 #include <signal.h>
43106 #ifdef pthread_sigmask
43107 headers_define_pthread_sigmask
43110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43111 $EGREP "headers_define_pthread_sigmask" >/dev/null 2>&1
43113 gl_cv_func_pthread_sigmask_macro=yes
43115 gl_cv_func_pthread_sigmask_macro=no
43121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_macro" >&5
43122 printf "%s\n" "$gl_cv_func_pthread_sigmask_macro" >&6; }
43124 LIB_PTHREAD_SIGMASK=
43126 if test $gl_cv_func_pthread_sigmask_macro = yes; then
43127 HAVE_PTHREAD_SIGMASK=0
43128 REPLACE_PTHREAD_SIGMASK=1
43133 if test "$gl_threads_api" = posix; then
43134 if test $ac_cv_func_pthread_sigmask = yes; then
43137 if test -n "$LIBMULTITHREAD"; then
43138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
43139 printf %s "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
43140 if test ${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+y}
43142 printf %s "(cached) " >&6
43144 gl_save_LIBS="$LIBS"
43145 LIBS="$LIBS $LIBMULTITHREAD"
43146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43147 /* end confdefs.h. */
43148 #include <pthread.h>
43149 #include <signal.h>
43154 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
43160 if ac_fn_c_try_link "$LINENO"
43162 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
43164 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
43166 rm -f core conftest.err conftest.$ac_objext conftest.beam \
43167 conftest$ac_exeext conftest.$ac_ext
43168 LIBS="$gl_save_LIBS"
43171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
43172 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
43173 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
43174 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
43176 HAVE_PTHREAD_SIGMASK=0
43179 HAVE_PTHREAD_SIGMASK=0
43183 if test $ac_cv_func_pthread_sigmask = yes; then
43184 REPLACE_PTHREAD_SIGMASK=1
43186 HAVE_PTHREAD_SIGMASK=0
43194 if test $HAVE_PTHREAD_SIGMASK = 1; then
43197 if test -z "$LIB_PTHREAD_SIGMASK"; then
43200 *' -lpthread '*) ;;
43202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
43203 printf %s "checking whether pthread_sigmask works without -lpthread... " >&6; }
43204 if test ${gl_cv_func_pthread_sigmask_in_libc_works+y}
43206 printf %s "(cached) " >&6
43209 if test "$cross_compiling" = yes
43213 freebsd* | midnightbsd* | hpux* | solaris | solaris2.[2-9]*)
43214 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
43216 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
43220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43221 /* end confdefs.h. */
43223 #include <pthread.h>
43224 #include <signal.h>
43225 #include <stddef.h>
43229 sigemptyset (&set);
43230 return pthread_sigmask (1729, &set, NULL) != 0;
43233 if ac_fn_c_try_run "$LINENO"
43235 gl_cv_func_pthread_sigmask_in_libc_works=no
43237 gl_cv_func_pthread_sigmask_in_libc_works=yes
43239 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43240 conftest.$ac_objext conftest.beam conftest.$ac_ext
43245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
43246 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
43247 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
43249 REPLACE_PTHREAD_SIGMASK=1
43251 printf "%s\n" "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
43258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
43259 printf %s "checking whether pthread_sigmask returns error numbers... " >&6; }
43260 if test ${gl_cv_func_pthread_sigmask_return_works+y}
43262 printf %s "(cached) " >&6
43265 gl_save_LIBS="$LIBS"
43266 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
43267 if test "$cross_compiling" = yes
43271 gl_cv_func_pthread_sigmask_return_works="guessing no";;
43273 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
43277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43278 /* end confdefs.h. */
43280 #include <pthread.h>
43281 #include <signal.h>
43282 #include <stddef.h>
43286 sigemptyset (&set);
43287 if (pthread_sigmask (1729, &set, NULL) == -1)
43292 if ac_fn_c_try_run "$LINENO"
43294 gl_cv_func_pthread_sigmask_return_works=yes
43296 gl_cv_func_pthread_sigmask_return_works=no
43298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43299 conftest.$ac_objext conftest.beam conftest.$ac_ext
43302 LIBS="$gl_save_LIBS"
43305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
43306 printf "%s\n" "$gl_cv_func_pthread_sigmask_return_works" >&6; }
43307 case "$gl_cv_func_pthread_sigmask_return_works" in
43309 REPLACE_PTHREAD_SIGMASK=1
43311 printf "%s\n" "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
43316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
43317 printf %s "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
43318 if test ${gl_cv_func_pthread_sigmask_unblock_works+y}
43320 printf %s "(cached) " >&6
43325 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
43327 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
43330 LIBS="$LIBS $LIBMULTITHREAD"
43331 if test "$cross_compiling" = yes
43335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43336 /* end confdefs.h. */
43338 #include <pthread.h>
43339 #include <signal.h>
43341 #include <stdlib.h>
43342 #include <unistd.h>
43347 static volatile int sigint_occurred;
43349 sigint_handler (int sig)
43356 int pid = getpid ();
43358 signal (SIGINT, sigint_handler);
43359 sigemptyset (&set);
43360 sigaddset (&set, SIGINT);
43361 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
43363 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
43364 if (!(system (command) == 0))
43367 if (!(sigint_occurred == 0))
43369 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
43371 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
43376 if ac_fn_c_try_run "$LINENO"
43380 gl_cv_func_pthread_sigmask_unblock_works=no
43382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43383 conftest.$ac_objext conftest.beam conftest.$ac_ext
43389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
43390 printf "%s\n" "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
43391 case "$gl_cv_func_pthread_sigmask_unblock_works" in
43393 REPLACE_PTHREAD_SIGMASK=1
43395 printf "%s\n" "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
43401 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
43410 gltests_LIBOBJS="$gltests_LIBOBJS pthread_sigmask.$ac_objext"
43413 if test $HAVE_PTHREAD_SIGMASK = 1; then
43415 printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
43429 if test "$GL_GNULIB_PTHREAD_SIGMASK" != 1; then
43430 if test "$GL_GNULIB_PTHREAD_SIGMASK" = 0; then
43431 GL_GNULIB_PTHREAD_SIGMASK=$gl_module_indicator_condition
43433 GL_GNULIB_PTHREAD_SIGMASK="($GL_GNULIB_PTHREAD_SIGMASK || $gl_module_indicator_condition)"
43441 printf "%s\n" "#define GNULIB_TEST_PTHREAD_SIGMASK 1" >>confdefs.h
43447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
43448 printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
43449 if test ${gl_cv_func_svid_putenv+y}
43451 printf %s "(cached) " >&6
43453 if test "$cross_compiling" = yes
43456 # Guess yes on glibc systems.
43457 *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
43458 # Guess yes on musl systems.
43459 *-musl*) gl_cv_func_svid_putenv="guessing yes" ;;
43460 # Guess no on native Windows.
43461 mingw*) gl_cv_func_svid_putenv="guessing no" ;;
43462 # If we don't know, obey --enable-cross-guesses.
43463 *) gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
43467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43468 /* end confdefs.h. */
43469 $ac_includes_default
43478 /* Put it in env. */
43479 if (putenv ("CONFTEST_putenv=val"))
43482 /* Try to remove it. */
43483 if (putenv ("CONFTEST_putenv"))
43486 /* Make sure it was deleted. */
43487 if (getenv ("CONFTEST_putenv") != 0)
43496 if ac_fn_c_try_run "$LINENO"
43498 gl_cv_func_svid_putenv=yes
43500 gl_cv_func_svid_putenv=no
43502 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43503 conftest.$ac_objext conftest.beam conftest.$ac_ext
43508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
43509 printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
43510 case "$gl_cv_func_svid_putenv" in
43517 if test $REPLACE_PUTENV = 1; then
43526 gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext"
43529 ac_fn_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
43530 if test "x$ac_cv_have_decl__putenv" = xyes
43536 printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
43549 if test "$GL_GNULIB_PUTENV" != 1; then
43550 if test "$GL_GNULIB_PUTENV" = 0; then
43551 GL_GNULIB_PUTENV=$gl_module_indicator_condition
43553 GL_GNULIB_PUTENV="($GL_GNULIB_PUTENV || $gl_module_indicator_condition)"
43561 printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
43581 if test "$ac_cv_header_winsock2_h" = yes; then
43585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
43586 printf %s "checking whether select supports a 0 argument... " >&6; }
43587 if test ${gl_cv_func_select_supports0+y}
43589 printf %s "(cached) " >&6
43592 if test "$cross_compiling" = yes
43596 # Guess no on Interix.
43597 interix*) gl_cv_func_select_supports0="guessing no";;
43598 # Guess yes otherwise.
43599 *) gl_cv_func_select_supports0="guessing yes";;
43603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43604 /* end confdefs.h. */
43606 #include <sys/types.h>
43607 #include <sys/time.h>
43608 #if HAVE_SYS_SELECT_H
43609 #include <sys/select.h>
43613 struct timeval timeout;
43614 timeout.tv_sec = 0;
43615 timeout.tv_usec = 5;
43616 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
43619 if ac_fn_c_try_run "$LINENO"
43621 gl_cv_func_select_supports0=yes
43623 gl_cv_func_select_supports0=no
43625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43626 conftest.$ac_objext conftest.beam conftest.$ac_ext
43631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
43632 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
43633 case "$gl_cv_func_select_supports0" in
43635 *) REPLACE_SELECT=1 ;;
43638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
43639 printf %s "checking whether select detects invalid fds... " >&6; }
43640 if test ${gl_cv_func_select_detects_ebadf+y}
43642 printf %s "(cached) " >&6
43645 if test "$cross_compiling" = yes
43649 # Guess yes on Linux systems.
43650 linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
43651 # Guess yes on glibc systems.
43652 *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
43653 # If we don't know, obey --enable-cross-guesses.
43654 *) gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
43658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43659 /* end confdefs.h. */
43661 #include <sys/types.h>
43662 #include <sys/time.h>
43663 #if HAVE_SYS_SELECT_H
43664 # include <sys/select.h>
43666 #include <unistd.h>
43681 struct timeval timeout;
43682 timeout.tv_sec = 0;
43683 timeout.tv_usec = 5;
43684 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
43690 if ac_fn_c_try_run "$LINENO"
43692 gl_cv_func_select_detects_ebadf=yes
43694 gl_cv_func_select_detects_ebadf=no
43696 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43697 conftest.$ac_objext conftest.beam conftest.$ac_ext
43702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
43703 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
43704 case $gl_cv_func_select_detects_ebadf in
43706 *) REPLACE_SELECT=1 ;;
43710 LIB_SELECT="$LIBSOCKET"
43711 if test $REPLACE_SELECT = 1; then
43714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43715 /* end confdefs.h. */
43717 #define WIN32_LEAN_AND_MEAN
43718 #include <windows.h>
43722 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
43726 if ac_fn_c_try_link "$LINENO"
43730 LIB_SELECT="$LIB_SELECT -luser32"
43732 rm -f core conftest.err conftest.$ac_objext conftest.beam \
43733 conftest$ac_exeext conftest.$ac_ext
43739 if test $REPLACE_SELECT = 1; then
43748 gltests_LIBOBJS="$gltests_LIBOBJS select.$ac_objext"
43760 if test "$GL_GNULIB_SELECT" != 1; then
43761 if test "$GL_GNULIB_SELECT" = 0; then
43762 GL_GNULIB_SELECT=$gl_module_indicator_condition
43764 GL_GNULIB_SELECT="($GL_GNULIB_SELECT || $gl_module_indicator_condition)"
43772 printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
43778 if test "$ac_cv_header_winsock2_h" = yes; then
43787 gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext"
43799 if test "$GL_GNULIB_SETSOCKOPT" != 1; then
43800 if test "$GL_GNULIB_SETSOCKOPT" = 0; then
43801 GL_GNULIB_SETSOCKOPT=$gl_module_indicator_condition
43803 GL_GNULIB_SETSOCKOPT="($GL_GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
43811 printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
43818 if test $ac_cv_func_sigaction = yes; then
43819 ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
43821 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes
43824 printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h
43829 if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
43830 HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
43836 if test $HAVE_SIGACTION = 0; then
43845 gltests_LIBOBJS="$gltests_LIBOBJS sigaction.$ac_objext"
43853 ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
43854 #include <signal.h>
43857 if test "x$ac_cv_type_siginfo_t" = xyes
43860 printf "%s\n" "#define HAVE_SIGINFO_T 1" >>confdefs.h
43865 if test $ac_cv_type_siginfo_t = no; then
43879 if test "$GL_GNULIB_SIGACTION" != 1; then
43880 if test "$GL_GNULIB_SIGACTION" = 0; then
43881 GL_GNULIB_SIGACTION=$gl_module_indicator_condition
43883 GL_GNULIB_SIGACTION="($GL_GNULIB_SIGACTION || $gl_module_indicator_condition)"
43891 printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
43898 HAVE_POSIX_SIGNALBLOCKING=0
43899 if test "$gl_cv_type_sigset_t" = yes; then
43900 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
43901 if test "x$ac_cv_func_sigprocmask" = xyes
43903 HAVE_POSIX_SIGNALBLOCKING=1
43908 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
43917 gltests_LIBOBJS="$gltests_LIBOBJS sigprocmask.$ac_objext"
43930 if test "$GL_GNULIB_SIGPROCMASK" != 1; then
43931 if test "$GL_GNULIB_SIGPROCMASK" = 0; then
43932 GL_GNULIB_SIGPROCMASK=$gl_module_indicator_condition
43934 GL_GNULIB_SIGPROCMASK="($GL_GNULIB_SIGPROCMASK || $gl_module_indicator_condition)"
43942 printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
43950 ac_fn_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
43951 " "$ac_c_undeclared_builtin_options" "CFLAGS"
43952 if test "x$ac_cv_have_decl_sleep" = xyes
43958 printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h
43961 if test $ac_cv_have_decl_sleep != yes; then
43964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
43965 printf %s "checking for working sleep... " >&6; }
43966 if test ${gl_cv_func_sleep_works+y}
43968 printf %s "(cached) " >&6
43970 if test "$cross_compiling" = yes
43973 # Guess yes on glibc systems.
43974 *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
43975 # Guess yes on musl systems.
43976 *-musl*) gl_cv_func_sleep_works="guessing yes" ;;
43977 # Guess no on native Windows.
43978 mingw*) gl_cv_func_sleep_works="guessing no" ;;
43979 # If we don't know, obey --enable-cross-guesses.
43980 *) gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
43984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43985 /* end confdefs.h. */
43988 #include <unistd.h>
43989 #include <signal.h>
43991 handle_alarm (int sig)
43993 if (sig != SIGALRM)
44001 /* Failure to compile this test due to missing alarm is okay,
44002 since all such platforms (mingw) also lack sleep. */
44003 unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
44004 unsigned int remaining;
44005 signal (SIGALRM, handle_alarm);
44007 remaining = sleep (pentecost);
44008 if (remaining > pentecost)
44010 if (remaining <= pentecost - 10)
44018 if ac_fn_c_try_run "$LINENO"
44020 gl_cv_func_sleep_works=yes
44022 gl_cv_func_sleep_works=no
44024 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44025 conftest.$ac_objext conftest.beam conftest.$ac_ext
44029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
44030 printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
44031 case "$gl_cv_func_sleep_works" in
44039 if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
44048 gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
44060 if test "$GL_GNULIB_SLEEP" != 1; then
44061 if test "$GL_GNULIB_SLEEP" = 0; then
44062 GL_GNULIB_SLEEP=$gl_module_indicator_condition
44064 GL_GNULIB_SLEEP="($GL_GNULIB_SLEEP || $gl_module_indicator_condition)"
44072 printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
44079 gl_cv_func_snprintf_usable=no
44080 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
44081 if test "x$ac_cv_func_snprintf" = xyes
44083 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
44087 if test $ac_cv_func_snprintf = yes; then
44091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
44092 printf %s "checking whether snprintf respects a size of 1... " >&6; }
44093 if test ${gl_cv_func_snprintf_size1+y}
44095 printf %s "(cached) " >&6
44098 if test "$cross_compiling" = yes
44101 # Guess yes on Android.
44102 linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
44103 # Guess yes on native Windows.
44104 mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
44105 *) gl_cv_func_snprintf_size1="guessing yes" ;;
44109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44110 /* end confdefs.h. */
44114 # define my_snprintf snprintf
44116 # include <stdarg.h>
44117 static int my_snprintf (char *buf, int size, const char *format, ...)
44121 va_start (args, format);
44122 ret = vsnprintf (buf, size, format, args);
44129 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
44130 my_snprintf (buf, 1, "%d", 12345);
44131 return buf[1] != 'E';
44134 if ac_fn_c_try_run "$LINENO"
44136 gl_cv_func_snprintf_size1=yes
44138 gl_cv_func_snprintf_size1=no
44140 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44141 conftest.$ac_objext conftest.beam conftest.$ac_ext
44146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
44147 printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
44149 case "$gl_cv_func_snprintf_size1" in
44152 case "$gl_cv_func_snprintf_retval_c99" in
44156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
44157 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
44158 if test ${gl_cv_func_printf_positions+y}
44160 printf %s "(cached) " >&6
44163 if test "$cross_compiling" = yes
44167 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
44168 gl_cv_func_printf_positions="guessing no";;
44169 beos*) gl_cv_func_printf_positions="guessing no";;
44170 # Guess yes on Android.
44171 linux*-android*) gl_cv_func_printf_positions="guessing yes";;
44172 # Guess no on native Windows.
44173 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
44174 *) gl_cv_func_printf_positions="guessing yes";;
44178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44179 /* end confdefs.h. */
44182 #include <string.h>
44183 /* The string "%2$d %1$d", with dollar characters protected from the shell's
44184 dollar expansion (possibly an autoconf bug). */
44185 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
44186 static char buf[100];
44189 sprintf (buf, format, 33, 55);
44190 return (strcmp (buf, "55 33") != 0);
44193 if ac_fn_c_try_run "$LINENO"
44195 gl_cv_func_printf_positions=yes
44197 gl_cv_func_printf_positions=no
44199 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44200 conftest.$ac_objext conftest.beam conftest.$ac_ext
44205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
44206 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
44208 case "$gl_cv_func_printf_positions" in
44210 gl_cv_func_snprintf_usable=yes
44218 if test $gl_cv_func_snprintf_usable = no; then
44229 gltests_LIBOBJS="$gltests_LIBOBJS snprintf.$ac_objext"
44231 if test $ac_cv_func_snprintf = yes; then
44235 if test $ac_cv_have_decl_snprintf = yes; then
44243 if test $ac_cv_have_decl_snprintf = no; then
44244 HAVE_DECL_SNPRINTF=0
44256 if test "$GL_GNULIB_SNPRINTF" != 1; then
44257 if test "$GL_GNULIB_SNPRINTF" = 0; then
44258 GL_GNULIB_SNPRINTF=$gl_module_indicator_condition
44260 GL_GNULIB_SNPRINTF="($GL_GNULIB_SNPRINTF || $gl_module_indicator_condition)"
44268 printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
44274 printf "%s\n" "#define GNULIB_SNPRINTF $gl_module_indicator_condition" >>confdefs.h
44278 if test "$ac_cv_header_winsock2_h" = yes; then
44287 gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext"
44290 # When this module is used, sockets may actually occur as file descriptors,
44291 # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
44303 if test "$ac_cv_header_winsock2_h" = yes; then
44304 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
44305 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
44316 if test "$GL_GNULIB_SOCKET" != 1; then
44317 if test "$GL_GNULIB_SOCKET" = 0; then
44318 GL_GNULIB_SOCKET=$gl_module_indicator_condition
44320 GL_GNULIB_SOCKET="($GL_GNULIB_SOCKET || $gl_module_indicator_condition)"
44328 printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
44334 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
44335 /* <sys/types.h> is not needed according to POSIX, but the
44336 <sys/socket.h> in i386-unknown-freebsd4.10 and
44337 powerpc-apple-darwin5.5 required it. */
44338 #include <sys/types.h>
44339 #if HAVE_SYS_SOCKET_H
44340 # include <sys/socket.h>
44341 #elif HAVE_WS2TCPIP_H
44342 # include <ws2tcpip.h>
44346 if test "x$ac_cv_type_socklen_t" = xyes
44350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
44351 printf %s "checking for socklen_t equivalent... " >&6; }
44352 if test ${gl_cv_socklen_t_equiv+y}
44354 printf %s "(cached) " >&6
44356 # Systems have either "struct sockaddr *" or
44357 # "void *" as the second argument to getpeername
44358 gl_cv_socklen_t_equiv=
44359 for arg2 in "struct sockaddr" void; do
44360 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
44361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44362 /* end confdefs.h. */
44363 #include <sys/types.h>
44364 #include <sys/socket.h>
44366 int getpeername (int, $arg2 *, $t *);
44371 getpeername (0, 0, &len);
44376 if ac_fn_c_try_compile "$LINENO"
44378 gl_cv_socklen_t_equiv="$t"
44380 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
44381 test "$gl_cv_socklen_t_equiv" != "" && break
44383 test "$gl_cv_socklen_t_equiv" != "" && break
44385 if test "$gl_cv_socklen_t_equiv" = ""; then
44386 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
44390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
44391 printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
44393 printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
44406 if test $ac_cv_have_decl_strerror_r = no; then
44407 HAVE_DECL_STRERROR_R=0
44410 if test $ac_cv_func_strerror_r = yes; then
44411 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
44412 if test $gl_cv_func_strerror_r_posix_signature = yes; then
44413 case "$gl_cv_func_strerror_r_works" in
44414 *no) REPLACE_STRERROR_R=1 ;;
44417 REPLACE_STRERROR_R=1
44420 REPLACE_STRERROR_R=1
44424 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
44433 gltests_LIBOBJS="$gltests_LIBOBJS strerror_r.$ac_objext"
44450 if test "$GL_GNULIB_STRERROR_R" != 1; then
44451 if test "$GL_GNULIB_STRERROR_R" = 0; then
44452 GL_GNULIB_STRERROR_R=$gl_module_indicator_condition
44454 GL_GNULIB_STRERROR_R="($GL_GNULIB_STRERROR_R || $gl_module_indicator_condition)"
44462 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
44468 printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h
44477 if test $ac_cv_func_symlink = no; then
44480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
44481 printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
44482 if test ${gl_cv_func_symlink_works+y}
44484 printf %s "(cached) " >&6
44486 if test "$cross_compiling" = yes
44489 # Guess yes on Linux systems.
44490 linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
44491 # Guess yes on glibc systems.
44492 *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
44493 # If we don't know, obey --enable-cross-guesses.
44494 *) gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
44498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44499 /* end confdefs.h. */
44500 #include <unistd.h>
44506 if (!symlink ("a", "conftest.link/"))
44508 if (symlink ("conftest.f", "conftest.lnk2"))
44510 else if (!symlink ("a", "conftest.lnk2/"))
44518 if ac_fn_c_try_run "$LINENO"
44520 gl_cv_func_symlink_works=yes
44522 gl_cv_func_symlink_works=no
44524 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44525 conftest.$ac_objext conftest.beam conftest.$ac_ext
44528 rm -f conftest.f conftest.link conftest.lnk2
44530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
44531 printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
44532 case "$gl_cv_func_symlink_works" in
44540 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
44549 gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext"
44561 if test "$GL_GNULIB_SYMLINK" != 1; then
44562 if test "$GL_GNULIB_SYMLINK" = 0; then
44563 GL_GNULIB_SYMLINK=$gl_module_indicator_condition
44565 GL_GNULIB_SYMLINK="($GL_GNULIB_SYMLINK || $gl_module_indicator_condition)"
44573 printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
44609 if test $gl_threads_api = posix; then
44610 gl_save_LIBS="$LIBS"
44611 LIBS="$LIBS $LIBMULTITHREAD"
44612 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
44613 if test "x$ac_cv_func_pthread_atfork" = xyes
44615 printf "%s\n" "#define HAVE_PTHREAD_ATFORK 1" >>confdefs.h
44619 LIBS="$gl_save_LIBS"
44622 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
44624 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
44629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
44630 printf %s "checking for a traditional french locale... " >&6; }
44631 if test ${gt_cv_locale_fr+y}
44633 printf %s "(cached) " >&6
44636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44637 /* end confdefs.h. */
44639 #include <locale.h>
44641 #if HAVE_LANGINFO_CODESET
44642 # include <langinfo.h>
44644 #include <stdlib.h>
44645 #include <string.h>
44649 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
44650 imitates locale dependent behaviour by looking at the environment
44651 variables, and all locales use the UTF-8 encoding. */
44652 #if defined __BEOS__ || defined __HAIKU__
44655 /* Check whether the given locale name is recognized by the system. */
44656 # if defined _WIN32 && !defined __CYGWIN__
44657 /* On native Windows, setlocale(category, "") looks at the system settings,
44658 not at the environment variables. Also, when an encoding suffix such
44659 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44660 category of the locale to "C". */
44661 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44662 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44665 if (setlocale (LC_ALL, "") == NULL) return 1;
44667 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44668 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44669 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44670 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44671 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44672 some unit tests fail.
44673 On MirBSD 10, when an unsupported locale is specified, setlocale()
44674 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
44675 # if HAVE_LANGINFO_CODESET
44677 const char *cs = nl_langinfo (CODESET);
44678 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
44679 || strcmp (cs, "UTF-8") == 0)
44684 /* On Cygwin, avoid locale names without encoding suffix, because the
44685 locale_charset() function relies on the encoding suffix. Note that
44686 LC_ALL is set on the command line. */
44687 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44689 /* Check whether in the abbreviation of the second month, the second
44690 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
44691 one byte long. This excludes the UTF-8 encoding. */
44692 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44693 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
44694 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
44695 /* Check whether the decimal separator is a comma.
44696 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44697 are nl_langinfo(RADIXCHAR) are both ".". */
44698 if (localeconv () ->decimal_point[0] != ',') return 1;
44705 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44706 (eval $ac_link) 2>&5
44708 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44709 test $ac_status = 0; } && test -s conftest$ac_exeext; then
44711 # Handle native Windows specially, because there setlocale() interprets
44712 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44713 # "fr" or "fra" as "French" or "French_France.1252",
44714 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44715 # "ja" as "Japanese" or "Japanese_Japan.932",
44718 # Test for the native Windows locale name.
44719 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44720 gt_cv_locale_fr=French_France.1252
44723 gt_cv_locale_fr=none
44727 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44728 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44729 # configure script would override the LC_ALL setting. Likewise for
44730 # LC_CTYPE, which is also set at the beginning of the configure script.
44731 # Test for the usual locale name.
44732 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44733 gt_cv_locale_fr=fr_FR
44735 # Test for the locale name with explicit encoding suffix.
44736 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44737 gt_cv_locale_fr=fr_FR.ISO-8859-1
44739 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
44740 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44741 gt_cv_locale_fr=fr_FR.ISO8859-1
44743 # Test for the HP-UX locale name.
44744 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44745 gt_cv_locale_fr=fr_FR.iso88591
44747 # Test for the Solaris 7 locale name.
44748 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44752 gt_cv_locale_fr=none
44764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
44765 printf "%s\n" "$gt_cv_locale_fr" >&6; }
44766 LOCALE_FR=$gt_cv_locale_fr
44771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
44772 printf %s "checking for a french Unicode locale... " >&6; }
44773 if test ${gt_cv_locale_fr_utf8+y}
44775 printf %s "(cached) " >&6
44778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44779 /* end confdefs.h. */
44781 #include <locale.h>
44783 #if HAVE_LANGINFO_CODESET
44784 # include <langinfo.h>
44786 #include <stdlib.h>
44787 #include <string.h>
44791 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
44792 imitates locale dependent behaviour by looking at the environment
44793 variables, and all locales use the UTF-8 encoding. */
44794 #if !(defined __BEOS__ || defined __HAIKU__)
44795 /* Check whether the given locale name is recognized by the system. */
44796 # if defined _WIN32 && !defined __CYGWIN__
44797 /* On native Windows, setlocale(category, "") looks at the system settings,
44798 not at the environment variables. Also, when an encoding suffix such
44799 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44800 category of the locale to "C". */
44801 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44802 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44805 if (setlocale (LC_ALL, "") == NULL) return 1;
44807 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44808 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44809 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44810 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44811 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44812 some unit tests fail. */
44813 # if HAVE_LANGINFO_CODESET
44815 const char *cs = nl_langinfo (CODESET);
44816 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44821 /* On Cygwin, avoid locale names without encoding suffix, because the
44822 locale_charset() function relies on the encoding suffix. Note that
44823 LC_ALL is set on the command line. */
44824 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44826 /* Check whether in the abbreviation of the second month, the second
44827 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
44828 two bytes long, with UTF-8 encoding. */
44829 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44830 if (strftime (buf, sizeof (buf), "%b", &t) < 4
44831 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
44834 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
44835 /* Check whether the decimal separator is a comma.
44836 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44837 are nl_langinfo(RADIXCHAR) are both ".". */
44838 if (localeconv () ->decimal_point[0] != ',') return 1;
44844 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44845 (eval $ac_link) 2>&5
44847 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44848 test $ac_status = 0; } && test -s conftest$ac_exeext; then
44850 # Handle native Windows specially, because there setlocale() interprets
44851 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44852 # "fr" or "fra" as "French" or "French_France.1252",
44853 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44854 # "ja" as "Japanese" or "Japanese_Japan.932",
44857 # Test for the hypothetical native Windows locale name.
44858 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44859 gt_cv_locale_fr_utf8=French_France.65001
44862 gt_cv_locale_fr_utf8=none
44866 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44867 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44868 # configure script would override the LC_ALL setting. Likewise for
44869 # LC_CTYPE, which is also set at the beginning of the configure script.
44870 # Test for the usual locale name.
44871 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44872 gt_cv_locale_fr_utf8=fr_FR
44874 # Test for the locale name with explicit encoding suffix.
44875 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44876 gt_cv_locale_fr_utf8=fr_FR.UTF-8
44878 # Test for the Solaris 7 locale name.
44879 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44880 gt_cv_locale_fr_utf8=fr.UTF-8
44883 gt_cv_locale_fr_utf8=none
44893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
44894 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
44895 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
44901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
44902 printf %s "checking for a traditional japanese locale... " >&6; }
44903 if test ${gt_cv_locale_ja+y}
44905 printf %s "(cached) " >&6
44908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44909 /* end confdefs.h. */
44911 #include <locale.h>
44913 #if HAVE_LANGINFO_CODESET
44914 # include <langinfo.h>
44916 #include <stdlib.h>
44917 #include <string.h>
44922 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
44923 imitates locale dependent behaviour by looking at the environment
44924 variables, and all locales use the UTF-8 encoding. */
44925 #if defined __BEOS__ || defined __HAIKU__
44928 /* Check whether the given locale name is recognized by the system. */
44929 # if defined _WIN32 && !defined __CYGWIN__
44930 /* On native Windows, setlocale(category, "") looks at the system settings,
44931 not at the environment variables. Also, when an encoding suffix such
44932 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44933 category of the locale to "C". */
44934 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44935 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44938 if (setlocale (LC_ALL, "") == NULL) return 1;
44940 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44941 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44942 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44943 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44944 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44945 some unit tests fail.
44946 On MirBSD 10, when an unsupported locale is specified, setlocale()
44947 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
44948 # if HAVE_LANGINFO_CODESET
44950 const char *cs = nl_langinfo (CODESET);
44951 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
44952 || strcmp (cs, "UTF-8") == 0)
44957 /* On Cygwin, avoid locale names without encoding suffix, because the
44958 locale_charset() function relies on the encoding suffix. Note that
44959 LC_ALL is set on the command line. */
44960 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44962 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
44963 on Cygwin 1.5.x. */
44964 if (MB_CUR_MAX == 1)
44966 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
44967 This excludes the UTF-8 encoding (except on MirBSD). */
44970 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44971 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
44972 for (p = buf; *p != '\0'; p++)
44973 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
44981 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44982 (eval $ac_link) 2>&5
44984 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44985 test $ac_status = 0; } && test -s conftest$ac_exeext; then
44987 # Handle native Windows specially, because there setlocale() interprets
44988 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44989 # "fr" or "fra" as "French" or "French_France.1252",
44990 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44991 # "ja" as "Japanese" or "Japanese_Japan.932",
44994 # Note that on native Windows, the Japanese locale is
44995 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
44996 # cannot use it here.
44997 gt_cv_locale_ja=none
45000 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45001 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
45002 # configure script would override the LC_ALL setting. Likewise for
45003 # LC_CTYPE, which is also set at the beginning of the configure script.
45004 # Test for the AIX locale name.
45005 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45006 gt_cv_locale_ja=ja_JP
45008 # Test for the locale name with explicit encoding suffix.
45009 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45010 gt_cv_locale_ja=ja_JP.EUC-JP
45012 # Test for the HP-UX, OSF/1, NetBSD locale name.
45013 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45014 gt_cv_locale_ja=ja_JP.eucJP
45016 # Test for the IRIX, FreeBSD locale name.
45017 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45018 gt_cv_locale_ja=ja_JP.EUC
45020 # Test for the Solaris 7 locale name.
45021 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45024 # Special test for NetBSD 1.6.
45025 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
45026 gt_cv_locale_ja=ja_JP.eucJP
45029 gt_cv_locale_ja=none
45042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
45043 printf "%s\n" "$gt_cv_locale_ja" >&6; }
45044 LOCALE_JA=$gt_cv_locale_ja
45050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
45051 printf %s "checking for a transitional chinese locale... " >&6; }
45052 if test ${gt_cv_locale_zh_CN+y}
45054 printf %s "(cached) " >&6
45057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45058 /* end confdefs.h. */
45060 #include <locale.h>
45061 #include <stdlib.h>
45063 #if HAVE_LANGINFO_CODESET
45064 # include <langinfo.h>
45066 #include <stdlib.h>
45067 #include <string.h>
45072 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
45073 imitates locale dependent behaviour by looking at the environment
45074 variables, and all locales use the UTF-8 encoding. */
45075 #if defined __BEOS__ || defined __HAIKU__
45078 /* Check whether the given locale name is recognized by the system. */
45079 # if defined _WIN32 && !defined __CYGWIN__
45080 /* On native Windows, setlocale(category, "") looks at the system settings,
45081 not at the environment variables. Also, when an encoding suffix such
45082 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
45083 category of the locale to "C". */
45084 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
45085 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
45088 if (setlocale (LC_ALL, "") == NULL) return 1;
45090 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
45091 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
45092 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
45093 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
45094 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
45095 some unit tests fail.
45096 On MirBSD 10, when an unsupported locale is specified, setlocale()
45097 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
45098 # if HAVE_LANGINFO_CODESET
45100 const char *cs = nl_langinfo (CODESET);
45101 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
45102 || strcmp (cs, "UTF-8") == 0)
45107 /* On Cygwin, avoid locale names without encoding suffix, because the
45108 locale_charset() function relies on the encoding suffix. Note that
45109 LC_ALL is set on the command line. */
45110 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
45112 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
45113 This excludes the UTF-8 encoding (except on MirBSD). */
45116 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
45117 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
45118 for (p = buf; *p != '\0'; p++)
45119 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
45122 /* Check whether a typical GB18030 multibyte sequence is recognized as a
45123 single wide character. This excludes the GB2312 and GBK encodings. */
45124 if (mblen ("\203\062\332\066", 5) != 4)
45131 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
45132 (eval $ac_link) 2>&5
45134 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45135 test $ac_status = 0; } && test -s conftest$ac_exeext; then
45137 # Handle native Windows specially, because there setlocale() interprets
45138 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
45139 # "fr" or "fra" as "French" or "French_France.1252",
45140 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
45141 # "ja" as "Japanese" or "Japanese_Japan.932",
45144 # Test for the hypothetical native Windows locale name.
45145 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45146 gt_cv_locale_zh_CN=Chinese_China.54936
45149 gt_cv_locale_zh_CN=none
45153 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
45154 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
45155 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
45156 gt_cv_locale_zh_CN=none
45159 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45160 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
45161 # configure script would override the LC_ALL setting. Likewise for
45162 # LC_CTYPE, which is also set at the beginning of the configure script.
45163 # Test for the locale name without encoding suffix.
45164 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45165 gt_cv_locale_zh_CN=zh_CN
45167 # Test for the locale name with explicit encoding suffix.
45168 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45169 gt_cv_locale_zh_CN=zh_CN.GB18030
45172 gt_cv_locale_zh_CN=none
45178 # If there was a link error, due to mblen(), the system is so old that
45179 # it certainly doesn't have a chinese locale.
45180 gt_cv_locale_zh_CN=none
45185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
45186 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
45187 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
45194 if test $ac_cv_func_wctob = no; then
45202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
45203 printf %s "checking whether wctob works... " >&6; }
45204 if test ${gl_cv_func_wctob_works+y}
45206 printf %s "(cached) " >&6
45210 # Guess no on Solaris <= 9 and Cygwin.
45211 solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
45212 gl_cv_func_wctob_works="guessing no" ;;
45213 # Guess no on native Windows.
45215 gl_cv_func_wctob_works="guessing no" ;;
45216 # Guess yes otherwise.
45217 *) gl_cv_func_wctob_works="guessing yes" ;;
45221 if test "$cross_compiling" = yes
45225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45226 /* end confdefs.h. */
45228 #include <locale.h>
45231 register long global __asm__ ("%ebx");
45235 setlocale (LC_ALL, "en_US.UTF-8");
45237 global = 0x12345678;
45238 if (wctob (0x00FC) != -1)
45240 if (global != 0x12345678)
45245 if ac_fn_c_try_run "$LINENO"
45249 gl_cv_func_wctob_works=no
45251 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45252 conftest.$ac_objext conftest.beam conftest.$ac_ext
45257 if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
45258 if test "$cross_compiling" = yes
45262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45263 /* end confdefs.h. */
45265 #include <locale.h>
45266 #include <stdlib.h>
45270 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
45274 if (mbtowc (&wc, "\374", 1) == 1)
45275 if (wctob (wc) != (unsigned char) '\374')
45281 if ac_fn_c_try_run "$LINENO"
45283 gl_cv_func_wctob_works=yes
45285 gl_cv_func_wctob_works=no
45287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45288 conftest.$ac_objext conftest.beam conftest.$ac_ext
45294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
45295 printf "%s\n" "$gl_cv_func_wctob_works" >&6; }
45296 case "$gl_cv_func_wctob_works" in
45298 *) REPLACE_WCTOB=1 ;;
45300 if test $REPLACE_WCTOB = 0; then
45302 ac_fn_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
45305 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45306 if test "x$ac_cv_have_decl_wctob" = xyes
45312 printf "%s\n" "#define HAVE_DECL_WCTOB $ac_have_decl" >>confdefs.h
45314 if test $ac_cv_have_decl_wctob != yes; then
45320 if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
45329 gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext"
45344 if test "$GL_GNULIB_WCTOB" != 1; then
45345 if test "$GL_GNULIB_WCTOB" = 0; then
45346 GL_GNULIB_WCTOB=$gl_module_indicator_condition
45348 GL_GNULIB_WCTOB="($GL_GNULIB_WCTOB || $gl_module_indicator_condition)"
45356 printf "%s\n" "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
45367 if test $REPLACE_WCTOMB = 1; then
45376 gltests_LIBOBJS="$gltests_LIBOBJS wctomb.$ac_objext"
45391 if test "$GL_GNULIB_WCTOMB" != 1; then
45392 if test "$GL_GNULIB_WCTOMB" = 0; then
45393 GL_GNULIB_WCTOMB=$gl_module_indicator_condition
45395 GL_GNULIB_WCTOMB="($GL_GNULIB_WCTOMB || $gl_module_indicator_condition)"
45403 printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
45418 gltests_LIBOBJS="$gltests_LIBOBJS windows-thread.$ac_objext"
45433 gltests_LIBOBJS="$gltests_LIBOBJS windows-tls.$ac_objext"
45449 LIBDIFFUTILS_LIBDEPS="$gl_libdeps"
45451 LIBDIFFUTILS_LTLIBDEPS="$gl_ltlibdeps"
45453 LIBTESTS_LIBDEPS="$gltests_libdeps"
45457 # Ensure VLAs are not used.
45458 # Note -Wvla is implicitly added by gl_MANYWARN_ALL_GCC
45460 printf "%s\n" "#define GNULIB_NO_VLA 1" >>confdefs.h
45463 # Check whether --enable-gcc-warnings was given.
45464 if test ${enable_gcc_warnings+y}
45466 enableval=$enable_gcc_warnings; case $enableval in
45468 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
45470 gl_gcc_warnings=$enableval
45472 if test -d "$srcdir"/.git; then
45473 gl_gcc_warnings=yes
45481 if test "$gl_gcc_warnings" = yes; then
45484 ac_cpp='$CPP $CPPFLAGS'
45485 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45486 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45487 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
45491 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
45492 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
45494 printf %s "(cached) " >&6
45497 gl_save_compiler_FLAGS="$CFLAGS"
45498 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
45499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45500 /* end confdefs.h. */
45510 if ac_fn_c_try_link "$LINENO"
45512 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
45514 gl_cv_warn_c__Werror__Wunknown_warning_option=no
45516 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45517 conftest$ac_exeext conftest.$ac_ext
45518 CFLAGS="$gl_save_compiler_FLAGS"
45521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
45522 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
45523 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
45525 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
45527 gl_unknown_warnings_are_errors=
45531 ac_cpp='$CPP $CPPFLAGS'
45532 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45533 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45534 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
45540 printf %s "checking whether C compiler handles -Werror... " >&6; }
45541 if test ${gl_cv_warn_c__Werror+y}
45543 printf %s "(cached) " >&6
45546 gl_save_compiler_FLAGS="$CFLAGS"
45547 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
45548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45549 /* end confdefs.h. */
45559 if ac_fn_c_try_link "$LINENO"
45561 gl_cv_warn_c__Werror=yes
45563 gl_cv_warn_c__Werror=no
45565 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45566 conftest$ac_exeext conftest.$ac_ext
45567 CFLAGS="$gl_save_compiler_FLAGS"
45570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
45571 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
45572 if test "x$gl_cv_warn_c__Werror" = xyes
45574 as_fn_append WERROR_CFLAGS " -Werror"
45581 # This, $nw, is the list of warnings we disable.
45582 nw="$nw -Winline" # system.h's readdir_ignoring_dot_and_dotdot
45583 nw="$nw -Wstack-protector" # not worth working around
45587 ac_cpp='$CPP $CPPFLAGS'
45588 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45589 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45590 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45594 if test -n "$GCC"; then
45596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
45597 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
45598 if test ${gl_cv_cc_nomfi_supported+y}
45600 printf %s "(cached) " >&6
45602 gl_save_CFLAGS="$CFLAGS"
45603 CFLAGS="$CFLAGS -Wextra -Werror -Wno-missing-field-initializers"
45604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45605 /* end confdefs.h. */
45615 if ac_fn_c_try_compile "$LINENO"
45617 gl_cv_cc_nomfi_supported=yes
45619 gl_cv_cc_nomfi_supported=no
45621 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45622 CFLAGS="$gl_save_CFLAGS"
45625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
45626 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
45628 if test "$gl_cv_cc_nomfi_supported" = yes; then
45629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
45630 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
45631 if test ${gl_cv_cc_nomfi_needed+y}
45633 printf %s "(cached) " >&6
45635 gl_save_CFLAGS="$CFLAGS"
45636 CFLAGS="$CFLAGS -Wextra -Werror"
45637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45638 /* end confdefs.h. */
45641 typedef struct { int a; int b; } s_t;
45654 if ac_fn_c_try_compile "$LINENO"
45656 gl_cv_cc_nomfi_needed=no
45658 gl_cv_cc_nomfi_needed=yes
45660 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45661 CFLAGS="$gl_save_CFLAGS"
45664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
45665 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
45668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
45669 printf %s "checking whether -Wuninitialized is supported... " >&6; }
45670 if test ${gl_cv_cc_uninitialized_supported+y}
45672 printf %s "(cached) " >&6
45674 gl_save_CFLAGS="$CFLAGS"
45675 CFLAGS="$CFLAGS -Werror -Wuninitialized"
45676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45677 /* end confdefs.h. */
45687 if ac_fn_c_try_compile "$LINENO"
45689 gl_cv_cc_uninitialized_supported=yes
45691 gl_cv_cc_uninitialized_supported=no
45693 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45694 CFLAGS="$gl_save_CFLAGS"
45697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
45698 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
45702 # List all gcc warning categories.
45703 # To compare this list to your installed GCC's, run this Bash command:
45706 # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
45707 # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
45708 # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
45711 for gl_manywarn_item in -fanalyzer -fno-common \
45713 -Warith-conversion \
45714 -Wbad-function-cast \
45715 -Wcast-align=strict \
45717 -Wdisabled-optimization \
45718 -Wdouble-promotion \
45719 -Wduplicated-branches \
45720 -Wduplicated-cond \
45722 -Wformat-signedness \
45727 -Wmissing-declarations \
45728 -Wmissing-include-dirs \
45729 -Wmissing-prototypes \
45731 -Wnull-dereference \
45732 -Wold-style-definition \
45734 -Woverlength-strings \
45738 -Wstack-protector \
45739 -Wstrict-overflow \
45740 -Wstrict-prototypes \
45741 -Wsuggest-attribute=cold \
45742 -Wsuggest-attribute=const \
45743 -Wsuggest-attribute=format \
45744 -Wsuggest-attribute=malloc \
45745 -Wsuggest-attribute=noreturn \
45746 -Wsuggest-attribute=pure \
45747 -Wsuggest-final-methods \
45748 -Wsuggest-final-types \
45753 -Wunknown-pragmas \
45754 -Wunsafe-loop-optimizations \
45756 -Wvariadic-macros \
45757 -Wvector-operation-performance \
45762 as_fn_append ws " $gl_manywarn_item"
45765 # gcc --help=warnings outputs an unusual form for these options; list
45766 # them here so that the above 'comm' command doesn't report a false match.
45767 as_fn_append ws ' -Warray-bounds=2'
45768 as_fn_append ws ' -Wattribute-alias=2'
45769 as_fn_append ws ' -Wformat-overflow=2'
45770 as_fn_append ws ' -Wformat=2'
45771 as_fn_append ws ' -Wformat-truncation=2'
45772 as_fn_append ws ' -Wimplicit-fallthrough=5'
45773 as_fn_append ws ' -Wshift-overflow=2'
45774 as_fn_append ws ' -Wunused-const-variable=2'
45775 as_fn_append ws ' -Wvla-larger-than=4031'
45777 # These are needed for older GCC versions.
45778 if test -n "$GCC"; then
45779 case `($CC --version) 2>/dev/null` in
45780 'gcc (GCC) '[0-3].* | \
45781 'gcc (GCC) '4.[0-7].*)
45782 as_fn_append ws ' -fdiagnostics-show-option'
45783 as_fn_append ws ' -funit-at-a-time'
45788 # Disable specific options as needed.
45789 if test "$gl_cv_cc_nomfi_needed" = yes; then
45790 as_fn_append ws ' -Wno-missing-field-initializers'
45793 if test "$gl_cv_cc_uninitialized_supported" = no; then
45794 as_fn_append ws ' -Wno-uninitialized'
45797 # Some warnings have too many false alarms in GCC 10.1.
45798 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93695
45799 as_fn_append ws ' -Wno-analyzer-double-free'
45800 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94458
45801 as_fn_append ws ' -Wno-analyzer-malloc-leak'
45802 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94851
45803 as_fn_append ws ' -Wno-analyzer-null-dereference'
45804 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95758
45805 as_fn_append ws ' -Wno-analyzer-use-after-free'
45808 ac_cpp='$CPP $CPPFLAGS'
45809 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45810 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45811 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45820 *" $gl_warn_item "*)
45823 as_fn_append gl_warn_set " $gl_warn_item"
45832 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
45834 case $gl_positive in
45835 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
45837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
45838 printf %s "checking whether C compiler handles $w... " >&6; }
45839 if eval test \${$as_gl_Warn+y}
45841 printf %s "(cached) " >&6
45844 gl_save_compiler_FLAGS="$CFLAGS"
45845 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
45846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45847 /* end confdefs.h. */
45857 if ac_fn_c_try_link "$LINENO"
45859 eval "$as_gl_Warn=yes"
45861 eval "$as_gl_Warn=no"
45863 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45864 conftest$ac_exeext conftest.$ac_ext
45865 CFLAGS="$gl_save_compiler_FLAGS"
45868 eval ac_res=\$$as_gl_Warn
45869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
45870 printf "%s\n" "$ac_res" >&6; }
45871 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
45873 as_fn_append WARN_CFLAGS " $w"
45880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
45881 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
45882 if test ${gl_cv_warn_c__Wno_sign_compare+y}
45884 printf %s "(cached) " >&6
45887 gl_save_compiler_FLAGS="$CFLAGS"
45888 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
45889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45890 /* end confdefs.h. */
45900 if ac_fn_c_try_link "$LINENO"
45902 gl_cv_warn_c__Wno_sign_compare=yes
45904 gl_cv_warn_c__Wno_sign_compare=no
45906 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45907 conftest$ac_exeext conftest.$ac_ext
45908 CFLAGS="$gl_save_compiler_FLAGS"
45911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
45912 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
45913 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
45915 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
45918 # Too many warnings for now
45921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
45922 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
45923 if test ${gl_cv_warn_c__Wno_unused_parameter+y}
45925 printf %s "(cached) " >&6
45928 gl_save_compiler_FLAGS="$CFLAGS"
45929 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
45930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45931 /* end confdefs.h. */
45941 if ac_fn_c_try_link "$LINENO"
45943 gl_cv_warn_c__Wno_unused_parameter=yes
45945 gl_cv_warn_c__Wno_unused_parameter=no
45947 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45948 conftest$ac_exeext conftest.$ac_ext
45949 CFLAGS="$gl_save_compiler_FLAGS"
45952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
45953 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
45954 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes
45956 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
45959 # Too many warnings for now
45962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
45963 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
45964 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
45966 printf %s "(cached) " >&6
45969 gl_save_compiler_FLAGS="$CFLAGS"
45970 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
45971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45972 /* end confdefs.h. */
45982 if ac_fn_c_try_link "$LINENO"
45984 gl_cv_warn_c__Wno_format_nonliteral=yes
45986 gl_cv_warn_c__Wno_format_nonliteral=no
45988 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45989 conftest$ac_exeext conftest.$ac_ext
45990 CFLAGS="$gl_save_compiler_FLAGS"
45993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
45994 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
45995 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
45997 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
46004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
46005 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
46006 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
46008 printf %s "(cached) " >&6
46011 gl_save_compiler_FLAGS="$CFLAGS"
46012 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
46013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46014 /* end confdefs.h. */
46024 if ac_fn_c_try_link "$LINENO"
46026 gl_cv_warn_c__fdiagnostics_show_option=yes
46028 gl_cv_warn_c__fdiagnostics_show_option=no
46030 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46031 conftest$ac_exeext conftest.$ac_ext
46032 CFLAGS="$gl_save_compiler_FLAGS"
46035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
46036 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
46037 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
46039 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
46045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
46046 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
46047 if test ${gl_cv_warn_c__funit_at_a_time+y}
46049 printf %s "(cached) " >&6
46052 gl_save_compiler_FLAGS="$CFLAGS"
46053 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
46054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46055 /* end confdefs.h. */
46065 if ac_fn_c_try_link "$LINENO"
46067 gl_cv_warn_c__funit_at_a_time=yes
46069 gl_cv_warn_c__funit_at_a_time=no
46071 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46072 conftest$ac_exeext conftest.$ac_ext
46073 CFLAGS="$gl_save_compiler_FLAGS"
46076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
46077 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
46078 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
46080 as_fn_append WARN_CFLAGS " -funit-at-a-time"
46086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-common" >&5
46087 printf %s "checking whether C compiler handles -fno-common... " >&6; }
46088 if test ${gl_cv_warn_c__fno_common+y}
46090 printf %s "(cached) " >&6
46093 gl_save_compiler_FLAGS="$CFLAGS"
46094 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-common"
46095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46096 /* end confdefs.h. */
46106 if ac_fn_c_try_link "$LINENO"
46108 gl_cv_warn_c__fno_common=yes
46110 gl_cv_warn_c__fno_common=no
46112 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46113 conftest$ac_exeext conftest.$ac_ext
46114 CFLAGS="$gl_save_compiler_FLAGS"
46117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_common" >&5
46118 printf "%s\n" "$gl_cv_warn_c__fno_common" >&6; }
46119 if test "x$gl_cv_warn_c__fno_common" = xyes
46121 as_fn_append WARN_CFLAGS " -fno-common"
46129 printf "%s\n" "#define lint 1" >>confdefs.h
46132 printf "%s\n" "#define _FORTIFY_SOURCE 2" >>confdefs.h
46135 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
46138 # We use a slightly smaller set of warning options for lib/.
46139 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
46141 nw="$nw -Wunused-macros"
46142 nw="$nw -Wsuggest-attribute=pure"
46143 nw="$nw -Wduplicated-branches" # Too many false alarms
46145 # Avoid false alarm in lib/vasnprintf.c.
46146 # https://lists.gnu.org/r/bug-gnulib/2021-01/msg00031.html
46149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-analyzer-null-argument" >&5
46150 printf %s "checking whether C compiler handles -Wno-analyzer-null-argument... " >&6; }
46151 if test ${gl_cv_warn_c__Wno_analyzer_null_argument+y}
46153 printf %s "(cached) " >&6
46156 gl_save_compiler_FLAGS="$CFLAGS"
46157 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wanalyzer-null-argument"
46158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46159 /* end confdefs.h. */
46169 if ac_fn_c_try_link "$LINENO"
46171 gl_cv_warn_c__Wno_analyzer_null_argument=yes
46173 gl_cv_warn_c__Wno_analyzer_null_argument=no
46175 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46176 conftest$ac_exeext conftest.$ac_ext
46177 CFLAGS="$gl_save_compiler_FLAGS"
46180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_analyzer_null_argument" >&5
46181 printf "%s\n" "$gl_cv_warn_c__Wno_analyzer_null_argument" >&6; }
46182 if test "x$gl_cv_warn_c__Wno_analyzer_null_argument" = xyes
46184 as_fn_append WARN_CFLAGS " -Wno-analyzer-null-argument"
46191 set x $WARN_CFLAGS; shift
46195 *" $gl_warn_item "*)
46198 as_fn_append gl_warn_set " $gl_warn_item"
46202 GNULIB_WARN_CFLAGS=$gl_warn_set
46207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
46208 printf %s "checking for inline... " >&6; }
46209 if test ${ac_cv_c_inline+y}
46211 printf %s "(cached) " >&6
46214 for ac_kw in inline __inline__ __inline; do
46215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46216 /* end confdefs.h. */
46217 #ifndef __cplusplus
46219 static $ac_kw foo_t static_foo (void) {return 0; }
46220 $ac_kw foo_t foo (void) {return 0; }
46224 if ac_fn_c_try_compile "$LINENO"
46226 ac_cv_c_inline=$ac_kw
46228 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46229 test "$ac_cv_c_inline" != no && break
46233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
46234 printf "%s\n" "$ac_cv_c_inline" >&6; }
46236 case $ac_cv_c_inline in
46239 case $ac_cv_c_inline in
46241 *) ac_val=$ac_cv_c_inline;;
46243 cat >>confdefs.h <<_ACEOF
46244 #ifndef __cplusplus
46245 #define inline $ac_val
46253 printf "%s\n" "#define DEFAULT_EDITOR_PROGRAM \"ed\"" >>confdefs.h
46256 # Extract the first word of "pr", so it can be a program name with args.
46257 set dummy pr; ac_word=$2
46258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46259 printf %s "checking for $ac_word... " >&6; }
46260 if test ${ac_cv_path_PR_PROGRAM+y}
46262 printf %s "(cached) " >&6
46264 case $PR_PROGRAM in
46266 ac_cv_path_PR_PROGRAM="$PR_PROGRAM" # Let the user override the test with a path.
46269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46270 for as_dir in $PATH
46273 case $as_dir in #(((
46276 *) as_dir=$as_dir/ ;;
46278 for ac_exec_ext in '' $ac_executable_extensions; do
46279 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
46280 ac_cv_path_PR_PROGRAM="$as_dir$ac_word$ac_exec_ext"
46281 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
46288 test -z "$ac_cv_path_PR_PROGRAM" && ac_cv_path_PR_PROGRAM=""""
46292 PR_PROGRAM=$ac_cv_path_PR_PROGRAM
46293 if test -n "$PR_PROGRAM"; then
46294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PR_PROGRAM" >&5
46295 printf "%s\n" "$PR_PROGRAM" >&6; }
46297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
46298 printf "%s\n" "no" >&6; }
46303 printf "%s\n" "#define PR_PROGRAM \"$PR_PROGRAM\"" >>confdefs.h
46306 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
46307 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes
46310 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLKSIZE 1" >>confdefs.h
46315 ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
46316 if test "x$ac_cv_member_struct_stat_st_rdev" = xyes
46319 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_RDEV 1" >>confdefs.h
46324 ac_header_dirent=no
46325 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
46326 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
46327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
46328 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
46329 if eval test \${$as_ac_Header+y}
46331 printf %s "(cached) " >&6
46333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46334 /* end confdefs.h. */
46335 #include <sys/types.h>
46347 if ac_fn_c_try_compile "$LINENO"
46349 eval "$as_ac_Header=yes"
46351 eval "$as_ac_Header=no"
46353 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46355 eval ac_res=\$$as_ac_Header
46356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
46357 printf "%s\n" "$ac_res" >&6; }
46358 if eval test \"x\$"$as_ac_Header"\" = x"yes"
46360 cat >>confdefs.h <<_ACEOF
46361 #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
46364 ac_header_dirent=$ac_hdr; break
46368 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
46369 if test $ac_header_dirent = dirent.h; then
46370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
46371 printf %s "checking for library containing opendir... " >&6; }
46372 if test ${ac_cv_search_opendir+y}
46374 printf %s "(cached) " >&6
46376 ac_func_search_save_LIBS=$LIBS
46377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46378 /* end confdefs.h. */
46380 /* Override any GCC internal prototype to avoid an error.
46381 Use char because int might match the return type of a GCC
46382 builtin and then its argument prototype would still apply. */
46392 for ac_lib in '' dir
46394 if test -z "$ac_lib"; then
46395 ac_res="none required"
46398 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
46400 if ac_fn_c_try_link "$LINENO"
46402 ac_cv_search_opendir=$ac_res
46404 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46406 if test ${ac_cv_search_opendir+y}
46411 if test ${ac_cv_search_opendir+y}
46415 ac_cv_search_opendir=no
46417 rm conftest.$ac_ext
46418 LIBS=$ac_func_search_save_LIBS
46420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
46421 printf "%s\n" "$ac_cv_search_opendir" >&6; }
46422 ac_res=$ac_cv_search_opendir
46423 if test "$ac_res" != no
46425 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
46430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
46431 printf %s "checking for library containing opendir... " >&6; }
46432 if test ${ac_cv_search_opendir+y}
46434 printf %s "(cached) " >&6
46436 ac_func_search_save_LIBS=$LIBS
46437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46438 /* end confdefs.h. */
46440 /* Override any GCC internal prototype to avoid an error.
46441 Use char because int might match the return type of a GCC
46442 builtin and then its argument prototype would still apply. */
46454 if test -z "$ac_lib"; then
46455 ac_res="none required"
46458 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
46460 if ac_fn_c_try_link "$LINENO"
46462 ac_cv_search_opendir=$ac_res
46464 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46466 if test ${ac_cv_search_opendir+y}
46471 if test ${ac_cv_search_opendir+y}
46475 ac_cv_search_opendir=no
46477 rm conftest.$ac_ext
46478 LIBS=$ac_func_search_save_LIBS
46480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
46481 printf "%s\n" "$ac_cv_search_opendir" >&6; }
46482 ac_res=$ac_cv_search_opendir
46483 if test "$ac_res" != no
46485 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
46491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
46492 printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
46493 if test ${ac_cv_header_sys_wait_h+y}
46495 printf %s "(cached) " >&6
46497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46498 /* end confdefs.h. */
46499 #include <sys/types.h>
46500 #include <sys/wait.h>
46501 #ifndef WEXITSTATUS
46502 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
46505 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
46513 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
46518 if ac_fn_c_try_compile "$LINENO"
46520 ac_cv_header_sys_wait_h=yes
46522 ac_cv_header_sys_wait_h=no
46524 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
46527 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
46528 if test $ac_cv_header_sys_wait_h = yes; then
46530 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
46535 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
46537 if test "x$ac_cv_type_pid_t" = xyes
46541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46542 /* end confdefs.h. */
46544 #if defined _WIN64 && !defined __CYGWIN__
46557 if ac_fn_c_try_compile "$LINENO"
46561 ac_pid_type='__int64'
46563 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46565 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
46576 if test $ac_cv_func_sigprocmask = no; then
46577 ac_fn_c_check_func "$LINENO" "sigblock" "ac_cv_func_sigblock"
46578 if test "x$ac_cv_func_sigblock" = xyes
46580 printf "%s\n" "#define HAVE_SIGBLOCK 1" >>confdefs.h
46585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
46586 printf %s "checking whether closedir returns void... " >&6; }
46587 if test ${ac_cv_func_closedir_void+y}
46589 printf %s "(cached) " >&6
46591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46592 /* end confdefs.h. */
46594 #include <$ac_header_dirent>
46600 return closedir(0);
46606 if ac_fn_c_try_compile "$LINENO"
46608 ac_cv_func_closedir_void=no
46610 ac_cv_func_closedir_void=yes
46612 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
46615 printf "%s\n" "$ac_cv_func_closedir_void" >&6; }
46616 if test $ac_cv_func_closedir_void = yes; then
46618 printf "%s\n" "#define CLOSEDIR_VOID 1" >>confdefs.h
46627 if test "x$ac_cv_func_fork" = xyes; then
46628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
46629 printf %s "checking for working fork... " >&6; }
46630 if test ${ac_cv_func_fork_works+y}
46632 printf %s "(cached) " >&6
46634 if test "$cross_compiling" = yes
46636 ac_cv_func_fork_works=cross
46638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46639 /* end confdefs.h. */
46640 $ac_includes_default
46645 /* By Ruediger Kuhlmann. */
46646 return fork () < 0;
46652 if ac_fn_c_try_run "$LINENO"
46654 ac_cv_func_fork_works=yes
46656 ac_cv_func_fork_works=no
46658 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46659 conftest.$ac_objext conftest.beam conftest.$ac_ext
46663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
46664 printf "%s\n" "$ac_cv_func_fork_works" >&6; }
46667 ac_cv_func_fork_works=$ac_cv_func_fork
46669 if test "x$ac_cv_func_fork_works" = xcross; then
46671 *-*-amigaos* | *-*-msdosdjgpp*)
46672 # Override, as these systems have only a dummy fork() stub
46673 ac_cv_func_fork_works=no
46676 ac_cv_func_fork_works=yes
46679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
46680 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
46682 ac_cv_func_vfork_works=$ac_cv_func_vfork
46683 if test "x$ac_cv_func_vfork" = xyes; then
46684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
46685 printf %s "checking for working vfork... " >&6; }
46686 if test ${ac_cv_func_vfork_works+y}
46688 printf %s "(cached) " >&6
46690 if test "$cross_compiling" = yes
46692 ac_cv_func_vfork_works=cross
46694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46695 /* end confdefs.h. */
46696 /* Thanks to Paul Eggert for this test. */
46697 $ac_includes_default
46698 #include <signal.h>
46699 #include <sys/wait.h>
46700 #ifdef HAVE_VFORK_H
46701 # include <vfork.h>
46705 do_nothing (int sig)
46710 /* On some sparc systems, changes by the child to local and incoming
46711 argument registers are propagated back to the parent. The compiler
46712 is told about this with #include <vfork.h>, but some compilers
46713 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
46714 static variable whose address is put into a register that is
46715 clobbered by the vfork. */
46717 sparc_address_test (int arg)
46719 static pid_t child;
46737 pid_t parent = getpid ();
46740 sparc_address_test (0);
46742 /* On Solaris 2.4, changes by the child to the signal handler
46743 also munge signal handlers in the parent. To detect this,
46744 start by putting the parent's handler in a known state. */
46745 signal (SIGTERM, SIG_DFL);
46750 /* Here is another test for sparc vfork register problems. This
46751 test uses lots of local variables, at least as many local
46752 variables as main has allocated so far including compiler
46753 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
46754 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
46755 reuse the register of parent for one of the local variables,
46756 since it will think that parent can't possibly be used any more
46757 in this routine. Assigning to the local variable will thus
46758 munge parent in the parent process. */
46760 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
46761 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
46762 /* Convince the compiler that p..p7 are live; otherwise, it might
46763 use the same hardware register for all 8 local variables. */
46764 if (p != p1 || p != p2 || p != p3 || p != p4
46765 || p != p5 || p != p6 || p != p7)
46768 /* Alter the child's signal handler. */
46769 if (signal (SIGTERM, do_nothing) != SIG_DFL)
46772 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
46773 from child file descriptors. If the child closes a descriptor
46774 before it execs or exits, this munges the parent's descriptor
46775 as well. Test for this by closing stdout in the child. */
46776 _exit(close(fileno(stdout)) != 0);
46781 while (wait(&status) != child)
46784 /* Was there some problem with vforking? */
46787 /* Did the child munge the parent's signal handler? */
46788 || signal (SIGTERM, SIG_DFL) != SIG_DFL
46790 /* Did the child fail? (This shouldn't happen.) */
46793 /* Did the vfork/compiler bug occur? */
46794 || parent != getpid()
46796 /* Did the file descriptor bug occur? */
46797 || fstat(fileno(stdout), &st) != 0
46802 if ac_fn_c_try_run "$LINENO"
46804 ac_cv_func_vfork_works=yes
46806 ac_cv_func_vfork_works=no
46808 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46809 conftest.$ac_objext conftest.beam conftest.$ac_ext
46813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
46814 printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
46817 if test "x$ac_cv_func_fork_works" = xcross; then
46818 ac_cv_func_vfork_works=$ac_cv_func_vfork
46819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
46820 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
46823 if test "x$ac_cv_func_vfork_works" = xyes; then
46825 printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
46829 printf "%s\n" "#define vfork fork" >>confdefs.h
46832 if test "x$ac_cv_func_fork_works" = xyes; then
46834 printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
46839 # When .tarball-version exists, we're building from a tarball
46840 # and must not make man/*.1 files depend on the generated src/version.c,
46841 # because that would induce a requirement to run the help2man perl script.
46842 # We are not yet prepared to make perl a build-from-tarball requirement.
46843 # Hence, here we detect .tarball-version existence. When not present,
46844 # we define a variable to be used in man/Makefile.am to induce the
46845 # proper dependency (so that man/*.1 will be rebuilt upon any version change),
46846 # but not when built from a tarball.
46848 test -f $srcdir/.tarball-version \
46849 && SRC_VERSION_C= \
46850 || SRC_VERSION_C=../src/version.c
46853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
46854 printf %s "checking whether NLS is requested... " >&6; }
46855 # Check whether --enable-nls was given.
46856 if test ${enable_nls+y}
46858 enableval=$enable_nls; USE_NLS=$enableval
46863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
46864 printf "%s\n" "$USE_NLS" >&6; }
46869 GETTEXT_MACRO_VERSION=0.19
46874 # Prepare PATH_SEPARATOR.
46875 # The user is always right.
46876 if test "${PATH_SEPARATOR+set}" != set; then
46877 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
46878 # contains only /bin. Note that ksh looks also at the FPATH variable,
46879 # so we have to set that as well for the test.
46881 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
46882 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
46883 || PATH_SEPARATOR=';'
46887 # Find out how to test for executable files. Don't use a zero-byte file,
46888 # as systems may use methods other than mode bits to determine executability.
46889 cat >conf$$.file <<_ASEOF
46893 chmod +x conf$$.file
46894 if test -x conf$$.file >/dev/null 2>&1; then
46895 ac_executable_p="test -x"
46897 ac_executable_p="test -f"
46901 # Extract the first word of "msgfmt", so it can be a program name with args.
46902 set dummy msgfmt; ac_word=$2
46903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46904 printf %s "checking for $ac_word... " >&6; }
46905 if test ${ac_cv_path_MSGFMT+y}
46907 printf %s "(cached) " >&6
46911 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
46914 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
46915 for ac_dir in $PATH; do
46917 test -z "$ac_dir" && ac_dir=.
46918 for ac_exec_ext in '' $ac_executable_extensions; do
46919 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
46920 echo "$as_me: trying $ac_dir/$ac_word..." >&5
46921 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
46922 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
46923 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
46930 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
46934 MSGFMT="$ac_cv_path_MSGFMT"
46935 if test "$MSGFMT" != ":"; then
46936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
46937 printf "%s\n" "$MSGFMT" >&6; }
46939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
46940 printf "%s\n" "no" >&6; }
46943 # Extract the first word of "gmsgfmt", so it can be a program name with args.
46944 set dummy gmsgfmt; ac_word=$2
46945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46946 printf %s "checking for $ac_word... " >&6; }
46947 if test ${ac_cv_path_GMSGFMT+y}
46949 printf %s "(cached) " >&6
46953 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
46956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46957 for as_dir in $PATH
46960 case $as_dir in #(((
46963 *) as_dir=$as_dir/ ;;
46965 for ac_exec_ext in '' $ac_executable_extensions; do
46966 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
46967 ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
46968 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
46975 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
46979 GMSGFMT=$ac_cv_path_GMSGFMT
46980 if test -n "$GMSGFMT"; then
46981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
46982 printf "%s\n" "$GMSGFMT" >&6; }
46984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
46985 printf "%s\n" "no" >&6; }
46990 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
46991 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
46992 *) MSGFMT_015=$MSGFMT ;;
46995 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
46996 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
46997 *) GMSGFMT_015=$GMSGFMT ;;
47002 # Prepare PATH_SEPARATOR.
47003 # The user is always right.
47004 if test "${PATH_SEPARATOR+set}" != set; then
47005 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
47006 # contains only /bin. Note that ksh looks also at the FPATH variable,
47007 # so we have to set that as well for the test.
47009 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47010 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47011 || PATH_SEPARATOR=';'
47015 # Find out how to test for executable files. Don't use a zero-byte file,
47016 # as systems may use methods other than mode bits to determine executability.
47017 cat >conf$$.file <<_ASEOF
47021 chmod +x conf$$.file
47022 if test -x conf$$.file >/dev/null 2>&1; then
47023 ac_executable_p="test -x"
47025 ac_executable_p="test -f"
47029 # Extract the first word of "xgettext", so it can be a program name with args.
47030 set dummy xgettext; ac_word=$2
47031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47032 printf %s "checking for $ac_word... " >&6; }
47033 if test ${ac_cv_path_XGETTEXT+y}
47035 printf %s "(cached) " >&6
47037 case "$XGETTEXT" in
47039 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
47042 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
47043 for ac_dir in $PATH; do
47045 test -z "$ac_dir" && ac_dir=.
47046 for ac_exec_ext in '' $ac_executable_extensions; do
47047 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
47048 echo "$as_me: trying $ac_dir/$ac_word..." >&5
47049 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
47050 (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
47051 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
47058 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
47062 XGETTEXT="$ac_cv_path_XGETTEXT"
47063 if test "$XGETTEXT" != ":"; then
47064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
47065 printf "%s\n" "$XGETTEXT" >&6; }
47067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47068 printf "%s\n" "no" >&6; }
47073 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
47074 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
47075 *) XGETTEXT_015=$XGETTEXT ;;
47080 # Prepare PATH_SEPARATOR.
47081 # The user is always right.
47082 if test "${PATH_SEPARATOR+set}" != set; then
47083 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
47084 # contains only /bin. Note that ksh looks also at the FPATH variable,
47085 # so we have to set that as well for the test.
47087 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47088 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47089 || PATH_SEPARATOR=';'
47093 # Find out how to test for executable files. Don't use a zero-byte file,
47094 # as systems may use methods other than mode bits to determine executability.
47095 cat >conf$$.file <<_ASEOF
47099 chmod +x conf$$.file
47100 if test -x conf$$.file >/dev/null 2>&1; then
47101 ac_executable_p="test -x"
47103 ac_executable_p="test -f"
47107 # Extract the first word of "msgmerge", so it can be a program name with args.
47108 set dummy msgmerge; ac_word=$2
47109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47110 printf %s "checking for $ac_word... " >&6; }
47111 if test ${ac_cv_path_MSGMERGE+y}
47113 printf %s "(cached) " >&6
47115 case "$MSGMERGE" in
47117 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
47120 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
47121 for ac_dir in $PATH; do
47123 test -z "$ac_dir" && ac_dir=.
47124 for ac_exec_ext in '' $ac_executable_extensions; do
47125 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
47126 echo "$as_me: trying $ac_dir/$ac_word..." >&5
47127 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
47128 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
47135 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
47139 MSGMERGE="$ac_cv_path_MSGMERGE"
47140 if test "$MSGMERGE" != ":"; then
47141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
47142 printf "%s\n" "$MSGMERGE" >&6; }
47144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47145 printf "%s\n" "no" >&6; }
47149 test -n "$localedir" || localedir='${datadir}/locale'
47152 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
47155 ac_config_commands="$ac_config_commands po-directories"
47182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
47183 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
47184 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
47186 printf %s "(cached) " >&6
47188 gt_save_LIBS="$LIBS"
47189 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
47190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47191 /* end confdefs.h. */
47192 #include <CoreFoundation/CFPreferences.h>
47196 CFPreferencesCopyAppValue(NULL, NULL)
47201 if ac_fn_c_try_link "$LINENO"
47203 gt_cv_func_CFPreferencesCopyAppValue=yes
47205 gt_cv_func_CFPreferencesCopyAppValue=no
47207 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47208 conftest$ac_exeext conftest.$ac_ext
47209 LIBS="$gt_save_LIBS"
47211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
47212 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
47213 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
47215 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
47218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
47219 printf %s "checking for CFLocaleCopyCurrent... " >&6; }
47220 if test ${gt_cv_func_CFLocaleCopyCurrent+y}
47222 printf %s "(cached) " >&6
47224 gt_save_LIBS="$LIBS"
47225 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
47226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47227 /* end confdefs.h. */
47228 #include <CoreFoundation/CFLocale.h>
47232 CFLocaleCopyCurrent();
47237 if ac_fn_c_try_link "$LINENO"
47239 gt_cv_func_CFLocaleCopyCurrent=yes
47241 gt_cv_func_CFLocaleCopyCurrent=no
47243 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47244 conftest$ac_exeext conftest.$ac_ext
47245 LIBS="$gt_save_LIBS"
47247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
47248 printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
47249 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
47251 printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
47255 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
47256 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
47268 case " $gt_needs " in
47269 *" need-formatstring-macros "*) gt_api_version=3 ;;
47270 *" need-ngettext "*) gt_api_version=2 ;;
47271 *) gt_api_version=1 ;;
47273 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
47274 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
47276 if test "$USE_NLS" = "yes"; then
47277 gt_use_preinstalled_gnugettext=no
47280 if test $gt_api_version -ge 3; then
47281 gt_revision_test_code='
47282 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
47283 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
47285 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
47288 gt_revision_test_code=
47290 if test $gt_api_version -ge 2; then
47291 gt_expression_test_code=' + * ngettext ("", "", 0)'
47293 gt_expression_test_code=
47296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
47297 printf %s "checking for GNU gettext in libc... " >&6; }
47298 if eval test \${$gt_func_gnugettext_libc+y}
47300 printf %s "(cached) " >&6
47302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47303 /* end confdefs.h. */
47305 #include <libintl.h>
47306 $gt_revision_test_code
47307 extern int _nl_msg_cat_cntr;
47308 extern int *_nl_domain_bindings;
47314 bindtextdomain ("", "");
47315 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
47321 if ac_fn_c_try_link "$LINENO"
47323 eval "$gt_func_gnugettext_libc=yes"
47325 eval "$gt_func_gnugettext_libc=no"
47327 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47328 conftest$ac_exeext conftest.$ac_ext
47330 eval ac_res=\$$gt_func_gnugettext_libc
47331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
47332 printf "%s\n" "$ac_res" >&6; }
47334 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
47340 am_save_CPPFLAGS="$CPPFLAGS"
47342 for element in $INCICONV; do
47344 for x in $CPPFLAGS; do
47346 acl_save_prefix="$prefix"
47347 prefix="$acl_final_prefix"
47348 acl_save_exec_prefix="$exec_prefix"
47349 exec_prefix="$acl_final_exec_prefix"
47351 exec_prefix="$acl_save_exec_prefix"
47352 prefix="$acl_save_prefix"
47354 if test "X$x" = "X$element"; then
47359 if test -z "$haveit"; then
47360 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
47365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
47366 printf %s "checking for iconv... " >&6; }
47367 if test ${am_cv_func_iconv+y}
47369 printf %s "(cached) " >&6
47372 am_cv_func_iconv="no, consider installing GNU libiconv"
47374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47375 /* end confdefs.h. */
47377 #include <stdlib.h>
47383 iconv_t cd = iconv_open("","");
47384 iconv(cd,NULL,NULL,NULL,NULL);
47390 if ac_fn_c_try_link "$LINENO"
47392 am_cv_func_iconv=yes
47394 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47395 conftest$ac_exeext conftest.$ac_ext
47396 if test "$am_cv_func_iconv" != yes; then
47397 am_save_LIBS="$LIBS"
47398 LIBS="$LIBS $LIBICONV"
47399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47400 /* end confdefs.h. */
47402 #include <stdlib.h>
47408 iconv_t cd = iconv_open("","");
47409 iconv(cd,NULL,NULL,NULL,NULL);
47415 if ac_fn_c_try_link "$LINENO"
47417 am_cv_lib_iconv=yes
47418 am_cv_func_iconv=yes
47420 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47421 conftest$ac_exeext conftest.$ac_ext
47422 LIBS="$am_save_LIBS"
47426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
47427 printf "%s\n" "$am_cv_func_iconv" >&6; }
47428 if test "$am_cv_func_iconv" = yes; then
47429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
47430 printf %s "checking for working iconv... " >&6; }
47431 if test ${am_cv_func_iconv_works+y}
47433 printf %s "(cached) " >&6
47436 am_save_LIBS="$LIBS"
47437 if test $am_cv_lib_iconv = yes; then
47438 LIBS="$LIBS $LIBICONV"
47440 am_cv_func_iconv_works=no
47441 for ac_iconv_const in '' 'const'; do
47442 if test "$cross_compiling" = yes
47445 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
47446 *) am_cv_func_iconv_works="guessing yes" ;;
47449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47450 /* end confdefs.h. */
47453 #include <string.h>
47455 #ifndef ICONV_CONST
47456 # define ICONV_CONST $ac_iconv_const
47463 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
47464 successful returns. This is even documented in
47465 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
47467 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
47468 if (cd_utf8_to_88591 != (iconv_t)(-1))
47470 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
47472 ICONV_CONST char *inptr = input;
47473 size_t inbytesleft = strlen (input);
47474 char *outptr = buf;
47475 size_t outbytesleft = sizeof (buf);
47476 size_t res = iconv (cd_utf8_to_88591,
47477 &inptr, &inbytesleft,
47478 &outptr, &outbytesleft);
47481 iconv_close (cd_utf8_to_88591);
47484 /* Test against Solaris 10 bug: Failures are not distinguishable from
47485 successful returns. */
47487 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
47488 if (cd_ascii_to_88591 != (iconv_t)(-1))
47490 static ICONV_CONST char input[] = "\263";
47492 ICONV_CONST char *inptr = input;
47493 size_t inbytesleft = strlen (input);
47494 char *outptr = buf;
47495 size_t outbytesleft = sizeof (buf);
47496 size_t res = iconv (cd_ascii_to_88591,
47497 &inptr, &inbytesleft,
47498 &outptr, &outbytesleft);
47501 iconv_close (cd_ascii_to_88591);
47504 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
47506 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
47507 if (cd_88591_to_utf8 != (iconv_t)(-1))
47509 static ICONV_CONST char input[] = "\304";
47510 static char buf[2] = { (char)0xDE, (char)0xAD };
47511 ICONV_CONST char *inptr = input;
47512 size_t inbytesleft = 1;
47513 char *outptr = buf;
47514 size_t outbytesleft = 1;
47515 size_t res = iconv (cd_88591_to_utf8,
47516 &inptr, &inbytesleft,
47517 &outptr, &outbytesleft);
47518 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
47520 iconv_close (cd_88591_to_utf8);
47523 #if 0 /* This bug could be worked around by the caller. */
47524 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
47526 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
47527 if (cd_88591_to_utf8 != (iconv_t)(-1))
47529 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
47531 ICONV_CONST char *inptr = input;
47532 size_t inbytesleft = strlen (input);
47533 char *outptr = buf;
47534 size_t outbytesleft = sizeof (buf);
47535 size_t res = iconv (cd_88591_to_utf8,
47536 &inptr, &inbytesleft,
47537 &outptr, &outbytesleft);
47540 iconv_close (cd_88591_to_utf8);
47544 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
47547 /* Try standardized names. */
47548 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
47549 /* Try IRIX, OSF/1 names. */
47550 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
47551 /* Try AIX names. */
47552 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
47553 /* Try HP-UX names. */
47554 iconv_t cd4 = iconv_open ("utf8", "eucJP");
47555 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
47556 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
47558 if (cd1 != (iconv_t)(-1))
47560 if (cd2 != (iconv_t)(-1))
47562 if (cd3 != (iconv_t)(-1))
47564 if (cd4 != (iconv_t)(-1))
47573 if ac_fn_c_try_run "$LINENO"
47575 am_cv_func_iconv_works=yes
47577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47578 conftest.$ac_objext conftest.beam conftest.$ac_ext
47581 test "$am_cv_func_iconv_works" = no || break
47583 LIBS="$am_save_LIBS"
47586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
47587 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
47588 case "$am_cv_func_iconv_works" in
47589 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
47590 *) am_func_iconv=yes ;;
47593 am_func_iconv=no am_cv_lib_iconv=no
47595 if test "$am_func_iconv" = yes; then
47597 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
47600 if test "$am_cv_lib_iconv" = yes; then
47601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
47602 printf %s "checking how to link with libiconv... " >&6; }
47603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
47604 printf "%s\n" "$LIBICONV" >&6; }
47606 CPPFLAGS="$am_save_CPPFLAGS"
47622 acl_save_prefix="$prefix"
47623 prefix="$acl_final_prefix"
47624 acl_save_exec_prefix="$exec_prefix"
47625 exec_prefix="$acl_final_exec_prefix"
47627 eval additional_includedir=\"$includedir\"
47628 eval additional_libdir=\"$libdir\"
47629 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
47630 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
47632 exec_prefix="$acl_save_exec_prefix"
47633 prefix="$acl_save_prefix"
47636 # Check whether --with-libintl-prefix was given.
47637 if test ${with_libintl_prefix+y}
47639 withval=$with_libintl_prefix;
47640 if test "X$withval" = "Xno"; then
47643 if test "X$withval" = "X"; then
47645 acl_save_prefix="$prefix"
47646 prefix="$acl_final_prefix"
47647 acl_save_exec_prefix="$exec_prefix"
47648 exec_prefix="$acl_final_exec_prefix"
47650 eval additional_includedir=\"$includedir\"
47651 eval additional_libdir=\"$libdir\"
47652 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
47653 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
47655 exec_prefix="$acl_save_exec_prefix"
47656 prefix="$acl_save_prefix"
47659 additional_includedir="$withval/include"
47660 additional_libdir="$withval/$acl_libdirstem"
47661 additional_libdir2="$withval/$acl_libdirstem2"
47662 additional_libdir3="$withval/$acl_libdirstem3"
47668 if test "X$additional_libdir2" = "X$additional_libdir"; then
47669 additional_libdir2=
47671 if test "X$additional_libdir3" = "X$additional_libdir"; then
47672 additional_libdir3=
47681 names_already_handled=
47682 names_next_round='intl '
47683 while test -n "$names_next_round"; do
47684 names_this_round="$names_next_round"
47686 for name in $names_this_round; do
47688 for n in $names_already_handled; do
47689 if test "$n" = "$name"; then
47690 already_handled=yes
47694 if test -z "$already_handled"; then
47695 names_already_handled="$names_already_handled $name"
47696 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
47697 eval value=\"\$HAVE_LIB$uppername\"
47698 if test -n "$value"; then
47699 if test "$value" = yes; then
47700 eval value=\"\$LIB$uppername\"
47701 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
47702 eval value=\"\$LTLIB$uppername\"
47703 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
47712 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
47713 if test -n "$acl_shlibext"; then
47714 shrext=".$acl_shlibext" # typically: shrext=.so
47718 if test $use_additional = yes; then
47719 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
47720 if test "X$found_dir" = "X"; then
47721 eval dir=\$$additional_libdir_variable
47722 if test -n "$dir"; then
47723 if test -n "$acl_shlibext"; then
47724 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
47726 found_so="$dir/$libname$shrext"
47728 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
47729 ver=`(cd "$dir" && \
47730 for f in "$libname$shrext".*; do echo "$f"; done \
47731 | sed -e "s,^$libname$shrext\\\\.,," \
47732 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
47733 | sed 1q ) 2>/dev/null`
47734 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
47736 found_so="$dir/$libname$shrext.$ver"
47739 eval library_names=\"$acl_library_names_spec\"
47740 for f in $library_names; do
47741 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
47750 if test "X$found_dir" = "X"; then
47751 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
47753 found_a="$dir/$libname.$acl_libext"
47756 if test "X$found_dir" != "X"; then
47757 if test -f "$dir/$libname.la"; then
47758 found_la="$dir/$libname.la"
47765 if test "X$found_dir" = "X"; then
47766 for x in $LDFLAGS $LTLIBINTL; do
47768 acl_save_prefix="$prefix"
47769 prefix="$acl_final_prefix"
47770 acl_save_exec_prefix="$exec_prefix"
47771 exec_prefix="$acl_final_exec_prefix"
47773 exec_prefix="$acl_save_exec_prefix"
47774 prefix="$acl_save_prefix"
47778 dir=`echo "X$x" | sed -e 's/^X-L//'`
47779 if test -n "$acl_shlibext"; then
47780 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
47782 found_so="$dir/$libname$shrext"
47784 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
47785 ver=`(cd "$dir" && \
47786 for f in "$libname$shrext".*; do echo "$f"; done \
47787 | sed -e "s,^$libname$shrext\\\\.,," \
47788 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
47789 | sed 1q ) 2>/dev/null`
47790 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
47792 found_so="$dir/$libname$shrext.$ver"
47795 eval library_names=\"$acl_library_names_spec\"
47796 for f in $library_names; do
47797 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
47806 if test "X$found_dir" = "X"; then
47807 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
47809 found_a="$dir/$libname.$acl_libext"
47812 if test "X$found_dir" != "X"; then
47813 if test -f "$dir/$libname.la"; then
47814 found_la="$dir/$libname.la"
47819 if test "X$found_dir" != "X"; then
47824 if test "X$found_dir" != "X"; then
47825 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
47826 if test "X$found_so" != "X"; then
47827 if test "$enable_rpath" = no \
47828 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
47829 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
47830 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
47831 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
47834 for x in $ltrpathdirs; do
47835 if test "X$x" = "X$found_dir"; then
47840 if test -z "$haveit"; then
47841 ltrpathdirs="$ltrpathdirs $found_dir"
47843 if test "$acl_hardcode_direct" = yes; then
47844 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
47846 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
47847 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
47849 for x in $rpathdirs; do
47850 if test "X$x" = "X$found_dir"; then
47855 if test -z "$haveit"; then
47856 rpathdirs="$rpathdirs $found_dir"
47860 for x in $LDFLAGS $LIBINTL; do
47862 acl_save_prefix="$prefix"
47863 prefix="$acl_final_prefix"
47864 acl_save_exec_prefix="$exec_prefix"
47865 exec_prefix="$acl_final_exec_prefix"
47867 exec_prefix="$acl_save_exec_prefix"
47868 prefix="$acl_save_prefix"
47870 if test "X$x" = "X-L$found_dir"; then
47875 if test -z "$haveit"; then
47876 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
47878 if test "$acl_hardcode_minus_L" != no; then
47879 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
47881 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
47887 if test "X$found_a" != "X"; then
47888 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
47890 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
47893 additional_includedir=
47894 case "$found_dir" in
47895 */$acl_libdirstem | */$acl_libdirstem/)
47896 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
47897 if test "$name" = 'intl'; then
47898 LIBINTL_PREFIX="$basedir"
47900 additional_includedir="$basedir/include"
47902 */$acl_libdirstem2 | */$acl_libdirstem2/)
47903 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
47904 if test "$name" = 'intl'; then
47905 LIBINTL_PREFIX="$basedir"
47907 additional_includedir="$basedir/include"
47909 */$acl_libdirstem3 | */$acl_libdirstem3/)
47910 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
47911 if test "$name" = 'intl'; then
47912 LIBINTL_PREFIX="$basedir"
47914 additional_includedir="$basedir/include"
47917 if test "X$additional_includedir" != "X"; then
47918 if test "X$additional_includedir" != "X/usr/include"; then
47920 if test "X$additional_includedir" = "X/usr/local/include"; then
47921 if test -n "$GCC"; then
47923 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
47927 if test -z "$haveit"; then
47928 for x in $CPPFLAGS $INCINTL; do
47930 acl_save_prefix="$prefix"
47931 prefix="$acl_final_prefix"
47932 acl_save_exec_prefix="$exec_prefix"
47933 exec_prefix="$acl_final_exec_prefix"
47935 exec_prefix="$acl_save_exec_prefix"
47936 prefix="$acl_save_prefix"
47938 if test "X$x" = "X-I$additional_includedir"; then
47943 if test -z "$haveit"; then
47944 if test -d "$additional_includedir"; then
47945 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
47951 if test -n "$found_la"; then
47952 save_libdir="$libdir"
47953 case "$found_la" in
47954 */* | *\\*) . "$found_la" ;;
47955 *) . "./$found_la" ;;
47957 libdir="$save_libdir"
47958 for dep in $dependency_libs; do
47961 dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
47962 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
47963 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
47964 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
47966 if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
47967 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
47968 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
47969 if test -n "$GCC"; then
47971 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
47975 if test -z "$haveit"; then
47977 for x in $LDFLAGS $LIBINTL; do
47979 acl_save_prefix="$prefix"
47980 prefix="$acl_final_prefix"
47981 acl_save_exec_prefix="$exec_prefix"
47982 exec_prefix="$acl_final_exec_prefix"
47984 exec_prefix="$acl_save_exec_prefix"
47985 prefix="$acl_save_prefix"
47987 if test "X$x" = "X-L$dependency_libdir"; then
47992 if test -z "$haveit"; then
47993 if test -d "$dependency_libdir"; then
47994 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
47998 for x in $LDFLAGS $LTLIBINTL; do
48000 acl_save_prefix="$prefix"
48001 prefix="$acl_final_prefix"
48002 acl_save_exec_prefix="$exec_prefix"
48003 exec_prefix="$acl_final_exec_prefix"
48005 exec_prefix="$acl_save_exec_prefix"
48006 prefix="$acl_save_prefix"
48008 if test "X$x" = "X-L$dependency_libdir"; then
48013 if test -z "$haveit"; then
48014 if test -d "$dependency_libdir"; then
48015 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
48022 dir=`echo "X$dep" | sed -e 's/^X-R//'`
48023 if test "$enable_rpath" != no; then
48025 for x in $rpathdirs; do
48026 if test "X$x" = "X$dir"; then
48031 if test -z "$haveit"; then
48032 rpathdirs="$rpathdirs $dir"
48035 for x in $ltrpathdirs; do
48036 if test "X$x" = "X$dir"; then
48041 if test -z "$haveit"; then
48042 ltrpathdirs="$ltrpathdirs $dir"
48047 dep=`echo "X$dep" | sed -e 's/^X-l//'`
48048 if test "X$dep" != Xc \
48049 || case $host_os in
48050 linux* | gnu* | k*bsd*-gnu) false ;;
48053 names_next_round="$names_next_round $dep"
48057 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
48060 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
48061 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
48067 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
48068 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
48074 if test "X$rpathdirs" != "X"; then
48075 if test -n "$acl_hardcode_libdir_separator"; then
48077 for found_dir in $rpathdirs; do
48078 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
48080 acl_save_libdir="$libdir"
48082 eval flag=\"$acl_hardcode_libdir_flag_spec\"
48083 libdir="$acl_save_libdir"
48084 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
48086 for found_dir in $rpathdirs; do
48087 acl_save_libdir="$libdir"
48088 libdir="$found_dir"
48089 eval flag=\"$acl_hardcode_libdir_flag_spec\"
48090 libdir="$acl_save_libdir"
48091 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
48095 if test "X$ltrpathdirs" != "X"; then
48096 for found_dir in $ltrpathdirs; do
48097 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
48105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
48106 printf %s "checking for GNU gettext in libintl... " >&6; }
48107 if eval test \${$gt_func_gnugettext_libintl+y}
48109 printf %s "(cached) " >&6
48111 gt_save_CPPFLAGS="$CPPFLAGS"
48112 CPPFLAGS="$CPPFLAGS $INCINTL"
48113 gt_save_LIBS="$LIBS"
48114 LIBS="$LIBS $LIBINTL"
48115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48116 /* end confdefs.h. */
48118 #include <libintl.h>
48119 $gt_revision_test_code
48120 extern int _nl_msg_cat_cntr;
48125 const char *_nl_expand_alias (const char *);
48131 bindtextdomain ("", "");
48132 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
48138 if ac_fn_c_try_link "$LINENO"
48140 eval "$gt_func_gnugettext_libintl=yes"
48142 eval "$gt_func_gnugettext_libintl=no"
48144 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48145 conftest$ac_exeext conftest.$ac_ext
48146 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
48147 LIBS="$LIBS $LIBICONV"
48148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48149 /* end confdefs.h. */
48151 #include <libintl.h>
48152 $gt_revision_test_code
48153 extern int _nl_msg_cat_cntr;
48158 const char *_nl_expand_alias (const char *);
48164 bindtextdomain ("", "");
48165 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
48171 if ac_fn_c_try_link "$LINENO"
48173 LIBINTL="$LIBINTL $LIBICONV"
48174 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
48175 eval "$gt_func_gnugettext_libintl=yes"
48178 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48179 conftest$ac_exeext conftest.$ac_ext
48181 CPPFLAGS="$gt_save_CPPFLAGS"
48182 LIBS="$gt_save_LIBS"
48184 eval ac_res=\$$gt_func_gnugettext_libintl
48185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
48186 printf "%s\n" "$ac_res" >&6; }
48189 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
48190 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
48191 && test "$PACKAGE" != gettext-runtime \
48192 && test "$PACKAGE" != gettext-tools; }; then
48193 gt_use_preinstalled_gnugettext=yes
48202 if test -n "$INTL_MACOSX_LIBS"; then
48203 if test "$gt_use_preinstalled_gnugettext" = "yes" \
48204 || test "$nls_cv_use_gnu_gettext" = "yes"; then
48205 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
48206 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
48210 if test "$gt_use_preinstalled_gnugettext" = "yes" \
48211 || test "$nls_cv_use_gnu_gettext" = "yes"; then
48213 printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
48220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
48221 printf %s "checking whether to use NLS... " >&6; }
48222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
48223 printf "%s\n" "$USE_NLS" >&6; }
48224 if test "$USE_NLS" = "yes"; then
48225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
48226 printf %s "checking where the gettext function comes from... " >&6; }
48227 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
48228 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
48229 gt_source="external libintl"
48234 gt_source="included intl directory"
48236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
48237 printf "%s\n" "$gt_source" >&6; }
48240 if test "$USE_NLS" = "yes"; then
48242 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
48243 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
48244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
48245 printf %s "checking how to link with libintl... " >&6; }
48246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
48247 printf "%s\n" "$LIBINTL" >&6; }
48249 for element in $INCINTL; do
48251 for x in $CPPFLAGS; do
48253 acl_save_prefix="$prefix"
48254 prefix="$acl_final_prefix"
48255 acl_save_exec_prefix="$exec_prefix"
48256 exec_prefix="$acl_final_exec_prefix"
48258 exec_prefix="$acl_save_exec_prefix"
48259 prefix="$acl_save_prefix"
48261 if test "X$x" = "X$element"; then
48266 if test -z "$haveit"; then
48267 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
48274 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
48277 printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
48286 INTLLIBS="$LIBINTL"
48294 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
48296 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile gnulib-tests/Makefile man/Makefile po/Makefile.in"
48298 cat >confcache <<\_ACEOF
48299 # This file is a shell script that caches the results of configure
48300 # tests run on this system so they can be shared between configure
48301 # scripts and configure runs, see configure's option --config-cache.
48302 # It is not useful on other systems. If it contains results you don't
48303 # want to keep, you may remove or edit it.
48305 # config.status only pays attention to the cache file if you give it
48306 # the --recheck option to rerun configure.
48308 # `ac_cv_env_foo' variables (set or unset) will be overridden when
48309 # loading this file, other *unset* `ac_cv_foo' will be assigned the
48310 # following values.
48314 # The following way of writing the cache mishandles newlines in values,
48315 # but we know of no workaround that is simple, portable, and efficient.
48316 # So, we kill variables containing newlines.
48317 # Ultrix sh set writes to stderr and can't be redirected directly,
48318 # and sets the high bit in the cache file unless we assign to the vars.
48320 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48321 eval ac_val=\$$ac_var
48325 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48326 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48329 _ | IFS | as_nl) ;; #(
48330 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48331 *) { eval $ac_var=; unset $ac_var;} ;;
48337 case $as_nl`(ac_space=' '; set) 2>&1` in #(
48338 *${as_nl}ac_space=\ *)
48339 # `set' does not quote correctly, so add quotes: double-quote
48340 # substitution turns \\\\ into \\, and sed turns \\ into \.
48343 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48346 # `set' quotes correctly as required by POSIX, so do not add quotes.
48347 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48356 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
48358 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48360 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48361 if test -w "$cache_file"; then
48362 if test "x$cache_file" != "x/dev/null"; then
48363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48364 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
48365 if test ! -f "$cache_file" || test -h "$cache_file"; then
48366 cat confcache >"$cache_file"
48368 case $cache_file in #(
48370 mv -f confcache "$cache_file"$$ &&
48371 mv -f "$cache_file"$$ "$cache_file" ;; #(
48373 mv -f confcache "$cache_file" ;;
48378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48379 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
48384 test "x$prefix" = xNONE && prefix=$ac_default_prefix
48385 # Let make expand exec_prefix.
48386 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48388 DEFS=-DHAVE_CONFIG_H
48393 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48394 # 1. Remove the extension, and $U if already installed.
48395 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48396 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
48397 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
48398 # will be set to the directory where LIBOBJS objects are built.
48399 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48400 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48402 LIBOBJS=$ac_libobjs
48404 LTLIBOBJS=$ac_ltlibobjs
48407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
48408 printf %s "checking that generated files are newer than configure... " >&6; }
48409 if test -n "$am_sleep_pid"; then
48410 # Hide warnings about reused PIDs.
48411 wait $am_sleep_pid 2>/dev/null
48413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
48414 printf "%s\n" "done" >&6; }
48415 if test -n "$EXEEXT"; then
48417 am__EXEEXT_FALSE='#'
48419 am__EXEEXT_TRUE='#'
48423 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
48424 as_fn_error $? "conditional \"AMDEP\" was never defined.
48425 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48427 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
48428 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
48429 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48431 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
48432 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
48433 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48435 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
48436 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
48437 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48439 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
48440 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
48441 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
48442 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48444 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
48445 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
48446 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48448 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
48449 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
48450 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48452 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
48453 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
48454 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48456 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
48457 as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
48458 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48460 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
48461 as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
48462 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48464 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
48465 as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
48466 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48468 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
48469 as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
48470 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48472 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
48473 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
48474 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48476 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
48477 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
48478 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48480 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
48481 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
48482 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48484 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
48485 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
48486 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48488 CONFIG_INCLUDE=lib/config.h
48490 if test -z "${GL_GENERATE_SIGSEGV_H_TRUE}" && test -z "${GL_GENERATE_SIGSEGV_H_FALSE}"; then
48491 as_fn_error $? "conditional \"GL_GENERATE_SIGSEGV_H\" was never defined.
48492 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48494 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
48495 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
48496 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48498 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
48499 as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
48500 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48502 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
48503 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
48504 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48506 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then
48507 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR\" was never defined.
48508 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48510 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE}"; then
48511 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB\" was never defined.
48512 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48514 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
48515 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
48516 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48522 if test -n "$gl_LIBOBJS"; then
48523 # Remove the extension.
48524 sed_drop_objext='s/\.o$//;s/\.obj$//'
48525 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
48526 gl_libobjs="$gl_libobjs $i.$ac_objext"
48527 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
48530 gl_LIBOBJS=$gl_libobjs
48532 gl_LTLIBOBJS=$gl_ltlibobjs
48536 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
48537 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
48538 Usually this means the macro was only invoked conditionally." "$LINENO" 5
48543 if test -n "$gltests_LIBOBJS"; then
48544 # Remove the extension.
48545 sed_drop_objext='s/\.o$//;s/\.obj$//'
48546 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
48547 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
48548 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
48551 gltests_LIBOBJS=$gltests_libobjs
48553 gltests_LTLIBOBJS=$gltests_ltlibobjs
48557 : "${CONFIG_STATUS=./config.status}"
48559 ac_clean_files_save=$ac_clean_files
48560 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48562 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
48564 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48566 # Generated by $as_me.
48567 # Run this file to recreate the current configuration.
48568 # Compiler output produced by configure, useful for debugging
48569 # configure, is in config.log if it exists.
48572 ac_cs_recheck=false
48575 SHELL=\${CONFIG_SHELL-$SHELL}
48578 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48579 ## -------------------- ##
48580 ## M4sh Initialization. ##
48581 ## -------------------- ##
48583 # Be more Bourne compatible
48584 DUALCASE=1; export DUALCASE # for MKS sh
48586 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
48590 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
48591 # is contrary to our usage. Disable this feature.
48592 alias -g '${1+"$@"}'='"$@"'
48593 setopt NO_GLOB_SUBST
48595 case `(set -o) 2>/dev/null` in #(
48605 # Reset variables that may have inherited troublesome values from
48608 # IFS needs to be set, to space, tab, and newline, in precisely that order.
48609 # (If _AS_PATH_WALK were called with IFS unset, it would have the
48610 # side effect of setting IFS to empty, thus disabling word splitting.)
48611 # Quoting is to prevent editors from complaining about space-tab.
48621 # Ensure predictable behavior from utilities with locale-dependent output.
48627 # We cannot yet rely on "unset" to work, but we need these variables
48628 # to be unset--not just set to an empty or harmless value--now, to
48629 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
48630 # also avoids known problems related to "unset" and subshell syntax
48631 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
48632 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
48633 do eval test \${$as_var+y} \
48634 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
48637 # Ensure that fds 0, 1, and 2 are open.
48638 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
48639 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
48640 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
48642 # The user is always right.
48643 if ${PATH_SEPARATOR+false} :; then
48645 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
48646 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48652 # Find who we are. Look in the path if we contain no directory separator.
48655 *[\\/]* ) as_myself=$0 ;;
48656 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48657 for as_dir in $PATH
48660 case $as_dir in #(((
48663 *) as_dir=$as_dir/ ;;
48665 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
48671 # We did not find ourselves, most probably we were run as `sh COMMAND'
48672 # in which case we are not to be found in the path.
48673 if test "x$as_myself" = x; then
48676 if test ! -f "$as_myself"; then
48677 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
48683 # as_fn_error STATUS ERROR [LINENO LOG_FD]
48684 # ----------------------------------------
48685 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
48686 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
48687 # script with STATUS, using 1 if that was 0.
48690 as_status=$1; test $as_status -eq 0 && as_status=1
48692 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
48693 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
48695 printf "%s\n" "$as_me: error: $2" >&2
48696 as_fn_exit $as_status
48701 # as_fn_set_status STATUS
48702 # -----------------------
48703 # Set $? to STATUS, without forking.
48704 as_fn_set_status ()
48707 } # as_fn_set_status
48709 # as_fn_exit STATUS
48710 # -----------------
48711 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
48715 as_fn_set_status $1
48721 # Portably unset VAR.
48724 { eval $1=; unset $1;}
48726 as_unset=as_fn_unset
48728 # as_fn_append VAR VALUE
48729 # ----------------------
48730 # Append the text in VALUE to the end of the definition contained in VAR. Take
48731 # advantage of any shell optimizations that allow amortized linear growth over
48732 # repeated appends, instead of the typical quadratic growth present in naive
48734 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
48736 eval 'as_fn_append ()
48747 # as_fn_arith ARG...
48748 # ------------------
48749 # Perform arithmetic evaluation on the ARGs, and store the result in the
48750 # global $as_val. Take advantage of shells that can avoid forks. The arguments
48751 # must be portable across $(()) and expr.
48752 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
48754 eval 'as_fn_arith ()
48761 as_val=`expr "$@" || test $? -eq 1`
48766 if expr a : '\(a\)' >/dev/null 2>&1 &&
48767 test "X`expr 00001 : '.*\(...\)'`" = X001; then
48773 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
48774 as_basename=basename
48779 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
48785 as_me=`$as_basename -- "$0" ||
48786 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
48787 X"$0" : 'X\(//\)$' \| \
48788 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
48789 printf "%s\n" X/"$0" |
48790 sed '/^.*\/\([^/][^/]*\)\/*$/{
48804 # Avoid depending upon Character Ranges.
48805 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
48806 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
48807 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
48808 as_cr_digits='0123456789'
48809 as_cr_alnum=$as_cr_Letters$as_cr_digits
48812 # Determine whether it's possible to make 'echo' print without a newline.
48813 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
48814 # for compatibility with existing Makefiles.
48815 ECHO_C= ECHO_N= ECHO_T=
48816 case `echo -n x` in #(((((
48818 case `echo 'xy\c'` in
48819 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
48821 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
48828 # For backward compatibility with old third-party macros, we provide
48829 # the shell variables $as_echo and $as_echo_n. New code should use
48830 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
48831 as_echo='printf %s\n'
48832 as_echo_n='printf %s'
48834 rm -f conf$$ conf$$.exe conf$$.file
48835 if test -d conf$$.dir; then
48836 rm -f conf$$.dir/conf$$.file
48839 mkdir conf$$.dir 2>/dev/null
48841 if (echo >conf$$.file) 2>/dev/null; then
48842 if ln -s conf$$.file conf$$ 2>/dev/null; then
48844 # ... but there are two gotchas:
48845 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
48846 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
48847 # In both cases, we have to default to `cp -pR'.
48848 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
48850 elif ln conf$$.file conf$$ 2>/dev/null; then
48858 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
48859 rmdir conf$$.dir 2>/dev/null
48864 # Create "$as_dir" as a directory, including parents if necessary.
48869 -*) as_dir=./$as_dir;;
48871 test -d "$as_dir" || eval $as_mkdir_p || {
48875 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
48876 *) as_qdir=$as_dir;;
48878 as_dirs="'$as_qdir' $as_dirs"
48879 as_dir=`$as_dirname -- "$as_dir" ||
48880 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
48881 X"$as_dir" : 'X\(//\)[^/]' \| \
48882 X"$as_dir" : 'X\(//\)$' \| \
48883 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
48884 printf "%s\n" X"$as_dir" |
48885 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
48889 /^X\(\/\/\)[^/].*/{
48902 test -d "$as_dir" && break
48904 test -z "$as_dirs" || eval "mkdir $as_dirs"
48905 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
48909 if mkdir -p . 2>/dev/null; then
48910 as_mkdir_p='mkdir -p "$as_dir"'
48912 test -d ./-p && rmdir ./-p
48917 # as_fn_executable_p FILE
48918 # -----------------------
48919 # Test if FILE is an executable regular file.
48920 as_fn_executable_p ()
48922 test -f "$1" && test -x "$1"
48923 } # as_fn_executable_p
48924 as_test_x='test -x'
48925 as_executable_p=as_fn_executable_p
48927 # Sed expression to map a string onto a valid CPP name.
48928 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
48930 # Sed expression to map a string onto a valid variable name.
48931 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
48935 ## ----------------------------------- ##
48936 ## Main body of $CONFIG_STATUS script. ##
48937 ## ----------------------------------- ##
48939 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
48941 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
48942 # Save the log message, to keep $0 and so on meaningful, and to
48943 # report actual input values of CONFIG_FILES etc. instead of their
48944 # values after options handling.
48946 This file was extended by GNU diffutils $as_me 3.8, which was
48947 generated by GNU Autoconf 2.71. Invocation command line was
48949 CONFIG_FILES = $CONFIG_FILES
48950 CONFIG_HEADERS = $CONFIG_HEADERS
48951 CONFIG_LINKS = $CONFIG_LINKS
48952 CONFIG_COMMANDS = $CONFIG_COMMANDS
48955 on `(hostname || uname -n) 2>/dev/null | sed 1q`
48960 case $ac_config_files in *"
48961 "*) set x $ac_config_files; shift; ac_config_files=$*;;
48964 case $ac_config_headers in *"
48965 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
48969 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
48970 # Files that config.status was made for.
48971 config_files="$ac_config_files"
48972 config_headers="$ac_config_headers"
48973 config_links="$ac_config_links"
48974 config_commands="$ac_config_commands"
48978 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
48980 \`$as_me' instantiates files and other configuration actions
48981 from templates according to the current configuration. Unless the files
48982 and actions are specified as TAGs, all are instantiated by default.
48984 Usage: $0 [OPTION]... [TAG]...
48986 -h, --help print this help, then exit
48987 -V, --version print version number and configuration settings, then exit
48988 --config print configuration, then exit
48989 -q, --quiet, --silent
48990 do not print progress messages
48991 -d, --debug don't remove temporary files
48992 --recheck update $as_me by reconfiguring in the same conditions
48993 --file=FILE[:TEMPLATE]
48994 instantiate the configuration file FILE
48995 --header=FILE[:TEMPLATE]
48996 instantiate the configuration header FILE
48998 Configuration files:
49001 Configuration headers:
49004 Configuration links:
49007 Configuration commands:
49010 Report bugs to <bug-diffutils@gnu.org>.
49011 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>.
49012 General help using GNU software: <https://www.gnu.org/gethelp/>."
49015 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
49016 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
49017 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49018 ac_cs_config='$ac_cs_config_escaped'
49020 GNU diffutils config.status 3.8
49021 configured by $0, generated by GNU Autoconf 2.71,
49022 with options \\"\$ac_cs_config\\"
49024 Copyright (C) 2021 Free Software Foundation, Inc.
49025 This config.status script is free software; the Free Software Foundation
49026 gives unlimited permission to copy, distribute and modify it."
49033 test -n "\$AWK" || AWK=awk
49036 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49037 # The default lists apply if the user does not specify any file.
49043 ac_option=`expr "X$1" : 'X\([^=]*\)='`
49044 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49048 ac_option=`expr "X$1" : 'X\([^=]*\)='`
49060 # Handling of the options.
49061 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49063 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49064 printf "%s\n" "$ac_cs_version"; exit ;;
49065 --config | --confi | --conf | --con | --co | --c )
49066 printf "%s\n" "$ac_cs_config"; exit ;;
49067 --debug | --debu | --deb | --de | --d | -d )
49069 --file | --fil | --fi | --f )
49072 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49073 '') as_fn_error $? "missing file argument" ;;
49075 as_fn_append CONFIG_FILES " '$ac_optarg'"
49076 ac_need_defaults=false;;
49077 --header | --heade | --head | --hea )
49080 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49082 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49083 ac_need_defaults=false;;
49085 # Conflict between --help and --header
49086 as_fn_error $? "ambiguous option: \`$1'
49087 Try \`$0 --help' for more information.";;
49088 --help | --hel | -h )
49089 printf "%s\n" "$ac_cs_usage"; exit ;;
49090 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49091 | -silent | --silent | --silen | --sile | --sil | --si | --s)
49094 # This is an error.
49095 -*) as_fn_error $? "unrecognized option: \`$1'
49096 Try \`$0 --help' for more information." ;;
49098 *) as_fn_append ac_config_targets " $1"
49099 ac_need_defaults=false ;;
49105 ac_configure_extra_args=
49107 if $ac_cs_silent; then
49109 ac_configure_extra_args="$ac_configure_extra_args --silent"
49113 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49114 if \$ac_cs_recheck; then
49115 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49117 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
49118 CONFIG_SHELL='$SHELL'
49119 export CONFIG_SHELL
49124 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49128 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49129 ## Running $as_me. ##
49131 printf "%s\n" "$ac_log"
49135 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49139 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
49140 GNUmakefile=$GNUmakefile
49141 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
49142 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
49143 # from automake < 1.5.
49144 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
49145 # Capture the value of LINGUAS because we need it to compute CATALOGS.
49146 LINGUAS="${LINGUAS-%UNSET%}"
49151 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49153 # Handling of arguments.
49154 for ac_config_target in $ac_config_targets
49156 case $ac_config_target in
49157 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
49158 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
49159 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
49160 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
49161 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
49162 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
49163 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
49164 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
49165 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
49166 "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;;
49167 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
49168 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
49170 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49175 # If the user did not use the arguments to specify the items to instantiate,
49176 # then the envvar interface is used. Set only those that are not.
49177 # We use the long form for the default assignment because of an extremely
49178 # bizarre bug on SunOS 4.1.3.
49179 if $ac_need_defaults; then
49180 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
49181 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
49182 test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
49183 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
49186 # Have a temporary directory for convenience. Make it in the build tree
49187 # simply because there is no reason against having it here, and in addition,
49188 # creating and moving files from /tmp can sometimes cause problems.
49189 # Hook for its removal unless debugging.
49190 # Note that there is a small window in which the directory will not be cleaned:
49191 # after its creation but before its name has been assigned to `$tmp'.
49195 trap 'exit_status=$?
49196 : "${ac_tmp:=$tmp}"
49197 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49199 trap 'as_fn_exit 1' 1 2 13 15
49201 # Create a (secure) tmp directory for tmp files.
49204 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49208 tmp=./conf$$-$RANDOM
49209 (umask 077 && mkdir "$tmp")
49210 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49213 # Set up the scripts for CONFIG_FILES section.
49214 # No need to generate them if there are no CONFIG_FILES.
49215 # This happens for instance with `./config.status config.h'.
49216 if test -n "$CONFIG_FILES"; then
49219 ac_cr=`echo X | tr X '\015'`
49220 # On cygwin, bash can eat \r inside `` if the user requested igncr.
49221 # But we know of no other shell where ac_cr would be empty at this
49222 # point, so we can use a bashism as a fallback.
49223 if test "x$ac_cr" = x; then
49224 eval ac_cr=\$\'\\r\'
49226 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49227 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49230 ac_cs_awk_cr=$ac_cr
49233 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49238 echo "cat >conf$$subs.awk <<_ACEOF" &&
49239 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49241 } >conf$$subs.sh ||
49242 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49243 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49245 for ac_last_try in false false false false false :; do
49246 . ./conf$$subs.sh ||
49247 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49249 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49250 if test $ac_delim_n = $ac_delim_num; then
49252 elif $ac_last_try; then
49253 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49255 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49258 rm -f conf$$subs.sh
49260 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49261 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49265 s/^/S["/; s/!.*/"]=/
49275 s/\(.\{148\}\)..*/\1/
49277 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49282 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49289 s/\(.\{148\}\)..*/\1/
49291 s/["\\]/\\&/g; s/^/"/; s/$/"/
49295 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49300 ' <conf$$subs.awk | sed '
49305 ' >>$CONFIG_STATUS || ac_write_fail=1
49306 rm -f conf$$subs.awk
49307 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49309 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49310 for (key in S) S_is_set[key] = 1
49316 nfields = split(line, field, "@")
49318 len = length(field[1])
49319 for (i = 2; i < nfields; i++) {
49321 keylen = length(key)
49322 if (S_is_set[key]) {
49324 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49325 len += length(value) + length(field[++i])
49336 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49337 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49338 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49341 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49342 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49345 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49346 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49347 # trailing colons and then remove the whole line if VPATH becomes empty
49348 # (actually we leave an empty line to preserve line numbers).
49349 if test "x$srcdir" = x.; then
49350 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
49368 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49369 fi # test -n "$CONFIG_FILES"
49371 # Set up the scripts for CONFIG_HEADERS section.
49372 # No need to generate them if there are no CONFIG_HEADERS.
49373 # This happens for instance with `./config.status Makefile'.
49374 if test -n "$CONFIG_HEADERS"; then
49375 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49379 # Transform confdefs.h into an awk script `defines.awk', embedded as
49380 # here-document in config.status, that substitutes the proper values into
49381 # config.h.in to produce config.h.
49383 # Create a delimiter string that does not exist in confdefs.h, to ease
49384 # handling of long lines.
49386 for ac_last_try in false false :; do
49387 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49388 if test -z "$ac_tt"; then
49390 elif $ac_last_try; then
49391 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49393 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49397 # For the awk script, D is an array of macro values keyed by name,
49398 # likewise P contains macro parameters if any. Preserve backslash
49399 # newline sequences.
49401 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49403 s/.\{148\}/&'"$ac_delim"'/g
49406 s/^[ ]*#[ ]*define[ ][ ]*/ /
49413 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
49415 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
49419 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
49420 D["\1"]=" \3\\\\\\n"\\/p
49422 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49427 s/.\{148\}/&'"$ac_delim"'/g
49432 s/["\\]/\\&/g; s/^/"/; s/$/"/p
49435 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49437 ' <confdefs.h | sed '
49438 s/'"$ac_delim"'/"\\\
49439 "/g' >>$CONFIG_STATUS || ac_write_fail=1
49441 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49442 for (key in D) D_is_set[key] = 1
49445 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49447 split(line, arg, " ")
49448 if (arg[1] == "#") {
49452 defundef = substr(arg[1], 2)
49455 split(mac1, mac2, "(") #)
49457 prefix = substr(line, 1, index(line, defundef) - 1)
49458 if (D_is_set[macro]) {
49459 # Preserve the white space surrounding the "#".
49460 print prefix "define", macro P[macro] D[macro]
49463 # Replace #undef with comments. This is necessary, for example,
49464 # in the case of _POSIX_SOURCE, which is predefined and required
49465 # on some systems where configure will not decide to define it.
49466 if (defundef == "undef") {
49467 print "/*", prefix defundef, macro, "*/"
49475 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49476 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49477 fi # test -n "$CONFIG_HEADERS"
49480 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
49485 :[FHLC]) ac_mode=$ac_tag; continue;;
49487 case $ac_mode$ac_tag in
49489 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49490 :[FH]-) ac_tag=-:-;;
49491 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49508 -) ac_f="$ac_tmp/stdin";;
49509 *) # Look for the file first in the build tree, then in the source tree
49510 # (if the path is not absolute). The absolute path cannot be DOS-style,
49511 # because $ac_f cannot contain `:'.
49515 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49517 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49519 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49520 as_fn_append ac_file_inputs " '$ac_f'"
49523 # Let's still pretend it is `configure' which instantiates (i.e., don't
49524 # use $as_me), people would be surprised to read:
49525 # /* config.h. Generated by config.status. */
49526 configure_input='Generated from '`
49527 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49529 if test x"$ac_file" != x-; then
49530 configure_input="$ac_file. $configure_input"
49531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49532 printf "%s\n" "$as_me: creating $ac_file" >&6;}
49534 # Neutralize special characters interpreted by sed in replacement strings.
49535 case $configure_input in #(
49536 *\&* | *\|* | *\\* )
49537 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
49538 sed 's/[\\\\&|]/\\\\&/g'`;; #(
49539 *) ac_sed_conf_input=$configure_input;;
49543 *:-:* | *:-) cat >"$ac_tmp/stdin" \
49544 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49549 ac_dir=`$as_dirname -- "$ac_file" ||
49550 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49551 X"$ac_file" : 'X\(//\)[^/]' \| \
49552 X"$ac_file" : 'X\(//\)$' \| \
49553 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49554 printf "%s\n" X"$ac_file" |
49555 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49559 /^X\(\/\/\)[^/].*/{
49572 as_dir="$ac_dir"; as_fn_mkdir_p
49576 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49578 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
49579 # A ".." for each directory in $ac_dir_suffix.
49580 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49581 case $ac_top_builddir_sub in
49582 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49583 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49586 ac_abs_top_builddir=$ac_pwd
49587 ac_abs_builddir=$ac_pwd$ac_dir_suffix
49588 # for backward compatibility:
49589 ac_top_builddir=$ac_top_build_prefix
49592 .) # We are building in place.
49594 ac_top_srcdir=$ac_top_builddir_sub
49595 ac_abs_top_srcdir=$ac_pwd ;;
49596 [\\/]* | ?:[\\/]* ) # Absolute name.
49597 ac_srcdir=$srcdir$ac_dir_suffix;
49598 ac_top_srcdir=$srcdir
49599 ac_abs_top_srcdir=$srcdir ;;
49600 *) # Relative name.
49601 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49602 ac_top_srcdir=$ac_top_build_prefix$srcdir
49603 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49605 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49615 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
49616 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
49618 ac_MKDIR_P=$MKDIR_P
49620 [\\/$]* | ?:[\\/]* ) ;;
49621 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
49625 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49626 # If the template does not know about datarootdir, expand it.
49627 # FIXME: This hack should be removed a few years after 2.60.
49628 ac_datarootdir_hack=; ac_datarootdir_seen=
49639 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
49640 *datarootdir*) ac_datarootdir_seen=yes;;
49641 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
49642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
49643 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
49645 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49646 ac_datarootdir_hack='
49647 s&@datadir@&$datadir&g
49648 s&@docdir@&$docdir&g
49649 s&@infodir@&$infodir&g
49650 s&@localedir@&$localedir&g
49651 s&@mandir@&$mandir&g
49652 s&\\\${datarootdir}&$datarootdir&g' ;;
49656 # Neutralize VPATH when `$srcdir' = `.'.
49657 # Shell code in configure.ac might set extrasub.
49658 # FIXME: do we really want to maintain this feature?
49659 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49660 ac_sed_extra="$ac_vpsub
49663 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49665 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
49666 s|@configure_input@|$ac_sed_conf_input|;t t
49667 s&@top_builddir@&$ac_top_builddir_sub&;t t
49668 s&@top_build_prefix@&$ac_top_build_prefix&;t t
49669 s&@srcdir@&$ac_srcdir&;t t
49670 s&@abs_srcdir@&$ac_abs_srcdir&;t t
49671 s&@top_srcdir@&$ac_top_srcdir&;t t
49672 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
49673 s&@builddir@&$ac_builddir&;t t
49674 s&@abs_builddir@&$ac_abs_builddir&;t t
49675 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
49676 s&@INSTALL@&$ac_INSTALL&;t t
49677 s&@MKDIR_P@&$ac_MKDIR_P&;t t
49678 $ac_datarootdir_hack
49680 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
49681 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49683 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
49684 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
49685 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
49686 "$ac_tmp/out"`; test -z "$ac_out"; } &&
49687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49688 which seems to be undefined. Please make sure it is defined" >&5
49689 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49690 which seems to be undefined. Please make sure it is defined" >&2;}
49692 rm -f "$ac_tmp/stdin"
49694 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
49695 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
49697 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49703 if test x"$ac_file" != x-; then
49705 printf "%s\n" "/* $configure_input */" >&1 \
49706 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
49707 } >"$ac_tmp/config.h" \
49708 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49709 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
49710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
49711 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
49714 mv "$ac_tmp/config.h" "$ac_file" \
49715 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49718 printf "%s\n" "/* $configure_input */" >&1 \
49719 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
49720 || as_fn_error $? "could not create -" "$LINENO" 5
49722 # Compute "$ac_file"'s index in $config_headers.
49725 for _am_header in $config_headers :; do
49726 case $_am_header in
49727 $_am_arg | $_am_arg:* )
49730 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
49733 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
49734 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49735 X"$_am_arg" : 'X\(//\)[^/]' \| \
49736 X"$_am_arg" : 'X\(//\)$' \| \
49737 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
49738 printf "%s\n" X"$_am_arg" |
49739 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49743 /^X\(\/\/\)[^/].*/{
49755 s/.*/./; q'`/stamp-h$_am_stamp_count
49762 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
49765 # Prefer the file from the source tree if names are identical.
49766 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
49767 ac_source=$srcdir/$ac_source
49770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
49771 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
49773 if test ! -r "$ac_source"; then
49774 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
49778 # Try a relative symlink, then a hard link, then a copy.
49780 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
49781 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
49783 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
49784 ln "$ac_source" "$ac_file" 2>/dev/null ||
49785 cp -p "$ac_source" "$ac_file" ||
49786 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
49789 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
49790 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
49795 case $ac_file$ac_mode in
49796 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
49797 # Older Autoconf quotes --file arguments for eval, but not when files
49798 # are listed without --file. Let's play safe and only enable the eval
49799 # if we detect the quoting.
49800 # TODO: see whether this extra hack can be removed once we start
49801 # requiring Autoconf 2.70 or later.
49802 case $CONFIG_FILES in #(
49804 eval set x "$CONFIG_FILES" ;; #(
49806 set x $CONFIG_FILES ;; #(
49811 # Used to flag and report bootstrapping failures.
49815 # Strip MF so we end up with the name of the file.
49816 am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
49817 # Check whether this is an Automake generated Makefile which includes
49818 # dependency-tracking related rules and includes.
49819 # Grep'ing the whole file directly is not great: AIX grep has a line
49820 # limit of 2048, but all sed's we know have understand at least 4000.
49821 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
49823 am_dirpart=`$as_dirname -- "$am_mf" ||
49824 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49825 X"$am_mf" : 'X\(//\)[^/]' \| \
49826 X"$am_mf" : 'X\(//\)$' \| \
49827 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
49828 printf "%s\n" X"$am_mf" |
49829 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49833 /^X\(\/\/\)[^/].*/{
49846 am_filepart=`$as_basename -- "$am_mf" ||
49847 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
49848 X"$am_mf" : 'X\(//\)$' \| \
49849 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
49850 printf "%s\n" X/"$am_mf" |
49851 sed '/^.*\/\([^/][^/]*\)\/*$/{
49864 { echo "$as_me:$LINENO: cd "$am_dirpart" \
49865 && sed -e '/# am--include-marker/d' "$am_filepart" \
49866 | $MAKE -f - am--depfiles" >&5
49867 (cd "$am_dirpart" \
49868 && sed -e '/# am--include-marker/d' "$am_filepart" \
49869 | $MAKE -f - am--depfiles) >&5 2>&5
49871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
49872 (exit $ac_status); } || am_rc=$?
49874 if test $am_rc -ne 0; then
49875 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49876 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
49877 as_fn_error $? "Something went wrong bootstrapping makefile fragments
49878 for automatic dependency tracking. If GNU make was not used, consider
49879 re-running the configure script with MAKE=\"gmake\" (or whatever is
49880 necessary). You can also try re-running configure with the
49881 '--disable-dependency-tracking' option to at least be able to build
49882 the package (albeit without support for automatic dependency tracking).
49883 See \`config.log' for more details" "$LINENO" 5; }
49885 { am_dirpart=; unset am_dirpart;}
49886 { am_filepart=; unset am_filepart;}
49887 { am_mf=; unset am_mf;}
49888 { am_rc=; unset am_rc;}
49889 rm -f conftest-deps.mk
49892 "po-directories":C)
49893 for ac_file in $CONFIG_FILES; do
49894 # Support "outfile[:infile[:infile...]]"
49896 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
49898 # PO directories have a Makefile.in generated from Makefile.in.in.
49899 case "$ac_file" in */Makefile.in)
49900 # Adjust a relative srcdir.
49901 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
49902 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
49903 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
49904 # In autoconf-2.13 it is called $ac_given_srcdir.
49905 # In autoconf-2.50 it is called $srcdir.
49906 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
49907 case "$ac_given_srcdir" in
49908 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
49909 /*) top_srcdir="$ac_given_srcdir" ;;
49910 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
49912 # Treat a directory as a PO directory if and only if it has a
49913 # POTFILES.in file. This allows packages to have multiple PO
49914 # directories under different names or in different locations.
49915 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
49916 rm -f "$ac_dir/POTFILES"
49917 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
49918 gt_tab=`printf '\t'`
49919 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"
49920 POMAKEFILEDEPS="POTFILES.in"
49921 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
49922 # on $ac_dir but don't depend on user-specified configuration
49924 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
49925 # The LINGUAS file contains the set of available languages.
49926 if test -n "$OBSOLETE_ALL_LINGUAS"; then
49927 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
49929 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
49930 # Hide the ALL_LINGUAS assignment from automake < 1.5.
49931 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
49932 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
49934 # The set of available languages was given in configure.in.
49935 # Hide the ALL_LINGUAS assignment from automake < 1.5.
49936 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
49939 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
49940 # Compute UPDATEPOFILES
49941 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
49942 # Compute DUMMYPOFILES
49943 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
49945 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
49946 case "$ac_given_srcdir" in
49948 *) srcdirpre='$(srcdir)/' ;;
49954 for lang in $ALL_LINGUAS; do
49955 POFILES="$POFILES $srcdirpre$lang.po"
49956 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
49957 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
49958 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
49960 # CATALOGS depends on both $ac_dir and the user's LINGUAS
49961 # environment variable.
49963 if test -n "$ALL_LINGUAS"; then
49964 for presentlang in $ALL_LINGUAS; do
49966 if test "%UNSET%" != "$LINGUAS"; then
49967 desiredlanguages="$LINGUAS"
49969 desiredlanguages="$ALL_LINGUAS"
49971 for desiredlang in $desiredlanguages; do
49972 # Use the presentlang catalog if desiredlang is
49973 # a. equal to presentlang, or
49974 # b. a variant of presentlang (because in this case,
49975 # presentlang can be used as a fallback for messages
49976 # which are not translated in the desiredlang catalog).
49977 case "$desiredlang" in
49978 "$presentlang"*) useit=yes;;
49981 if test $useit = yes; then
49982 INST_LINGUAS="$INST_LINGUAS $presentlang"
49987 if test -n "$INST_LINGUAS"; then
49988 for lang in $INST_LINGUAS; do
49989 CATALOGS="$CATALOGS $lang.gmo"
49992 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
49993 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"
49994 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
49995 if test -f "$f"; then
49997 *.orig | *.bak | *~) ;;
49998 *) cat "$f" >> "$ac_dir/Makefile" ;;
50013 ac_clean_files=$ac_clean_files_save
50015 test $ac_write_fail = 0 ||
50016 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50019 # configure is writing to config.log, and then calls config.status.
50020 # config.status does its own redirection, appending to config.log.
50021 # Unfortunately, on DOS this fails, as config.log is still kept open
50022 # by configure, so config.status won't be able to write to it; its
50023 # output is simply discarded. So we exec the FD to /dev/null,
50024 # effectively closing config.log, so it can be properly (re)opened and
50025 # appended to by config.status. When coming back to configure, we
50026 # need to make the FD available again.
50027 if test "$no_create" != yes; then
50029 ac_config_status_args=
50030 test "$silent" = yes &&
50031 ac_config_status_args="$ac_config_status_args --quiet"
50033 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50035 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50036 # would make configure fail if this is the last instruction.
50037 $ac_cs_success || as_fn_exit 1
50039 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50041 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}