2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.72c.20-9c018 for GNU diffutils 3.10.
5 # Report bugs to <bug-diffutils@gnu.org>.
8 # Copyright (C) 1992-1996, 1998-2017, 2020-2023 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
20 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
29 e) 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="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
147 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
148 # is contrary to our usage. Disable this feature.
149 alias -g '\${1+\"\$@\"}'='\"\$@\"'
152 e) 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 e) exitcode=1; echo positional parameters were not saved. ;;
179 test x\$exitcode = x0 || exit 1
180 blah=\$(echo \$(echo blah))
181 test x\"\$blah\" = xblah || exit 1
183 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
184 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
185 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
186 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
187 test \$(( 1 + 1 )) = 2 || exit 1"
188 if (eval "$as_required") 2>/dev/null
192 e) as_have_required=no ;;
195 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
199 e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
201 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
207 *) as_dir=$as_dir/ ;;
212 for as_base in sh bash ksh sh5; do
213 # Try only shells that exist, to save several forks.
214 as_shell=$as_dir$as_base
215 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
216 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
218 CONFIG_SHELL=$as_shell as_have_required=yes
219 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
233 e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
236 CONFIG_SHELL=$SHELL as_have_required=yes
242 if test "x$CONFIG_SHELL" != x
245 # We cannot yet assume a decent shell, so we have to provide a
246 # neutralization value for shells without unset; and this also
247 # works around shells that cannot unset nonexistent variables.
248 # Preserve -v and -x to the replacement shell.
251 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
253 *v*x* | *x*v* ) as_opts=-vx ;;
258 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
259 # Admittedly, this is quite paranoid, since all the known shells bail
260 # out after a failed 'exec'.
261 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
265 if test x$as_have_required = xno
267 printf "%s\n" "$0: This script requires a shell more modern than all"
268 printf "%s\n" "$0: the shells that I found on your system."
269 if test ${ZSH_VERSION+y} ; then
270 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
271 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
273 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
274 $0: bug-diffutils@gnu.org about your system, including any
275 $0: error possibly output before this message. Then install
276 $0: a modern shell, or manually run the script under such a
277 $0: shell if you do have one."
284 SHELL=${CONFIG_SHELL-/bin/sh}
286 # Unset more variables known to interfere with behavior of common tools.
287 CLICOLOR_FORCE= GREP_OPTIONS=
288 unset CLICOLOR_FORCE GREP_OPTIONS
290 ## --------------------- ##
291 ## M4sh Shell Functions. ##
292 ## --------------------- ##
295 # Portably unset VAR.
298 { eval $1=; unset $1;}
303 # as_fn_set_status STATUS
304 # -----------------------
305 # Set $? to STATUS, without forking.
313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
323 # Create "$as_dir" as a directory, including parents if necessary.
328 -*) as_dir=./$as_dir;;
330 test -d "$as_dir" || eval $as_mkdir_p || {
334 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
337 as_dirs="'$as_qdir' $as_dirs"
338 as_dir=`$as_dirname -- "$as_dir" ||
339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340 X"$as_dir" : 'X\(//\)[^/]' \| \
341 X"$as_dir" : 'X\(//\)$' \| \
342 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343 printf "%s\n" X"$as_dir" |
344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
361 test -d "$as_dir" && break
363 test -z "$as_dirs" || eval "mkdir $as_dirs"
364 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
369 # as_fn_executable_p FILE
370 # -----------------------
371 # Test if FILE is an executable regular file.
372 as_fn_executable_p ()
374 test -f "$1" && test -x "$1"
375 } # as_fn_executable_p
376 # as_fn_append VAR VALUE
377 # ----------------------
378 # Append the text in VALUE to the end of the definition contained in VAR. Take
379 # advantage of any shell optimizations that allow amortized linear growth over
380 # repeated appends, instead of the typical quadratic growth present in naive
382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
384 eval 'as_fn_append ()
398 # Perform arithmetic evaluation on the ARGs, and store the result in the
399 # global $as_val. Take advantage of shells that can avoid forks. The arguments
400 # must be portable across $(()) and expr.
401 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
410 as_val=`expr "$@" || test $? -eq 1`
416 # as_fn_error STATUS ERROR [LINENO LOG_FD]
417 # ----------------------------------------
418 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
419 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
420 # script with STATUS, using 1 if that was 0.
423 as_status=$1; test $as_status -eq 0 && as_status=1
425 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
426 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
428 printf "%s\n" "$as_me: error: $2" >&2
429 as_fn_exit $as_status
432 if expr a : '\(a\)' >/dev/null 2>&1 &&
433 test "X`expr 00001 : '.*\(...\)'`" = X001; then
439 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
445 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
451 as_me=`$as_basename -- "$0" ||
452 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
453 X"$0" : 'X\(//\)$' \| \
454 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
455 printf "%s\n" X/"$0" |
456 sed '/^.*\/\([^/][^/]*\)\/*$/{
470 # Avoid depending upon Character Ranges.
471 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
472 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
473 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
474 as_cr_digits='0123456789'
475 as_cr_alnum=$as_cr_Letters$as_cr_digits
478 as_lineno_1=$LINENO as_lineno_1a=$LINENO
479 as_lineno_2=$LINENO as_lineno_2a=$LINENO
480 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
481 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
482 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
496 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
500 chmod +x "$as_me.lineno" ||
501 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
503 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
504 # already done that, so ensure we don't try to do so again and fall
505 # in an infinite loop. This has already happened in practice.
506 _as_can_reexec=no; export _as_can_reexec
507 # Don't try to exec as it changes $[0], causing all sort of problems
508 # (the dirname of $[0] is not the place where we might find the
509 # original and so on. Autoconf is especially sensitive to this).
511 # Exit status is that of the last command.
516 # Determine whether it's possible to make 'echo' print without a newline.
517 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
518 # for compatibility with existing Makefiles.
519 ECHO_C= ECHO_N= ECHO_T=
520 case `echo -n x` in #(((((
522 case `echo 'xy\c'` in
523 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
525 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
532 # For backward compatibility with old third-party macros, we provide
533 # the shell variables $as_echo and $as_echo_n. New code should use
534 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
535 as_echo='printf %s\n'
536 as_echo_n='printf %s'
538 rm -f conf$$ conf$$.exe conf$$.file
539 if test -d conf$$.dir; then
540 rm -f conf$$.dir/conf$$.file
543 mkdir conf$$.dir 2>/dev/null
545 if (echo >conf$$.file) 2>/dev/null; then
546 if ln -s conf$$.file conf$$ 2>/dev/null; then
548 # ... but there are two gotchas:
549 # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
550 # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
551 # In both cases, we have to default to 'cp -pR'.
552 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
554 elif ln conf$$.file conf$$ 2>/dev/null; then
562 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
563 rmdir conf$$.dir 2>/dev/null
565 if mkdir -p . 2>/dev/null; then
566 as_mkdir_p='mkdir -p "$as_dir"'
568 test -d ./-p && rmdir ./-p
573 as_executable_p=as_fn_executable_p
575 # Sed expression to map a string onto a valid CPP name.
576 as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
577 as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
579 # Sed expression to map a string onto a valid variable name.
580 as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
581 as_tr_sh="eval sed '$as_sed_sh'" # deprecated
584 test -n "$DJDIR" || exec 7<&0 </dev/null
588 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
589 # so uname gets run too.
590 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
595 ac_default_prefix=/usr/local
597 ac_config_libobj_dir=.
604 # Identity of this package.
605 PACKAGE_NAME='GNU diffutils'
606 PACKAGE_TARNAME='diffutils'
607 PACKAGE_VERSION='3.10'
608 PACKAGE_STRING='GNU diffutils 3.10'
609 PACKAGE_BUGREPORT='bug-diffutils@gnu.org'
610 PACKAGE_URL='https://www.gnu.org/software/diffutils/'
612 ac_unique_file="src/diff.c"
613 # Factoring default headers for most tests.
614 ac_includes_default="\
625 #ifdef HAVE_INTTYPES_H
626 # include <inttypes.h>
631 #ifdef HAVE_STRINGS_H
632 # include <strings.h>
634 #ifdef HAVE_SYS_TYPES_H
635 # include <sys/types.h>
637 #ifdef HAVE_SYS_STAT_H
638 # include <sys/stat.h>
645 gl_use_threads_default=
646 gl_use_winpthreads_default=no
647 ac_config_libobj_dir=gnulib-tests
649 gl_fnmatch_required=POSIX
650 gl_getopt_required=POSIX
653 ac_subst_vars='gltests_LIBOBJDEPS
667 XGETTEXT_EXTRA_OPTIONS
675 GETTEXT_MACRO_VERSION
683 LIBDIFFUTILS_LTLIBDEPS
685 GL_CFLAG_GNULIB_WARNINGS
686 GL_COND_OBJ_WINDOWS_TLS_FALSE
687 GL_COND_OBJ_WINDOWS_TLS_TRUE
688 GL_COND_OBJ_WINDOWS_THREAD_FALSE
689 GL_COND_OBJ_WINDOWS_THREAD_TRUE
690 GL_COND_OBJ_WCTOMB_FALSE
691 GL_COND_OBJ_WCTOMB_TRUE
692 GL_COND_OBJ_WCTOB_FALSE
693 GL_COND_OBJ_WCTOB_TRUE
695 GL_COND_OBJ_TIME_FALSE
696 GL_COND_OBJ_TIME_TRUE
698 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
700 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
703 GL_COND_OBJ_SYMLINK_FALSE
704 GL_COND_OBJ_SYMLINK_TRUE
705 GL_COND_OBJ_SOCKET_FALSE
706 GL_COND_OBJ_SOCKET_TRUE
707 GL_COND_OBJ_SLEEP_FALSE
708 GL_COND_OBJ_SLEEP_TRUE
709 GL_COND_OBJ_SETSOCKOPT_FALSE
710 GL_COND_OBJ_SETSOCKOPT_TRUE
711 GL_COND_OBJ_SELECT_FALSE
712 GL_COND_OBJ_SELECT_TRUE
716 GL_GNULIB_SCHED_YIELD
717 HAVE_STRUCT_SCHED_PARAM
719 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
723 GL_COND_OBJ_PUTENV_FALSE
724 GL_COND_OBJ_PUTENV_TRUE
725 GL_COND_OBJ_PTHREAD_SIGMASK_FALSE
726 GL_COND_OBJ_PTHREAD_SIGMASK_TRUE
729 GL_COND_OBJ_PTHREAD_THREAD_FALSE
730 GL_COND_OBJ_PTHREAD_THREAD_TRUE
731 GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK
732 GL_GNULIB_PTHREAD_SPIN
733 GL_GNULIB_PTHREAD_TSS
734 GL_GNULIB_PTHREAD_COND
735 GL_GNULIB_PTHREAD_RWLOCK
736 GL_GNULIB_PTHREAD_MUTEX
737 GL_GNULIB_PTHREAD_ONCE
738 GL_GNULIB_PTHREAD_THREAD
741 NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H
743 REPLACE_PTHREAD_SPIN_DESTROY
744 REPLACE_PTHREAD_SPIN_UNLOCK
745 REPLACE_PTHREAD_SPIN_TRYLOCK
746 REPLACE_PTHREAD_SPIN_LOCK
747 REPLACE_PTHREAD_SPIN_INIT
748 REPLACE_PTHREAD_KEY_DELETE
749 REPLACE_PTHREAD_GETSPECIFIC
750 REPLACE_PTHREAD_SETSPECIFIC
751 REPLACE_PTHREAD_KEY_CREATE
752 REPLACE_PTHREAD_COND_DESTROY
753 REPLACE_PTHREAD_COND_BROADCAST
754 REPLACE_PTHREAD_COND_SIGNAL
755 REPLACE_PTHREAD_COND_TIMEDWAIT
756 REPLACE_PTHREAD_COND_WAIT
757 REPLACE_PTHREAD_CONDATTR_DESTROY
758 REPLACE_PTHREAD_CONDATTR_INIT
759 REPLACE_PTHREAD_COND_INIT
760 REPLACE_PTHREAD_RWLOCK_DESTROY
761 REPLACE_PTHREAD_RWLOCK_UNLOCK
762 REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK
763 REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK
764 REPLACE_PTHREAD_RWLOCK_TRYWRLOCK
765 REPLACE_PTHREAD_RWLOCK_TRYRDLOCK
766 REPLACE_PTHREAD_RWLOCK_WRLOCK
767 REPLACE_PTHREAD_RWLOCK_RDLOCK
768 REPLACE_PTHREAD_RWLOCKATTR_DESTROY
769 REPLACE_PTHREAD_RWLOCKATTR_INIT
770 REPLACE_PTHREAD_RWLOCK_INIT
771 REPLACE_PTHREAD_MUTEX_DESTROY
772 REPLACE_PTHREAD_MUTEX_UNLOCK
773 REPLACE_PTHREAD_MUTEX_TIMEDLOCK
774 REPLACE_PTHREAD_MUTEX_TRYLOCK
775 REPLACE_PTHREAD_MUTEX_LOCK
776 REPLACE_PTHREAD_MUTEXATTR_DESTROY
777 REPLACE_PTHREAD_MUTEXATTR_SETROBUST
778 REPLACE_PTHREAD_MUTEXATTR_GETROBUST
779 REPLACE_PTHREAD_MUTEXATTR_SETTYPE
780 REPLACE_PTHREAD_MUTEXATTR_GETTYPE
781 REPLACE_PTHREAD_MUTEXATTR_INIT
782 REPLACE_PTHREAD_MUTEX_INIT
786 REPLACE_PTHREAD_DETACH
787 REPLACE_PTHREAD_EQUAL
789 REPLACE_PTHREAD_ATTR_DESTROY
790 REPLACE_PTHREAD_ATTR_SETDETACHSTATE
791 REPLACE_PTHREAD_ATTR_GETDETACHSTATE
792 REPLACE_PTHREAD_ATTR_INIT
793 REPLACE_PTHREAD_CREATE
794 HAVE_PTHREAD_SPIN_DESTROY
795 HAVE_PTHREAD_SPIN_UNLOCK
796 HAVE_PTHREAD_SPIN_TRYLOCK
797 HAVE_PTHREAD_SPIN_LOCK
798 HAVE_PTHREAD_SPIN_INIT
799 HAVE_PTHREAD_KEY_DELETE
800 HAVE_PTHREAD_GETSPECIFIC
801 HAVE_PTHREAD_SETSPECIFIC
802 HAVE_PTHREAD_KEY_CREATE
803 HAVE_PTHREAD_COND_DESTROY
804 HAVE_PTHREAD_COND_BROADCAST
805 HAVE_PTHREAD_COND_SIGNAL
806 HAVE_PTHREAD_COND_TIMEDWAIT
807 HAVE_PTHREAD_COND_WAIT
808 HAVE_PTHREAD_CONDATTR_DESTROY
809 HAVE_PTHREAD_CONDATTR_INIT
810 HAVE_PTHREAD_COND_INIT
811 HAVE_PTHREAD_RWLOCK_DESTROY
812 HAVE_PTHREAD_RWLOCK_UNLOCK
813 HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
814 HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK
815 HAVE_PTHREAD_RWLOCK_TRYWRLOCK
816 HAVE_PTHREAD_RWLOCK_TRYRDLOCK
817 HAVE_PTHREAD_RWLOCK_WRLOCK
818 HAVE_PTHREAD_RWLOCK_RDLOCK
819 HAVE_PTHREAD_RWLOCKATTR_DESTROY
820 HAVE_PTHREAD_RWLOCKATTR_INIT
821 HAVE_PTHREAD_RWLOCK_INIT
822 HAVE_PTHREAD_MUTEX_DESTROY
823 HAVE_PTHREAD_MUTEX_UNLOCK
824 HAVE_PTHREAD_MUTEX_TIMEDLOCK
825 HAVE_PTHREAD_MUTEX_TRYLOCK
826 HAVE_PTHREAD_MUTEX_LOCK
827 HAVE_PTHREAD_MUTEXATTR_DESTROY
828 HAVE_PTHREAD_MUTEXATTR_SETROBUST
829 HAVE_PTHREAD_MUTEXATTR_GETROBUST
830 HAVE_PTHREAD_MUTEXATTR_SETTYPE
831 HAVE_PTHREAD_MUTEXATTR_GETTYPE
832 HAVE_PTHREAD_MUTEXATTR_INIT
833 HAVE_PTHREAD_MUTEX_INIT
840 HAVE_PTHREAD_ATTR_DESTROY
841 HAVE_PTHREAD_ATTR_SETDETACHSTATE
842 HAVE_PTHREAD_ATTR_GETDETACHSTATE
843 HAVE_PTHREAD_ATTR_INIT
845 HAVE_PTHREAD_PROCESS_SHARED
846 HAVE_PTHREAD_MUTEX_ROBUST
847 HAVE_PTHREAD_MUTEX_RECURSIVE
848 HAVE_PTHREAD_CREATE_DETACHED
849 HAVE_PTHREAD_SPINLOCK_T
853 GL_COND_OBJ_PSELECT_FALSE
854 GL_COND_OBJ_PSELECT_TRUE
856 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
861 GL_COND_OBJ_PIPE_FALSE
862 GL_COND_OBJ_PIPE_TRUE
863 GL_COND_OBJ_PERROR_FALSE
864 GL_COND_OBJ_PERROR_TRUE
865 GL_GENERATE_NETINET_IN_H_FALSE
866 GL_GENERATE_NETINET_IN_H_TRUE
869 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
871 GL_COND_OBJ_NANOSLEEP_FALSE
872 GL_COND_OBJ_NANOSLEEP_TRUE
875 GL_COND_OBJ_LISTEN_FALSE
876 GL_COND_OBJ_LISTEN_TRUE
878 GL_COND_OBJ_IOCTL_FALSE
879 GL_COND_OBJ_IOCTL_TRUE
880 GL_COND_OBJ_INET_PTON_FALSE
881 GL_COND_OBJ_INET_PTON_TRUE
883 GL_COND_OBJ_GETCWD_LGPL_FALSE
884 GL_COND_OBJ_GETCWD_LGPL_TRUE
885 GL_COND_OBJ_FTRUNCATE_FALSE
886 GL_COND_OBJ_FTRUNCATE_TRUE
887 GL_COND_OBJ_ITOLD_FALSE
888 GL_COND_OBJ_ITOLD_TRUE
889 GL_COND_OBJ_FLOAT_FALSE
890 GL_COND_OBJ_FLOAT_TRUE
891 GL_GENERATE_FLOAT_H_FALSE
892 GL_GENERATE_FLOAT_H_TRUE
895 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
897 GL_COND_OBJ_FDOPEN_FALSE
898 GL_COND_OBJ_FDOPEN_TRUE
899 GL_COND_OBJ_CONNECT_FALSE
900 GL_COND_OBJ_CONNECT_TRUE
902 GL_COND_OBJ_BIND_FALSE
903 GL_COND_OBJ_BIND_TRUE
904 GL_COND_OBJ_ATOLL_FALSE
905 GL_COND_OBJ_ATOLL_TRUE
908 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
924 GL_GNULIB_GETSOCKNAME
925 GL_GNULIB_GETPEERNAME
930 GL_COND_OBJ_ACCEPT_FALSE
931 GL_COND_OBJ_ACCEPT_TRUE
934 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
938 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
939 HAVE_STRUCT_SOCKADDR_STORAGE
941 GL_CXXFLAG_ALLOW_WARNINGS
942 GL_CFLAG_ALLOW_WARNINGS
943 GL_COND_OBJ_WMEMPCPY_FALSE
944 GL_COND_OBJ_WMEMPCPY_TRUE
945 GL_COND_OBJ_WMEMCHR_FALSE
946 GL_COND_OBJ_WMEMCHR_TRUE
947 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE
948 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE
949 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE
950 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE
951 GL_COND_OBJ_WINDOWS_ONCE_FALSE
952 GL_COND_OBJ_WINDOWS_ONCE_TRUE
953 GL_COND_OBJ_WINDOWS_MUTEX_FALSE
954 GL_COND_OBJ_WINDOWS_MUTEX_TRUE
955 GL_COND_OBJ_WCWIDTH_FALSE
956 GL_COND_OBJ_WCWIDTH_TRUE
957 GL_COND_OBJ_WCRTOMB_FALSE
958 GL_COND_OBJ_WCRTOMB_TRUE
960 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
962 GL_COND_OBJ_UNSETENV_FALSE
963 GL_COND_OBJ_UNSETENV_TRUE
964 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
965 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
966 LIBUNISTRING_UNIWIDTH_H
967 LIBUNISTRING_UNITYPES_H
968 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE
969 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE
970 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE
971 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE
972 LIBUNISTRING_UNISTR_H
973 HAVE_UNISTRING_WOE32DLL_H
975 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
977 GL_COND_OBJ_TZSET_FALSE
978 GL_COND_OBJ_TZSET_TRUE
979 GL_COND_OBJ_TIMEGM_FALSE
980 GL_COND_OBJ_TIMEGM_TRUE
981 GL_COND_OBJ_TIME_RZ_FALSE
982 GL_COND_OBJ_TIME_RZ_TRUE
983 GL_COND_OBJ_TIME_R_FALSE
984 GL_COND_OBJ_TIME_R_TRUE
985 TIME_H_DEFINES_TIME_UTC
986 UNISTD_H_DEFINES_STRUCT_TIMESPEC
987 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
988 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
989 TIME_H_DEFINES_STRUCT_TIMESPEC
990 NEXT_AS_FIRST_DIRECTIVE_TIME_H
993 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
997 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1000 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
1002 GL_COND_OBJ_STRTOLL_FALSE
1003 GL_COND_OBJ_STRTOLL_TRUE
1004 GL_COND_OBJ_STRTOIMAX_FALSE
1005 GL_COND_OBJ_STRTOIMAX_TRUE
1006 GL_COND_OBJ_STRPTIME_FALSE
1007 GL_COND_OBJ_STRPTIME_TRUE
1008 GL_COND_OBJ_STRNLEN_FALSE
1009 GL_COND_OBJ_STRNLEN_TRUE
1012 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
1014 NEXT_AS_FIRST_DIRECTIVE_STRING_H
1016 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE
1017 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE
1018 GL_COND_OBJ_STRERROR_FALSE
1019 GL_COND_OBJ_STRERROR_TRUE
1020 GL_COND_OBJ_STRNCASECMP_FALSE
1021 GL_COND_OBJ_STRNCASECMP_TRUE
1022 GL_COND_OBJ_STRCASECMP_FALSE
1023 GL_COND_OBJ_STRCASECMP_TRUE
1024 HAVE_DECL_STRNCASECMP
1027 GL_COND_OBJ_STPCPY_FALSE
1028 GL_COND_OBJ_STPCPY_TRUE
1029 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
1031 GL_COND_OBJ_STDIO_WRITE_FALSE
1032 GL_COND_OBJ_STDIO_WRITE_TRUE
1033 GL_COND_OBJ_STDIO_READ_FALSE
1034 GL_COND_OBJ_STDIO_READ_TRUE
1035 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
1037 GL_GENERATE_STDINT_H_FALSE
1038 GL_GENERATE_STDINT_H_TRUE
1040 GL_GENERATE_STDDEF_H_FALSE
1041 GL_GENERATE_STDDEF_H_TRUE
1043 GL_GENERATE_STDCKDINT_H_FALSE
1044 GL_GENERATE_STDCKDINT_H_TRUE
1046 GL_GENERATE_STDARG_H_FALSE
1047 GL_GENERATE_STDARG_H_TRUE
1049 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
1051 GL_COND_OBJ_STAT_FALSE
1052 GL_COND_OBJ_STAT_TRUE
1053 GL_GENERATE_SIGSEGV_H_FALSE
1054 GL_GENERATE_SIGSEGV_H_TRUE
1056 GL_COND_OBJ_SIGPROCMASK_FALSE
1057 GL_COND_OBJ_SIGPROCMASK_TRUE
1058 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
1060 GL_COND_OBJ_SETLOCALE_LOCK_FALSE
1061 GL_COND_OBJ_SETLOCALE_LOCK_TRUE
1062 GL_COND_OBJ_SETENV_FALSE
1063 GL_COND_OBJ_SETENV_TRUE
1064 GL_COND_OBJ_REGEX_FALSE
1065 GL_COND_OBJ_REGEX_TRUE
1066 GL_COND_OBJ_REALLOCARRAY_FALSE
1067 GL_COND_OBJ_REALLOCARRAY_TRUE
1068 GL_COND_OBJ_READLINK_FALSE
1069 GL_COND_OBJ_READLINK_TRUE
1070 GL_COND_OBJ_RAWMEMCHR_FALSE
1071 GL_COND_OBJ_RAWMEMCHR_TRUE
1073 GL_GNULIB_SIGPROCMASK
1074 GL_GNULIB_SIGNAL_H_SIGPIPE
1076 GL_GNULIB_PTHREAD_SIGMASK
1077 GL_COND_OBJ_RAISE_FALSE
1078 GL_COND_OBJ_RAISE_TRUE
1080 REPLACE_PTHREAD_SIGMASK
1082 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
1083 HAVE_STRUCT_SIGACTION_SA_SIGACTION
1088 HAVE_PTHREAD_SIGMASK
1089 HAVE_POSIX_SIGNALBLOCKING
1091 GL_COND_OBJ_OPEN_FALSE
1092 GL_COND_OBJ_OPEN_TRUE
1093 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE
1094 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE
1095 GL_COND_OBJ_NL_LANGINFO_FALSE
1096 GL_COND_OBJ_NL_LANGINFO_TRUE
1098 GL_COND_OBJ_MSVC_NOTHROW_FALSE
1099 GL_COND_OBJ_MSVC_NOTHROW_TRUE
1100 GL_COND_OBJ_MSVC_INVAL_FALSE
1101 GL_COND_OBJ_MSVC_INVAL_TRUE
1106 GL_GNULIB_TIMESPEC_GETRES
1107 GL_GNULIB_TIMESPEC_GET
1120 REPLACE_TIMESPEC_GET
1129 HAVE_TIMESPEC_GETRES
1134 HAVE_DECL_LOCALTIME_R
1135 GL_COND_OBJ_MKSTEMP_FALSE
1136 GL_COND_OBJ_MKSTEMP_TRUE
1137 GL_COND_OBJ_MKDIR_FALSE
1138 GL_COND_OBJ_MKDIR_TRUE
1139 GL_COND_OBJ_MEMPCPY_FALSE
1140 GL_COND_OBJ_MEMPCPY_TRUE
1141 GL_COND_OBJ_MEMCHR_FALSE
1142 GL_COND_OBJ_MEMCHR_TRUE
1143 GL_COND_OBJ_MBTOWC_FALSE
1144 GL_COND_OBJ_MBTOWC_TRUE
1145 GL_COND_OBJ_MBSRTOWCS_FALSE
1146 GL_COND_OBJ_MBSRTOWCS_TRUE
1147 GL_COND_OBJ_MBSINIT_FALSE
1148 GL_COND_OBJ_MBSINIT_TRUE
1151 REPLACE_STRERRORNAME_NP
1172 HAVE_STRERRORNAME_NP
1173 HAVE_DECL_STRERROR_R
1186 HAVE_MEMSET_EXPLICIT
1193 GL_GNULIB_MDA_STRDUP
1194 GL_GNULIB_MDA_MEMCCPY
1195 GL_GNULIB_STRVERSCMP
1197 GL_GNULIB_SIGDESCR_NP
1198 GL_GNULIB_SIGABBREV_NP
1199 GL_GNULIB_STRERRORNAME_NP
1200 GL_GNULIB_STRERROR_R
1207 GL_GNULIB_MBSCASESTR
1208 GL_GNULIB_MBSPCASECMP
1209 GL_GNULIB_MBSNCASECMP
1210 GL_GNULIB_MBSCASECMP
1217 GL_GNULIB_STRCASESTR
1229 GL_GNULIB_MEMSET_EXPLICIT
1236 GL_GNULIB_EXPLICIT_BZERO
1239 GL_COND_OBJ_MBRTOWC_FALSE
1240 GL_COND_OBJ_MBRTOWC_TRUE
1245 GL_COND_OBJ_LSTAT_FALSE
1246 GL_COND_OBJ_LSTAT_TRUE
1252 GL_COND_OBJ_LOCALECONV_FALSE
1253 GL_COND_OBJ_LOCALECONV_TRUE
1254 GL_GNULIB_LOCALENAME
1256 GL_GNULIB_SETLOCALE_NULL
1258 GL_GNULIB_LOCALECONV
1259 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1262 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1267 LOCALENAME_ENHANCE_LOCALE_FUNCS
1268 REPLACE_STRUCT_LCONV
1277 LOCALCHARSET_TESTS_ENVIRONMENT
1278 GL_GENERATE_LIMITS_H_FALSE
1279 GL_GENERATE_LIMITS_H_TRUE
1281 GL_GNULIB_NL_LANGINFO
1282 HAVE_LANGINFO_YESEXPR
1284 HAVE_LANGINFO_ALTMON
1285 HAVE_LANGINFO_T_FMT_AMPM
1286 HAVE_LANGINFO_CODESET
1288 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1292 GL_COND_OBJ_ISWXDIGIT_FALSE
1293 GL_COND_OBJ_ISWXDIGIT_TRUE
1294 GL_COND_OBJ_ISWDIGIT_FALSE
1295 GL_COND_OBJ_ISWDIGIT_TRUE
1306 GL_COND_OBJ_ISWBLANK_FALSE
1307 GL_COND_OBJ_ISWBLANK_TRUE
1311 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
1322 GL_COND_OBJ_ISBLANK_FALSE
1323 GL_COND_OBJ_ISBLANK_TRUE
1328 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1330 UINT64_MAX_EQ_ULONG_MAX
1331 UINT32_MAX_LT_UINTMAX_MAX
1333 INT64_MAX_EQ_LONG_MAX
1334 INT32_MAX_LT_INTMAX_MAX
1356 HAVE_SIGNED_SIG_ATOMIC_T
1359 BITSIZEOF_SIG_ATOMIC_T
1362 APPLE_UNIVERSAL_BUILD
1364 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1369 GNULIBHEADERS_OVERRIDE_WINT_T
1370 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1372 GL_COND_OBJ_ICONV_FALSE
1373 GL_COND_OBJ_ICONV_TRUE
1374 GL_COND_OBJ_ICONV_OPEN_FALSE
1375 GL_COND_OBJ_ICONV_OPEN_TRUE
1376 GL_GENERATE_ICONV_H_FALSE
1377 GL_GENERATE_ICONV_H_TRUE
1379 NEXT_AS_FIRST_DIRECTIVE_ICONV_H
1400 GL_GNULIB_GETTIMEOFDAY
1401 GL_COND_OBJ_GETTIMEOFDAY_FALSE
1402 GL_COND_OBJ_GETTIMEOFDAY_TRUE
1403 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1405 REPLACE_STRUCT_TIMEVAL
1406 REPLACE_GETTIMEOFDAY
1413 GL_COND_OBJ_GETRANDOM_FALSE
1414 GL_COND_OBJ_GETRANDOM_TRUE
1419 GL_COND_OBJ_GETPROGNAME_FALSE
1420 GL_COND_OBJ_GETPROGNAME_TRUE
1421 GL_COND_OBJ_GETPAGESIZE_FALSE
1422 GL_COND_OBJ_GETPAGESIZE_TRUE
1423 GL_COND_OBJ_GETOPT_FALSE
1424 GL_COND_OBJ_GETOPT_TRUE
1425 GL_GENERATE_GETOPT_CDEFS_H_FALSE
1426 GL_GENERATE_GETOPT_CDEFS_H_TRUE
1428 GL_GENERATE_GETOPT_H_FALSE
1429 GL_GENERATE_GETOPT_H_TRUE
1433 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1435 GL_COND_OBJ_GETDTABLESIZE_FALSE
1436 GL_COND_OBJ_GETDTABLESIZE_TRUE
1440 GL_GNULIB_OVERRIDES_STRUCT_STAT
1457 WINDOWS_64_BIT_ST_SIZE
1458 WINDOWS_STAT_TIMESPEC
1459 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1461 GL_COND_OBJ_FSTAT_FALSE
1462 GL_COND_OBJ_FSTAT_TRUE
1488 GL_COND_OBJ_FREOPEN_FALSE
1489 GL_COND_OBJ_FREOPEN_TRUE
1490 GL_COND_OBJ_FREE_FALSE
1491 GL_COND_OBJ_FREE_TRUE
1492 GL_GNULIB_MDA_TEMPNAM
1495 GL_GNULIB_MDA_FILENO
1496 GL_GNULIB_MDA_FDOPEN
1497 GL_GNULIB_MDA_FCLOSEALL
1498 GL_GNULIB_VSPRINTF_POSIX
1500 GL_GNULIB_VPRINTF_POSIX
1502 GL_GNULIB_VFPRINTF_POSIX
1509 GL_GNULIB_STDIO_H_SIGPIPE
1510 GL_GNULIB_STDIO_H_NONBLOCKING
1511 GL_GNULIB_SPRINTF_POSIX
1520 GL_GNULIB_PRINTF_POSIX
1525 GL_GNULIB_OBSTACK_PRINTF_POSIX
1526 GL_GNULIB_OBSTACK_PRINTF
1542 GL_GNULIB_FPRINTF_POSIX
1559 REPLACE_STDIO_WRITE_FUNCS
1560 REPLACE_STDIO_READ_FUNCS
1569 REPLACE_OBSTACK_PRINTF
1579 REPLACE_FOPEN_FOR_FOPEN_GNU
1596 HAVE_DECL_OBSTACK_PRINTF
1604 GL_GENERATE_FNMATCH_H_FALSE
1605 GL_GENERATE_FNMATCH_H_TRUE
1609 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1613 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1619 GL_GNULIB_NONBLOCKING
1622 GL_COND_OBJ_FCNTL_FALSE
1623 GL_COND_OBJ_FCNTL_TRUE
1630 GL_GENERATE_ERROR_H_FALSE
1631 GL_GENERATE_ERROR_H_TRUE
1633 GL_COND_OBJ_ERROR_FALSE
1634 GL_COND_OBJ_ERROR_TRUE
1635 REPLACE_ERROR_AT_LINE
1640 NEXT_AS_FIRST_DIRECTIVE_ERROR_H
1642 GL_GENERATE_ERRNO_H_FALSE
1643 GL_GENERATE_ERRNO_H_TRUE
1651 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1653 GL_COND_OBJ_DUP2_FALSE
1654 GL_COND_OBJ_DUP2_TRUE
1656 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1660 GL_GNULIB_MDA_UNLINK
1665 GL_GNULIB_MDA_ISATTY
1666 GL_GNULIB_MDA_GETPID
1667 GL_GNULIB_MDA_GETCWD
1668 GL_GNULIB_MDA_EXECVPE
1669 GL_GNULIB_MDA_EXECVP
1670 GL_GNULIB_MDA_EXECVE
1672 GL_GNULIB_MDA_EXECLP
1673 GL_GNULIB_MDA_EXECLE
1679 GL_GNULIB_MDA_ACCESS
1684 GL_GNULIB_UNISTD_H_SIGPIPE
1685 GL_GNULIB_UNISTD_H_NONBLOCKING
1686 GL_GNULIB_UNISTD_H_GETOPT
1692 GL_GNULIB_SETHOSTNAME
1694 GL_GNULIB_READLINKAT
1706 GL_GNULIB_GROUP_MEMBER
1707 GL_GNULIB_GETUSERSHELL
1708 GL_GNULIB_GETPASS_GNU
1710 GL_GNULIB_GETPAGESIZE
1711 GL_GNULIB_GETOPT_POSIX
1712 GL_GNULIB_GETLOGIN_R
1714 GL_GNULIB_GETHOSTNAME
1716 GL_GNULIB_GETENTROPY
1717 GL_GNULIB_GETDTABLESIZE
1718 GL_GNULIB_GETDOMAINNAME
1733 GL_GNULIB_EUIDACCESS
1738 GL_GNULIB_COPY_FILE_RANGE
1743 GL_COND_OBJ_CLOSE_FALSE
1744 GL_COND_OBJ_CLOSE_TRUE
1747 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1748 SYS_IOCTL_H_HAVE_WINSOCK2_H
1749 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1750 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1751 UNISTD_H_HAVE_WINSOCK2_H
1752 UNISTD_H_HAVE_SYS_RANDOM_H
1775 REPLACE_GETPASS_FOR_GETPASS_GNU
1781 REPLACE_GETDTABLESIZE
1782 REPLACE_GETDOMAINNAME
1798 REPLACE_COPY_FILE_RANGE
1806 HAVE_DECL_SETHOSTNAME
1807 HAVE_DECL_GETUSERSHELL
1808 HAVE_DECL_GETPAGESIZE
1809 HAVE_DECL_GETLOGIN_R
1811 HAVE_DECL_GETDOMAINNAME
1848 HAVE_COPY_FILE_RANGE
1869 REPLACE_REALLOCARRAY
1870 REPLACE_REALLOC_FOR_REALLOC_POSIX
1871 REPLACE_REALLOC_FOR_REALLOC_GNU
1878 REPLACE_POSIX_OPENPT
1879 REPLACE_POSIX_MEMALIGN
1886 REPLACE_MALLOC_FOR_MALLOC_POSIX
1887 REPLACE_MALLOC_FOR_MALLOC_GNU
1893 REPLACE_CANONICALIZE_FILE_NAME
1894 REPLACE_CALLOC_FOR_CALLOC_POSIX
1895 REPLACE_CALLOC_FOR_CALLOC_GNU
1896 REPLACE_ALIGNED_ALLOC
1901 HAVE_STRUCT_RANDOM_DATA
1935 HAVE_DECL_PROGRAM_INVOCATION_NAME
1936 HAVE_DECL_GETLOADAVG
1940 HAVE_CANONICALIZE_FILE_NAME
1944 GL_GNULIB_MDA_PUTENV
1945 GL_GNULIB_MDA_MKTEMP
1952 GL_GNULIB_SYSTEM_POSIX
1960 GL_GNULIB_SECURE_GETENV
1963 GL_GNULIB_REALLOC_POSIX
1964 GL_GNULIB_REALLOC_GNU
1965 GL_GNULIB_REALLOCARRAY
1972 GL_GNULIB_POSIX_OPENPT
1973 GL_GNULIB_POSIX_MEMALIGN
1981 GL_GNULIB_MALLOC_POSIX
1982 GL_GNULIB_MALLOC_GNU
1985 GL_GNULIB_GETPROGNAME
1986 GL_GNULIB_GETLOADAVG
1987 GL_GNULIB_FREE_POSIX
1988 GL_GNULIB_CANONICALIZE_FILE_NAME
1989 GL_GNULIB_CALLOC_POSIX
1990 GL_GNULIB_CALLOC_GNU
1992 GL_GNULIB_ALIGNED_ALLOC
1994 GL_GNULIB_MDA_WCSDUP
2007 GL_GNULIB_WCSNCASECMP
2008 GL_GNULIB_WCSCASECMP
2026 GL_GNULIB_WCSNRTOMBS
2029 GL_GNULIB_MBSNRTOWCS
2036 GL_COND_OBJ_BTOWC_FALSE
2037 GL_COND_OBJ_BTOWC_TRUE
2101 GL_GENERATE_ASSERT_H_FALSE
2102 GL_GENERATE_ASSERT_H_TRUE
2104 NEXT_AS_FIRST_DIRECTIVE_ASSERT_H
2107 PRAGMA_SYSTEM_HEADER
2108 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
2110 GL_GENERATE_ALLOCA_H_FALSE
2111 GL_GENERATE_ALLOCA_H_TRUE
2115 GL_COND_LIBTOOL_FALSE
2116 GL_COND_LIBTOOL_TRUE
2149 AM_DEFAULT_VERBOSITY
2163 INSTALL_STRIP_PROGRAM
2206 program_transform_name
2220 enable_option_checking
2222 enable_dependency_tracking
2225 enable_cross_guesses
2229 with_libsigsegv_prefix
2230 with_libiconv_prefix
2233 with_packager_version
2234 with_packager_bug_reports
2240 ac_precious_vars='build_alias
2251 # Initialize some variables set by options.
2253 ac_init_version=false
2254 ac_unrecognized_opts=
2255 ac_unrecognized_sep=
2256 # The variables have the same names as the options, with
2257 # dashes changed to underlines.
2258 cache_file=/dev/null
2265 program_transform_name=s,x,x,
2273 # Installation directory options.
2274 # These are left unexpanded so users can "make install exec_prefix=/foo"
2275 # and all the variables that are supposed to be based on exec_prefix
2276 # by default will actually change.
2277 # Use braces instead of parens because sh, perl, etc. also accept them.
2278 # (The list follows the same order as the GNU Coding Standards.)
2279 bindir='${exec_prefix}/bin'
2280 sbindir='${exec_prefix}/sbin'
2281 libexecdir='${exec_prefix}/libexec'
2282 datarootdir='${prefix}/share'
2283 datadir='${datarootdir}'
2284 sysconfdir='${prefix}/etc'
2285 sharedstatedir='${prefix}/com'
2286 localstatedir='${prefix}/var'
2287 runstatedir='${localstatedir}/run'
2288 includedir='${prefix}/include'
2289 oldincludedir='/usr/include'
2290 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2291 infodir='${datarootdir}/info'
2296 libdir='${exec_prefix}/lib'
2297 localedir='${datarootdir}/locale'
2298 mandir='${datarootdir}/man'
2304 # If the previous option needs an argument, assign it.
2305 if test -n "$ac_prev"; then
2306 eval $ac_prev=\$ac_option
2312 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2317 case $ac_dashdash$ac_option in
2321 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2323 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2324 bindir=$ac_optarg ;;
2326 -build | --build | --buil | --bui | --bu)
2327 ac_prev=build_alias ;;
2328 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2329 build_alias=$ac_optarg ;;
2331 -cache-file | --cache-file | --cache-fil | --cache-fi \
2332 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2333 ac_prev=cache_file ;;
2334 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2335 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2336 cache_file=$ac_optarg ;;
2338 --config-cache | -C)
2339 cache_file=config.cache ;;
2341 -datadir | --datadir | --datadi | --datad)
2343 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2344 datadir=$ac_optarg ;;
2346 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2347 | --dataroo | --dataro | --datar)
2348 ac_prev=datarootdir ;;
2349 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2350 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2351 datarootdir=$ac_optarg ;;
2353 -disable-* | --disable-*)
2354 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2355 # Reject names that are not valid shell variable names.
2356 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2357 as_fn_error $? "invalid feature name: '$ac_useropt'"
2358 ac_useropt_orig=$ac_useropt
2359 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2360 case $ac_user_opts in
2362 "enable_$ac_useropt"
2364 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2365 ac_unrecognized_sep=', ';;
2367 eval enable_$ac_useropt=no ;;
2369 -docdir | --docdir | --docdi | --doc | --do)
2371 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2372 docdir=$ac_optarg ;;
2374 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2376 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2377 dvidir=$ac_optarg ;;
2379 -enable-* | --enable-*)
2380 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2381 # Reject names that are not valid shell variable names.
2382 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2383 as_fn_error $? "invalid feature name: '$ac_useropt'"
2384 ac_useropt_orig=$ac_useropt
2385 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2386 case $ac_user_opts in
2388 "enable_$ac_useropt"
2390 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2391 ac_unrecognized_sep=', ';;
2393 eval enable_$ac_useropt=\$ac_optarg ;;
2395 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2396 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2397 | --exec | --exe | --ex)
2398 ac_prev=exec_prefix ;;
2399 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2400 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2401 | --exec=* | --exe=* | --ex=*)
2402 exec_prefix=$ac_optarg ;;
2404 -gas | --gas | --ga | --g)
2405 # Obsolete; use --with-gas.
2408 -help | --help | --hel | --he | -h)
2409 ac_init_help=long ;;
2410 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2411 ac_init_help=recursive ;;
2412 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2413 ac_init_help=short ;;
2415 -host | --host | --hos | --ho)
2416 ac_prev=host_alias ;;
2417 -host=* | --host=* | --hos=* | --ho=*)
2418 host_alias=$ac_optarg ;;
2420 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2422 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2424 htmldir=$ac_optarg ;;
2426 -includedir | --includedir | --includedi | --included | --include \
2427 | --includ | --inclu | --incl | --inc)
2428 ac_prev=includedir ;;
2429 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2430 | --includ=* | --inclu=* | --incl=* | --inc=*)
2431 includedir=$ac_optarg ;;
2433 -infodir | --infodir | --infodi | --infod | --info | --inf)
2435 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2436 infodir=$ac_optarg ;;
2438 -libdir | --libdir | --libdi | --libd)
2440 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2441 libdir=$ac_optarg ;;
2443 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2444 | --libexe | --libex | --libe)
2445 ac_prev=libexecdir ;;
2446 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2447 | --libexe=* | --libex=* | --libe=*)
2448 libexecdir=$ac_optarg ;;
2450 -localedir | --localedir | --localedi | --localed | --locale)
2451 ac_prev=localedir ;;
2452 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2453 localedir=$ac_optarg ;;
2455 -localstatedir | --localstatedir | --localstatedi | --localstated \
2456 | --localstate | --localstat | --localsta | --localst | --locals)
2457 ac_prev=localstatedir ;;
2458 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2459 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2460 localstatedir=$ac_optarg ;;
2462 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2464 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2465 mandir=$ac_optarg ;;
2467 -nfp | --nfp | --nf)
2468 # Obsolete; use --without-fp.
2471 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2472 | --no-cr | --no-c | -n)
2475 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2476 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2479 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2480 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2481 | --oldin | --oldi | --old | --ol | --o)
2482 ac_prev=oldincludedir ;;
2483 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2484 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2485 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2486 oldincludedir=$ac_optarg ;;
2488 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2490 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2491 prefix=$ac_optarg ;;
2493 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2494 | --program-pre | --program-pr | --program-p)
2495 ac_prev=program_prefix ;;
2496 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2497 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2498 program_prefix=$ac_optarg ;;
2500 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2501 | --program-suf | --program-su | --program-s)
2502 ac_prev=program_suffix ;;
2503 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2504 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2505 program_suffix=$ac_optarg ;;
2507 -program-transform-name | --program-transform-name \
2508 | --program-transform-nam | --program-transform-na \
2509 | --program-transform-n | --program-transform- \
2510 | --program-transform | --program-transfor \
2511 | --program-transfo | --program-transf \
2512 | --program-trans | --program-tran \
2513 | --progr-tra | --program-tr | --program-t)
2514 ac_prev=program_transform_name ;;
2515 -program-transform-name=* | --program-transform-name=* \
2516 | --program-transform-nam=* | --program-transform-na=* \
2517 | --program-transform-n=* | --program-transform-=* \
2518 | --program-transform=* | --program-transfor=* \
2519 | --program-transfo=* | --program-transf=* \
2520 | --program-trans=* | --program-tran=* \
2521 | --progr-tra=* | --program-tr=* | --program-t=*)
2522 program_transform_name=$ac_optarg ;;
2524 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2526 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2527 pdfdir=$ac_optarg ;;
2529 -psdir | --psdir | --psdi | --psd | --ps)
2531 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2534 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2535 | -silent | --silent | --silen | --sile | --sil)
2538 -runstatedir | --runstatedir | --runstatedi | --runstated \
2539 | --runstate | --runstat | --runsta | --runst | --runs \
2540 | --run | --ru | --r)
2541 ac_prev=runstatedir ;;
2542 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2543 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2544 | --run=* | --ru=* | --r=*)
2545 runstatedir=$ac_optarg ;;
2547 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2549 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2551 sbindir=$ac_optarg ;;
2553 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2554 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2555 | --sharedst | --shareds | --shared | --share | --shar \
2557 ac_prev=sharedstatedir ;;
2558 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2559 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2560 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2562 sharedstatedir=$ac_optarg ;;
2564 -site | --site | --sit)
2566 -site=* | --site=* | --sit=*)
2569 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2571 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2572 srcdir=$ac_optarg ;;
2574 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2575 | --syscon | --sysco | --sysc | --sys | --sy)
2576 ac_prev=sysconfdir ;;
2577 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2578 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2579 sysconfdir=$ac_optarg ;;
2581 -target | --target | --targe | --targ | --tar | --ta | --t)
2582 ac_prev=target_alias ;;
2583 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2584 target_alias=$ac_optarg ;;
2586 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2589 -version | --version | --versio | --versi | --vers | -V)
2590 ac_init_version=: ;;
2593 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2594 # Reject names that are not valid shell variable names.
2595 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2596 as_fn_error $? "invalid package name: '$ac_useropt'"
2597 ac_useropt_orig=$ac_useropt
2598 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2599 case $ac_user_opts in
2603 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2604 ac_unrecognized_sep=', ';;
2606 eval with_$ac_useropt=\$ac_optarg ;;
2608 -without-* | --without-*)
2609 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2610 # Reject names that are not valid shell variable names.
2611 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2612 as_fn_error $? "invalid package name: '$ac_useropt'"
2613 ac_useropt_orig=$ac_useropt
2614 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2615 case $ac_user_opts in
2619 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2620 ac_unrecognized_sep=', ';;
2622 eval with_$ac_useropt=no ;;
2625 # Obsolete; use --with-x.
2628 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2629 | --x-incl | --x-inc | --x-in | --x-i)
2630 ac_prev=x_includes ;;
2631 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2632 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2633 x_includes=$ac_optarg ;;
2635 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2636 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2637 ac_prev=x_libraries ;;
2638 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2639 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2640 x_libraries=$ac_optarg ;;
2642 -*) as_fn_error $? "unrecognized option: '$ac_option'
2643 Try '$0 --help' for more information"
2647 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2648 # Reject names that are not valid shell variable names.
2649 case $ac_envvar in #(
2650 '' | [0-9]* | *[!_$as_cr_alnum]* )
2651 as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
2653 eval $ac_envvar=\$ac_optarg
2654 export $ac_envvar ;;
2657 # FIXME: should be removed in autoconf 3.0.
2658 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2659 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2660 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2661 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2667 if test -n "$ac_prev"; then
2668 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2669 as_fn_error $? "missing argument to $ac_option"
2672 if test -n "$ac_unrecognized_opts"; then
2673 case $enable_option_checking in
2675 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2676 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2680 # Check all directory arguments for consistency.
2681 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2682 datadir sysconfdir sharedstatedir localstatedir includedir \
2683 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2684 libdir localedir mandir runstatedir
2686 eval ac_val=\$$ac_var
2687 # Remove trailing slashes.
2690 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2691 eval $ac_var=\$ac_val;;
2693 # Be sure to have absolute directory names.
2695 [\\/$]* | ?:[\\/]* ) continue;;
2696 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2698 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2701 # There might be people who depend on the old broken behavior: '$host'
2702 # used to hold the argument of --host etc.
2703 # FIXME: To remove some day.
2706 target=$target_alias
2708 # FIXME: To remove some day.
2709 if test "x$host_alias" != x; then
2710 if test "x$build_alias" = x; then
2711 cross_compiling=maybe
2712 elif test "x$build_alias" != "x$host_alias"; then
2718 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2720 test "$silent" = yes && exec 6>/dev/null
2723 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2724 ac_ls_di=`ls -di .` &&
2725 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2726 as_fn_error $? "working directory cannot be determined"
2727 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2728 as_fn_error $? "pwd does not report name of working directory"
2731 # Find the source files, if location was not specified.
2732 if test -z "$srcdir"; then
2733 ac_srcdir_defaulted=yes
2734 # Try the directory containing this script, then the parent directory.
2735 ac_confdir=`$as_dirname -- "$as_myself" ||
2736 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2737 X"$as_myself" : 'X\(//\)[^/]' \| \
2738 X"$as_myself" : 'X\(//\)$' \| \
2739 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2740 printf "%s\n" X"$as_myself" |
2741 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2759 if test ! -r "$srcdir/$ac_unique_file"; then
2763 ac_srcdir_defaulted=no
2765 if test ! -r "$srcdir/$ac_unique_file"; then
2766 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2767 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2769 ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
2771 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2773 # When building in place, set srcdir=.
2774 if test "$ac_abs_confdir" = "$ac_pwd"; then
2777 # Remove unnecessary trailing slashes from srcdir.
2778 # Double slashes in file names in object file debugging info
2779 # mess up M-x gdb in Emacs.
2781 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2783 for ac_var in $ac_precious_vars; do
2784 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2785 eval ac_env_${ac_var}_value=\$${ac_var}
2786 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2787 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2791 # Report the --help message.
2793 if test "$ac_init_help" = "long"; then
2794 # Omit some internal or obsolete options to make the list less imposing.
2795 # This message is too long to be a string in the A/UX 3.1 sh.
2797 'configure' configures GNU diffutils 3.10 to adapt to many kinds of systems.
2799 Usage: $0 [OPTION]... [VAR=VALUE]...
2801 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2802 VAR=VALUE. See below for descriptions of some of the useful variables.
2804 Defaults for the options are specified in brackets.
2807 -h, --help display this help and exit
2808 --help=short display options specific to this package
2809 --help=recursive display the short help of all the included packages
2810 -V, --version display version information and exit
2811 -q, --quiet, --silent do not print 'checking ...' messages
2812 --cache-file=FILE cache test results in FILE [disabled]
2813 -C, --config-cache alias for '--cache-file=config.cache'
2814 -n, --no-create do not create output files
2815 --srcdir=DIR find the sources in DIR [configure dir or '..']
2817 Installation directories:
2818 --prefix=PREFIX install architecture-independent files in PREFIX
2819 [$ac_default_prefix]
2820 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2823 By default, 'make install' will install all the files in
2824 '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify
2825 an installation prefix other than '$ac_default_prefix' using '--prefix',
2826 for instance '--prefix=\$HOME'.
2828 For better control, use the options below.
2830 Fine tuning of the installation directories:
2831 --bindir=DIR user executables [EPREFIX/bin]
2832 --sbindir=DIR system admin executables [EPREFIX/sbin]
2833 --libexecdir=DIR program executables [EPREFIX/libexec]
2834 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2835 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2836 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2837 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
2838 --libdir=DIR object code libraries [EPREFIX/lib]
2839 --includedir=DIR C header files [PREFIX/include]
2840 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2841 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2842 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2843 --infodir=DIR info documentation [DATAROOTDIR/info]
2844 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2845 --mandir=DIR man documentation [DATAROOTDIR/man]
2846 --docdir=DIR documentation root [DATAROOTDIR/doc/diffutils]
2847 --htmldir=DIR html documentation [DOCDIR]
2848 --dvidir=DIR dvi documentation [DOCDIR]
2849 --pdfdir=DIR pdf documentation [DOCDIR]
2850 --psdir=DIR ps documentation [DOCDIR]
2856 --program-prefix=PREFIX prepend PREFIX to installed program names
2857 --program-suffix=SUFFIX append SUFFIX to installed program names
2858 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2861 --build=BUILD configure for building on BUILD [guessed]
2862 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2866 if test -n "$ac_init_help"; then
2867 case $ac_init_help in
2868 short | recursive ) echo "Configuration of GNU diffutils 3.10:";;
2873 --disable-option-checking ignore unrecognized --enable/--with options
2874 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2875 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2876 --enable-silent-rules less verbose build output (undo: "make V=1")
2877 --disable-silent-rules verbose build output (undo: "make V=0")
2878 --enable-dependency-tracking
2879 do not reject slow dependency extractors
2880 --disable-dependency-tracking
2881 speeds up one-time build
2882 --disable-largefile omit support for large files
2883 --enable-threads={isoc|posix|isoc+posix|windows}
2884 specify multithreading API
2885 --disable-threads build without multithread safety
2886 --enable-cross-guesses={conservative|risky}
2887 specify policy for cross-compilation guesses
2888 --disable-rpath do not hardcode runtime library paths
2889 --enable-gcc-warnings turn on lots of GCC warnings (for developers)
2890 --disable-nls do not use Native Language Support
2891 --disable-year2038 don't support timestamps after 2038
2894 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2895 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2896 --with-libsigsegv use the GNU libsigsegv library, when present,
2897 instead of the gnulib module 'sigsegv'
2898 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2899 --with-libsigsegv-prefix[=DIR] search for libsigsegv in DIR/include and DIR/lib
2900 --without-libsigsegv-prefix don't search for libsigsegv in includedir and libdir
2901 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
2902 --without-libiconv-prefix don't search for libiconv in includedir and libdir
2903 --without-included-regex
2904 don't compile regex; this is the default on systems
2905 with recent-enough versions of the GNU C Library
2906 (use with caution on other systems).
2907 --with-packager String identifying the packager of this software
2908 --with-packager-version Packager-specific version information
2909 --with-packager-bug-reports
2910 Packager info for bug reports (URL/e-mail/...)
2911 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
2912 --without-libintl-prefix don't search for libintl in includedir and libdir
2914 Some influential environment variables:
2915 CC C compiler command
2916 CFLAGS C compiler flags
2917 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2918 nonstandard directory <lib dir>
2919 LIBS libraries to pass to the linker, e.g. -l<library>
2920 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2921 you have headers in a nonstandard directory <include dir>
2924 Use these variables to override the choices made by 'configure' or to help
2925 it to find libraries and programs with nonstandard names/locations.
2927 Report bugs to <bug-diffutils@gnu.org>.
2928 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>.
2929 General help using GNU software: <https://www.gnu.org/gethelp/>.
2934 if test "$ac_init_help" = "recursive"; then
2935 # If there are subdirs, report their specific --help.
2936 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2937 test -d "$ac_dir" ||
2938 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2943 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2945 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2946 # A ".." for each directory in $ac_dir_suffix.
2947 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2948 case $ac_top_builddir_sub in
2949 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2950 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2953 ac_abs_top_builddir=$ac_pwd
2954 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2955 # for backward compatibility:
2956 ac_top_builddir=$ac_top_build_prefix
2959 .) # We are building in place.
2961 ac_top_srcdir=$ac_top_builddir_sub
2962 ac_abs_top_srcdir=$ac_pwd ;;
2963 [\\/]* | ?:[\\/]* ) # Absolute name.
2964 ac_srcdir=$srcdir$ac_dir_suffix;
2965 ac_top_srcdir=$srcdir
2966 ac_abs_top_srcdir=$srcdir ;;
2968 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2969 ac_top_srcdir=$ac_top_build_prefix$srcdir
2970 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2972 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2974 cd "$ac_dir" || { ac_status=$?; continue; }
2975 # Check for configure.gnu first; this name is used for a wrapper for
2976 # Metaconfig's "Configure" on case-insensitive file systems.
2977 if test -f "$ac_srcdir/configure.gnu"; then
2979 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2980 elif test -f "$ac_srcdir/configure"; then
2982 $SHELL "$ac_srcdir/configure" --help=recursive
2984 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2986 cd "$ac_pwd" || { ac_status=$?; break; }
2990 test -n "$ac_init_help" && exit $ac_status
2991 if $ac_init_version; then
2993 GNU diffutils configure 3.10
2994 generated by GNU Autoconf 2.72c.20-9c018
2996 Copyright (C) 2023 Free Software Foundation, Inc.
2997 This configure script is free software; the Free Software Foundation
2998 gives unlimited permission to copy, distribute and modify it.
3003 ## ------------------------ ##
3004 ## Autoconf initialization. ##
3005 ## ------------------------ ##
3007 # ac_fn_c_try_compile LINENO
3008 # --------------------------
3009 # Try to compile conftest.$ac_ext, and return whether this succeeded.
3010 ac_fn_c_try_compile ()
3012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3013 rm -f conftest.$ac_objext conftest.beam
3014 if { { ac_try="$ac_compile"
3016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3017 *) ac_try_echo=$ac_try;;
3019 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3020 printf "%s\n" "$ac_try_echo"; } >&5
3021 (eval "$ac_compile") 2>conftest.err
3023 if test -s conftest.err; then
3024 grep -v '^ *+' conftest.err >conftest.er1
3025 cat conftest.er1 >&5
3026 mv -f conftest.er1 conftest.err
3028 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3029 test $ac_status = 0; } && {
3030 test -z "$ac_c_werror_flag" ||
3031 test ! -s conftest.err
3032 } && test -s conftest.$ac_objext
3036 e) printf "%s\n" "$as_me: failed program was:" >&5
3037 sed 's/^/| /' conftest.$ac_ext >&5
3042 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3043 as_fn_set_status $ac_retval
3045 } # ac_fn_c_try_compile
3047 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3048 # -------------------------------------------------------
3049 # Tests whether HEADER exists and can be compiled using the include files in
3050 # INCLUDES, setting the cache variable VAR accordingly.
3051 ac_fn_c_check_header_compile ()
3053 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3055 printf %s "checking for $2... " >&6; }
3056 if eval test \${$3+y}
3058 printf %s "(cached) " >&6
3060 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3061 /* end confdefs.h. */
3065 if ac_fn_c_try_compile "$LINENO"
3072 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3077 printf "%s\n" "$ac_res" >&6; }
3078 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3080 } # ac_fn_c_check_header_compile
3082 # ac_fn_c_try_cpp LINENO
3083 # ----------------------
3084 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
3087 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3088 if { { ac_try="$ac_cpp conftest.$ac_ext"
3090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3091 *) ac_try_echo=$ac_try;;
3093 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3094 printf "%s\n" "$ac_try_echo"; } >&5
3095 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
3097 if test -s conftest.err; then
3098 grep -v '^ *+' conftest.err >conftest.er1
3099 cat conftest.er1 >&5
3100 mv -f conftest.er1 conftest.err
3102 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3103 test $ac_status = 0; } > conftest.i && {
3104 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3105 test ! -s conftest.err
3110 e) printf "%s\n" "$as_me: failed program was:" >&5
3111 sed 's/^/| /' conftest.$ac_ext >&5
3116 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3117 as_fn_set_status $ac_retval
3121 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3122 # -------------------------------------------
3123 # Tests whether TYPE exists after having included INCLUDES, setting cache
3124 # variable VAR accordingly.
3125 ac_fn_c_check_type ()
3127 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3129 printf %s "checking for $2... " >&6; }
3130 if eval test \${$3+y}
3132 printf %s "(cached) " >&6
3135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3136 /* end confdefs.h. */
3147 if ac_fn_c_try_compile "$LINENO"
3149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3150 /* end confdefs.h. */
3161 if ac_fn_c_try_compile "$LINENO"
3168 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3170 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3175 printf "%s\n" "$ac_res" >&6; }
3176 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3178 } # ac_fn_c_check_type
3180 # ac_fn_c_try_link LINENO
3181 # -----------------------
3182 # Try to link conftest.$ac_ext, and return whether this succeeded.
3185 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3186 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
3187 if { { ac_try="$ac_link"
3189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3190 *) ac_try_echo=$ac_try;;
3192 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3193 printf "%s\n" "$ac_try_echo"; } >&5
3194 (eval "$ac_link") 2>conftest.err
3196 if test -s conftest.err; then
3197 grep -v '^ *+' conftest.err >conftest.er1
3198 cat conftest.er1 >&5
3199 mv -f conftest.er1 conftest.err
3201 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3202 test $ac_status = 0; } && {
3203 test -z "$ac_c_werror_flag" ||
3204 test ! -s conftest.err
3205 } && test -s conftest$ac_exeext && {
3206 test "$cross_compiling" = yes ||
3207 test -x conftest$ac_exeext
3212 e) printf "%s\n" "$as_me: failed program was:" >&5
3213 sed 's/^/| /' conftest.$ac_ext >&5
3218 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3219 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3220 # interfere with the next link command; also delete a directory that is
3221 # left behind by Apple's compiler. We do this before executing the actions.
3222 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3223 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3224 as_fn_set_status $ac_retval
3226 } # ac_fn_c_try_link
3228 # ac_fn_c_try_run LINENO
3229 # ----------------------
3230 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
3231 # executables *can* be run.
3234 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3235 if { { ac_try="$ac_link"
3237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3238 *) ac_try_echo=$ac_try;;
3240 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3241 printf "%s\n" "$ac_try_echo"; } >&5
3242 (eval "$ac_link") 2>&5
3244 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3245 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
3246 { { case "(($ac_try" in
3247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3248 *) ac_try_echo=$ac_try;;
3250 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3251 printf "%s\n" "$ac_try_echo"; } >&5
3252 (eval "$ac_try") 2>&5
3254 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3255 test $ac_status = 0; }; }
3259 e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
3260 printf "%s\n" "$as_me: failed program was:" >&5
3261 sed 's/^/| /' conftest.$ac_ext >&5
3263 ac_retval=$ac_status ;;
3266 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3267 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3268 as_fn_set_status $ac_retval
3272 # ac_fn_c_check_func LINENO FUNC VAR
3273 # ----------------------------------
3274 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3275 ac_fn_c_check_func ()
3277 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3279 printf %s "checking for $2... " >&6; }
3280 if eval test \${$3+y}
3282 printf %s "(cached) " >&6
3284 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3285 /* end confdefs.h. */
3286 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3287 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3288 #define $2 innocuous_$2
3290 /* System header to define __stub macros and hopefully few prototypes,
3291 which can conflict with char $2 (void); below. */
3296 /* Override any GCC internal prototype to avoid an error.
3297 Use char because int might match the return type of a GCC
3298 builtin and then its argument prototype would still apply. */
3303 /* The GNU C library defines this for functions which it implements
3304 to always fail with ENOSYS. Some functions are actually named
3305 something starting with __ and the normal name is an alias. */
3306 #if defined __stub_$2 || defined __stub___$2
3318 if ac_fn_c_try_link "$LINENO"
3325 rm -f core conftest.err conftest.$ac_objext conftest.beam \
3326 conftest$ac_exeext conftest.$ac_ext ;;
3330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3331 printf "%s\n" "$ac_res" >&6; }
3332 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3334 } # ac_fn_c_check_func
3336 # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
3337 # ------------------------------------------------------------------
3338 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3339 # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
3342 ac_save_ac_compile="$ac_compile"
3343 if test -n "$ac_compile_for_check_decl"; then
3344 ac_compile="$ac_compile_for_check_decl"
3346 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3347 as_decl_name=`echo $2|sed 's/ *(.*//'`
3348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3349 printf %s "checking whether $as_decl_name is declared... " >&6; }
3350 if eval test \${$3+y}
3352 printf %s "(cached) " >&6
3354 e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3355 eval ac_save_FLAGS=\$$6
3356 as_fn_append $6 " $5"
3357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3358 /* end confdefs.h. */
3363 #ifndef $as_decl_name
3365 (void) $as_decl_use;
3367 (void) $as_decl_name;
3375 if ac_fn_c_try_compile "$LINENO"
3382 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3383 eval $6=\$ac_save_FLAGS
3388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3389 printf "%s\n" "$ac_res" >&6; }
3390 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3391 ac_compile="$ac_save_ac_compile"
3393 } # ac_fn_check_decl
3395 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3396 # --------------------------------------------
3397 # Tries to find the compile-time value of EXPR in a program that includes
3398 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3400 ac_fn_c_compute_int ()
3402 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3403 if test "$cross_compiling" = yes; then
3404 # Depending upon the size, compute the lo and hi bounds.
3405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3406 /* end confdefs.h. */
3411 static int test_array [1 - 2 * !(($2) >= 0)];
3413 return test_array [0];
3419 if ac_fn_c_try_compile "$LINENO"
3423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3424 /* end confdefs.h. */
3429 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3431 return test_array [0];
3437 if ac_fn_c_try_compile "$LINENO"
3439 ac_hi=$ac_mid; break
3441 e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3442 if test $ac_lo -le $ac_mid; then
3446 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;;
3449 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3452 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3453 /* end confdefs.h. */
3458 static int test_array [1 - 2 * !(($2) < 0)];
3460 return test_array [0];
3466 if ac_fn_c_try_compile "$LINENO"
3470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3471 /* end confdefs.h. */
3476 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3478 return test_array [0];
3484 if ac_fn_c_try_compile "$LINENO"
3486 ac_lo=$ac_mid; break
3488 e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3489 if test $ac_mid -le $ac_hi; then
3493 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;;
3496 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3502 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3505 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3506 # Binary search between lo and hi bounds.
3507 while test "x$ac_lo" != "x$ac_hi"; do
3508 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3510 /* end confdefs.h. */
3515 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3517 return test_array [0];
3523 if ac_fn_c_try_compile "$LINENO"
3527 e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;;
3530 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3533 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3538 /* end confdefs.h. */
3540 static long int longval (void) { return $2; }
3541 static unsigned long int ulongval (void) { return $2; }
3548 FILE *f = fopen ("conftest.val", "w");
3553 long int i = longval ();
3556 fprintf (f, "%ld", i);
3560 unsigned long int i = ulongval ();
3563 fprintf (f, "%lu", i);
3565 /* Do not output a trailing newline, as this causes \r\n confusion
3566 on some platforms. */
3567 return ferror (f) || fclose (f) != 0;
3573 if ac_fn_c_try_run "$LINENO"
3575 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3580 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3581 conftest.$ac_objext conftest.beam conftest.$ac_ext
3585 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3586 as_fn_set_status $ac_retval
3588 } # ac_fn_c_compute_int
3590 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3591 # ----------------------------------------------------
3592 # Tries to find if the field MEMBER exists in type AGGR, after including
3593 # INCLUDES, setting cache variable VAR accordingly.
3594 ac_fn_c_check_member ()
3596 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3598 printf %s "checking for $2.$3... " >&6; }
3599 if eval test \${$4+y}
3601 printf %s "(cached) " >&6
3603 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3604 /* end confdefs.h. */
3616 if ac_fn_c_try_compile "$LINENO"
3620 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3621 /* end confdefs.h. */
3627 if (sizeof ac_aggr.$3)
3633 if ac_fn_c_try_compile "$LINENO"
3640 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3643 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3648 printf "%s\n" "$ac_res" >&6; }
3649 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3651 } # ac_fn_c_check_member
3652 ac_configure_args_raw=
3657 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3659 as_fn_append ac_configure_args_raw " '$ac_arg'"
3662 case $ac_configure_args_raw in
3666 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
3667 ac_unsafe_a="$ac_unsafe_z#~"
3668 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3669 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3672 cat >config.log <<_ACEOF
3673 This file contains any messages produced by compilers while
3674 running configure, to aid debugging if configure makes a mistake.
3676 It was created by GNU diffutils $as_me 3.10, which was
3677 generated by GNU Autoconf 2.72c.20-9c018. Invocation command line was
3679 $ $0$ac_configure_args_raw
3689 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3690 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3691 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3692 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3693 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3695 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3696 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3698 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3699 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3700 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3701 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3702 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3703 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3704 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3712 case $as_dir in #(((
3715 *) as_dir=$as_dir/ ;;
3717 printf "%s\n" "PATH: $as_dir"
3733 # Keep a trace of the command line.
3734 # Strip out --no-create and --no-recursion so they do not pile up.
3735 # Strip out --silent because we don't want to record it for future runs.
3736 # Also quote any args containing shell meta-characters.
3737 # Make two passes to allow for proper duplicate-argument suppression.
3741 ac_must_keep_next=false
3747 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3748 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3749 | -silent | --silent | --silen | --sile | --sil)
3752 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3755 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3757 as_fn_append ac_configure_args1 " '$ac_arg'"
3758 if test $ac_must_keep_next = true; then
3759 ac_must_keep_next=false # Got value, back to normal.
3762 *=* | --config-cache | -C | -disable-* | --disable-* \
3763 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3764 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3765 | -with-* | --with-* | -without-* | --without-* | --x)
3766 case "$ac_configure_args0 " in
3767 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3770 -* ) ac_must_keep_next=true ;;
3773 as_fn_append ac_configure_args " '$ac_arg'"
3778 { ac_configure_args0=; unset ac_configure_args0;}
3779 { ac_configure_args1=; unset ac_configure_args1;}
3781 # When interrupted or exit'd, cleanup temporary files, and complete
3782 # config.log. We remove comments because anyway the quotes in there
3783 # would cause problems or look ugly.
3784 # WARNING: Use '\'' to represent an apostrophe within the trap.
3785 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3786 trap 'exit_status=$?
3789 # Save into config.log some information that might help in debugging.
3793 printf "%s\n" "## ---------------- ##
3794 ## Cache variables. ##
3795 ## ---------------- ##"
3797 # The following way of writing the cache mishandles newlines in values,
3799 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3800 eval ac_val=\$$ac_var
3804 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3805 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3808 _ | IFS | as_nl) ;; #(
3809 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3810 *) { eval $ac_var=; unset $ac_var;} ;;
3815 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3816 *${as_nl}ac_space=\ *)
3818 "s/'\''/'\''\\\\'\'''\''/g;
3819 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3822 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3829 printf "%s\n" "## ----------------- ##
3830 ## Output variables. ##
3831 ## ----------------- ##"
3833 for ac_var in $ac_subst_vars
3835 eval ac_val=\$$ac_var
3837 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3839 printf "%s\n" "$ac_var='\''$ac_val'\''"
3843 if test -n "$ac_subst_files"; then
3844 printf "%s\n" "## ------------------- ##
3845 ## File substitutions. ##
3846 ## ------------------- ##"
3848 for ac_var in $ac_subst_files
3850 eval ac_val=\$$ac_var
3852 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3854 printf "%s\n" "$ac_var='\''$ac_val'\''"
3859 if test -s confdefs.h; then
3860 printf "%s\n" "## ----------- ##
3867 test "$ac_signal" != 0 &&
3868 printf "%s\n" "$as_me: caught signal $ac_signal"
3869 printf "%s\n" "$as_me: exit $exit_status"
3871 rm -f core *.core core.conftest.* &&
3872 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3875 for ac_signal in 1 2 13 15; do
3876 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3880 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3881 rm -f -r conftest* confdefs.h
3883 printf "%s\n" "/* confdefs.h */" > confdefs.h
3885 # Predefined preprocessor variables.
3887 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3889 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3891 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3893 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3895 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3897 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3900 # Let the site file select an alternate cache file if it wants to.
3901 # Prefer an explicitly selected file to automatically selected ones.
3902 if test -n "$CONFIG_SITE"; then
3903 ac_site_files="$CONFIG_SITE"
3904 elif test "x$prefix" != xNONE; then
3905 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
3907 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
3910 for ac_site_file in $ac_site_files
3912 case $ac_site_file in #(
3916 ac_site_file=./$ac_site_file ;;
3918 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
3919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3920 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3921 sed 's/^/| /' "$ac_site_file" >&5
3923 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3924 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3925 as_fn_error $? "failed to load site script $ac_site_file
3926 See 'config.log' for more details" "$LINENO" 5; }
3930 if test -r "$cache_file"; then
3931 # Some versions of bash will fail to source /dev/null (special files
3932 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3933 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3935 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3937 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3938 *) . "./$cache_file";;
3942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3943 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3947 # Test code for whether the C compiler supports C89 (global declarations)
3948 ac_c_conftest_c89_globals='
3949 /* Does the compiler advertise C89 conformance?
3950 Do not test the value of __STDC__, because some compilers set it to 0
3951 while being otherwise adequately conformant. */
3952 #if !defined __STDC__
3953 # error "Compiler does not advertise C89 conformance"
3959 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
3960 struct buf { int x; };
3961 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
3962 static char *e (char **p, int i)
3966 static char *f (char * (*g) (char **, int), char **p, ...)
3971 s = g (p, va_arg (v,int));
3976 /* C89 style stringification. */
3977 #define noexpand_stringify(a) #a
3978 const char *stringified = noexpand_stringify(arbitrary+token=sequence);
3980 /* C89 style token pasting. Exercises some of the corner cases that
3981 e.g. old MSVC gets wrong, but not very hard. */
3982 #define noexpand_concat(a,b) a##b
3983 #define expand_concat(a,b) noexpand_concat(a,b)
3988 int *pvA = &expand_concat(v,aye);
3989 int *pvbee = &noexpand_concat(v,bee);
3991 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3992 function prototypes and stuff, but not \xHH hex character constants.
3993 These do not provoke an error unfortunately, instead are silently treated
3994 as an "x". The following induces an error, until -std is added to get
3995 proper ANSI mode. Curiously \x00 != x always comes out true, for an
3996 array size at least. It is necessary to write \x00 == 0 to get something
3997 that is true only with -std. */
3998 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
4000 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4001 inside strings and character constants. */
4002 #define FOO(x) '\''x'\''
4003 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
4005 int test (int i, double x);
4006 struct s1 {int (*f) (int a);};
4007 struct s2 {int (*f) (double a);};
4008 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
4011 # Test code for whether the C compiler supports C89 (body of main).
4012 ac_c_conftest_c89_main='
4013 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
4016 # Test code for whether the C compiler supports C99 (global declarations)
4017 ac_c_conftest_c99_globals='
4018 // Does the compiler advertise C99 conformance?
4019 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
4020 # error "Compiler does not advertise C99 conformance"
4023 #include <stdbool.h>
4024 extern int puts (const char *);
4025 extern int printf (const char *, ...);
4026 extern int dprintf (int, const char *, ...);
4027 extern void *malloc (size_t);
4028 extern void free (void *);
4030 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4031 // dprintf is used instead of fprintf to avoid needing to declare
4033 #define debug(...) dprintf (2, __VA_ARGS__)
4034 #define showlist(...) puts (#__VA_ARGS__)
4035 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4037 test_varargs_macros (void)
4042 debug ("X = %d\n", x);
4043 showlist (The first, second, and third items.);
4044 report (x>y, "x is %d but y is %d", x, y);
4047 // Check long long types.
4048 #define BIG64 18446744073709551615ull
4049 #define BIG32 4294967295ul
4050 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4052 #error "your preprocessor is broken"
4056 #error "your preprocessor is broken"
4058 static long long int bignum = -9223372036854775807LL;
4059 static unsigned long long int ubignum = BIG64;
4061 struct incomplete_array
4069 const wchar_t *name;
4073 typedef const char *ccp;
4076 test_restrict (ccp restrict text)
4078 // See if C++-style comments work.
4079 // Iterate through items via the restricted pointer.
4080 // Also check for declarations in for loops.
4081 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
4086 // Check varargs and va_copy.
4088 test_varargs (const char *format, ...)
4091 va_start (args, format);
4093 va_copy (args_copy, args);
4095 const char *str = "";
4103 case '\''s'\'': // string
4104 str = va_arg (args_copy, const char *);
4106 case '\''d'\'': // int
4107 number = va_arg (args_copy, int);
4109 case '\''f'\'': // float
4110 fnumber = va_arg (args_copy, double);
4119 return *str && number && fnumber;
4123 # Test code for whether the C compiler supports C99 (body of main).
4124 ac_c_conftest_c99_main='
4126 _Bool success = false;
4127 success |= (argc != 0);
4130 if (test_restrict ("String literal") == 0)
4132 char *restrict newvar = "Another string";
4135 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
4136 test_varargs_macros ();
4138 // Check flexible array members.
4139 struct incomplete_array *ia =
4140 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4142 for (int i = 0; i < ia->datasize; ++i)
4143 ia->data[i] = i * 1.234;
4144 // Work around memory leak warnings.
4147 // Check named initializers.
4148 struct named_init ni = {
4150 .name = L"Test wide string",
4151 .average = 543.34343,
4156 int dynamic_array[ni.number];
4157 dynamic_array[0] = argv[0][0];
4158 dynamic_array[ni.number - 1] = 543;
4160 // work around unused variable warnings
4161 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
4162 || dynamic_array[ni.number - 1] != 543);
4165 # Test code for whether the C compiler supports C11 (global declarations)
4166 ac_c_conftest_c11_globals='
4167 // Does the compiler advertise C11 conformance?
4168 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
4169 # error "Compiler does not advertise C11 conformance"
4173 char _Alignas (double) aligned_as_double;
4174 char _Alignas (0) no_special_alignment;
4175 extern char aligned_as_int;
4176 char _Alignas (0) _Alignas (int) aligned_as_int;
4181 int_alignment = _Alignof (int),
4182 int_array_alignment = _Alignof (int[100]),
4183 char_alignment = _Alignof (char)
4185 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4188 int _Noreturn does_not_return (void) { for (;;) continue; }
4190 // Check _Static_assert.
4191 struct test_static_assert
4194 _Static_assert (sizeof (int) <= sizeof (long int),
4195 "_Static_assert does not work in struct");
4199 // Check UTF-8 literals.
4200 #define u8 syntax error!
4201 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4203 // Check duplicate typedefs.
4204 typedef long *long_ptr;
4205 typedef long int *long_ptr;
4206 typedef long_ptr long_ptr;
4208 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4212 struct { int i; int j; };
4213 struct { int k; long int l; } w;
4219 # Test code for whether the C compiler supports C11 (body of main).
4220 ac_c_conftest_c11_main='
4221 _Static_assert ((offsetof (struct anonymous, i)
4222 == offsetof (struct anonymous, w.k)),
4223 "Anonymous union alignment botch");
4229 # Test code for whether the C compiler supports C11 (complete).
4230 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
4231 ${ac_c_conftest_c99_globals}
4232 ${ac_c_conftest_c11_globals}
4235 main (int argc, char **argv)
4238 ${ac_c_conftest_c89_main}
4239 ${ac_c_conftest_c99_main}
4240 ${ac_c_conftest_c11_main}
4245 # Test code for whether the C compiler supports C99 (complete).
4246 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
4247 ${ac_c_conftest_c99_globals}
4250 main (int argc, char **argv)
4253 ${ac_c_conftest_c89_main}
4254 ${ac_c_conftest_c99_main}
4259 # Test code for whether the C compiler supports C89 (complete).
4260 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
4263 main (int argc, char **argv)
4266 ${ac_c_conftest_c89_main}
4271 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
4272 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
4273 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
4274 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
4275 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
4276 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
4277 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
4278 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
4279 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
4280 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
4281 as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
4282 as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
4283 as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
4284 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
4285 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
4286 as_fn_append ac_header_c_list " error.h error_h HAVE_ERROR_H"
4287 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
4288 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
4289 as_fn_append ac_header_c_list " fnmatch.h fnmatch_h HAVE_FNMATCH_H"
4290 as_fn_append ac_func_c_list " fnmatch HAVE_FNMATCH"
4291 as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS"
4292 gl_fnmatch_required=GNU
4293 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
4294 gl_getopt_required=GNU
4295 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
4296 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
4297 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
4298 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
4299 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
4300 as_fn_append ac_header_c_list " threads.h threads_h HAVE_THREADS_H"
4301 as_fn_append ac_header_c_list " iconv.h iconv_h HAVE_ICONV_H"
4302 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
4303 as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
4304 as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
4305 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
4306 as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
4307 as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
4308 as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
4309 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
4310 as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
4311 as_fn_append ac_func_c_list " mbslen HAVE_MBSLEN"
4312 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
4313 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
4314 as_fn_append ac_func_c_list " mkstemp HAVE_MKSTEMP"
4315 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
4316 as_fn_append ac_func_c_list " readlink HAVE_READLINK"
4317 as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
4318 as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
4319 as_fn_append ac_func_c_list " setenv HAVE_SETENV"
4320 as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
4321 as_fn_append ac_func_c_list " setrlimit HAVE_SETRLIMIT"
4322 as_fn_append ac_func_c_list " getrlimit HAVE_GETRLIMIT"
4323 as_fn_append ac_header_c_list " stdbool.h stdbool_h HAVE_STDBOOL_H"
4324 as_fn_append ac_header_c_list " stdckdint.h stdckdint_h HAVE_STDCKDINT_H"
4325 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
4326 as_fn_append ac_func_c_list " strptime HAVE_STRPTIME"
4327 as_fn_append ac_func_c_list " strtoimax HAVE_STRTOIMAX"
4328 as_fn_append ac_header_c_list " sys/random.h sys_random_h HAVE_SYS_RANDOM_H"
4329 as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
4330 as_fn_append ac_func_c_list " localtime_r HAVE_LOCALTIME_R"
4331 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
4332 as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
4333 as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH"
4334 as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
4335 as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
4336 as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
4337 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
4338 as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
4339 as_fn_append ac_func_c_list " pselect HAVE_PSELECT"
4340 as_fn_append ac_header_c_list " pthread.h pthread_h HAVE_PTHREAD_H"
4341 as_fn_append ac_func_c_list " pthread_sigmask HAVE_PTHREAD_SIGMASK"
4342 as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
4343 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
4344 as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
4345 as_fn_append ac_func_c_list " shutdown HAVE_SHUTDOWN"
4346 as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
4347 as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
4348 as_fn_append ac_func_c_list " wctob HAVE_WCTOB"
4349 as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
4350 as_fn_append ac_func_c_list " sigprocmask HAVE_SIGPROCMASK"
4351 as_fn_append ac_func_c_list " strcasecoll HAVE_STRCASECOLL"
4352 as_fn_append ac_func_c_list " stricoll HAVE_STRICOLL"
4353 as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
4354 as_fn_append ac_func_c_list " fork HAVE_FORK"
4355 as_fn_append ac_func_c_list " vfork HAVE_VFORK"
4356 gt_needs="$gt_needs need-ngettext"
4358 # Auxiliary files required by this configure script.
4359 ac_aux_files="config.rpath config.guess config.sub compile missing install-sh"
4361 # Locations in which to look for auxiliary files.
4362 ac_aux_dir_candidates="${srcdir}/build-aux"
4364 # Search for a directory containing all of the required auxiliary files,
4365 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
4366 # If we don't find one directory that contains all the files we need,
4367 # we report the set of missing files from the *first* directory in
4368 # $ac_aux_dir_candidates and give up.
4369 ac_missing_aux_files=""
4370 ac_first_candidate=:
4371 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
4372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4374 for as_dir in $ac_aux_dir_candidates
4377 case $as_dir in #(((
4380 *) as_dir=$as_dir/ ;;
4384 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
4385 ac_aux_dir_found=yes
4387 for ac_aux in $ac_aux_files
4389 # As a special case, if "install-sh" is required, that requirement
4390 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
4391 # and $ac_install_sh is set appropriately for whichever one is found.
4392 if test x"$ac_aux" = x"install-sh"
4394 if test -f "${as_dir}install-sh"; then
4395 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
4396 ac_install_sh="${as_dir}install-sh -c"
4397 elif test -f "${as_dir}install.sh"; then
4398 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
4399 ac_install_sh="${as_dir}install.sh -c"
4400 elif test -f "${as_dir}shtool"; then
4401 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
4402 ac_install_sh="${as_dir}shtool install -c"
4405 if $ac_first_candidate; then
4406 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
4412 if test -f "${as_dir}${ac_aux}"; then
4413 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
4416 if $ac_first_candidate; then
4417 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
4424 if test "$ac_aux_dir_found" = yes; then
4425 ac_aux_dir="$as_dir"
4428 ac_first_candidate=false
4437 e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;;
4442 # These three variables are undocumented and unsupported,
4443 # and are intended to be withdrawn in a future Autoconf release.
4444 # They can cause serious problems if a builder's source tree is in a directory
4445 # whose full name contains unusual characters.
4446 if test -f "${ac_aux_dir}config.guess"; then
4447 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
4449 if test -f "${ac_aux_dir}config.sub"; then
4450 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
4452 if test -f "$ac_aux_dir/configure"; then
4453 ac_configure="$SHELL ${ac_aux_dir}configure"
4456 # Check that the precious variables saved in the cache have kept the same
4458 ac_cache_corrupted=false
4459 for ac_var in $ac_precious_vars; do
4460 eval ac_old_set=\$ac_cv_env_${ac_var}_set
4461 eval ac_new_set=\$ac_env_${ac_var}_set
4462 eval ac_old_val=\$ac_cv_env_${ac_var}_value
4463 eval ac_new_val=\$ac_env_${ac_var}_value
4464 case $ac_old_set,$ac_new_set in
4466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
4467 printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
4468 ac_cache_corrupted=: ;;
4470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
4471 printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
4472 ac_cache_corrupted=: ;;
4475 if test "x$ac_old_val" != "x$ac_new_val"; then
4476 # differences in whitespace do not lead to failure.
4477 ac_old_val_w=`echo x $ac_old_val`
4478 ac_new_val_w=`echo x $ac_new_val`
4479 if test "$ac_old_val_w" != "$ac_new_val_w"; then
4480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
4481 printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
4482 ac_cache_corrupted=:
4484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
4485 printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
4486 eval $ac_var=\$ac_old_val
4488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5
4489 printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;}
4490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5
4491 printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;}
4494 # Pass precious variables to config.status.
4495 if test "$ac_new_set" = set; then
4497 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
4498 *) ac_arg=$ac_var=$ac_new_val ;;
4500 case " $ac_configure_args " in
4501 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
4502 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
4506 if $ac_cache_corrupted; then
4507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4508 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
4509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
4510 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
4511 as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
4512 and start over" "$LINENO" 5
4514 ## -------------------- ##
4515 ## Main body of script. ##
4516 ## -------------------- ##
4519 ac_cpp='$CPP $CPPFLAGS'
4520 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4521 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4522 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4530 am__api_version='1.16'
4534 # Find a good install program. We prefer a C program (faster),
4535 # so one script is as good as another. But avoid the broken or
4536 # incompatible versions:
4537 # SysV /etc/install, /usr/sbin/install
4538 # SunOS /usr/etc/install
4539 # IRIX /sbin/install
4541 # AmigaOS /C/install, which installs bootblocks on floppy discs
4542 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4543 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4544 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4545 # OS/2's system install, which has a completely different semantic
4546 # ./install, which can be erroneously created by make from ./install.sh.
4547 # Reject install programs that cannot install multiple files.
4548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4549 printf %s "checking for a BSD-compatible install... " >&6; }
4550 if test -z "$INSTALL"; then
4551 if test ${ac_cv_path_install+y}
4553 printf %s "(cached) " >&6
4555 e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4559 case $as_dir in #(((
4562 *) as_dir=$as_dir/ ;;
4564 # Account for fact that we put trailing slashes in our PATH walk.
4567 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4568 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4571 # OSF1 and SCO ODT 3.0 have their own names for install.
4572 # Don't use installbsd from OSF since it installs stuff as root
4574 for ac_prog in ginstall scoinst install; do
4575 for ac_exec_ext in '' $ac_executable_extensions; do
4576 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
4577 if test $ac_prog = install &&
4578 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4579 # AIX install. It has an incompatible calling convention.
4581 elif test $ac_prog = install &&
4582 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4583 # program-specific install script used by HP pwplus--don't use.
4586 rm -rf conftest.one conftest.two conftest.dir
4587 echo one > conftest.one
4588 echo two > conftest.two
4590 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
4591 test -s conftest.one && test -s conftest.two &&
4592 test -s conftest.dir/conftest.one &&
4593 test -s conftest.dir/conftest.two
4595 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
4608 rm -rf conftest.one conftest.two conftest.dir
4612 if test ${ac_cv_path_install+y}; then
4613 INSTALL=$ac_cv_path_install
4615 # As a last resort, use the slow shell script. Don't cache a
4616 # value for INSTALL within a source directory, because that will
4617 # break other packages using the cache if that directory is
4618 # removed, or if the value is a relative name.
4619 INSTALL=$ac_install_sh
4622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4623 printf "%s\n" "$INSTALL" >&6; }
4625 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4626 # It thinks the first close brace ends the variable substitution.
4627 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4629 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4631 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sleep supports fractional seconds" >&5
4634 printf %s "checking whether sleep supports fractional seconds... " >&6; }
4635 if test ${am_cv_sleep_fractional_seconds+y}
4637 printf %s "(cached) " >&6
4639 e) if sleep 0.001 2>/dev/null
4641 am_cv_sleep_fractional_seconds=true
4643 e) am_cv_sleep_fractional_seconds=false ;;
4649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_sleep_fractional_seconds" >&5
4650 printf "%s\n" "$am_cv_sleep_fractional_seconds" >&6; }
4652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the filesystem timestamp resolution" >&5
4653 printf %s "checking the filesystem timestamp resolution... " >&6; }
4654 if test ${am_cv_filesystem_timestamp_resolution+y}
4656 printf %s "(cached) " >&6
4658 e) # Use names that lexically sort older-first when the timestamps are equal.
4659 rm -f conftest.file.a conftest.file.b
4661 if $am_cv_sleep_fractional_seconds
4663 am_try_sleep=0.1 am_try_loops=20
4666 e) am_try_sleep=1 am_try_loops=2
4672 as_fn_arith $am_try + 1 && am_try=$as_val
4673 echo "timestamp $am_try" > conftest.file.b
4674 set X `ls -t conftest.file.a conftest.file.b`
4675 if test "$2" = conftest.file.b || test $am_try -eq $am_try_loops; then
4680 rm -f conftest.file.a conftest.file.b
4681 am_cv_filesystem_timestamp_resolution=$am_try
4682 if $am_cv_sleep_fractional_seconds
4684 as_fn_arith $am_try / 10 && am_cv_filesystem_timestamp_resolution=$as_val
4685 as_fn_arith $am_try % 10 && am_fraction=$as_val
4686 as_fn_append am_cv_filesystem_timestamp_resolution .$am_fraction
4692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_filesystem_timestamp_resolution" >&5
4693 printf "%s\n" "$am_cv_filesystem_timestamp_resolution" >&6; }
4696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
4697 printf %s "checking whether build environment is sane... " >&6; }
4698 if test ${am_cv_build_env_is_sane+y}
4700 printf %s "(cached) " >&6
4702 e) # Reject unsafe characters in $srcdir or the absolute working directory
4703 # name. Accept space and tab only in the latter.
4707 *[\\\"\#\$\&\'\`$am_lf]*)
4708 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4711 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
4712 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4715 # Do 'set' in a subshell so we don't clobber the current shell's
4716 # arguments. Must try -L first in case configure is actually a
4717 # symlink; some systems play weird games with the mod time of symlinks
4718 # (eg FreeBSD returns the mod time of the symlink's containing
4722 for am_try in 1 2; do
4723 echo "timestamp, slept: $am_has_slept" > conftest.file
4724 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4725 if test "$*" = "X"; then
4727 set X `ls -t "$srcdir/configure" conftest.file`
4729 if test "$*" != "X $srcdir/configure conftest.file" \
4730 && test "$*" != "X conftest.file $srcdir/configure"; then
4732 # If neither matched, then we have a broken ls. This can happen
4733 # if, for instance, CONFIG_SHELL is bash and it inherits a
4734 # broken ls alias from the environment. This has actually
4735 # happened. Such a system could not be considered "sane".
4736 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
4737 alias in your environment" "$LINENO" 5
4739 if test "$2" = conftest.file || test $am_try -eq 2; then
4743 sleep $am_cv_filesystem_timestamp_resolution
4746 test "$2" = conftest.file
4749 am_cv_build_env_is_sane=yes
4751 as_fn_error $? "newly created file is older than distributed files!
4752 Check your system clock" "$LINENO" 5
4757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_build_env_is_sane" >&5
4758 printf "%s\n" "$am_cv_build_env_is_sane" >&6; }
4759 # If we didn't sleep, we still need to ensure time stamps of config.status and
4760 # generated files are strictly newer.
4762 if ! test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1; then
4763 ( sleep $am_cv_filesystem_timestamp_resolution ) &
4769 test "$program_prefix" != NONE &&
4770 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4771 # Use a double $ so make ignores it.
4772 test "$program_suffix" != NONE &&
4773 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4774 # Double any \ or $.
4775 # By default was 's,x,x', remove it if useless.
4776 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4777 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
4780 # Expand $ac_aux_dir to an absolute path.
4781 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4784 if test x"${MISSING+set}" != xset; then
4785 MISSING="\${SHELL} '$am_aux_dir/missing'"
4787 # Use eval to expand $SHELL
4788 if eval "$MISSING --is-lightweight"; then
4789 am_missing_run="$MISSING "
4792 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4793 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4796 if test x"${install_sh+set}" != xset; then
4799 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4801 install_sh="\${SHELL} $am_aux_dir/install-sh"
4805 # Installed binaries are usually stripped using 'strip' when the user
4806 # run "make install-strip". However 'strip' might not be the right
4807 # tool to use in cross-compilation environments, therefore Automake
4808 # will honor the 'STRIP' environment variable to overrule this program.
4809 if test "$cross_compiling" != no; then
4810 if test -n "$ac_tool_prefix"; then
4811 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4812 set dummy ${ac_tool_prefix}strip; ac_word=$2
4813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4814 printf %s "checking for $ac_word... " >&6; }
4815 if test ${ac_cv_prog_STRIP+y}
4817 printf %s "(cached) " >&6
4819 e) if test -n "$STRIP"; then
4820 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826 case $as_dir in #(((
4829 *) as_dir=$as_dir/ ;;
4831 for ac_exec_ext in '' $ac_executable_extensions; do
4832 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4833 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4834 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4844 STRIP=$ac_cv_prog_STRIP
4845 if test -n "$STRIP"; then
4846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4847 printf "%s\n" "$STRIP" >&6; }
4849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4850 printf "%s\n" "no" >&6; }
4855 if test -z "$ac_cv_prog_STRIP"; then
4857 # Extract the first word of "strip", so it can be a program name with args.
4858 set dummy strip; ac_word=$2
4859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4860 printf %s "checking for $ac_word... " >&6; }
4861 if test ${ac_cv_prog_ac_ct_STRIP+y}
4863 printf %s "(cached) " >&6
4865 e) if test -n "$ac_ct_STRIP"; then
4866 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4872 case $as_dir in #(((
4875 *) as_dir=$as_dir/ ;;
4877 for ac_exec_ext in '' $ac_executable_extensions; do
4878 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4879 ac_cv_prog_ac_ct_STRIP="strip"
4880 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4890 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4891 if test -n "$ac_ct_STRIP"; then
4892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4893 printf "%s\n" "$ac_ct_STRIP" >&6; }
4895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896 printf "%s\n" "no" >&6; }
4899 if test "x$ac_ct_STRIP" = x; then
4902 case $cross_compiling:$ac_tool_warned in
4904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4905 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4906 ac_tool_warned=yes ;;
4911 STRIP="$ac_cv_prog_STRIP"
4915 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
4919 printf %s "checking for a race-free mkdir -p... " >&6; }
4920 if test -z "$MKDIR_P"; then
4921 if test ${ac_cv_path_mkdir+y}
4923 printf %s "(cached) " >&6
4925 e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4926 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4929 case $as_dir in #(((
4932 *) as_dir=$as_dir/ ;;
4934 for ac_prog in mkdir gmkdir; do
4935 for ac_exec_ext in '' $ac_executable_extensions; do
4936 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
4937 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
4938 'mkdir ('*'coreutils) '* | \
4940 'mkdir (fileutils) '4.1*)
4941 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
4952 test -d ./--version && rmdir ./--version
4953 if test ${ac_cv_path_mkdir+y}; then
4954 MKDIR_P="$ac_cv_path_mkdir -p"
4956 # As a last resort, use plain mkdir -p,
4957 # in the hope it doesn't have the bugs of ancient mkdir.
4961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4962 printf "%s\n" "$MKDIR_P" >&6; }
4964 for ac_prog in gawk mawk nawk awk
4966 # Extract the first word of "$ac_prog", so it can be a program name with args.
4967 set dummy $ac_prog; ac_word=$2
4968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969 printf %s "checking for $ac_word... " >&6; }
4970 if test ${ac_cv_prog_AWK+y}
4972 printf %s "(cached) " >&6
4974 e) if test -n "$AWK"; then
4975 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4981 case $as_dir in #(((
4984 *) as_dir=$as_dir/ ;;
4986 for ac_exec_ext in '' $ac_executable_extensions; do
4987 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4988 ac_cv_prog_AWK="$ac_prog"
4989 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5000 if test -n "$AWK"; then
5001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5002 printf "%s\n" "$AWK" >&6; }
5004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005 printf "%s\n" "no" >&6; }
5009 test -n "$AWK" && break
5012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5013 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5015 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5016 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
5018 printf %s "(cached) " >&6
5020 e) cat >conftest.make <<\_ACEOF
5023 @echo '@@@%%%=$(MAKE)=@@@%%%'
5025 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
5026 case `${MAKE-make} -f conftest.make 2>/dev/null` in
5028 eval ac_cv_prog_make_${ac_make}_set=yes;;
5030 eval ac_cv_prog_make_${ac_make}_set=no;;
5032 rm -f conftest.make ;;
5035 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5037 printf "%s\n" "yes" >&6; }
5040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5041 printf "%s\n" "no" >&6; }
5042 SET_MAKE="MAKE=${MAKE-make}"
5045 rm -rf .tst 2>/dev/null
5046 mkdir .tst 2>/dev/null
5047 if test -d .tst; then
5052 rmdir .tst 2>/dev/null
5054 AM_DEFAULT_VERBOSITY=1
5055 # Check whether --enable-silent-rules was given.
5056 if test ${enable_silent_rules+y}
5058 enableval=$enable_silent_rules;
5061 am_make=${MAKE-make}
5062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
5063 printf %s "checking whether $am_make supports nested variables... " >&6; }
5064 if test ${am_cv_make_support_nested_variables+y}
5066 printf %s "(cached) " >&6
5068 e) if printf "%s\n" 'TRUE=$(BAR$(V))
5074 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
5075 am_cv_make_support_nested_variables=yes
5077 am_cv_make_support_nested_variables=no
5081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
5082 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
5086 if (rm -f && rm -fr && rm -rf) 2>/dev/null
5090 e) am__rm_f_notfound='""' ;;
5095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xargs -n works" >&5
5096 printf %s "checking xargs -n works... " >&6; }
5097 if test ${am_cv_xargs_n_works+y}
5099 printf %s "(cached) " >&6
5101 e) if test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
5104 am_cv_xargs_n_works=yes
5106 e) am_cv_xargs_n_works=no ;;
5111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_xargs_n_works" >&5
5112 printf "%s\n" "$am_cv_xargs_n_works" >&6; }
5113 if test "$am_cv_xargs_n_works" = yes
5115 am__xargs_n='xargs -n'
5117 e) am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "" "$am__xargs_n_arg"; done; }'
5122 if test "`cd $srcdir && pwd`" != "`pwd`"; then
5123 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
5124 # is not polluted with repeated "-I."
5125 am__isrc=' -I$(srcdir)'
5126 # test to see if srcdir already configured
5127 if test -f $srcdir/config.status; then
5128 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
5132 # test whether we have cygpath
5133 if test -z "$CYGPATH_W"; then
5134 if (cygpath --version) >/dev/null 2>/dev/null; then
5135 CYGPATH_W='cygpath -w'
5142 # Define the identity of the package.
5147 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
5150 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
5152 # Some tools Automake needs.
5154 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
5157 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
5160 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
5163 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
5166 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
5168 # For better backward compatibility. To be removed once Automake 1.9.x
5169 # dies out for good. For more background, see:
5170 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
5171 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
5172 mkdir_p='$(MKDIR_P)'
5174 # We need awk for the "check" target (and possibly the TAP driver). The
5175 # system "awk" is bad on some platforms.
5176 # Always define AMTAR for backward compatibility. Yes, it's still used
5177 # in the wild :-( We should find a proper way to deprecate it ...
5181 # We'll loop over all known methods to create a tar archive until one works.
5182 _am_tools='gnutar pax cpio none'
5184 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
5190 # Variables for tags utilities; see am/tags.am
5191 if test -z "$CTAGS"; then
5195 if test -z "$ETAGS"; then
5199 if test -z "$CSCOPE"; then
5210 AM_DEFAULT_VERBOSITY=0 # make --enable-silent-rules the default.
5212 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
5215 for ac_prog in gawk mawk nawk awk
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_AWK+y}
5223 printf %s "(cached) " >&6
5225 e) if test -n "$AWK"; then
5226 ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog"
5240 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5251 if test -n "$AWK"; then
5252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5253 printf "%s\n" "$AWK" >&6; }
5255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5256 printf "%s\n" "no" >&6; }
5260 test -n "$AWK" && break
5273 ac_cpp='$CPP $CPPFLAGS'
5274 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5275 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5276 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5277 if test -n "$ac_tool_prefix"; then
5278 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5279 set dummy ${ac_tool_prefix}gcc; 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 e) 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}gcc"
5301 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5312 if test -n "$CC"; then
5313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5314 printf "%s\n" "$CC" >&6; }
5316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5317 printf "%s\n" "no" >&6; }
5322 if test -z "$ac_cv_prog_CC"; then
5324 # Extract the first word of "gcc", so it can be a program name with args.
5325 set dummy gcc; ac_word=$2
5326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5327 printf %s "checking for $ac_word... " >&6; }
5328 if test ${ac_cv_prog_ac_ct_CC+y}
5330 printf %s "(cached) " >&6
5332 e) if test -n "$ac_ct_CC"; then
5333 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5339 case $as_dir in #(((
5342 *) as_dir=$as_dir/ ;;
5344 for ac_exec_ext in '' $ac_executable_extensions; do
5345 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5346 ac_cv_prog_ac_ct_CC="gcc"
5347 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5357 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5358 if test -n "$ac_ct_CC"; then
5359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5360 printf "%s\n" "$ac_ct_CC" >&6; }
5362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5363 printf "%s\n" "no" >&6; }
5366 if test "x$ac_ct_CC" = x; then
5369 case $cross_compiling:$ac_tool_warned in
5371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5372 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5373 ac_tool_warned=yes ;;
5381 if test -z "$CC"; then
5382 if test -n "$ac_tool_prefix"; then
5383 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5384 set dummy ${ac_tool_prefix}cc; ac_word=$2
5385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5386 printf %s "checking for $ac_word... " >&6; }
5387 if test ${ac_cv_prog_CC+y}
5389 printf %s "(cached) " >&6
5391 e) if test -n "$CC"; then
5392 ac_cv_prog_CC="$CC" # Let the user override the test.
5394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5398 case $as_dir in #(((
5401 *) as_dir=$as_dir/ ;;
5403 for ac_exec_ext in '' $ac_executable_extensions; do
5404 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5405 ac_cv_prog_CC="${ac_tool_prefix}cc"
5406 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5417 if test -n "$CC"; then
5418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5419 printf "%s\n" "$CC" >&6; }
5421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5422 printf "%s\n" "no" >&6; }
5428 if test -z "$CC"; then
5429 # Extract the first word of "cc", so it can be a program name with args.
5430 set dummy cc; ac_word=$2
5431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5432 printf %s "checking for $ac_word... " >&6; }
5433 if test ${ac_cv_prog_CC+y}
5435 printf %s "(cached) " >&6
5437 e) if test -n "$CC"; then
5438 ac_cv_prog_CC="$CC" # Let the user override the test.
5441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5445 case $as_dir in #(((
5448 *) as_dir=$as_dir/ ;;
5450 for ac_exec_ext in '' $ac_executable_extensions; do
5451 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5452 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5453 ac_prog_rejected=yes
5457 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5464 if test $ac_prog_rejected = yes; then
5465 # We found a bogon in the path, so make sure we never use it.
5466 set dummy $ac_cv_prog_CC
5468 if test $# != 0; then
5469 # We chose a different compiler from the bogus one.
5470 # However, it has the same basename, so the bogon will be chosen
5471 # first if we set CC to just the basename; use the full file name.
5473 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5480 if test -n "$CC"; then
5481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5482 printf "%s\n" "$CC" >&6; }
5484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5485 printf "%s\n" "no" >&6; }
5490 if test -z "$CC"; then
5491 if test -n "$ac_tool_prefix"; then
5492 for ac_prog in cl.exe
5494 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5495 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497 printf %s "checking for $ac_word... " >&6; }
5498 if test ${ac_cv_prog_CC+y}
5500 printf %s "(cached) " >&6
5502 e) if test -n "$CC"; then
5503 ac_cv_prog_CC="$CC" # Let the user override the test.
5505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5509 case $as_dir in #(((
5512 *) as_dir=$as_dir/ ;;
5514 for ac_exec_ext in '' $ac_executable_extensions; do
5515 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5516 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5517 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5528 if test -n "$CC"; then
5529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5530 printf "%s\n" "$CC" >&6; }
5532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5533 printf "%s\n" "no" >&6; }
5537 test -n "$CC" && break
5540 if test -z "$CC"; then
5542 for ac_prog in cl.exe
5544 # Extract the first word of "$ac_prog", so it can be a program name with args.
5545 set dummy $ac_prog; ac_word=$2
5546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5547 printf %s "checking for $ac_word... " >&6; }
5548 if test ${ac_cv_prog_ac_ct_CC+y}
5550 printf %s "(cached) " >&6
5552 e) if test -n "$ac_ct_CC"; then
5553 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5559 case $as_dir in #(((
5562 *) as_dir=$as_dir/ ;;
5564 for ac_exec_ext in '' $ac_executable_extensions; do
5565 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5566 ac_cv_prog_ac_ct_CC="$ac_prog"
5567 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5577 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5578 if test -n "$ac_ct_CC"; then
5579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5580 printf "%s\n" "$ac_ct_CC" >&6; }
5582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5583 printf "%s\n" "no" >&6; }
5587 test -n "$ac_ct_CC" && break
5590 if test "x$ac_ct_CC" = x; then
5593 case $cross_compiling:$ac_tool_warned in
5595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5596 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5597 ac_tool_warned=yes ;;
5604 if test -z "$CC"; then
5605 if test -n "$ac_tool_prefix"; then
5606 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5607 set dummy ${ac_tool_prefix}clang; ac_word=$2
5608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5609 printf %s "checking for $ac_word... " >&6; }
5610 if test ${ac_cv_prog_CC+y}
5612 printf %s "(cached) " >&6
5614 e) if test -n "$CC"; then
5615 ac_cv_prog_CC="$CC" # Let the user override the test.
5617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5621 case $as_dir in #(((
5624 *) as_dir=$as_dir/ ;;
5626 for ac_exec_ext in '' $ac_executable_extensions; do
5627 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5628 ac_cv_prog_CC="${ac_tool_prefix}clang"
5629 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5640 if test -n "$CC"; then
5641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5642 printf "%s\n" "$CC" >&6; }
5644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5645 printf "%s\n" "no" >&6; }
5650 if test -z "$ac_cv_prog_CC"; then
5652 # Extract the first word of "clang", so it can be a program name with args.
5653 set dummy clang; ac_word=$2
5654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5655 printf %s "checking for $ac_word... " >&6; }
5656 if test ${ac_cv_prog_ac_ct_CC+y}
5658 printf %s "(cached) " >&6
5660 e) if test -n "$ac_ct_CC"; then
5661 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5667 case $as_dir in #(((
5670 *) as_dir=$as_dir/ ;;
5672 for ac_exec_ext in '' $ac_executable_extensions; do
5673 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5674 ac_cv_prog_ac_ct_CC="clang"
5675 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5685 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5686 if test -n "$ac_ct_CC"; then
5687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5688 printf "%s\n" "$ac_ct_CC" >&6; }
5690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691 printf "%s\n" "no" >&6; }
5694 if test "x$ac_ct_CC" = x; then
5697 case $cross_compiling:$ac_tool_warned in
5699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5700 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5701 ac_tool_warned=yes ;;
5712 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5713 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5714 as_fn_error $? "no acceptable C compiler found in \$PATH
5715 See 'config.log' for more details" "$LINENO" 5; }
5717 # Provide some information about the compiler.
5718 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5721 for ac_option in --version -v -V -qversion -version; do
5722 { { ac_try="$ac_compiler $ac_option >&5"
5724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5725 *) ac_try_echo=$ac_try;;
5727 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5728 printf "%s\n" "$ac_try_echo"; } >&5
5729 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5731 if test -s conftest.err; then
5733 ... rest of stderr output deleted ...
5734 10q' conftest.err >conftest.er1
5735 cat conftest.er1 >&5
5737 rm -f conftest.er1 conftest.err
5738 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5739 test $ac_status = 0; }
5742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5743 /* end confdefs.h. */
5753 ac_clean_files_save=$ac_clean_files
5754 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5755 # Try to create an executable without -o first, disregard a.out.
5756 # It will help us diagnose broken compilers, and finding out an intuition
5758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5759 printf %s "checking whether the C compiler works... " >&6; }
5760 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5762 # The possible output files:
5763 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5766 for ac_file in $ac_files
5769 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5770 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5775 if { { ac_try="$ac_link_default"
5777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5778 *) ac_try_echo=$ac_try;;
5780 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5781 printf "%s\n" "$ac_try_echo"; } >&5
5782 (eval "$ac_link_default") 2>&5
5784 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5785 test $ac_status = 0; }
5787 # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
5788 # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
5789 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5790 # so that the user can short-circuit this test for compilers unknown to
5792 for ac_file in $ac_files ''
5794 test -f "$ac_file" || continue
5796 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5799 # We found the default executable, but exeext='' is most
5803 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
5805 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5807 # We set ac_cv_exeext here because the later test for it is not
5808 # safe: cross compilers may not add the suffix if given an '-o'
5809 # argument, so we may need to know it at that point already.
5810 # Even if this section looks crufty: it has the advantage of
5817 test "$ac_cv_exeext" = no && ac_cv_exeext=
5823 if test -z "$ac_file"
5825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5826 printf "%s\n" "no" >&6; }
5827 printf "%s\n" "$as_me: failed program was:" >&5
5828 sed 's/^/| /' conftest.$ac_ext >&5
5830 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5831 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5832 as_fn_error 77 "C compiler cannot create executables
5833 See 'config.log' for more details" "$LINENO" 5; }
5835 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5836 printf "%s\n" "yes" >&6; } ;;
5839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5840 printf %s "checking for C compiler default output file name... " >&6; }
5841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5842 printf "%s\n" "$ac_file" >&6; }
5843 ac_exeext=$ac_cv_exeext
5845 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5846 ac_clean_files=$ac_clean_files_save
5847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5848 printf %s "checking for suffix of executables... " >&6; }
5849 if { { ac_try="$ac_link"
5851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5852 *) ac_try_echo=$ac_try;;
5854 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5855 printf "%s\n" "$ac_try_echo"; } >&5
5856 (eval "$ac_link") 2>&5
5858 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5859 test $ac_status = 0; }
5861 # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
5862 # catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will
5863 # work properly (i.e., refer to 'conftest.exe'), while it won't with
5865 for ac_file in conftest.exe conftest conftest.*; do
5866 test -f "$ac_file" || continue
5868 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5869 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5875 e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5876 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5877 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5878 See 'config.log' for more details" "$LINENO" 5; } ;;
5881 rm -f conftest conftest$ac_cv_exeext
5882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5883 printf "%s\n" "$ac_cv_exeext" >&6; }
5885 rm -f conftest.$ac_ext
5886 EXEEXT=$ac_cv_exeext
5888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5889 /* end confdefs.h. */
5894 FILE *f = fopen ("conftest.out", "w");
5895 return ferror (f) || fclose (f) != 0;
5901 ac_clean_files="$ac_clean_files conftest.out"
5902 # Check that the compiler produces executables we can run. If not, either
5903 # the compiler is broken, or we cross compile.
5904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5905 printf %s "checking whether we are cross compiling... " >&6; }
5906 if test "$cross_compiling" != yes; then
5907 { { ac_try="$ac_link"
5909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5910 *) ac_try_echo=$ac_try;;
5912 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5913 printf "%s\n" "$ac_try_echo"; } >&5
5914 (eval "$ac_link") 2>&5
5916 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5917 test $ac_status = 0; }
5918 if { ac_try='./conftest$ac_cv_exeext'
5919 { { case "(($ac_try" in
5920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5921 *) ac_try_echo=$ac_try;;
5923 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5924 printf "%s\n" "$ac_try_echo"; } >&5
5925 (eval "$ac_try") 2>&5
5927 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5928 test $ac_status = 0; }; }; then
5931 if test "$cross_compiling" = maybe; then
5934 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5935 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5936 as_fn_error 77 "cannot run C compiled programs.
5937 If you meant to cross compile, use '--host'.
5938 See 'config.log' for more details" "$LINENO" 5; }
5942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5943 printf "%s\n" "$cross_compiling" >&6; }
5945 rm -f conftest.$ac_ext conftest$ac_cv_exeext \
5946 conftest.o conftest.obj conftest.out
5947 ac_clean_files=$ac_clean_files_save
5948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5949 printf %s "checking for suffix of object files... " >&6; }
5950 if test ${ac_cv_objext+y}
5952 printf %s "(cached) " >&6
5954 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5955 /* end confdefs.h. */
5965 rm -f conftest.o conftest.obj
5966 if { { ac_try="$ac_compile"
5968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5969 *) ac_try_echo=$ac_try;;
5971 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5972 printf "%s\n" "$ac_try_echo"; } >&5
5973 (eval "$ac_compile") 2>&5
5975 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5976 test $ac_status = 0; }
5978 for ac_file in conftest.o conftest.obj conftest.*; do
5979 test -f "$ac_file" || continue;
5981 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5982 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5987 e) printf "%s\n" "$as_me: failed program was:" >&5
5988 sed 's/^/| /' conftest.$ac_ext >&5
5990 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5991 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5992 as_fn_error $? "cannot compute suffix of object files: cannot compile
5993 See 'config.log' for more details" "$LINENO" 5; } ;;
5996 rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
5999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
6000 printf "%s\n" "$ac_cv_objext" >&6; }
6001 OBJEXT=$ac_cv_objext
6003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
6004 printf %s "checking whether the compiler supports GNU C... " >&6; }
6005 if test ${ac_cv_c_compiler_gnu+y}
6007 printf %s "(cached) " >&6
6009 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6010 /* end confdefs.h. */
6023 if ac_fn_c_try_compile "$LINENO"
6027 e) ac_compiler_gnu=no ;;
6030 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6031 ac_cv_c_compiler_gnu=$ac_compiler_gnu
6035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6036 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
6037 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6039 if test $ac_compiler_gnu = yes; then
6044 ac_test_CFLAGS=${CFLAGS+y}
6045 ac_save_CFLAGS=$CFLAGS
6046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6047 printf %s "checking whether $CC accepts -g... " >&6; }
6048 if test ${ac_cv_prog_cc_g+y}
6050 printf %s "(cached) " >&6
6052 e) ac_save_c_werror_flag=$ac_c_werror_flag
6053 ac_c_werror_flag=yes
6056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6057 /* end confdefs.h. */
6067 if ac_fn_c_try_compile "$LINENO"
6072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6073 /* end confdefs.h. */
6083 if ac_fn_c_try_compile "$LINENO"
6087 e) ac_c_werror_flag=$ac_save_c_werror_flag
6089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6090 /* end confdefs.h. */
6100 if ac_fn_c_try_compile "$LINENO"
6104 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
6107 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
6110 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6111 ac_c_werror_flag=$ac_save_c_werror_flag ;;
6114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6115 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
6116 if test $ac_test_CFLAGS; then
6117 CFLAGS=$ac_save_CFLAGS
6118 elif test $ac_cv_prog_cc_g = yes; then
6119 if test "$GCC" = yes; then
6125 if test "$GCC" = yes; then
6132 if test x$ac_prog_cc_stdc = xno
6134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
6135 printf %s "checking for $CC option to enable C11 features... " >&6; }
6136 if test ${ac_cv_prog_cc_c11+y}
6138 printf %s "(cached) " >&6
6140 e) ac_cv_prog_cc_c11=no
6142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6143 /* end confdefs.h. */
6144 $ac_c_conftest_c11_program
6146 for ac_arg in '' -std=gnu11
6148 CC="$ac_save_CC $ac_arg"
6149 if ac_fn_c_try_compile "$LINENO"
6151 ac_cv_prog_cc_c11=$ac_arg
6153 rm -f core conftest.err conftest.$ac_objext conftest.beam
6154 test "x$ac_cv_prog_cc_c11" != "xno" && break
6156 rm -f conftest.$ac_ext
6161 if test "x$ac_cv_prog_cc_c11" = xno
6163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6164 printf "%s\n" "unsupported" >&6; }
6166 e) if test "x$ac_cv_prog_cc_c11" = x
6168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6169 printf "%s\n" "none needed" >&6; }
6171 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
6172 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
6173 CC="$CC $ac_cv_prog_cc_c11" ;;
6176 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
6177 ac_prog_cc_stdc=c11 ;;
6181 if test x$ac_prog_cc_stdc = xno
6183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
6184 printf %s "checking for $CC option to enable C99 features... " >&6; }
6185 if test ${ac_cv_prog_cc_c99+y}
6187 printf %s "(cached) " >&6
6189 e) ac_cv_prog_cc_c99=no
6191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6192 /* end confdefs.h. */
6193 $ac_c_conftest_c99_program
6195 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
6197 CC="$ac_save_CC $ac_arg"
6198 if ac_fn_c_try_compile "$LINENO"
6200 ac_cv_prog_cc_c99=$ac_arg
6202 rm -f core conftest.err conftest.$ac_objext conftest.beam
6203 test "x$ac_cv_prog_cc_c99" != "xno" && break
6205 rm -f conftest.$ac_ext
6210 if test "x$ac_cv_prog_cc_c99" = xno
6212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6213 printf "%s\n" "unsupported" >&6; }
6215 e) if test "x$ac_cv_prog_cc_c99" = x
6217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6218 printf "%s\n" "none needed" >&6; }
6220 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6221 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
6222 CC="$CC $ac_cv_prog_cc_c99" ;;
6225 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6226 ac_prog_cc_stdc=c99 ;;
6230 if test x$ac_prog_cc_stdc = xno
6232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
6233 printf %s "checking for $CC option to enable C89 features... " >&6; }
6234 if test ${ac_cv_prog_cc_c89+y}
6236 printf %s "(cached) " >&6
6238 e) ac_cv_prog_cc_c89=no
6240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6241 /* end confdefs.h. */
6242 $ac_c_conftest_c89_program
6244 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6246 CC="$ac_save_CC $ac_arg"
6247 if ac_fn_c_try_compile "$LINENO"
6249 ac_cv_prog_cc_c89=$ac_arg
6251 rm -f core conftest.err conftest.$ac_objext conftest.beam
6252 test "x$ac_cv_prog_cc_c89" != "xno" && break
6254 rm -f conftest.$ac_ext
6259 if test "x$ac_cv_prog_cc_c89" = xno
6261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6262 printf "%s\n" "unsupported" >&6; }
6264 e) if test "x$ac_cv_prog_cc_c89" = x
6266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6267 printf "%s\n" "none needed" >&6; }
6269 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6270 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
6271 CC="$CC $ac_cv_prog_cc_c89" ;;
6274 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6275 ac_prog_cc_stdc=c89 ;;
6281 ac_cpp='$CPP $CPPFLAGS'
6282 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6283 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6284 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6288 ac_cpp='$CPP $CPPFLAGS'
6289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6293 printf %s "checking whether $CC understands -c and -o together... " >&6; }
6294 if test ${am_cv_prog_cc_c_o+y}
6296 printf %s "(cached) " >&6
6298 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6299 /* end confdefs.h. */
6309 # Make sure it works both with $CC and with simple cc.
6310 # Following AC_PROG_CC_C_O, we do the test twice because some
6311 # compilers refuse to overwrite an existing .o file with -o,
6312 # though they will create one.
6313 am_cv_prog_cc_c_o=yes
6315 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6316 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6319 (exit $ac_status); } \
6320 && test -f conftest2.$ac_objext; then
6323 am_cv_prog_cc_c_o=no
6327 rm -f core conftest*
6331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6332 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
6333 if test "$am_cv_prog_cc_c_o" != yes; then
6334 # Losing compiler, so override with the script.
6335 # FIXME: It is wrong to rewrite CC.
6336 # But if we don't then we get into trouble of one sort or another.
6337 # A longer-term fix would be to have automake use am__CC in this case,
6338 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6339 CC="$am_aux_dir/compile $CC"
6342 ac_cpp='$CPP $CPPFLAGS'
6343 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6344 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6345 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6349 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
6350 printf %s "checking whether the compiler is clang... " >&6; }
6351 if test ${gl_cv_compiler_clang+y}
6353 printf %s "(cached) " >&6
6355 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6356 /* end confdefs.h. */
6371 if ac_fn_c_try_compile "$LINENO"
6373 gl_cv_compiler_clang=no
6375 e) gl_cv_compiler_clang=yes ;;
6378 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
6383 printf "%s\n" "$gl_cv_compiler_clang" >&6; }
6386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
6387 printf %s "checking for compiler option needed when checking for declarations... " >&6; }
6388 if test ${gl_cv_compiler_check_decl_option+y}
6390 printf %s "(cached) " >&6
6392 e) if test $gl_cv_compiler_clang = yes; then
6393 save_ac_compile="$ac_compile"
6394 ac_compile="$ac_compile -Werror=implicit-function-declaration"
6395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6396 /* end confdefs.h. */
6406 if ac_fn_c_try_compile "$LINENO"
6408 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
6410 e) gl_cv_compiler_check_decl_option=none ;;
6413 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6414 ac_compile="$save_ac_compile"
6416 gl_cv_compiler_check_decl_option=none
6421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
6422 printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
6423 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
6424 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
6426 ac_compile_for_check_decl="$ac_compile"
6429 DEPDIR="${am__leading_dot}deps"
6431 ac_config_commands="$ac_config_commands depfiles"
6433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
6434 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
6435 cat > confinc.mk << 'END'
6437 @echo this is the am__doit target >confinc.out
6442 # BSD make does it like this.
6443 echo '.include "confinc.mk" # ignored' > confmf.BSD
6444 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
6445 echo 'include confinc.mk # ignored' > confmf.GNU
6447 for s in GNU BSD; do
6448 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
6449 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
6451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6452 (exit $ac_status); }
6453 case $?:`cat confinc.out 2>/dev/null` in #(
6454 '0:this is the am__doit target') :
6457 am__include='.include' am__quote='"' ;; #(
6459 am__include='include' am__quote='' ;;
6464 if test "$am__include" != "#"; then
6465 _am_result="yes ($s style)"
6469 rm -f confinc.* confmf.*
6470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
6471 printf "%s\n" "${_am_result}" >&6; }
6473 # Check whether --enable-dependency-tracking was given.
6474 if test ${enable_dependency_tracking+y}
6476 enableval=$enable_dependency_tracking;
6479 if test "x$enable_dependency_tracking" != xno; then
6480 am_depcomp="$ac_aux_dir/depcomp"
6484 if test "x$enable_dependency_tracking" != xno; then
6494 depcc="$CC" am_compiler_list=
6496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6497 printf %s "checking dependency style of $depcc... " >&6; }
6498 if test ${am_cv_CC_dependencies_compiler_type+y}
6500 printf %s "(cached) " >&6
6502 e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6503 # We make a subdir and do the tests there. Otherwise we can end up
6504 # making bogus files that we don't know about and never remove. For
6505 # instance it was reported that on HP-UX the gcc test will end up
6506 # making a dummy file named 'D' -- because '-MD' means "put the output
6510 # Copy depcomp to subdir because otherwise we won't find it if we're
6511 # using a relative directory.
6512 cp "$am_depcomp" conftest.dir
6514 # We will build objects and dependencies in a subdirectory because
6515 # it helps to detect inapplicable dependency modes. For instance
6516 # both Tru64's cc and ICC support -MD to output dependencies as a
6517 # side effect of compilation, but ICC will put the dependencies in
6518 # the current directory while Tru64 will put them in the object
6522 am_cv_CC_dependencies_compiler_type=none
6523 if test "$am_compiler_list" = ""; then
6524 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6527 case " $depcc " in #(
6528 *\ -arch\ *\ -arch\ *) am__universal=true ;;
6531 for depmode in $am_compiler_list; do
6532 # Setup a source with many dependencies, because some compilers
6533 # like to wrap large dependency lists on column 80 (with \), and
6534 # we should not choose a depcomp mode which is confused by this.
6536 # We need to recreate these files for each test, as the compiler may
6537 # overwrite some of them when testing with obscure command lines.
6538 # This happens at least with the AIX C compiler.
6540 for i in 1 2 3 4 5 6; do
6541 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6542 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6543 # Solaris 10 /bin/sh.
6544 echo '/* dummy */' > sub/conftst$i.h
6546 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6548 # We check with '-c' and '-o' for the sake of the "dashmstdout"
6549 # mode. It turns out that the SunPro C++ compiler does not properly
6550 # handle '-M -o', and we need to detect this. Also, some Intel
6551 # versions had trouble with output in subdirs.
6552 am__obj=sub/conftest.${OBJEXT-o}
6553 am__minus_obj="-o $am__obj"
6556 # This depmode causes a compiler race in universal mode.
6557 test "$am__universal" = false || continue
6560 # After this tag, mechanisms are not by side-effect, so they'll
6561 # only be used when explicitly requested.
6562 if test "x$enable_dependency_tracking" = xyes; then
6568 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6569 # This compiler won't grok '-c -o', but also, the minuso test has
6570 # not run yet. These depmodes are late enough in the game, and
6571 # so weak that their functioning should not be impacted.
6572 am__obj=conftest.${OBJEXT-o}
6577 if depmode=$depmode \
6578 source=sub/conftest.c object=$am__obj \
6579 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6580 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6581 >/dev/null 2>conftest.err &&
6582 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6583 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6584 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6585 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6586 # icc doesn't choke on unknown options, it will just issue warnings
6587 # or remarks (even with -Werror). So we grep stderr for any message
6588 # that says an option was ignored or not supported.
6589 # When given -MP, icc 7.0 and 7.1 complain thusly:
6590 # icc: Command line warning: ignoring option '-M'; no argument required
6591 # The diagnosis changed in icc 8.0:
6592 # icc: Command line remark: option '-MP' not supported
6593 if (grep 'ignoring option' conftest.err ||
6594 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6595 am_cv_CC_dependencies_compiler_type=$depmode
6604 am_cv_CC_dependencies_compiler_type=none
6609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6610 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
6611 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6614 test "x$enable_dependency_tracking" != xno \
6615 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6617 am__fastdepCC_FALSE='#'
6619 am__fastdepCC_TRUE='#'
6620 am__fastdepCC_FALSE=
6626 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
6628 if test -n "$ac_tool_prefix"; then
6629 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6630 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6632 printf %s "checking for $ac_word... " >&6; }
6633 if test ${ac_cv_prog_RANLIB+y}
6635 printf %s "(cached) " >&6
6637 e) if test -n "$RANLIB"; then
6638 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6644 case $as_dir in #(((
6647 *) as_dir=$as_dir/ ;;
6649 for ac_exec_ext in '' $ac_executable_extensions; do
6650 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6651 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6652 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6662 RANLIB=$ac_cv_prog_RANLIB
6663 if test -n "$RANLIB"; then
6664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6665 printf "%s\n" "$RANLIB" >&6; }
6667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6668 printf "%s\n" "no" >&6; }
6673 if test -z "$ac_cv_prog_RANLIB"; then
6674 ac_ct_RANLIB=$RANLIB
6675 # Extract the first word of "ranlib", so it can be a program name with args.
6676 set dummy ranlib; ac_word=$2
6677 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6678 printf %s "checking for $ac_word... " >&6; }
6679 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6681 printf %s "(cached) " >&6
6683 e) if test -n "$ac_ct_RANLIB"; then
6684 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6690 case $as_dir in #(((
6693 *) as_dir=$as_dir/ ;;
6695 for ac_exec_ext in '' $ac_executable_extensions; do
6696 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6697 ac_cv_prog_ac_ct_RANLIB="ranlib"
6698 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6708 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6709 if test -n "$ac_ct_RANLIB"; then
6710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6711 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714 printf "%s\n" "no" >&6; }
6717 if test "x$ac_ct_RANLIB" = x; then
6720 case $cross_compiling:$ac_tool_warned in
6722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6723 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6724 ac_tool_warned=yes ;;
6726 RANLIB=$ac_ct_RANLIB
6729 RANLIB="$ac_cv_prog_RANLIB"
6733 ac_header= ac_cache=
6734 for ac_item in $ac_header_c_list
6736 if test $ac_cache; then
6737 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6738 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6739 printf "%s\n" "#define $ac_item 1" >> confdefs.h
6741 ac_header= ac_cache=
6742 elif test $ac_header; then
6756 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
6759 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6769 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6770 if test ${ac_cv_safe_to_define___extensions__+y}
6772 printf %s "(cached) " >&6
6774 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6775 /* end confdefs.h. */
6777 # define __EXTENSIONS__ 1
6778 $ac_includes_default
6787 if ac_fn_c_try_compile "$LINENO"
6789 ac_cv_safe_to_define___extensions__=yes
6791 e) ac_cv_safe_to_define___extensions__=no ;;
6794 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
6797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6798 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6801 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6802 if test ${ac_cv_should_define__xopen_source+y}
6804 printf %s "(cached) " >&6
6806 e) ac_cv_should_define__xopen_source=no
6807 if test $ac_cv_header_wchar_h = yes
6809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6810 /* end confdefs.h. */
6822 if ac_fn_c_try_compile "$LINENO"
6826 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6827 /* end confdefs.h. */
6829 #define _XOPEN_SOURCE 500
6840 if ac_fn_c_try_compile "$LINENO"
6842 ac_cv_should_define__xopen_source=yes
6844 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
6847 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6852 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6854 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6856 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6858 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6860 printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6862 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6864 printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6866 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6868 printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6870 printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6872 printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6874 printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h
6876 printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6878 printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6880 printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6882 printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6884 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6886 if test $ac_cv_header_minix_config_h = yes
6889 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6891 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6893 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6899 if test $ac_cv_safe_to_define___extensions__ = yes
6901 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6904 if test $ac_cv_should_define__xopen_source = yes
6906 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6912 # Make sure we can run config.sub.
6913 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
6914 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
6916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6917 printf %s "checking build system type... " >&6; }
6918 if test ${ac_cv_build+y}
6920 printf %s "(cached) " >&6
6922 e) ac_build_alias=$build_alias
6923 test "x$ac_build_alias" = x &&
6924 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
6925 test "x$ac_build_alias" = x &&
6926 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6927 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
6928 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
6932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6933 printf "%s\n" "$ac_cv_build" >&6; }
6934 case $ac_cv_build in
6936 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6939 ac_save_IFS=$IFS; IFS='-'
6945 # Remember, the first character of IFS is used to create $*,
6946 # except with old shells:
6949 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6953 printf %s "checking host system type... " >&6; }
6954 if test ${ac_cv_host+y}
6956 printf %s "(cached) " >&6
6958 e) if test "x$host_alias" = x; then
6959 ac_cv_host=$ac_cv_build
6961 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
6962 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
6967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6968 printf "%s\n" "$ac_cv_host" >&6; }
6971 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6974 ac_save_IFS=$IFS; IFS='-'
6980 # Remember, the first character of IFS is used to create $*,
6981 # except with old shells:
6984 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6994 printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h
7000 ac_cpp='$CPP $CPPFLAGS'
7001 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7002 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7003 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7005 printf %s "checking how to run the C preprocessor... " >&6; }
7006 # On Suns, sometimes $CPP names a directory.
7007 if test -n "$CPP" && test -d "$CPP"; then
7010 if test -z "$CPP"; then
7011 if test ${ac_cv_prog_CPP+y}
7013 printf %s "(cached) " >&6
7015 e) # Double quotes because $CC needs to be expanded
7016 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
7019 for ac_c_preproc_warn_flag in '' yes
7021 # Use a header file that comes with gcc, so configuring glibc
7022 # with a fresh cross-compiler works.
7023 # On the NeXT, cc -E runs the code through the compiler's parser,
7024 # not just through cpp. "Syntax error" is here to catch this case.
7025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7026 /* end confdefs.h. */
7030 if ac_fn_c_try_cpp "$LINENO"
7034 e) # Broken: fails on valid input.
7038 rm -f conftest.err conftest.i conftest.$ac_ext
7040 # OK, works on sane cases. Now check whether nonexistent headers
7041 # can be detected and how.
7042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7043 /* end confdefs.h. */
7044 #include <ac_nonexistent.h>
7046 if ac_fn_c_try_cpp "$LINENO"
7048 # Broken: success on invalid input.
7051 e) # Passes both tests.
7056 rm -f conftest.err conftest.i conftest.$ac_ext
7059 # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7060 rm -f conftest.i conftest.err conftest.$ac_ext
7075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7076 printf "%s\n" "$CPP" >&6; }
7078 for ac_c_preproc_warn_flag in '' yes
7080 # Use a header file that comes with gcc, so configuring glibc
7081 # with a fresh cross-compiler works.
7082 # On the NeXT, cc -E runs the code through the compiler's parser,
7083 # not just through cpp. "Syntax error" is here to catch this case.
7084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7085 /* end confdefs.h. */
7089 if ac_fn_c_try_cpp "$LINENO"
7093 e) # Broken: fails on valid input.
7097 rm -f conftest.err conftest.i conftest.$ac_ext
7099 # OK, works on sane cases. Now check whether nonexistent headers
7100 # can be detected and how.
7101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7102 /* end confdefs.h. */
7103 #include <ac_nonexistent.h>
7105 if ac_fn_c_try_cpp "$LINENO"
7107 # Broken: success on invalid input.
7110 e) # Passes both tests.
7115 rm -f conftest.err conftest.i conftest.$ac_ext
7118 # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7119 rm -f conftest.i conftest.err conftest.$ac_ext
7124 e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
7125 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
7126 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7127 See 'config.log' for more details" "$LINENO" 5; } ;;
7132 ac_cpp='$CPP $CPPFLAGS'
7133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
7139 printf %s "checking for egrep -e... " >&6; }
7140 if test ${ac_cv_path_EGREP_TRADITIONAL+y}
7142 printf %s "(cached) " >&6
7144 e) if test -z "$EGREP_TRADITIONAL"; then
7145 ac_path_EGREP_TRADITIONAL_found=false
7146 # Loop through the user's path and test for each of PROGNAME-LIST
7147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7148 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7151 case $as_dir in #(((
7154 *) as_dir=$as_dir/ ;;
7156 for ac_prog in grep ggrep
7158 for ac_exec_ext in '' $ac_executable_extensions; do
7159 ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
7160 as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
7161 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
7162 # Check for GNU $ac_path_EGREP_TRADITIONAL
7163 case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
7165 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
7169 printf %s 0123456789 >"conftest.in"
7172 cat "conftest.in" "conftest.in" >"conftest.tmp"
7173 mv "conftest.tmp" "conftest.in"
7174 cp "conftest.in" "conftest.nl"
7175 printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
7176 "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7177 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7178 as_fn_arith $ac_count + 1 && ac_count=$as_val
7179 if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
7180 # Best one so far, save it but keep looking for a better one
7181 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
7182 ac_path_EGREP_TRADITIONAL_max=$ac_count
7184 # 10*(2^10) chars as input seems more than enough
7185 test $ac_count -gt 10 && break
7187 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7190 $ac_path_EGREP_TRADITIONAL_found && break 3
7195 if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
7199 ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
7202 if test "$ac_cv_path_EGREP_TRADITIONAL"
7204 ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
7206 e) if test -z "$EGREP_TRADITIONAL"; then
7207 ac_path_EGREP_TRADITIONAL_found=false
7208 # Loop through the user's path and test for each of PROGNAME-LIST
7209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7210 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7213 case $as_dir in #(((
7216 *) as_dir=$as_dir/ ;;
7218 for ac_prog in egrep
7220 for ac_exec_ext in '' $ac_executable_extensions; do
7221 ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
7222 as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
7223 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
7224 # Check for GNU $ac_path_EGREP_TRADITIONAL
7225 case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
7227 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
7231 printf %s 0123456789 >"conftest.in"
7234 cat "conftest.in" "conftest.in" >"conftest.tmp"
7235 mv "conftest.tmp" "conftest.in"
7236 cp "conftest.in" "conftest.nl"
7237 printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
7238 "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7239 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7240 as_fn_arith $ac_count + 1 && ac_count=$as_val
7241 if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
7242 # Best one so far, save it but keep looking for a better one
7243 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
7244 ac_path_EGREP_TRADITIONAL_max=$ac_count
7246 # 10*(2^10) chars as input seems more than enough
7247 test $ac_count -gt 10 && break
7249 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7252 $ac_path_EGREP_TRADITIONAL_found && break 3
7257 if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
7258 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7261 ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
7268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
7269 printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
7270 EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL
7275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
7276 printf %s "checking for Minix Amsterdam compiler... " >&6; }
7277 if test ${gl_cv_c_amsterdam_compiler+y}
7279 printf %s "(cached) " >&6
7282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7283 /* end confdefs.h. */
7290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7291 $EGREP_TRADITIONAL "Amsterdam" >/dev/null 2>&1
7293 gl_cv_c_amsterdam_compiler=yes
7295 e) gl_cv_c_amsterdam_compiler=no ;;
7303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
7304 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
7306 if test $gl_cv_c_amsterdam_compiler = yes; then
7307 if test -z "$AR"; then
7310 if test -z "$ARFLAGS"; then
7317 if test -n "$ac_tool_prefix"; then
7318 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7319 set dummy ${ac_tool_prefix}ar; ac_word=$2
7320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7321 printf %s "checking for $ac_word... " >&6; }
7322 if test ${ac_cv_prog_AR+y}
7324 printf %s "(cached) " >&6
7326 e) if test -n "$AR"; then
7327 ac_cv_prog_AR="$AR" # Let the user override the test.
7329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7333 case $as_dir in #(((
7336 *) as_dir=$as_dir/ ;;
7338 for ac_exec_ext in '' $ac_executable_extensions; do
7339 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7340 ac_cv_prog_AR="${ac_tool_prefix}ar"
7341 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7352 if test -n "$AR"; then
7353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7354 printf "%s\n" "$AR" >&6; }
7356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7357 printf "%s\n" "no" >&6; }
7362 if test -z "$ac_cv_prog_AR"; then
7364 # Extract the first word of "ar", so it can be a program name with args.
7365 set dummy ar; ac_word=$2
7366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7367 printf %s "checking for $ac_word... " >&6; }
7368 if test ${ac_cv_prog_ac_ct_AR+y}
7370 printf %s "(cached) " >&6
7372 e) if test -n "$ac_ct_AR"; then
7373 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7379 case $as_dir in #(((
7382 *) as_dir=$as_dir/ ;;
7384 for ac_exec_ext in '' $ac_executable_extensions; do
7385 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7386 ac_cv_prog_ac_ct_AR="ar"
7387 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7397 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7398 if test -n "$ac_ct_AR"; then
7399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7400 printf "%s\n" "$ac_ct_AR" >&6; }
7402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7403 printf "%s\n" "no" >&6; }
7406 if test "x$ac_ct_AR" = x; then
7409 case $cross_compiling:$ac_tool_warned in
7411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7412 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7413 ac_tool_warned=yes ;;
7421 if test -z "$ARFLAGS"; then
7427 if test -z "$RANLIB"; then
7428 if test $gl_cv_c_amsterdam_compiler = yes; then
7431 if test -n "$ac_tool_prefix"; then
7432 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7433 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7435 printf %s "checking for $ac_word... " >&6; }
7436 if test ${ac_cv_prog_RANLIB+y}
7438 printf %s "(cached) " >&6
7440 e) if test -n "$RANLIB"; then
7441 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7447 case $as_dir in #(((
7450 *) as_dir=$as_dir/ ;;
7452 for ac_exec_ext in '' $ac_executable_extensions; do
7453 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7454 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7455 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7465 RANLIB=$ac_cv_prog_RANLIB
7466 if test -n "$RANLIB"; then
7467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7468 printf "%s\n" "$RANLIB" >&6; }
7470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7471 printf "%s\n" "no" >&6; }
7476 if test -z "$ac_cv_prog_RANLIB"; then
7477 ac_ct_RANLIB=$RANLIB
7478 # Extract the first word of "ranlib", so it can be a program name with args.
7479 set dummy ranlib; ac_word=$2
7480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7481 printf %s "checking for $ac_word... " >&6; }
7482 if test ${ac_cv_prog_ac_ct_RANLIB+y}
7484 printf %s "(cached) " >&6
7486 e) if test -n "$ac_ct_RANLIB"; then
7487 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7493 case $as_dir in #(((
7496 *) as_dir=$as_dir/ ;;
7498 for ac_exec_ext in '' $ac_executable_extensions; do
7499 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7500 ac_cv_prog_ac_ct_RANLIB="ranlib"
7501 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7511 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7512 if test -n "$ac_ct_RANLIB"; then
7513 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7514 printf "%s\n" "$ac_ct_RANLIB" >&6; }
7516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7517 printf "%s\n" "no" >&6; }
7520 if test "x$ac_ct_RANLIB" = x; then
7523 case $cross_compiling:$ac_tool_warned in
7525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7526 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7527 ac_tool_warned=yes ;;
7529 RANLIB=$ac_ct_RANLIB
7532 RANLIB="$ac_cv_prog_RANLIB"
7542 # IEEE behaviour is the default on all CPUs except Alpha and SH
7543 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
7544 # and the GCC 4.1.2 manual).
7547 # On Alpha systems, a compiler option provides the behaviour.
7548 # See the ieee(3) manual page, also available at
7549 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
7550 if test -n "$GCC"; then
7551 # GCC has the option -mieee.
7552 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
7553 CPPFLAGS="$CPPFLAGS -mieee"
7555 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
7556 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
7557 CPPFLAGS="$CPPFLAGS -ieee"
7561 if test -n "$GCC"; then
7562 # GCC has the option -mieee.
7563 CPPFLAGS="$CPPFLAGS -mieee"
7568 # Check whether --enable-largefile was given.
7569 if test ${enable_largefile+y}
7571 enableval=$enable_largefile;
7573 if test "$enable_largefile,$enable_year2038" != no,no
7575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5
7576 printf %s "checking for $CC option to enable large file support... " >&6; }
7577 if test ${ac_cv_sys_largefile_opts+y}
7579 printf %s "(cached) " >&6
7583 for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do
7584 if test x"$ac_opt" != x"none needed"
7586 CC="$ac_save_CC $ac_opt"
7588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7589 /* end confdefs.h. */
7590 #include <sys/types.h>
7591 /* Check that off_t can represent 2**63 - 1 correctly.
7592 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7593 since some C++ compilers masquerading as C compilers
7594 incorrectly reject 9223372036854775807. */
7595 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7596 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7597 && LARGE_OFF_T % 2147483647 == 1)
7607 if ac_fn_c_try_compile "$LINENO"
7609 ac_cv_sys_largefile_opts="$ac_opt"
7612 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7613 test $ac_opt_found = no || break
7618 if test $ac_opt_found != yes; then
7621 ac_cv_sys_largefile_opts="supported through gnulib"
7629 test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;;
7632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5
7633 printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; }
7635 ac_have_largefile=yes
7636 case $ac_cv_sys_largefile_opts in #(
7639 "supported through gnulib") :
7641 "support not detected") :
7642 ac_have_largefile=no ;; #(
7643 "-D_FILE_OFFSET_BITS=64") :
7645 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
7647 "-D_LARGE_FILES=1") :
7649 printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
7654 as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;;
7657 if test "$enable_year2038" != no
7659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5
7660 printf %s "checking for $CC option for timestamps after 2038... " >&6; }
7661 if test ${ac_cv_sys_year2038_opts+y}
7663 printf %s "(cached) " >&6
7665 e) ac_save_CPPFLAGS="$CPPFLAGS"
7667 for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do
7668 if test x"$ac_opt" != x"none needed"
7670 CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"
7672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7673 /* end confdefs.h. */
7676 /* Check that time_t can represent 2**32 - 1 correctly. */
7677 #define LARGE_TIME_T \\
7678 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
7679 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
7680 && LARGE_TIME_T % 65537 == 0)
7691 if ac_fn_c_try_compile "$LINENO"
7693 ac_cv_sys_year2038_opts="$ac_opt"
7696 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7697 test $ac_opt_found = no || break
7699 CPPFLAGS="$ac_save_CPPFLAGS"
7700 test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;;
7703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5
7704 printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; }
7706 ac_have_year2038=yes
7707 case $ac_cv_sys_year2038_opts in #(
7710 "support not detected") :
7711 ac_have_year2038=no ;; #(
7712 "-D_TIME_BITS=64") :
7714 printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
7716 "-D__MINGW_USE_VC2005_COMPAT") :
7718 printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
7720 "-U_USE_32_BIT_TIME_T"*) :
7721 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
7722 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
7723 as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It
7724 will stop working after mid-January 2038. Remove
7725 _USE_32BIT_TIME_T from the compiler flags.
7726 See 'config.log' for more details" "$LINENO" 5; } ;; #(
7728 as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;;
7740 # Check whether --enable-threads was given.
7741 if test ${enable_threads+y}
7743 enableval=$enable_threads; gl_use_threads=$enableval
7745 e) if test -n "$gl_use_threads_default"; then
7746 gl_use_threads="$gl_use_threads_default"
7749 osf*) gl_use_threads=no ;;
7752 1.[0-5].*) gl_use_threads=no ;;
7753 *) gl_use_threads=yes ;;
7757 case "$gl_use_winpthreads_default" in
7758 yes) gl_use_threads=posix ;;
7759 no) gl_use_threads=windows ;;
7760 *) gl_use_threads=yes ;;
7763 *) gl_use_threads=yes ;;
7770 if test "$gl_use_threads" = yes \
7771 || test "$gl_use_threads" = isoc \
7772 || test "$gl_use_threads" = posix \
7773 || test "$gl_use_threads" = isoc+posix; then
7774 # For using <threads.h> or <pthread.h>:
7777 if test -z "$gl_anythreadlib_early_done"; then
7780 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7781 # groks <pthread.h>. cc also understands the flag -pthread, but
7782 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7783 # 2. putting a flag into CPPFLAGS that has an effect on the linker
7784 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7785 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7786 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7789 # Some systems optimize for single-threaded programs by default, and
7790 # need special flags to disable these optimizations. For example, the
7791 # definition of 'errno' in <errno.h>.
7793 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7794 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7796 gl_anythreadlib_early_done=done
7801 if test "$enable_year2038,$ac_have_year2038,$cross_compiling" = yes,no,no
7803 # If we're not cross compiling and 'touch' works with a large
7804 # timestamp, then we can presume the system supports wider time_t
7805 # *somehow* and we just weren't able to detect it. One common
7806 # case that we deliberately *don't* probe for is a system that
7807 # supports both 32- and 64-bit ABIs but only the 64-bit ABI offers
7808 # wide time_t. (It would be inappropriate for us to override an
7809 # intentional use of -m32.) Error out, demanding use of
7810 # --disable-year2038 if this is intentional.
7811 if TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null
7813 case `TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null` in #(
7814 *'Feb 7 2106'* | *'Feb 7 17:10'*) :
7815 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
7816 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
7817 as_fn_error $? "this system appears to support timestamps after
7818 mid-January 2038, but no mechanism for enabling wide
7819 'time_t' was detected. Did you mean to build a 64-bit
7820 binary? (E.g., 'CC=\"${CC} -m64\"'.) To proceed with
7821 32-bit time_t, configure with '--disable-year2038'.
7822 See 'config.log' for more details" "$LINENO" 5; } ;; #(
7830 # Pre-early section.
7834 # Code from module absolute-header:
7835 # Code from module accept:
7836 # Code from module accept-tests:
7837 # Code from module alignasof:
7838 # Code from module alignasof-tests:
7839 # Code from module alloca:
7840 # Code from module alloca-opt:
7841 # Code from module alloca-opt-tests:
7842 # Code from module allocator:
7843 # Code from module announce-gen:
7844 # Code from module areadlink:
7845 # Code from module areadlink-tests:
7846 # Code from module argmatch:
7847 # Code from module argmatch-tests:
7848 # Code from module arpa_inet:
7849 # Code from module arpa_inet-tests:
7850 # Code from module assert-h:
7851 # Code from module assert-h-tests:
7852 # Code from module assure:
7853 # Code from module atoll:
7854 # Code from module attribute:
7855 # Code from module basename-lgpl:
7856 # Code from module binary-io:
7857 # Code from module binary-io-tests:
7858 # Code from module bind:
7859 # Code from module bind-tests:
7860 # Code from module bitrotate:
7861 # Code from module bitrotate-tests:
7862 # Code from module btowc:
7863 # Code from module btowc-tests:
7864 # Code from module builtin-expect:
7865 # Code from module c-ctype:
7866 # Code from module c-ctype-tests:
7867 # Code from module c-stack:
7868 # Code from module c-stack-tests:
7869 # Code from module c-strcase:
7870 # Code from module c-strcase-tests:
7871 # Code from module c-strcaseeq:
7872 # Code from module c-strcasestr:
7873 # Code from module c-strcasestr-tests:
7874 # Code from module c99:
7875 # Code from module calloc-gnu:
7876 # Code from module calloc-gnu-tests:
7877 # Code from module calloc-posix:
7878 # Code from module careadlinkat:
7879 # Code from module clock-time:
7880 # Code from module cloexec:
7881 # Code from module cloexec-tests:
7882 # Code from module close:
7883 # Code from module close-tests:
7884 # Code from module config-h:
7885 # Code from module connect:
7886 # Code from module connect-tests:
7887 # Code from module ctype:
7888 # Code from module ctype-tests:
7889 # Code from module diffseq:
7890 # Code from module dirname:
7891 # Code from module dirname-lgpl:
7892 # Code from module dirname-tests:
7893 # Code from module do-release-commit-and-tag:
7894 # Code from module double-slash-root:
7895 # Code from module dtotimespec:
7896 # Code from module dup2:
7897 # Code from module dup2-tests:
7898 # Code from module environ:
7899 # Code from module environ-tests:
7900 # Code from module errno:
7901 # Code from module errno-tests:
7902 # Code from module error:
7903 # Code from module error-h:
7904 # Code from module error-tests:
7905 # Code from module exclude:
7906 # Code from module exclude-tests:
7907 # Code from module exitfail:
7908 # Code from module extensions:
7909 # Code from module extern-inline:
7910 # Code from module fcntl:
7911 # Code from module fcntl-h:
7912 # Code from module fcntl-h-tests:
7913 # Code from module fcntl-tests:
7914 # Code from module fd-hook:
7915 # Code from module fdopen:
7916 # Code from module fdopen-tests:
7917 # Code from module fgetc-tests:
7918 # Code from module file-type:
7919 # Code from module filename:
7920 # Code from module filenamecat:
7921 # Code from module filenamecat-lgpl:
7922 # Code from module filenamecat-tests:
7923 # Code from module flexmember:
7924 # Code from module float:
7925 # Code from module float-tests:
7926 # Code from module fnmatch:
7927 # Code from module fnmatch-gnu:
7928 # Code from module fnmatch-h:
7929 # Code from module fnmatch-h-tests:
7930 # Code from module fnmatch-tests:
7931 # Code from module fopen:
7932 # Code from module fopen-gnu:
7933 # Code from module fopen-gnu-tests:
7934 # Code from module fopen-tests:
7935 # Code from module fpieee:
7937 # Code from module fpucw:
7938 # Code from module fputc-tests:
7939 # Code from module fread-tests:
7940 # Code from module free-posix:
7941 # Code from module free-posix-tests:
7942 # Code from module freopen:
7943 # Code from module freopen-tests:
7944 # Code from module fstat:
7945 # Code from module fstat-tests:
7946 # Code from module ftruncate:
7947 # Code from module ftruncate-tests:
7948 # Code from module fwrite-tests:
7949 # Code from module gen-header:
7950 # Code from module gendocs:
7951 # Code from module getcwd-lgpl:
7952 # Code from module getcwd-lgpl-tests:
7953 # Code from module getdtablesize:
7954 # Code from module getdtablesize-tests:
7955 # Code from module getopt-gnu:
7956 # Code from module getopt-gnu-tests:
7957 # Code from module getopt-posix:
7958 # Code from module getopt-posix-tests:
7959 # Code from module getpagesize:
7960 # Code from module getprogname:
7961 # Code from module getprogname-tests:
7962 # Code from module getrandom:
7963 # Code from module getrandom-tests:
7964 # Code from module gettext-h:
7965 # Code from module gettime:
7966 # Code from module gettimeofday:
7967 # Code from module gettimeofday-tests:
7968 # Code from module git-version-gen:
7969 # Code from module gitlog-to-changelog:
7970 # Code from module glibc-internal/dynarray:
7971 # Code from module glibc-internal/dynarray-tests:
7972 # Code from module gnu-make:
7973 # Code from module gnu-web-doc-update:
7974 # Code from module gnumakefile:
7975 # Code from module gnupload:
7976 # Code from module gperf:
7977 # Code from module hard-locale:
7978 # Code from module hard-locale-tests:
7979 # Code from module hash:
7980 # Code from module hash-pjw:
7981 # Code from module hash-tests:
7982 # Code from module havelib:
7983 # Code from module host-cpu-c-abi:
7984 # Code from module ialloc:
7985 # Code from module iconv:
7986 # Code from module iconv-h:
7987 # Code from module iconv-h-tests:
7988 # Code from module iconv-tests:
7989 # Code from module iconv_open:
7990 # Code from module idx:
7991 # Code from module ignore-value:
7992 # Code from module ignore-value-tests:
7993 # Code from module include_next:
7994 # Code from module inet_pton:
7995 # Code from module inet_pton-tests:
7996 # Code from module inline:
7997 # Code from module intprops:
7998 # Code from module intprops-tests:
7999 # Code from module inttostr:
8000 # Code from module inttostr-tests:
8001 # Code from module inttypes:
8002 # Code from module inttypes-incomplete:
8003 # Code from module inttypes-tests:
8004 # Code from module ioctl:
8005 # Code from module ioctl-tests:
8006 # Code from module isblank:
8007 # Code from module isblank-tests:
8008 # Code from module iswblank:
8009 # Code from module iswblank-tests:
8010 # Code from module iswdigit:
8011 # Code from module iswdigit-tests:
8012 # Code from module iswxdigit:
8013 # Code from module iswxdigit-tests:
8014 # Code from module langinfo:
8015 # Code from module langinfo-tests:
8016 # Code from module largefile:
8018 # Code from module largefile-tests:
8019 # Code from module libc-config:
8020 # Code from module limits-h:
8021 # Code from module limits-h-tests:
8022 # Code from module listen:
8023 # Code from module listen-tests:
8024 # Code from module localcharset:
8025 # Code from module localcharset-tests:
8026 # Code from module locale:
8027 # Code from module locale-tests:
8028 # Code from module localeconv:
8029 # Code from module localeconv-tests:
8030 # Code from module lock:
8031 # Code from module lstat:
8032 # Code from module lstat-tests:
8033 # Code from module maintainer-makefile:
8034 # Code from module malloc-gnu:
8035 # Code from module malloc-gnu-tests:
8036 # Code from module malloc-posix:
8037 # Code from module malloca:
8038 # Code from module malloca-tests:
8039 # Code from module manywarnings:
8040 # Code from module mbchar:
8041 # Code from module mbiter:
8042 # Code from module mbrtowc:
8043 # Code from module mbrtowc-tests:
8044 # Code from module mbscasecmp:
8045 # Code from module mbscasecmp-tests:
8046 # Code from module mbsinit:
8047 # Code from module mbsinit-tests:
8048 # Code from module mbslen:
8049 # Code from module mbsrtowcs:
8050 # Code from module mbsrtowcs-tests:
8051 # Code from module mbsstr:
8052 # Code from module mbsstr-tests:
8053 # Code from module mbtowc:
8054 # Code from module mbuiter:
8055 # Code from module memchr:
8056 # Code from module memchr-tests:
8057 # Code from module mempcpy:
8058 # Code from module minmax:
8059 # Code from module mkdir:
8060 # Code from module mkdir-tests:
8061 # Code from module mkstemp:
8062 # Code from module mktime:
8063 # Code from module mktime-internal:
8064 # Code from module msvc-inval:
8065 # Code from module msvc-nothrow:
8066 # Code from module multiarch:
8067 # Code from module nanosleep:
8068 # Code from module nanosleep-tests:
8069 # Code from module netinet_in:
8070 # Code from module netinet_in-tests:
8071 # Code from module nl_langinfo:
8072 # Code from module nl_langinfo-tests:
8073 # Code from module nocrash:
8074 # Code from module nstrftime:
8075 # Code from module nstrftime-tests:
8076 # Code from module nullptr:
8077 # Code from module nullptr-tests:
8078 # Code from module open:
8079 # Code from module open-tests:
8080 # Code from module pathmax:
8081 # Code from module pathmax-tests:
8082 # Code from module perl:
8083 # Code from module perror:
8084 # Code from module perror-tests:
8085 # Code from module pipe-posix:
8086 # Code from module pipe-posix-tests:
8087 # Code from module progname:
8088 # Code from module propername:
8089 # Code from module pselect:
8090 # Code from module pselect-tests:
8091 # Code from module pthread-h:
8094 if test -z "$gl_anythreadlib_early_done"; then
8097 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
8098 # groks <pthread.h>. cc also understands the flag -pthread, but
8099 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
8100 # 2. putting a flag into CPPFLAGS that has an effect on the linker
8101 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
8102 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
8103 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
8106 # Some systems optimize for single-threaded programs by default, and
8107 # need special flags to disable these optimizations. For example, the
8108 # definition of 'errno' in <errno.h>.
8110 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
8111 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
8113 gl_anythreadlib_early_done=done
8116 # Code from module pthread-h-tests:
8117 # Code from module pthread-thread:
8118 # Code from module pthread-thread-tests:
8119 # Code from module pthread_sigmask:
8120 # Code from module pthread_sigmask-tests:
8121 # Code from module putenv:
8122 # Code from module quote:
8123 # Code from module quotearg:
8124 # Code from module quotearg-simple:
8125 # Code from module quotearg-simple-tests:
8126 # Code from module raise:
8127 # Code from module raise-tests:
8128 # Code from module rawmemchr:
8129 # Code from module rawmemchr-tests:
8130 # Code from module readlink:
8131 # Code from module readlink-tests:
8132 # Code from module readme-release:
8133 # Code from module realloc-gnu:
8134 # Code from module realloc-gnu-tests:
8135 # Code from module realloc-posix:
8136 # Code from module reallocarray:
8137 # Code from module reallocarray-tests:
8138 # Code from module regex:
8139 # Code from module regex-tests:
8140 # Code from module same-inode:
8141 # Code from module sched:
8142 # Code from module sched-tests:
8143 # Code from module select:
8144 # Code from module select-tests:
8145 # Code from module setenv:
8146 # Code from module setenv-tests:
8147 # Code from module setlocale-null:
8148 # Code from module setlocale-null-tests:
8149 # Code from module setsockopt:
8150 # Code from module setsockopt-tests:
8151 # Code from module sh-quote:
8152 # Code from module sh-quote-tests:
8153 # Code from module signal:
8154 # Code from module signal-h:
8155 # Code from module signal-h-tests:
8156 # Code from module sigprocmask:
8157 # Code from module sigprocmask-tests:
8158 # Code from module sigsegv:
8159 # Code from module sigsegv-tests:
8160 # Code from module size_max:
8161 # Code from module sleep:
8162 # Code from module sleep-tests:
8163 # Code from module snippet/_Noreturn:
8164 # Code from module snippet/arg-nonnull:
8165 # Code from module snippet/c++defs:
8166 # Code from module snippet/warn-on-use:
8167 # Code from module snprintf:
8168 # Code from module snprintf-tests:
8169 # Code from module socket:
8170 # Code from module socketlib:
8171 # Code from module sockets:
8172 # Code from module sockets-tests:
8173 # Code from module socklen:
8174 # Code from module ssize_t:
8175 # Code from module stat:
8176 # Code from module stat-macros:
8177 # Code from module stat-tests:
8178 # Code from module stat-time:
8179 # Code from module stat-time-tests:
8180 # Code from module std-gnu11:
8181 # Code from module stdarg:
8185 # Code from module stdarg-tests:
8186 # Code from module stdbool:
8187 # Code from module stdbool-tests:
8188 # Code from module stdckdint:
8189 # Code from module stdckdint-tests:
8190 # Code from module stddef:
8191 # Code from module stddef-tests:
8192 # Code from module stdint:
8193 # Code from module stdint-tests:
8194 # Code from module stdio:
8197 printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
8200 # Code from module stdio-tests:
8201 # Code from module stdlib:
8202 # Code from module stdlib-tests:
8203 # Code from module stdopen:
8204 # Code from module stpcpy:
8205 # Code from module strcase:
8206 # Code from module streq:
8207 # Code from module strerror:
8208 # Code from module strerror-override:
8209 # Code from module strerror-tests:
8210 # Code from module strerror_r-posix:
8211 # Code from module strerror_r-posix-tests:
8212 # Code from module striconv:
8213 # Code from module striconv-tests:
8214 # Code from module string:
8215 # Code from module string-tests:
8216 # Code from module strings:
8217 # Code from module strings-tests:
8218 # Code from module strnlen:
8219 # Code from module strnlen-tests:
8220 # Code from module strnlen1:
8221 # Code from module strptime:
8222 # Code from module strtoimax:
8223 # Code from module strtoimax-tests:
8224 # Code from module strtoll:
8225 # Code from module strtoll-tests:
8226 # Code from module symlink:
8227 # Code from module symlink-tests:
8228 # Code from module sys_ioctl:
8229 # Code from module sys_ioctl-tests:
8230 # Code from module sys_random:
8231 # Code from module sys_random-tests:
8232 # Code from module sys_select:
8233 # Code from module sys_select-tests:
8234 # Code from module sys_socket:
8235 # Code from module sys_socket-tests:
8236 # Code from module sys_stat:
8237 # Code from module sys_stat-tests:
8238 # Code from module sys_time:
8239 # Code from module sys_time-tests:
8240 # Code from module sys_types:
8241 # Code from module sys_types-tests:
8242 # Code from module sys_uio:
8243 # Code from module sys_uio-tests:
8244 # Code from module sys_wait:
8245 # Code from module sys_wait-tests:
8246 # Code from module system-quote:
8247 # Code from module tempname:
8248 # Code from module test-framework-sh:
8249 # Code from module test-framework-sh-tests:
8250 # Code from module thread:
8251 # Code from module thread-tests:
8252 # Code from module threadlib:
8256 # Code from module time:
8257 # Code from module time-h:
8258 # Code from module time-h-tests:
8259 # Code from module time-tests:
8260 # Code from module time_r:
8261 # Code from module time_rz:
8262 # Code from module timegm:
8263 # Code from module timespec:
8264 # Code from module timespec-add:
8265 # Code from module timespec-sub:
8266 # Code from module timespec-tests:
8267 # Code from module trim:
8268 # Code from module trim-tests:
8269 # Code from module tzset:
8270 # Code from module unistd:
8271 # Code from module unistd-tests:
8272 # Code from module unistr/base:
8273 # Code from module unistr/u8-mbtoucr:
8274 # Code from module unistr/u8-mbtoucr-tests:
8275 # Code from module unistr/u8-uctomb:
8276 # Code from module unistr/u8-uctomb-tests:
8277 # Code from module unitypes:
8278 # Code from module uniwidth/base:
8279 # Code from module uniwidth/width:
8280 # Code from module uniwidth/width-tests:
8281 # Code from module unlocked-io:
8282 # Code from module unlocked-io-internal:
8283 # Code from module unsetenv:
8284 # Code from module unsetenv-tests:
8285 # Code from module update-copyright:
8286 # Code from module update-copyright-tests:
8287 # Code from module useless-if-before-free:
8288 # Code from module vararrays:
8289 # Code from module vasnprintf:
8290 # Code from module vasnprintf-tests:
8291 # Code from module vc-list-files:
8292 # Code from module vc-list-files-tests:
8293 # Code from module verify:
8294 # Code from module verify-tests:
8295 # Code from module version-etc:
8296 # Code from module version-etc-fsf:
8297 # Code from module version-etc-tests:
8298 # Code from module warnings:
8299 # Code from module wchar:
8300 # Code from module wchar-tests:
8301 # Code from module wcrtomb:
8302 # Code from module wcrtomb-tests:
8303 # Code from module wctob:
8304 # Code from module wctomb:
8305 # Code from module wctype-h:
8306 # Code from module wctype-h-tests:
8307 # Code from module wcwidth:
8308 # Code from module wcwidth-tests:
8309 # Code from module windows-mutex:
8310 # Code from module windows-once:
8311 # Code from module windows-recmutex:
8312 # Code from module windows-rwlock:
8313 # Code from module windows-thread:
8314 # Code from module windows-tls:
8315 # Code from module wmemchr:
8316 # Code from module wmempcpy:
8317 # Code from module xalloc:
8318 # Code from module xalloc-die:
8319 # Code from module xalloc-die-tests:
8320 # Code from module xalloc-oversized:
8321 # Code from module xfreopen:
8322 # Code from module xmalloca:
8323 # Code from module xreadlink:
8324 # Code from module xsize:
8325 # Code from module xstdopen:
8326 # Code from module xstdopen-tests:
8327 # Code from module xstriconv:
8328 # Code from module xstrtoimax:
8329 # Code from module xstrtoimax-tests:
8330 # Code from module xstrtol:
8331 # Code from module xstrtol-error:
8332 # Code from module xstrtol-tests:
8333 # Code from module year2038:
8335 # Code from module year2038-tests:
8349 # Check whether --enable-cross-guesses was given.
8350 if test ${enable_cross_guesses+y}
8352 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
8353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
8354 printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
8355 enableval=conservative
8357 gl_cross_guesses="$enableval"
8359 e) gl_cross_guesses=conservative ;;
8363 if test $gl_cross_guesses = risky; then
8364 gl_cross_guess_normal="guessing yes"
8365 gl_cross_guess_inverted="guessing no"
8367 gl_cross_guess_normal="guessing no"
8368 gl_cross_guess_inverted="guessing yes"
8370 LIBC_FATAL_STDERR_=1
8371 export LIBC_FATAL_STDERR_
8374 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8375 if test "x$ac_cv_type_size_t" = xyes
8380 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
8385 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8386 # for constant arguments. Useless!
8387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8388 printf %s "checking for working alloca.h... " >&6; }
8389 if test ${ac_cv_working_alloca_h+y}
8391 printf %s "(cached) " >&6
8393 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8394 /* end confdefs.h. */
8399 char *p = (char *) alloca (2 * sizeof (int));
8405 if ac_fn_c_try_link "$LINENO"
8407 ac_cv_working_alloca_h=yes
8409 e) ac_cv_working_alloca_h=no ;;
8412 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8413 conftest$ac_exeext conftest.$ac_ext ;;
8416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8417 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
8418 if test $ac_cv_working_alloca_h = yes; then
8420 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
8424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8425 printf %s "checking for alloca... " >&6; }
8426 if test ${ac_cv_func_alloca_works+y}
8428 printf %s "(cached) " >&6
8430 e) ac_cv_func_alloca_works=$ac_cv_working_alloca_h
8431 if test "$ac_cv_func_alloca_works" != yes
8433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8434 /* end confdefs.h. */
8439 # define alloca __builtin_alloca
8440 # elif defined _MSC_VER
8441 # include <malloc.h>
8442 # define alloca _alloca
8447 void *alloca (size_t);
8454 char *p = (char *) alloca (1);
8460 if ac_fn_c_try_link "$LINENO"
8462 ac_cv_func_alloca_works=yes
8464 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8465 conftest$ac_exeext conftest.$ac_ext
8469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8470 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
8472 if test $ac_cv_func_alloca_works = yes; then
8474 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
8477 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8478 # that cause trouble. Some versions do not even contain alloca or
8479 # contain a buggy version. If you still want to use their alloca,
8480 # use ar to extract alloca.o from them instead of compiling alloca.c.
8486 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8488 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
8491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8492 printf %s "checking stack direction for C alloca... " >&6; }
8493 if test ${ac_cv_c_stack_direction+y}
8495 printf %s "(cached) " >&6
8497 e) if test "$cross_compiling" = yes
8499 ac_cv_c_stack_direction=0
8501 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8502 /* end confdefs.h. */
8503 $ac_includes_default
8505 find_stack_direction (int *addr, int depth)
8510 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8511 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8516 main (int argc, char **argv)
8518 return find_stack_direction (0, argc + !argv + 20) < 0;
8521 if ac_fn_c_try_run "$LINENO"
8523 ac_cv_c_stack_direction=1
8525 e) ac_cv_c_stack_direction=-1 ;;
8528 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8529 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
8535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8536 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
8537 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
8544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
8545 printf %s "checking whether the preprocessor supports include_next... " >&6; }
8546 if test ${gl_cv_have_include_next+y}
8548 printf %s "(cached) " >&6
8550 e) rm -rf conftestd1a conftestd1b conftestd2
8551 mkdir conftestd1a conftestd1b conftestd2
8552 cat <<EOF > conftestd1a/conftest.h
8553 #define DEFINED_IN_CONFTESTD1
8554 #include_next <conftest.h>
8555 #ifdef DEFINED_IN_CONFTESTD2
8558 #error "include_next doesn't work"
8561 cat <<EOF > conftestd1b/conftest.h
8562 #define DEFINED_IN_CONFTESTD1
8564 #include_next <conftest.h>
8565 #ifdef DEFINED_IN_CONFTESTD2
8568 #error "include_next doesn't work"
8571 cat <<EOF > conftestd2/conftest.h
8572 #ifndef DEFINED_IN_CONFTESTD1
8573 #error "include_next test doesn't work"
8575 #define DEFINED_IN_CONFTESTD2
8577 gl_save_CPPFLAGS="$CPPFLAGS"
8578 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
8579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8580 /* end confdefs.h. */
8581 #include <conftest.h>
8583 if ac_fn_c_try_compile "$LINENO"
8585 gl_cv_have_include_next=yes
8587 e) CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
8588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8589 /* end confdefs.h. */
8590 #include <conftest.h>
8592 if ac_fn_c_try_compile "$LINENO"
8594 gl_cv_have_include_next=buggy
8596 e) gl_cv_have_include_next=no ;;
8599 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8603 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8604 CPPFLAGS="$gl_save_CPPFLAGS"
8605 rm -rf conftestd1a conftestd1b conftestd2
8609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
8610 printf "%s\n" "$gl_cv_have_include_next" >&6; }
8611 PRAGMA_SYSTEM_HEADER=
8612 if test $gl_cv_have_include_next = yes; then
8613 INCLUDE_NEXT=include_next
8614 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8615 if test -n "$GCC"; then
8616 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
8619 if test $gl_cv_have_include_next = buggy; then
8620 INCLUDE_NEXT=include
8621 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8623 INCLUDE_NEXT=include
8624 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
8631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
8632 printf %s "checking whether source code line length is unlimited... " >&6; }
8633 if test ${gl_cv_source_line_length_unlimited+y}
8635 printf %s "(cached) " >&6
8637 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8638 /* end confdefs.h. */
8645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8646 $EGREP_TRADITIONAL "choke me" >/dev/null 2>&1
8648 gl_cv_source_line_length_unlimited=no
8650 e) gl_cv_source_line_length_unlimited=yes ;;
8658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
8659 printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
8660 if test $gl_cv_source_line_length_unlimited = no; then
8661 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
8709 HAVE_DECL_WCWIDTH=1;
8710 REPLACE_MBSTATE_T=0;
8716 REPLACE_MBSRTOWCS=0;
8717 REPLACE_MBSNRTOWCS=0;
8719 REPLACE_WCSRTOMBS=0;
8720 REPLACE_WCSNRTOMBS=0;
8733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8734 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8735 if test ${gl_cv_header_wchar_h_correct_inline+y}
8737 printf %s "(cached) " >&6
8739 e) gl_cv_header_wchar_h_correct_inline=yes
8742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8743 /* end confdefs.h. */
8746 #define wcstod renamed_wcstod
8748 extern int zero (void);
8749 int main () { return zero(); }
8752 save_ac_compile="$ac_compile"
8753 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
8754 if echo '#include "conftest.c"' >conftest1.c \
8755 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8756 (eval $ac_compile) 2>&5
8758 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8759 test $ac_status = 0; }; then
8760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8761 /* end confdefs.h. */
8764 #define wcstod renamed_wcstod
8766 int zero (void) { return 0; }
8769 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
8770 if echo '#include "conftest.c"' >conftest2.c \
8771 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8772 (eval $ac_compile) 2>&5
8774 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8775 test $ac_status = 0; }; then
8776 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8779 gl_cv_header_wchar_h_correct_inline=no
8783 ac_compile="$save_ac_compile"
8784 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
8790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8791 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
8792 if test $gl_cv_header_wchar_h_correct_inline = no; then
8793 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8794 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8795 C99 mode. You have four options:
8796 - Add the flag -fgnu89-inline to CC and reconfigure, or
8797 - Fix your include files, using parts of
8798 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8799 - Use a gcc version older than 4.3, or
8800 - Don't use the flags -std=c99 or -std=gnu99.
8801 Configuration aborted." "$LINENO" 5
8805 for ac_item in $ac_func_c_list
8807 if test $ac_func; then
8808 ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
8809 if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
8810 echo "#define $ac_item 1" >> confdefs.h
8818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8819 printf %s "checking for nl_langinfo and CODESET... " >&6; }
8820 if test ${am_cv_langinfo_codeset+y}
8822 printf %s "(cached) " >&6
8824 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8825 /* end confdefs.h. */
8826 #include <langinfo.h>
8830 char* cs = nl_langinfo(CODESET); return !cs;
8835 if ac_fn_c_try_link "$LINENO"
8837 am_cv_langinfo_codeset=yes
8839 e) am_cv_langinfo_codeset=no ;;
8842 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8843 conftest$ac_exeext conftest.$ac_ext
8847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8848 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
8849 if test $am_cv_langinfo_codeset = yes; then
8851 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8859 printf %s "checking for a traditional french locale... " >&6; }
8860 if test ${gt_cv_locale_fr+y}
8862 printf %s "(cached) " >&6
8865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8866 /* end confdefs.h. */
8870 #if HAVE_LANGINFO_CODESET
8871 # include <langinfo.h>
8878 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
8879 imitates locale dependent behaviour by looking at the environment
8880 variables, and all locales use the UTF-8 encoding. */
8881 #if defined __BEOS__ || defined __HAIKU__
8884 /* Check whether the given locale name is recognized by the system. */
8885 # if defined _WIN32 && !defined __CYGWIN__
8886 /* On native Windows, setlocale(category, "") looks at the system settings,
8887 not at the environment variables. Also, when an encoding suffix such
8888 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8889 category of the locale to "C". */
8890 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8891 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8894 if (setlocale (LC_ALL, "") == NULL) return 1;
8896 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8897 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8898 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8899 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8900 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8901 some unit tests fail.
8902 On MirBSD 10, when an unsupported locale is specified, setlocale()
8903 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
8904 # if HAVE_LANGINFO_CODESET
8906 const char *cs = nl_langinfo (CODESET);
8907 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8908 || strcmp (cs, "UTF-8") == 0)
8913 /* On Cygwin, avoid locale names without encoding suffix, because the
8914 locale_charset() function relies on the encoding suffix. Note that
8915 LC_ALL is set on the command line. */
8916 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8918 /* Check whether in the abbreviation of the second month, the second
8919 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8920 one byte long. This excludes the UTF-8 encoding. */
8921 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8922 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8923 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8924 /* Check whether the decimal separator is a comma.
8925 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8926 are nl_langinfo(RADIXCHAR) are both ".". */
8927 if (localeconv () ->decimal_point[0] != ',') return 1;
8934 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8935 (eval $ac_link) 2>&5
8937 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8938 test $ac_status = 0; } && test -s conftest$ac_exeext; then
8940 # Handle native Windows specially, because there setlocale() interprets
8941 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8942 # "fr" or "fra" as "French" or "French_France.1252",
8943 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8944 # "ja" as "Japanese" or "Japanese_Japan.932",
8947 # Test for the native Windows locale name.
8948 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8949 gt_cv_locale_fr=French_France.1252
8952 gt_cv_locale_fr=none
8956 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8957 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8958 # configure script would override the LC_ALL setting. Likewise for
8959 # LC_CTYPE, which is also set at the beginning of the configure script.
8960 # Test for the usual locale name.
8961 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8962 gt_cv_locale_fr=fr_FR
8964 # Test for the locale name with explicit encoding suffix.
8965 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8966 gt_cv_locale_fr=fr_FR.ISO-8859-1
8968 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8969 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8970 gt_cv_locale_fr=fr_FR.ISO8859-1
8972 # Test for the HP-UX locale name.
8973 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8974 gt_cv_locale_fr=fr_FR.iso88591
8976 # Test for the Solaris 7 locale name.
8977 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8981 gt_cv_locale_fr=none
8994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8995 printf "%s\n" "$gt_cv_locale_fr" >&6; }
8996 LOCALE_FR=$gt_cv_locale_fr
9022 GL_GNULIB_MBSRTOWCS=0
9026 GL_GNULIB_MBSNRTOWCS=0
9034 GL_GNULIB_WCSRTOMBS=0
9038 GL_GNULIB_WCSNRTOMBS=0
9058 GL_GNULIB_WMEMMOVE=0
9062 GL_GNULIB_WMEMPCPY=0
9110 GL_GNULIB_WCSCASECMP=0
9114 GL_GNULIB_WCSNCASECMP=0
9158 GL_GNULIB_WCSWIDTH=0
9162 GL_GNULIB_WCSFTIME=0
9166 GL_GNULIB_MDA_WCSDUP=1
9176 GL_GNULIB_ALIGNED_ALLOC=0
9184 GL_GNULIB_CALLOC_GNU=0
9188 GL_GNULIB_CALLOC_POSIX=0
9192 GL_GNULIB_CANONICALIZE_FILE_NAME=0
9196 GL_GNULIB_FREE_POSIX=0
9200 GL_GNULIB_GETLOADAVG=0
9204 GL_GNULIB_GETPROGNAME=0
9208 GL_GNULIB_GETSUBOPT=0
9216 GL_GNULIB_MALLOC_GNU=0
9220 GL_GNULIB_MALLOC_POSIX=0
9224 GL_GNULIB_MBSTOWCS=0
9236 GL_GNULIB_MKOSTEMP=0
9240 GL_GNULIB_MKOSTEMPS=0
9248 GL_GNULIB_MKSTEMPS=0
9252 GL_GNULIB_POSIX_MEMALIGN=0
9256 GL_GNULIB_POSIX_OPENPT=0
9264 GL_GNULIB_PTSNAME_R=0
9280 GL_GNULIB_RANDOM_R=0
9284 GL_GNULIB_REALLOCARRAY=0
9288 GL_GNULIB_REALLOC_GNU=0
9292 GL_GNULIB_REALLOC_POSIX=0
9296 GL_GNULIB_REALPATH=0
9304 GL_GNULIB_SECURE_GETENV=0
9332 GL_GNULIB_STRTOULL=0
9336 GL_GNULIB_SYSTEM_POSIX=0
9340 GL_GNULIB_UNLOCKPT=0
9344 GL_GNULIB_UNSETENV=0
9352 GL_GNULIB_MDA_ECVT=1
9356 GL_GNULIB_MDA_FCVT=1
9360 GL_GNULIB_MDA_GCVT=1
9364 GL_GNULIB_MDA_MKTEMP=1
9368 GL_GNULIB_MDA_PUTENV=1
9374 HAVE_ALIGNED_ALLOC=1;
9376 HAVE_CANONICALIZE_FILE_NAME=1;
9380 HAVE_DECL_GETLOADAVG=1;
9381 HAVE_DECL_PROGRAM_INVOCATION_NAME=1;
9386 HAVE_DECL_INITSTATE=1;
9393 HAVE_POSIX_MEMALIGN=1;
9394 HAVE_POSIX_OPENPT=1;
9401 HAVE_REALLOCARRAY=1;
9404 HAVE_SECURE_GETENV=1;
9408 HAVE_DECL_SETSTATE=1;
9415 HAVE_STRUCT_RANDOM_DATA=1;
9416 HAVE_SYS_LOADAVG_H=0;
9418 HAVE_DECL_UNSETENV=1;
9420 REPLACE_ALIGNED_ALLOC=0;
9421 REPLACE_CALLOC_FOR_CALLOC_GNU=0;
9422 REPLACE_CALLOC_FOR_CALLOC_POSIX=0;
9423 REPLACE_CANONICALIZE_FILE_NAME=0;
9425 REPLACE_GETLOADAVG=0;
9426 REPLACE_GETPROGNAME=0;
9427 REPLACE_GETSUBOPT=0;
9428 REPLACE_INITSTATE=0;
9429 REPLACE_MALLOC_FOR_MALLOC_GNU=0;
9430 REPLACE_MALLOC_FOR_MALLOC_POSIX=0;
9431 REPLACE_MB_CUR_MAX=0;
9435 REPLACE_MKOSTEMPS=0;
9437 REPLACE_POSIX_MEMALIGN=0;
9438 REPLACE_POSIX_OPENPT=0;
9440 REPLACE_PTSNAME_R=0;
9445 REPLACE_REALLOC_FOR_REALLOC_GNU=0;
9446 REPLACE_REALLOC_FOR_REALLOC_POSIX=0;
9447 REPLACE_REALLOCARRAY=0;
9461 if test "X$prefix" = "XNONE"; then
9462 acl_final_prefix="$ac_default_prefix"
9464 acl_final_prefix="$prefix"
9466 if test "X$exec_prefix" = "XNONE"; then
9467 acl_final_exec_prefix='${prefix}'
9469 acl_final_exec_prefix="$exec_prefix"
9471 acl_save_prefix="$prefix"
9472 prefix="$acl_final_prefix"
9473 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
9474 prefix="$acl_save_prefix"
9478 # Check whether --with-gnu-ld was given.
9479 if test ${with_gnu_ld+y}
9481 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
9483 e) with_gnu_ld=no ;;
9487 # Prepare PATH_SEPARATOR.
9488 # The user is always right.
9489 if test "${PATH_SEPARATOR+set}" != set; then
9490 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
9491 # contains only /bin. Note that ksh looks also at the FPATH variable,
9492 # so we have to set that as well for the test.
9494 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9495 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9496 || PATH_SEPARATOR=';'
9500 if test -n "$LD"; then
9501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
9502 printf %s "checking for ld... " >&6; }
9503 elif test "$GCC" = yes; then
9504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
9505 printf %s "checking for ld used by $CC... " >&6; }
9506 elif test "$with_gnu_ld" = yes; then
9507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9508 printf %s "checking for GNU ld... " >&6; }
9510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9511 printf %s "checking for non-GNU ld... " >&6; }
9513 if test -n "$LD"; then
9514 # Let the user override the test with a path.
9517 if test ${acl_cv_path_LD+y}
9519 printf %s "(cached) " >&6
9522 acl_cv_path_LD= # Final result of this test
9523 ac_prog=ld # Program to search in $PATH
9524 if test "$GCC" = yes; then
9525 # Check if gcc -print-prog-name=ld gives a path.
9528 # gcc leaves a trailing carriage return which upsets mingw
9529 acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9531 acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
9534 # Accept absolute paths.
9536 re_direlt='/[^/][^/]*/\.\./'
9537 # Canonicalize the pathname of ld
9538 acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
9539 while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
9540 acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
9542 # Got the pathname. No search in PATH is needed.
9543 acl_cv_path_LD="$acl_output"
9547 # If it fails, then pretend we aren't using GCC.
9550 # If it is relative, then search for the first ld in PATH.
9555 if test -n "$ac_prog"; then
9556 # Search for $ac_prog in $PATH.
9557 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
9558 for ac_dir in $PATH; do
9560 test -z "$ac_dir" && ac_dir=.
9561 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9562 acl_cv_path_LD="$ac_dir/$ac_prog"
9563 # Check to see if the program is GNU ld. I'd rather use --version,
9564 # but apparently some variants of GNU ld only accept -v.
9565 # Break only if it was the GNU/non-GNU ld that we prefer.
9566 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
9567 *GNU* | *'with BFD'*)
9568 test "$with_gnu_ld" != no && break
9571 test "$with_gnu_ld" != yes && break
9580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9581 /* end confdefs.h. */
9582 #if defined __powerpc64__ || defined __LP64__
9589 if ac_fn_c_try_compile "$LINENO"
9591 # The compiler produces 64-bit code. Add option '-b64' so that the
9592 # linker groks 64-bit object files.
9593 case "$acl_cv_path_LD " in
9595 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
9599 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9603 /* end confdefs.h. */
9604 #if defined __sparcv9 || defined __arch64__
9611 if ac_fn_c_try_compile "$LINENO"
9615 e) # The compiler produces 32-bit code. Add option '-m elf32_sparc'
9616 # so that the linker groks 32-bit object files.
9617 case "$acl_cv_path_LD " in
9618 *" -m elf32_sparc "*) ;;
9619 *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
9624 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9631 LD="$acl_cv_path_LD"
9633 if test -n "$LD"; then
9634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9635 printf "%s\n" "$LD" >&6; }
9637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9638 printf "%s\n" "no" >&6; }
9639 as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9642 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
9643 if test ${acl_cv_prog_gnu_ld+y}
9645 printf %s "(cached) " >&6
9647 e) # I'd rather use --version here, but apparently some GNU lds only accept -v.
9648 case `$LD -v 2>&1 </dev/null` in
9649 *GNU* | *'with BFD'*)
9650 acl_cv_prog_gnu_ld=yes
9653 acl_cv_prog_gnu_ld=no
9658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9659 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
9660 with_gnu_ld=$acl_cv_prog_gnu_ld
9666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9667 printf %s "checking for shared library run path origin... " >&6; }
9668 if test ${acl_cv_rpath+y}
9670 printf %s "(cached) " >&6
9673 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9674 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9682 printf "%s\n" "$acl_cv_rpath" >&6; }
9684 acl_libext="$acl_cv_libext"
9685 acl_shlibext="$acl_cv_shlibext"
9686 acl_libname_spec="$acl_cv_libname_spec"
9687 acl_library_names_spec="$acl_cv_library_names_spec"
9688 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9689 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9690 acl_hardcode_direct="$acl_cv_hardcode_direct"
9691 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
9692 # Check whether --enable-rpath was given.
9693 if test ${enable_rpath+y}
9695 enableval=$enable_rpath; :
9697 e) enable_rpath=yes ;;
9704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
9705 printf %s "checking 32-bit host C ABI... " >&6; }
9706 if test ${gl_cv_host_cpu_c_abi_32bit+y}
9708 printf %s "(cached) " >&6
9710 e) if test -n "$gl_cv_host_cpu_c_abi"; then
9711 case "$gl_cv_host_cpu_c_abi" in
9712 i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
9713 gl_cv_host_cpu_c_abi_32bit=yes ;;
9714 x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
9715 gl_cv_host_cpu_c_abi_32bit=no ;;
9717 gl_cv_host_cpu_c_abi_32bit=unknown ;;
9722 # CPUs that only support a 32-bit ABI.
9731 | microblaze | microblazeel \
9732 | nds32 | nds32le | nds32be \
9733 | nios2 | nios2eb | nios2el \
9736 | sh | sh1234 | sh1234elb \
9739 gl_cv_host_cpu_c_abi_32bit=yes
9742 # CPUs that only support a 64-bit ABI.
9743 alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
9745 gl_cv_host_cpu_c_abi_32bit=no
9749 gl_cv_host_cpu_c_abi_32bit=yes
9753 # On x86_64 systems, the C compiler may be generating code in one of
9755 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
9756 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
9757 # with native Windows (mingw, MSVC).
9758 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
9759 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
9760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9761 /* end confdefs.h. */
9762 #if (defined __x86_64__ || defined __amd64__ \
9763 || defined _M_X64 || defined _M_AMD64) \
9764 && !(defined __ILP32__ || defined _ILP32)
9771 if ac_fn_c_try_compile "$LINENO"
9773 gl_cv_host_cpu_c_abi_32bit=no
9775 e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9778 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9782 # Assume arm with EABI.
9783 # On arm64 systems, the C compiler may be generating code in one of
9785 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
9786 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
9787 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
9788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9789 /* end confdefs.h. */
9790 #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
9797 if ac_fn_c_try_compile "$LINENO"
9799 gl_cv_host_cpu_c_abi_32bit=no
9801 e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9804 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9807 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
9808 # On hppa, the C compiler may be generating 32-bit code or 64-bit
9809 # code. In the latter case, it defines _LP64 and __LP64__.
9810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9811 /* end confdefs.h. */
9819 if ac_fn_c_try_compile "$LINENO"
9821 gl_cv_host_cpu_c_abi_32bit=no
9823 e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9826 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9830 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
9831 # 32-bit code. In the latter case, it defines _ILP32.
9832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9833 /* end confdefs.h. */
9841 if ac_fn_c_try_compile "$LINENO"
9843 gl_cv_host_cpu_c_abi_32bit=yes
9845 e) gl_cv_host_cpu_c_abi_32bit=no ;;
9848 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9852 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
9854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9855 /* end confdefs.h. */
9856 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
9863 if ac_fn_c_try_compile "$LINENO"
9865 gl_cv_host_cpu_c_abi_32bit=no
9867 e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9870 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9874 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
9875 # No need to distinguish them here; the caller may distinguish
9876 # them based on the OS.
9877 # On powerpc64 systems, the C compiler may still be generating
9878 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
9879 # be generating 64-bit code.
9880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9881 /* end confdefs.h. */
9882 #if defined __powerpc64__ || defined __LP64__
9889 if ac_fn_c_try_compile "$LINENO"
9891 gl_cv_host_cpu_c_abi_32bit=no
9893 e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9896 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9900 gl_cv_host_cpu_c_abi_32bit=yes
9904 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
9905 # Size of 'long' and 'void *':
9906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9907 /* end confdefs.h. */
9908 #if defined __LP64__
9915 if ac_fn_c_try_compile "$LINENO"
9917 gl_cv_host_cpu_c_abi_32bit=no
9919 e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9922 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9926 # On s390x, the C compiler may be generating 64-bit (= s390x) code
9927 # or 31-bit (= s390) code.
9928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9929 /* end confdefs.h. */
9930 #if defined __LP64__ || defined __s390x__
9937 if ac_fn_c_try_compile "$LINENO"
9939 gl_cv_host_cpu_c_abi_32bit=no
9941 e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9944 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9948 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
9949 # C compiler still generates 32-bit code.
9950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9951 /* end confdefs.h. */
9952 #if defined __sparcv9 || defined __arch64__
9959 if ac_fn_c_try_compile "$LINENO"
9961 gl_cv_host_cpu_c_abi_32bit=no
9963 e) gl_cv_host_cpu_c_abi_32bit=yes ;;
9966 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9970 gl_cv_host_cpu_c_abi_32bit=unknown
9977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
9978 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
9980 HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
9986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
9987 printf %s "checking for ELF binary format... " >&6; }
9988 if test ${gl_cv_elf+y}
9990 printf %s "(cached) " >&6
9992 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9993 /* end confdefs.h. */
9994 #if defined __ELF__ || (defined __linux__ && defined __EDG__)
9995 Extensible Linking Format
9999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10000 $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
10012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
10013 printf "%s\n" "$gl_cv_elf" >&6; }
10014 if test $gl_cv_elf = yes; then
10015 # Extract the ELF class of a file (5th byte) in decimal.
10016 # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
10017 if od -A x < /dev/null >/dev/null 2>/dev/null; then
10021 od -A n -t d1 -j 4 -N 1
10027 dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
10031 # Use 'expr', not 'test', to compare the values of func_elfclass, because on
10032 # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002,
10034 case $HOST_CPU_C_ABI_32BIT in
10037 acl_is_expected_elfclass ()
10039 expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null
10044 acl_is_expected_elfclass ()
10046 expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null
10051 acl_is_expected_elfclass ()
10058 acl_is_expected_elfclass ()
10064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
10065 printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
10066 if test ${acl_cv_libdirstems+y}
10068 printf %s "(cached) " >&6
10070 e) acl_libdirstem=lib
10075 if test $HOST_CPU_C_ABI_32BIT = no; then
10076 acl_libdirstem2=lib/64
10077 case "$host_cpu" in
10078 sparc*) acl_libdirstem3=lib/sparcv9 ;;
10079 i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
10084 searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
10085 | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
10086 if test $HOST_CPU_C_ABI_32BIT != no; then
10087 # 32-bit or unknown ABI.
10088 if test -d /usr/lib32; then
10089 acl_libdirstem2=lib32
10092 if test $HOST_CPU_C_ABI_32BIT != yes; then
10093 # 64-bit or unknown ABI.
10094 if test -d /usr/lib64; then
10095 acl_libdirstem3=lib64
10098 if test -n "$searchpath"; then
10099 acl_save_IFS="${IFS= }"; IFS=":"
10100 for searchdir in $searchpath; do
10101 if test -d "$searchdir"; then
10102 case "$searchdir" in
10103 */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
10104 */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
10106 # Better ignore directories of this form. They are misleading.
10108 *) searchdir=`cd "$searchdir" && pwd`
10109 case "$searchdir" in
10110 */lib32 ) acl_libdirstem2=lib32 ;;
10111 */lib64 ) acl_libdirstem3=lib64 ;;
10116 IFS="$acl_save_IFS"
10117 if test $HOST_CPU_C_ABI_32BIT = yes; then
10121 if test $HOST_CPU_C_ABI_32BIT = no; then
10128 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
10129 test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
10130 acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
10134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
10135 printf "%s\n" "$acl_cv_libdirstems" >&6; }
10136 acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
10137 acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
10138 acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
10142 # Check whether --with-libsigsegv was given.
10143 if test ${with_libsigsegv+y}
10145 withval=$with_libsigsegv;
10148 if test "$with_libsigsegv" = yes; then
10164 acl_save_prefix="$prefix"
10165 prefix="$acl_final_prefix"
10166 acl_save_exec_prefix="$exec_prefix"
10167 exec_prefix="$acl_final_exec_prefix"
10169 eval additional_includedir=\"$includedir\"
10170 eval additional_libdir=\"$libdir\"
10171 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
10172 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
10174 exec_prefix="$acl_save_exec_prefix"
10175 prefix="$acl_save_prefix"
10178 # Check whether --with-libsigsegv-prefix was given.
10179 if test ${with_libsigsegv_prefix+y}
10181 withval=$with_libsigsegv_prefix;
10182 if test "X$withval" = "Xno"; then
10185 if test "X$withval" = "X"; then
10187 acl_save_prefix="$prefix"
10188 prefix="$acl_final_prefix"
10189 acl_save_exec_prefix="$exec_prefix"
10190 exec_prefix="$acl_final_exec_prefix"
10192 eval additional_includedir=\"$includedir\"
10193 eval additional_libdir=\"$libdir\"
10194 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
10195 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
10197 exec_prefix="$acl_save_exec_prefix"
10198 prefix="$acl_save_prefix"
10201 additional_includedir="$withval/include"
10202 additional_libdir="$withval/$acl_libdirstem"
10203 additional_libdir2="$withval/$acl_libdirstem2"
10204 additional_libdir3="$withval/$acl_libdirstem3"
10210 if test "X$additional_libdir2" = "X$additional_libdir"; then
10211 additional_libdir2=
10213 if test "X$additional_libdir3" = "X$additional_libdir"; then
10214 additional_libdir3=
10223 names_already_handled=
10224 names_next_round='sigsegv '
10225 while test -n "$names_next_round"; do
10226 names_this_round="$names_next_round"
10228 for name in $names_this_round; do
10230 for n in $names_already_handled; do
10231 if test "$n" = "$name"; then
10232 already_handled=yes
10236 if test -z "$already_handled"; then
10237 names_already_handled="$names_already_handled $name"
10238 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
10239 eval value=\"\$HAVE_LIB$uppername\"
10240 if test -n "$value"; then
10241 if test "$value" = yes; then
10242 eval value=\"\$LIB$uppername\"
10243 test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
10244 eval value=\"\$LTLIB$uppername\"
10245 test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
10254 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
10255 if test -n "$acl_shlibext"; then
10256 shrext=".$acl_shlibext" # typically: shrext=.so
10260 if test $use_additional = yes; then
10261 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
10262 if test "X$found_dir" = "X"; then
10263 eval dir=\$$additional_libdir_variable
10264 if test -n "$dir"; then
10265 if test -n "$acl_shlibext"; then
10266 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
10268 found_so="$dir/$libname$shrext"
10270 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
10271 ver=`(cd "$dir" && \
10272 for f in "$libname$shrext".*; do echo "$f"; done \
10273 | sed -e "s,^$libname$shrext\\\\.,," \
10274 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
10275 | sed 1q ) 2>/dev/null`
10276 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
10278 found_so="$dir/$libname$shrext.$ver"
10281 eval library_names=\"$acl_library_names_spec\"
10282 for f in $library_names; do
10283 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
10292 if test "X$found_dir" = "X"; then
10293 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
10295 found_a="$dir/$libname.$acl_libext"
10298 if test "X$found_dir" != "X"; then
10299 if test -f "$dir/$libname.la"; then
10300 found_la="$dir/$libname.la"
10307 if test "X$found_dir" = "X"; then
10308 for x in $LDFLAGS $LTLIBSIGSEGV; do
10310 acl_save_prefix="$prefix"
10311 prefix="$acl_final_prefix"
10312 acl_save_exec_prefix="$exec_prefix"
10313 exec_prefix="$acl_final_exec_prefix"
10315 exec_prefix="$acl_save_exec_prefix"
10316 prefix="$acl_save_prefix"
10320 dir=`echo "X$x" | sed -e 's/^X-L//'`
10321 if test -n "$acl_shlibext"; then
10322 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
10324 found_so="$dir/$libname$shrext"
10326 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
10327 ver=`(cd "$dir" && \
10328 for f in "$libname$shrext".*; do echo "$f"; done \
10329 | sed -e "s,^$libname$shrext\\\\.,," \
10330 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
10331 | sed 1q ) 2>/dev/null`
10332 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
10334 found_so="$dir/$libname$shrext.$ver"
10337 eval library_names=\"$acl_library_names_spec\"
10338 for f in $library_names; do
10339 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
10348 if test "X$found_dir" = "X"; then
10349 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
10351 found_a="$dir/$libname.$acl_libext"
10354 if test "X$found_dir" != "X"; then
10355 if test -f "$dir/$libname.la"; then
10356 found_la="$dir/$libname.la"
10361 if test "X$found_dir" != "X"; then
10366 if test "X$found_dir" != "X"; then
10367 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
10368 if test "X$found_so" != "X"; then
10369 if test "$enable_rpath" = no \
10370 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
10371 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
10372 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
10373 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
10376 for x in $ltrpathdirs; do
10377 if test "X$x" = "X$found_dir"; then
10382 if test -z "$haveit"; then
10383 ltrpathdirs="$ltrpathdirs $found_dir"
10385 if test "$acl_hardcode_direct" = yes; then
10386 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
10388 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
10389 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
10391 for x in $rpathdirs; do
10392 if test "X$x" = "X$found_dir"; then
10397 if test -z "$haveit"; then
10398 rpathdirs="$rpathdirs $found_dir"
10402 for x in $LDFLAGS $LIBSIGSEGV; do
10404 acl_save_prefix="$prefix"
10405 prefix="$acl_final_prefix"
10406 acl_save_exec_prefix="$exec_prefix"
10407 exec_prefix="$acl_final_exec_prefix"
10409 exec_prefix="$acl_save_exec_prefix"
10410 prefix="$acl_save_prefix"
10412 if test "X$x" = "X-L$found_dir"; then
10417 if test -z "$haveit"; then
10418 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
10420 if test "$acl_hardcode_minus_L" != no; then
10421 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
10423 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
10429 if test "X$found_a" != "X"; then
10430 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
10432 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
10435 additional_includedir=
10436 case "$found_dir" in
10437 */$acl_libdirstem | */$acl_libdirstem/)
10438 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
10439 if test "$name" = 'sigsegv'; then
10440 LIBSIGSEGV_PREFIX="$basedir"
10442 additional_includedir="$basedir/include"
10444 */$acl_libdirstem2 | */$acl_libdirstem2/)
10445 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
10446 if test "$name" = 'sigsegv'; then
10447 LIBSIGSEGV_PREFIX="$basedir"
10449 additional_includedir="$basedir/include"
10451 */$acl_libdirstem3 | */$acl_libdirstem3/)
10452 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
10453 if test "$name" = 'sigsegv'; then
10454 LIBSIGSEGV_PREFIX="$basedir"
10456 additional_includedir="$basedir/include"
10459 if test "X$additional_includedir" != "X"; then
10460 if test "X$additional_includedir" != "X/usr/include"; then
10462 if test "X$additional_includedir" = "X/usr/local/include"; then
10463 if test -n "$GCC"; then
10465 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
10469 if test -z "$haveit"; then
10470 for x in $CPPFLAGS $INCSIGSEGV; do
10472 acl_save_prefix="$prefix"
10473 prefix="$acl_final_prefix"
10474 acl_save_exec_prefix="$exec_prefix"
10475 exec_prefix="$acl_final_exec_prefix"
10477 exec_prefix="$acl_save_exec_prefix"
10478 prefix="$acl_save_prefix"
10480 if test "X$x" = "X-I$additional_includedir"; then
10485 if test -z "$haveit"; then
10486 if test -d "$additional_includedir"; then
10487 INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
10493 if test -n "$found_la"; then
10494 save_libdir="$libdir"
10495 case "$found_la" in
10496 */* | *\\*) . "$found_la" ;;
10497 *) . "./$found_la" ;;
10499 libdir="$save_libdir"
10500 for dep in $dependency_libs; do
10503 dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10504 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
10505 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
10506 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
10508 if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
10509 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
10510 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
10511 if test -n "$GCC"; then
10513 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
10517 if test -z "$haveit"; then
10519 for x in $LDFLAGS $LIBSIGSEGV; do
10521 acl_save_prefix="$prefix"
10522 prefix="$acl_final_prefix"
10523 acl_save_exec_prefix="$exec_prefix"
10524 exec_prefix="$acl_final_exec_prefix"
10526 exec_prefix="$acl_save_exec_prefix"
10527 prefix="$acl_save_prefix"
10529 if test "X$x" = "X-L$dependency_libdir"; then
10534 if test -z "$haveit"; then
10535 if test -d "$dependency_libdir"; then
10536 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$dependency_libdir"
10540 for x in $LDFLAGS $LTLIBSIGSEGV; do
10542 acl_save_prefix="$prefix"
10543 prefix="$acl_final_prefix"
10544 acl_save_exec_prefix="$exec_prefix"
10545 exec_prefix="$acl_final_exec_prefix"
10547 exec_prefix="$acl_save_exec_prefix"
10548 prefix="$acl_save_prefix"
10550 if test "X$x" = "X-L$dependency_libdir"; then
10555 if test -z "$haveit"; then
10556 if test -d "$dependency_libdir"; then
10557 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$dependency_libdir"
10564 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10565 if test "$enable_rpath" != no; then
10567 for x in $rpathdirs; do
10568 if test "X$x" = "X$dir"; then
10573 if test -z "$haveit"; then
10574 rpathdirs="$rpathdirs $dir"
10577 for x in $ltrpathdirs; do
10578 if test "X$x" = "X$dir"; then
10583 if test -z "$haveit"; then
10584 ltrpathdirs="$ltrpathdirs $dir"
10589 dep=`echo "X$dep" | sed -e 's/^X-l//'`
10590 if test "X$dep" != Xc \
10591 || case $host_os in
10592 linux* | gnu* | k*bsd*-gnu) false ;;
10595 names_next_round="$names_next_round $dep"
10599 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10602 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
10603 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
10609 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
10610 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
10616 if test "X$rpathdirs" != "X"; then
10617 if test -n "$acl_hardcode_libdir_separator"; then
10619 for found_dir in $rpathdirs; do
10620 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
10622 acl_save_libdir="$libdir"
10624 eval flag=\"$acl_hardcode_libdir_flag_spec\"
10625 libdir="$acl_save_libdir"
10626 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
10628 for found_dir in $rpathdirs; do
10629 acl_save_libdir="$libdir"
10630 libdir="$found_dir"
10631 eval flag=\"$acl_hardcode_libdir_flag_spec\"
10632 libdir="$acl_save_libdir"
10633 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
10637 if test "X$ltrpathdirs" != "X"; then
10638 for found_dir in $ltrpathdirs; do
10639 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
10648 ac_save_CPPFLAGS="$CPPFLAGS"
10650 for element in $INCSIGSEGV; do
10652 for x in $CPPFLAGS; do
10654 acl_save_prefix="$prefix"
10655 prefix="$acl_final_prefix"
10656 acl_save_exec_prefix="$exec_prefix"
10657 exec_prefix="$acl_final_exec_prefix"
10659 exec_prefix="$acl_save_exec_prefix"
10660 prefix="$acl_save_prefix"
10662 if test "X$x" = "X$element"; then
10667 if test -z "$haveit"; then
10668 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
10674 printf %s "checking for libsigsegv... " >&6; }
10675 if test ${ac_cv_libsigsegv+y}
10677 printf %s "(cached) " >&6
10680 ac_save_LIBS="$LIBS"
10681 case " $LIBSIGSEGV" in
10682 *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
10683 *) LIBS="$LIBSIGSEGV $LIBS" ;;
10685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10686 /* end confdefs.h. */
10687 #include <sigsegv.h>
10691 sigsegv_deinstall_handler();
10696 if ac_fn_c_try_link "$LINENO"
10698 ac_cv_libsigsegv=yes
10700 e) ac_cv_libsigsegv='no, consider installing GNU libsigsegv' ;;
10703 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10704 conftest$ac_exeext conftest.$ac_ext
10705 LIBS="$ac_save_LIBS"
10709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
10710 printf "%s\n" "$ac_cv_libsigsegv" >&6; }
10711 if test "$ac_cv_libsigsegv" = yes; then
10712 HAVE_LIBSIGSEGV=yes
10714 printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
10716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
10717 printf %s "checking how to link with libsigsegv... " >&6; }
10718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
10719 printf "%s\n" "$LIBSIGSEGV" >&6; }
10722 CPPFLAGS="$ac_save_CPPFLAGS"
10734 gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
10736 gl_sigsegv_uses_libsigsegv="$gl_cv_lib_sigsegv"
10738 gl_sigsegv_uses_libsigsegv=no
10742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
10743 printf %s "checking whether malloc is ptrdiff_t safe... " >&6; }
10744 if test ${gl_cv_malloc_ptrdiff+y}
10746 printf %s "(cached) " >&6
10748 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10749 /* end confdefs.h. */
10750 #include <stdint.h>
10755 /* 64-bit ptrdiff_t is so wide that no practical platform
10757 #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
10759 /* On rare machines where size_t fits in ptrdiff_t there
10761 #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
10763 /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
10764 bounds even on 32-bit platforms. We don't know which
10765 non-glibc systems are safe. */
10766 #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
10768 #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
10771 #error "malloc might not be ptrdiff_t safe"
10779 if ac_fn_c_try_compile "$LINENO"
10781 gl_cv_malloc_ptrdiff=yes
10783 e) gl_cv_malloc_ptrdiff=no ;;
10786 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
10791 printf "%s\n" "$gl_cv_malloc_ptrdiff" >&6; }
10796 test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
10800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
10801 printf %s "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
10802 if test ${gl_cv_func_malloc_posix+y}
10804 printf %s "(cached) " >&6
10809 gl_cv_func_malloc_posix=no ;;
10812 gl_cv_func_malloc_posix=no ;;
10814 gl_cv_func_malloc_posix=yes ;;
10819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
10820 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
10826 if test "$gl_cv_func_malloc_posix" = yes; then
10828 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
10831 REPLACE_MALLOC_FOR_MALLOC_POSIX=1
10837 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
10838 REPLACE_CALLOC_FOR_CALLOC_POSIX=1
10841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10842 printf %s "checking for C/C++ restrict keyword... " >&6; }
10843 if test ${ac_cv_c_restrict+y}
10845 printf %s "(cached) " >&6
10847 e) ac_cv_c_restrict=no
10848 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
10849 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
10850 # Put 'restrict' last, because C++ lacks it.
10851 for ac_kw in __restrict__ __restrict _Restrict restrict; do
10852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10853 /* end confdefs.h. */
10854 typedef int *int_ptr;
10855 int foo (int_ptr $ac_kw ip) { return ip[0]; }
10856 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
10857 int bar (int ip[$ac_kw]) { return ip[0]; }
10865 return foo (t) + bar (t);
10871 if ac_fn_c_try_compile "$LINENO"
10873 ac_cv_c_restrict=$ac_kw
10875 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10876 test "$ac_cv_c_restrict" != no && break
10881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10882 printf "%s\n" "$ac_cv_c_restrict" >&6; }
10884 case $ac_cv_c_restrict in
10886 no) printf "%s\n" "#define restrict /**/" >>confdefs.h
10888 *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
10892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
10893 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
10894 if test ${ac_cv_c_undeclared_builtin_options+y}
10896 printf %s "(cached) " >&6
10898 e) ac_save_CFLAGS=$CFLAGS
10899 ac_cv_c_undeclared_builtin_options='cannot detect'
10900 for ac_arg in '' -fno-builtin; do
10901 CFLAGS="$ac_save_CFLAGS $ac_arg"
10902 # This test program should *not* compile successfully.
10903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10904 /* end confdefs.h. */
10914 if ac_fn_c_try_compile "$LINENO"
10918 e) # This test program should compile successfully.
10919 # No library function is consistently available on
10920 # freestanding implementations, so test against a dummy
10921 # declaration. Include always-available headers on the
10922 # off chance that they somehow elicit warnings.
10923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10924 /* end confdefs.h. */
10926 #include <limits.h>
10927 #include <stdarg.h>
10928 #include <stddef.h>
10929 extern void ac_decl (int, char *);
10934 (void) ac_decl (0, (char *) 0);
10941 if ac_fn_c_try_compile "$LINENO"
10943 if test x"$ac_arg" = x
10945 ac_cv_c_undeclared_builtin_options='none needed'
10947 e) ac_cv_c_undeclared_builtin_options=$ac_arg ;;
10952 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
10955 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10957 CFLAGS=$ac_save_CFLAGS
10961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
10962 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
10963 case $ac_cv_c_undeclared_builtin_options in #(
10965 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10966 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
10967 as_fn_error $? "cannot make $CC report undeclared builtins
10968 See 'config.log' for more details" "$LINENO" 5; } ;; #(
10970 ac_c_undeclared_builtin_options='' ;; #(
10972 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
10977 HAVE_COPY_FILE_RANGE=1;
10987 HAVE_GETDTABLESIZE=1;
10990 HAVE_GETHOSTNAME=1;
10992 HAVE_GETPAGESIZE=1;
10994 HAVE_GROUP_MEMBER=1;
11004 HAVE_SETHOSTNAME=1;
11010 HAVE_DECL_ENVIRON=1;
11011 HAVE_DECL_EXECVPE=1;
11012 HAVE_DECL_FCHDIR=1;
11013 HAVE_DECL_FDATASYNC=1;
11014 HAVE_DECL_GETDOMAINNAME=1;
11015 HAVE_DECL_GETLOGIN=1;
11016 HAVE_DECL_GETLOGIN_R=1;
11017 HAVE_DECL_GETPAGESIZE=1;
11018 HAVE_DECL_GETUSERSHELL=1;
11019 HAVE_DECL_SETHOSTNAME=1;
11020 HAVE_DECL_TRUNCATE=1;
11021 HAVE_DECL_TTYNAME_R=1;
11023 HAVE_SYS_PARAM_H=0;
11027 REPLACE_COPY_FILE_RANGE=0;
11038 REPLACE_FACCESSAT=0;
11039 REPLACE_FCHOWNAT=0;
11040 REPLACE_FDATASYNC=0;
11041 REPLACE_FTRUNCATE=0;
11043 REPLACE_GETDOMAINNAME=0;
11044 REPLACE_GETDTABLESIZE=0;
11045 REPLACE_GETENTROPY=0;
11046 REPLACE_GETLOGIN_R=0;
11047 REPLACE_GETGROUPS=0;
11048 REPLACE_GETPAGESIZE=0;
11050 REPLACE_GETPASS_FOR_GETPASS_GNU=0;
11060 REPLACE_READLINK=0;
11061 REPLACE_READLINKAT=0;
11063 REPLACE_SETHOSTNAME=0;
11066 REPLACE_SYMLINKAT=0;
11067 REPLACE_TRUNCATE=0;
11068 REPLACE_TTYNAME_R=0;
11070 REPLACE_UNLINKAT=0;
11073 UNISTD_H_HAVE_SYS_RANDOM_H=0;
11074 UNISTD_H_HAVE_WINSOCK2_H=0;
11075 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
11081 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
11082 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
11084 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
11087 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
11092 SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
11093 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
11102 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
11111 if test $ac_cv_header_sys_socket_h != yes; then
11112 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11113 if test "x$ac_cv_header_winsock2_h" = xyes
11115 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
11120 if test "$ac_cv_header_winsock2_h" = yes; then
11122 UNISTD_H_HAVE_WINSOCK2_H=1
11123 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11129 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
11153 GL_GNULIB_COPY_FILE_RANGE=0
11169 GL_GNULIB_ENVIRON=0
11173 GL_GNULIB_EUIDACCESS=0
11201 GL_GNULIB_EXECVPE=0
11205 GL_GNULIB_FACCESSAT=0
11213 GL_GNULIB_FCHOWNAT=0
11217 GL_GNULIB_FDATASYNC=0
11225 GL_GNULIB_FTRUNCATE=0
11233 GL_GNULIB_GETDOMAINNAME=0
11237 GL_GNULIB_GETDTABLESIZE=0
11241 GL_GNULIB_GETENTROPY=0
11245 GL_GNULIB_GETGROUPS=0
11249 GL_GNULIB_GETHOSTNAME=0
11253 GL_GNULIB_GETLOGIN=0
11257 GL_GNULIB_GETLOGIN_R=0
11261 GL_GNULIB_GETOPT_POSIX=0
11265 GL_GNULIB_GETPAGESIZE=0
11269 GL_GNULIB_GETPASS=0
11273 GL_GNULIB_GETPASS_GNU=0
11277 GL_GNULIB_GETUSERSHELL=0
11281 GL_GNULIB_GROUP_MEMBER=0
11325 GL_GNULIB_READLINK=0
11329 GL_GNULIB_READLINKAT=0
11337 GL_GNULIB_SETHOSTNAME=0
11345 GL_GNULIB_SYMLINK=0
11349 GL_GNULIB_SYMLINKAT=0
11353 GL_GNULIB_TRUNCATE=0
11357 GL_GNULIB_TTYNAME_R=0
11361 GL_GNULIB_UNISTD_H_GETOPT=0
11365 GL_GNULIB_UNISTD_H_NONBLOCKING=0
11369 GL_GNULIB_UNISTD_H_SIGPIPE=0
11377 GL_GNULIB_UNLINKAT=0
11389 GL_GNULIB_MDA_ACCESS=1
11393 GL_GNULIB_MDA_CHDIR=1
11397 GL_GNULIB_MDA_CLOSE=1
11401 GL_GNULIB_MDA_DUP=1
11405 GL_GNULIB_MDA_DUP2=1
11409 GL_GNULIB_MDA_EXECL=1
11413 GL_GNULIB_MDA_EXECLE=1
11417 GL_GNULIB_MDA_EXECLP=1
11421 GL_GNULIB_MDA_EXECV=1
11425 GL_GNULIB_MDA_EXECVE=1
11429 GL_GNULIB_MDA_EXECVP=1
11433 GL_GNULIB_MDA_EXECVPE=1
11437 GL_GNULIB_MDA_GETCWD=1
11441 GL_GNULIB_MDA_GETPID=1
11445 GL_GNULIB_MDA_ISATTY=1
11449 GL_GNULIB_MDA_LSEEK=1
11453 GL_GNULIB_MDA_READ=1
11457 GL_GNULIB_MDA_RMDIR=1
11461 GL_GNULIB_MDA_SWAB=1
11465 GL_GNULIB_MDA_UNLINK=1
11469 GL_GNULIB_MDA_WRITE=1
11487 if test $gl_cv_have_include_next = yes; then
11488 gl_cv_next_ctype_h='<'ctype.h'>'
11490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
11491 printf %s "checking absolute name of <ctype.h>... " >&6; }
11492 if test ${gl_cv_next_ctype_h+y}
11494 printf %s "(cached) " >&6
11499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11500 /* end confdefs.h. */
11504 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11505 *) gl_absname_cpp="$ac_cpp" ;;
11510 gl_dirsep_regex='[/\\]'
11513 gl_dirsep_regex='\/'
11516 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11517 gl_header_literal_regex=`echo 'ctype.h' \
11518 | sed -e "$gl_make_literal_regex_sed"`
11519 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11520 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11526 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11527 sed -n "$gl_absolute_header_sed"`
11529 gl_header=$gl_cv_absolute_ctype_h
11530 gl_cv_next_ctype_h='"'$gl_header'"'
11535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
11536 printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
11538 NEXT_CTYPE_H=$gl_cv_next_ctype_h
11540 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11541 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11542 gl_next_as_first_directive='<'ctype.h'>'
11544 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11545 gl_next_as_first_directive=$gl_cv_next_ctype_h
11547 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
11559 GL_GNULIB_ISBLANK=0
11564 #if defined _WIN32 && !defined __CYGWIN__
11565 #define access _access
11566 #define chdir _chdir
11567 #define chmod _chmod
11568 #define close _close
11569 #define creat _creat
11573 #define execl _execl
11574 #define execle _execle
11575 #define execlp _execlp
11576 #define execv _execv
11577 #define execve _execve
11578 #define execvp _execvp
11579 #define execvpe _execvpe
11580 #define fcloseall _fcloseall
11582 #define fdopen _fdopen
11583 #define fileno _fileno
11585 #define getcwd _getcwd
11586 #define getpid _getpid
11588 #define isatty _isatty
11592 #define lfind _lfind
11593 #define lsearch _lsearch
11594 #define lseek _lseek
11595 #define memccpy _memccpy
11596 #define mkdir _mkdir
11597 #define mktemp _mktemp
11599 #define putenv _putenv
11602 #define rmdir _rmdir
11603 #define strdup _strdup
11605 #define tempnam _tempnam
11606 #define tzset _tzset
11607 #define umask _umask
11608 #define unlink _unlink
11609 #define utime _utime
11610 #define wcsdup _wcsdup
11611 #define write _write
11625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
11626 printf %s "checking if environ is properly declared... " >&6; }
11627 if test ${gt_cv_var_environ_declaration+y}
11629 printf %s "(cached) " >&6
11631 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11632 /* end confdefs.h. */
11634 #include <unistd.h>
11636 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
11637 #include <stdlib.h>
11639 typedef struct { int foo; } foo_t;
11640 extern foo_t environ;
11649 if ac_fn_c_try_compile "$LINENO"
11651 gt_cv_var_environ_declaration=no
11653 e) gt_cv_var_environ_declaration=yes ;;
11656 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
11659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
11660 printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
11661 if test $gt_cv_var_environ_declaration = yes; then
11663 printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
11668 if test $gt_cv_var_environ_declaration != yes; then
11669 HAVE_DECL_ENVIRON=0
11674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
11675 printf %s "checking for complete errno.h... " >&6; }
11676 if test ${gl_cv_header_errno_h_complete+y}
11678 printf %s "(cached) " >&6
11681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11682 /* end confdefs.h. */
11685 #if !defined ETXTBSY
11688 #if !defined ENOMSG
11694 #if !defined ENOLINK
11697 #if !defined EPROTO
11700 #if !defined EMULTIHOP
11703 #if !defined EBADMSG
11706 #if !defined EOVERFLOW
11709 #if !defined ENOTSUP
11712 #if !defined ENETRESET
11715 #if !defined ECONNABORTED
11718 #if !defined ESTALE
11721 #if !defined EDQUOT
11724 #if !defined ECANCELED
11727 #if !defined EOWNERDEAD
11730 #if !defined ENOTRECOVERABLE
11733 #if !defined EILSEQ
11738 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11739 $EGREP_TRADITIONAL "booboo" >/dev/null 2>&1
11741 gl_cv_header_errno_h_complete=no
11743 e) gl_cv_header_errno_h_complete=yes ;;
11751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
11752 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
11753 if test $gl_cv_header_errno_h_complete = yes; then
11754 GL_GENERATE_ERRNO_H=false
11764 if test $gl_cv_have_include_next = yes; then
11765 gl_cv_next_errno_h='<'errno.h'>'
11767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
11768 printf %s "checking absolute name of <errno.h>... " >&6; }
11769 if test ${gl_cv_next_errno_h+y}
11771 printf %s "(cached) " >&6
11776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11777 /* end confdefs.h. */
11781 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11782 *) gl_absname_cpp="$ac_cpp" ;;
11787 gl_dirsep_regex='[/\\]'
11790 gl_dirsep_regex='\/'
11793 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11794 gl_header_literal_regex=`echo 'errno.h' \
11795 | sed -e "$gl_make_literal_regex_sed"`
11796 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11797 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11803 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11804 sed -n "$gl_absolute_header_sed"`
11806 gl_header=$gl_cv_absolute_errno_h
11807 gl_cv_next_errno_h='"'$gl_header'"'
11812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
11813 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
11815 NEXT_ERRNO_H=$gl_cv_next_errno_h
11817 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11818 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11819 gl_next_as_first_directive='<'errno.h'>'
11821 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11822 gl_next_as_first_directive=$gl_cv_next_errno_h
11824 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
11829 GL_GENERATE_ERRNO_H=true
11832 if $GL_GENERATE_ERRNO_H; then
11833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
11834 printf %s "checking for EMULTIHOP value... " >&6; }
11835 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
11837 printf %s "(cached) " >&6
11840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11841 /* end confdefs.h. */
11849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11850 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
11852 gl_cv_header_errno_h_EMULTIHOP=yes
11854 e) gl_cv_header_errno_h_EMULTIHOP=no ;;
11859 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
11860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11861 /* end confdefs.h. */
11863 #define _XOPEN_SOURCE_EXTENDED 1
11870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11871 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
11873 gl_cv_header_errno_h_EMULTIHOP=hidden
11877 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
11878 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
11879 #define _XOPEN_SOURCE_EXTENDED 1
11881 /* The following two lines are a workaround against an autoconf-2.52 bug. */
11883 #include <stdlib.h>
11894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
11895 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
11896 case $gl_cv_header_errno_h_EMULTIHOP in
11898 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
11901 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
11909 if $GL_GENERATE_ERRNO_H; then
11910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
11911 printf %s "checking for ENOLINK value... " >&6; }
11912 if test ${gl_cv_header_errno_h_ENOLINK+y}
11914 printf %s "(cached) " >&6
11917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11918 /* end confdefs.h. */
11926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11927 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
11929 gl_cv_header_errno_h_ENOLINK=yes
11931 e) gl_cv_header_errno_h_ENOLINK=no ;;
11936 if test $gl_cv_header_errno_h_ENOLINK = no; then
11937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11938 /* end confdefs.h. */
11940 #define _XOPEN_SOURCE_EXTENDED 1
11947 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11948 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
11950 gl_cv_header_errno_h_ENOLINK=hidden
11954 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
11955 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
11956 #define _XOPEN_SOURCE_EXTENDED 1
11958 /* The following two lines are a workaround against an autoconf-2.52 bug. */
11960 #include <stdlib.h>
11971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
11972 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
11973 case $gl_cv_header_errno_h_ENOLINK in
11975 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
11978 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
11986 if $GL_GENERATE_ERRNO_H; then
11987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
11988 printf %s "checking for EOVERFLOW value... " >&6; }
11989 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
11991 printf %s "(cached) " >&6
11994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11995 /* end confdefs.h. */
12003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12004 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
12006 gl_cv_header_errno_h_EOVERFLOW=yes
12008 e) gl_cv_header_errno_h_EOVERFLOW=no ;;
12013 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
12014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12015 /* end confdefs.h. */
12017 #define _XOPEN_SOURCE_EXTENDED 1
12024 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12025 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
12027 gl_cv_header_errno_h_EOVERFLOW=hidden
12031 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
12032 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
12033 #define _XOPEN_SOURCE_EXTENDED 1
12035 /* The following two lines are a workaround against an autoconf-2.52 bug. */
12037 #include <stdlib.h>
12048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
12049 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
12050 case $gl_cv_header_errno_h_EOVERFLOW in
12052 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
12055 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
12075 if test $gl_cv_have_include_next = yes; then
12076 gl_cv_next_error_h='<'error.h'>'
12078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <error.h>" >&5
12079 printf %s "checking absolute name of <error.h>... " >&6; }
12080 if test ${gl_cv_next_error_h+y}
12082 printf %s "(cached) " >&6
12085 if test $ac_cv_header_error_h = yes; then
12090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12091 /* end confdefs.h. */
12095 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12096 *) gl_absname_cpp="$ac_cpp" ;;
12101 gl_dirsep_regex='[/\\]'
12104 gl_dirsep_regex='\/'
12107 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12108 gl_header_literal_regex=`echo 'error.h' \
12109 | sed -e "$gl_make_literal_regex_sed"`
12110 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12111 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12117 gl_cv_absolute_error_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12118 sed -n "$gl_absolute_header_sed"`
12120 gl_header=$gl_cv_absolute_error_h
12121 gl_cv_next_error_h='"'$gl_header'"'
12123 gl_cv_next_error_h='<'error.h'>'
12129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_error_h" >&5
12130 printf "%s\n" "$gl_cv_next_error_h" >&6; }
12132 NEXT_ERROR_H=$gl_cv_next_error_h
12134 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12135 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12136 gl_next_as_first_directive='<'error.h'>'
12138 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12139 gl_next_as_first_directive=$gl_cv_next_error_h
12141 NEXT_AS_FIRST_DIRECTIVE_ERROR_H=$gl_next_as_first_directive
12146 if test $ac_cv_header_error_h = yes; then
12157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error" >&5
12158 printf %s "checking for error... " >&6; }
12159 if test ${gl_cv_onwards_func_error+y}
12161 printf %s "(cached) " >&6
12164 exec 9>&6 6>/dev/null
12169 ac_fn_check_decl "$LINENO" "error" "ac_cv_have_decl_error" "#include <error.h>
12170 " "$ac_c_undeclared_builtin_options" "CFLAGS"
12171 if test "x$ac_cv_have_decl_error" = xyes
12175 if test $ac_cv_have_decl_error = yes; then
12176 ac_fn_c_check_func "$LINENO" "error" "ac_cv_func_error"
12177 if test "x$ac_cv_func_error" = xyes
12182 if test $ac_cv_func_error = yes; then
12183 gl_cv_onwards_func_error=yes
12185 gl_cv_onwards_func_error='future OS version'
12188 gl_cv_onwards_func_error='future OS version'
12194 ac_fn_c_check_func "$LINENO" "error" "ac_cv_func_error"
12195 if test "x$ac_cv_func_error" = xyes
12200 gl_cv_onwards_func_error=$ac_cv_func_error
12210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_error" >&5
12211 printf "%s\n" "$gl_cv_onwards_func_error" >&6; }
12213 case "$gl_cv_onwards_func_error" in
12214 future*) ac_cv_func_error=no ;;
12215 *) ac_cv_func_error=$gl_cv_onwards_func_error ;;
12217 if test $ac_cv_func_error = yes; then
12219 printf "%s\n" "#define HAVE_ERROR 1" >>confdefs.h
12224 if test $ac_cv_func_error = yes; then
12228 case "$gl_cv_onwards_func_error" in
12229 future*) REPLACE_ERROR=1 ;;
12233 ac_fn_check_decl "$LINENO" "error_at_line" "ac_cv_have_decl_error_at_line" "#include <error.h>
12234 " "$ac_c_undeclared_builtin_options" "CFLAGS"
12235 if test "x$ac_cv_have_decl_error_at_line" = xyes
12239 if test $ac_cv_have_decl_error_at_line = yes; then
12240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
12241 printf %s "checking for error_at_line... " >&6; }
12242 if test ${ac_cv_lib_error_at_line+y}
12244 printf %s "(cached) " >&6
12246 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12247 /* end confdefs.h. */
12252 error_at_line (0, 0, "", 0, "an error occurred");
12257 if ac_fn_c_try_link "$LINENO"
12259 ac_cv_lib_error_at_line=yes
12261 e) ac_cv_lib_error_at_line=no ;;
12264 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12265 conftest$ac_exeext conftest.$ac_ext ;;
12268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
12269 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
12271 ac_cv_lib_error_at_line=no
12273 if test $ac_cv_lib_error_at_line = yes; then
12274 HAVE_ERROR_AT_LINE=1
12276 HAVE_ERROR_AT_LINE=0
12278 REPLACE_ERROR_AT_LINE=0
12280 if test $ac_cv_func_error = yes && test $ac_cv_lib_error_at_line = yes; then
12281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working error function" >&5
12282 printf %s "checking for working error function... " >&6; }
12283 if test ${gl_cv_func_working_error+y}
12285 printf %s "(cached) " >&6
12287 e) if test $cross_compiling != yes; then
12288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12289 /* end confdefs.h. */
12292 static void print_no_progname (void) {}
12298 error_print_progname = print_no_progname;
12299 error (0, 0, "foo");
12306 if ac_fn_c_try_link "$LINENO"
12309 if test -s conftest$ac_exeext \
12310 && ./conftest$ac_exeext 2> conftest.out; then
12311 if grep ' ' conftest.out >/dev/null; then
12312 gl_cv_func_working_error=no
12314 gl_cv_func_working_error=yes
12317 gl_cv_func_working_error=no
12322 e) gl_cv_func_working_error=no ;;
12325 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12326 conftest$ac_exeext conftest.$ac_ext
12328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12329 /* end confdefs.h. */
12337 error (0, 0, "foo");
12344 if ac_fn_c_try_compile "$LINENO"
12347 # Guess yes on glibc systems.
12348 *-gnu* | gnu*) gl_cv_func_working_error="guessing yes" ;;
12349 # Guess no on Android.
12350 linux*-android*) gl_cv_func_working_error="guessing no" ;;
12351 # If we don't know, obey --enable-cross-guesses.
12352 *) gl_cv_func_working_error="$gl_cross_guess_normal" ;;
12356 e) gl_cv_func_working_error=no ;;
12359 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_error" >&5
12365 printf "%s\n" "$gl_cv_func_working_error" >&6; }
12366 case "$gl_cv_func_working_error" in
12369 REPLACE_ERROR_AT_LINE=1
12374 if test $HAVE_ERROR = 0 || test $REPLACE_ERROR = 1 \
12375 || test $HAVE_ERROR_AT_LINE = 0 || test $REPLACE_ERROR_AT_LINE = 1; then
12376 GL_GENERATE_ERROR_H=true
12378 GL_GENERATE_ERROR_H=false
12386 ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
12387 if test "x$ac_cv_have_decl_strerror_r" = xyes
12391 e) ac_have_decl=0 ;;
12394 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
12397 if test $ac_cv_have_decl_strerror_r = yes; then
12398 # For backward compatibility's sake, define HAVE_STRERROR_R.
12399 # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
12400 # as AC_CHECK_DECLS_ONCE.)
12402 printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
12406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
12407 printf %s "checking whether strerror_r returns char *... " >&6; }
12408 if test ${ac_cv_func_strerror_r_char_p+y}
12410 printf %s "(cached) " >&6
12413 ac_cv_func_strerror_r_char_p=no
12414 if test $ac_cv_have_decl_strerror_r = yes; then
12415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12416 /* end confdefs.h. */
12417 #include <string.h>
12423 char x = *strerror_r (0, buf, sizeof buf);
12424 char *p = strerror_r (0, buf, sizeof buf);
12431 if ac_fn_c_try_compile "$LINENO"
12433 ac_cv_func_strerror_r_char_p=yes
12435 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
12442 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
12443 if test $ac_cv_func_strerror_r_char_p = yes; then
12445 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
12450 XGETTEXT_EXTRA_OPTIONS=
12453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ctype.h defines __header_inline" >&5
12454 printf %s "checking whether ctype.h defines __header_inline... " >&6; }
12455 if test ${gl_cv_have___header_inline+y}
12457 printf %s "(cached) " >&6
12459 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12460 /* end confdefs.h. */
12462 #ifndef __header_inline
12463 #error "<ctype.h> does not define __header_inline"
12467 if ac_fn_c_try_cpp "$LINENO"
12469 gl_cv_have___header_inline=yes
12471 e) gl_cv_have___header_inline=no ;;
12474 rm -f conftest.err conftest.i conftest.$ac_ext ;;
12477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___header_inline" >&5
12478 printf "%s\n" "$gl_cv_have___header_inline" >&6; }
12479 if test "$gl_cv_have___header_inline" = yes; then
12481 printf "%s\n" "#define HAVE___HEADER_INLINE 1" >>confdefs.h
12506 GL_GNULIB_NONBLOCKING=0
12518 GL_GNULIB_MDA_CREAT=1
12522 GL_GNULIB_MDA_OPEN=1
12532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
12533 printf %s "checking for working fcntl.h... " >&6; }
12534 if test ${gl_cv_header_working_fcntl_h+y}
12536 printf %s "(cached) " >&6
12538 e) if test "$cross_compiling" = yes
12541 # Guess 'no' on native Windows.
12542 mingw*) gl_cv_header_working_fcntl_h='no' ;;
12543 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
12547 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12548 /* end confdefs.h. */
12549 #include <sys/types.h>
12550 #include <sys/stat.h>
12552 # include <unistd.h>
12553 #else /* on Windows with MSVC */
12555 # include <stdlib.h>
12556 # defined sleep(n) _sleep ((n) * 1000)
12564 #define O_NOATIME 0
12567 #define O_NOFOLLOW 0
12569 static int const constants[] =
12571 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
12572 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
12579 int result = !constants;
12582 static char const sym[] = "conftest.sym";
12583 if (symlink ("/dev/null", sym) != 0)
12587 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
12594 if (unlink (sym) != 0 || symlink (".", sym) != 0)
12598 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
12609 static char const file[] = "confdefs.h";
12610 int fd = open (file, O_RDONLY | O_NOATIME);
12616 if (fstat (fd, &st0) != 0)
12622 if (read (fd, &c, 1) != 1)
12626 if (close (fd) != 0)
12631 if (stat (file, &st1) != 0)
12634 if (st0.st_atime != st1.st_atime)
12646 if ac_fn_c_try_run "$LINENO"
12648 gl_cv_header_working_fcntl_h=yes
12651 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
12652 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
12653 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
12654 *) gl_cv_header_working_fcntl_h='no';;
12658 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12659 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
12667 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
12669 case $gl_cv_header_working_fcntl_h in #(
12670 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
12674 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
12677 case $gl_cv_header_working_fcntl_h in #(
12678 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
12682 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
12686 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12688 if test "x$ac_cv_type_pid_t" = xyes
12692 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12693 /* end confdefs.h. */
12695 #if defined _WIN64 && !defined __CYGWIN__
12708 if ac_fn_c_try_compile "$LINENO"
12712 e) ac_pid_type='__int64' ;;
12715 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12717 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12724 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
12725 if test "x$ac_cv_type_mode_t" = xyes
12730 printf "%s\n" "#define mode_t int" >>confdefs.h
12746 if test $gl_cv_have_include_next = yes; then
12747 gl_cv_next_fcntl_h='<'fcntl.h'>'
12749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
12750 printf %s "checking absolute name of <fcntl.h>... " >&6; }
12751 if test ${gl_cv_next_fcntl_h+y}
12753 printf %s "(cached) " >&6
12758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12759 /* end confdefs.h. */
12763 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12764 *) gl_absname_cpp="$ac_cpp" ;;
12769 gl_dirsep_regex='[/\\]'
12772 gl_dirsep_regex='\/'
12775 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12776 gl_header_literal_regex=`echo 'fcntl.h' \
12777 | sed -e "$gl_make_literal_regex_sed"`
12778 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12779 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12785 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12786 sed -n "$gl_absolute_header_sed"`
12788 gl_header=$gl_cv_absolute_fcntl_h
12789 gl_cv_next_fcntl_h='"'$gl_header'"'
12794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
12795 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
12797 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
12799 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12800 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12801 gl_next_as_first_directive='<'fcntl.h'>'
12803 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12804 gl_next_as_first_directive=$gl_cv_next_fcntl_h
12806 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
12823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mempcpy" >&5
12824 printf %s "checking for mempcpy... " >&6; }
12825 if test ${gl_cv_onwards_func_mempcpy+y}
12827 printf %s "(cached) " >&6
12830 exec 9>&6 6>/dev/null
12835 ac_fn_check_decl "$LINENO" "mempcpy" "ac_cv_have_decl_mempcpy" "#include <string.h>
12836 " "$ac_c_undeclared_builtin_options" "CFLAGS"
12837 if test "x$ac_cv_have_decl_mempcpy" = xyes
12841 if test $ac_cv_have_decl_mempcpy = yes; then
12842 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
12843 if test "x$ac_cv_func_mempcpy" = xyes
12848 if test $ac_cv_func_mempcpy = yes; then
12849 gl_cv_onwards_func_mempcpy=yes
12851 gl_cv_onwards_func_mempcpy='future OS version'
12854 gl_cv_onwards_func_mempcpy='future OS version'
12860 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
12861 if test "x$ac_cv_func_mempcpy" = xyes
12866 gl_cv_onwards_func_mempcpy=$ac_cv_func_mempcpy
12876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mempcpy" >&5
12877 printf "%s\n" "$gl_cv_onwards_func_mempcpy" >&6; }
12879 case "$gl_cv_onwards_func_mempcpy" in
12880 future*) ac_cv_func_mempcpy=no ;;
12881 *) ac_cv_func_mempcpy=$gl_cv_onwards_func_mempcpy ;;
12883 if test $ac_cv_func_mempcpy = yes; then
12885 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
12909 if test $gl_cv_have_include_next = yes; then
12910 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
12912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
12913 printf %s "checking absolute name of <fnmatch.h>... " >&6; }
12914 if test ${gl_cv_next_fnmatch_h+y}
12916 printf %s "(cached) " >&6
12919 if test $ac_cv_header_fnmatch_h = yes; then
12924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12925 /* end confdefs.h. */
12926 #include <fnmatch.h>
12929 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12930 *) gl_absname_cpp="$ac_cpp" ;;
12935 gl_dirsep_regex='[/\\]'
12938 gl_dirsep_regex='\/'
12941 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12942 gl_header_literal_regex=`echo 'fnmatch.h' \
12943 | sed -e "$gl_make_literal_regex_sed"`
12944 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12945 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12951 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12952 sed -n "$gl_absolute_header_sed"`
12954 gl_header=$gl_cv_absolute_fnmatch_h
12955 gl_cv_next_fnmatch_h='"'$gl_header'"'
12957 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
12963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
12964 printf "%s\n" "$gl_cv_next_fnmatch_h" >&6; }
12966 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
12968 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12969 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12970 gl_next_as_first_directive='<'fnmatch.h'>'
12972 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12973 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
12975 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
12983 if test $ac_cv_header_fnmatch_h = yes; then
12990 GL_GENERATE_FNMATCH_H=false
12992 GL_GENERATE_FNMATCH_H=true
12994 if test $ac_cv_header_fnmatch_h != yes; then
12995 GL_GENERATE_FNMATCH_H=true
13007 GL_GNULIB_FNMATCH=0
13013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
13014 printf %s "checking for mbstate_t... " >&6; }
13015 if test ${ac_cv_type_mbstate_t+y}
13017 printf %s "(cached) " >&6
13019 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13020 /* end confdefs.h. */
13021 $ac_includes_default
13026 mbstate_t x; return sizeof x;
13031 if ac_fn_c_try_compile "$LINENO"
13033 ac_cv_type_mbstate_t=yes
13035 e) ac_cv_type_mbstate_t=no ;;
13038 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
13042 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
13043 if test $ac_cv_type_mbstate_t = yes; then
13045 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
13049 printf "%s\n" "#define mbstate_t int" >>confdefs.h
13055 HAVE_DECL_FCLOSEALL=1;
13056 HAVE_DECL_FPURGE=1;
13057 HAVE_DECL_FSEEKO=1;
13058 HAVE_DECL_FTELLO=1;
13059 HAVE_DECL_GETDELIM=1;
13060 HAVE_DECL_GETLINE=1;
13062 HAVE_DECL_OBSTACK_PRINTF=1;
13064 HAVE_DECL_SNPRINTF=1;
13065 HAVE_DECL_VSNPRINTF=1;
13079 REPLACE_FOPEN_FOR_FOPEN_GNU=0;
13087 REPLACE_GETDELIM=0;
13089 REPLACE_OBSTACK_PRINTF=0;
13095 REPLACE_RENAMEAT=0;
13096 REPLACE_SNPRINTF=0;
13098 REPLACE_STDIO_READ_FUNCS=0;
13099 REPLACE_STDIO_WRITE_FUNCS=0;
13101 REPLACE_VASPRINTF=0;
13102 REPLACE_VDPRINTF=0;
13103 REPLACE_VFPRINTF=0;
13105 REPLACE_VSNPRINTF=0;
13106 REPLACE_VSPRINTF=0;
13114 gl_cv_func_fopen_slash="guessing no"
13117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
13118 printf %s "checking whether fopen recognizes a trailing slash... " >&6; }
13119 if test ${gl_cv_func_fopen_slash+y}
13121 printf %s "(cached) " >&6
13124 if test "$cross_compiling" = yes
13128 aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
13129 gl_cv_func_fopen_slash="guessing no" ;;
13131 gl_cv_func_fopen_slash="guessing yes" ;;
13135 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13136 /* end confdefs.h. */
13138 #include <stddef.h>
13142 FILE *fp = fopen ("conftest.sl/", "w");
13143 int result = (fp != NULL);
13149 if ac_fn_c_try_run "$LINENO"
13151 gl_cv_func_fopen_slash=yes
13153 e) gl_cv_func_fopen_slash=no ;;
13156 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13157 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
13166 printf "%s\n" "$gl_cv_func_fopen_slash" >&6; }
13169 case "$gl_cv_func_fopen_slash" in
13172 printf "%s\n" "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
13184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
13185 printf %s "checking whether fflush works on input streams... " >&6; }
13186 if test ${gl_cv_func_fflush_stdin+y}
13188 printf %s "(cached) " >&6
13190 e) echo hello world > conftest.txt
13191 if test "$cross_compiling" = yes
13194 # Guess no on native Windows.
13195 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
13196 *) gl_cv_func_fflush_stdin=cross ;;
13200 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13201 /* end confdefs.h. */
13205 # include <unistd.h>
13206 #else /* on Windows with MSVC */
13216 FILE *f = fopen ("conftest.txt", "r");
13223 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
13224 { fclose (f); return 2; }
13225 /* For deterministic results, ensure f read a bigger buffer. */
13226 if (lseek (fd, 0, SEEK_CUR) == 5)
13227 { fclose (f); return 3; }
13228 /* POSIX requires fflush-fseek to set file offset of fd. This fails
13229 on BSD systems and on mingw. */
13230 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
13231 { fclose (f); return 4; }
13232 if (lseek (fd, 0, SEEK_CUR) != 5)
13233 { fclose (f); return 5; }
13234 /* Verify behaviour of fflush after ungetc. See
13235 <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
13236 /* Verify behaviour of fflush after a backup ungetc. This fails on
13241 if (fgetc (f) != c)
13242 { fclose (f); return 6; }
13243 /* Verify behaviour of fflush after a non-backup ungetc. This fails
13244 on glibc 2.8 and on BSD systems. */
13248 if (fgetc (f) != c)
13249 { fclose (f); return 7; }
13257 if ac_fn_c_try_run "$LINENO"
13259 gl_cv_func_fflush_stdin=yes
13261 e) gl_cv_func_fflush_stdin=no ;;
13264 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13265 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
13274 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
13275 case "$gl_cv_func_fflush_stdin" in
13276 *yes) gl_func_fflush_stdin=1 ;;
13277 *no) gl_func_fflush_stdin=0 ;;
13278 *) gl_func_fflush_stdin='(-1)' ;;
13281 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
13284 case "$gl_cv_func_fflush_stdin" in
13286 *) REPLACE_FCLOSE=1 ;;
13290 if test $REPLACE_CLOSE = 1; then
13295 openedition) REPLACE_FCLOSE=1 ;;
13298 if test $REPLACE_FCLOSE = 0; then
13301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fclose works on input streams" >&5
13302 printf %s "checking whether fclose works on input streams... " >&6; }
13303 if test ${gl_cv_func_fclose_stdin+y}
13305 printf %s "(cached) " >&6
13307 e) echo hello world > conftest.txt
13308 if test "$cross_compiling" = yes
13311 # Guess no on glibc systems.
13312 *-gnu* | gnu*) gl_cv_func_fclose_stdin="guessing no" ;;
13313 # Guess yes on musl systems.
13314 *-musl* | midipix*) gl_cv_func_fclose_stdin="guessing yes" ;;
13315 # Guess no on native Windows.
13316 mingw*) gl_cv_func_fclose_stdin="guessing no" ;;
13317 # If we don't know, obey --enable-cross-guesses.
13318 *) gl_cv_func_fclose_stdin="$gl_cross_guess_normal" ;;
13322 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13323 /* end confdefs.h. */
13327 # include <unistd.h>
13328 #else /* on Windows with MSVC */
13341 fd = open ("conftest.txt", O_RDONLY);
13344 if (lseek (fd, 1, SEEK_SET) != 1)
13349 fp = fdopen (fd2, "r");
13352 if (fgetc (fp) != 'e')
13353 { fclose (fp); return 5; }
13354 /* This fclose() call should reposition the underlying file
13356 if (fclose (fp) != 0)
13358 if (lseek (fd2, 0, SEEK_CUR) != -1) /* should fail with EBADF */
13360 /* Verify the file position. */
13361 if (lseek (fd, 0, SEEK_CUR) != 2)
13369 if ac_fn_c_try_run "$LINENO"
13371 gl_cv_func_fclose_stdin=yes
13373 e) gl_cv_func_fclose_stdin=no ;;
13376 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13377 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fclose_stdin" >&5
13386 printf "%s\n" "$gl_cv_func_fclose_stdin" >&6; }
13388 case "$gl_cv_func_fclose_stdin" in
13390 *) REPLACE_FCLOSE=1 ;;
13396 GL_GNULIB_DPRINTF=0
13424 GL_GNULIB_FOPEN_GNU=0
13428 GL_GNULIB_FPRINTF=0
13432 GL_GNULIB_FPRINTF_POSIX=0
13452 GL_GNULIB_FREOPEN=0
13484 GL_GNULIB_GETCHAR=0
13488 GL_GNULIB_GETDELIM=0
13492 GL_GNULIB_GETLINE=0
13496 GL_GNULIB_OBSTACK_PRINTF=0
13500 GL_GNULIB_OBSTACK_PRINTF_POSIX=0
13520 GL_GNULIB_PRINTF_POSIX=0
13528 GL_GNULIB_PUTCHAR=0
13544 GL_GNULIB_RENAMEAT=0
13552 GL_GNULIB_SNPRINTF=0
13556 GL_GNULIB_SPRINTF_POSIX=0
13560 GL_GNULIB_STDIO_H_NONBLOCKING=0
13564 GL_GNULIB_STDIO_H_SIGPIPE=0
13568 GL_GNULIB_TMPFILE=0
13572 GL_GNULIB_VASPRINTF=0
13576 GL_GNULIB_VFSCANF=0
13584 GL_GNULIB_VDPRINTF=0
13588 GL_GNULIB_VFPRINTF=0
13592 GL_GNULIB_VFPRINTF_POSIX=0
13596 GL_GNULIB_VPRINTF=0
13600 GL_GNULIB_VPRINTF_POSIX=0
13604 GL_GNULIB_VSNPRINTF=0
13608 GL_GNULIB_VSPRINTF_POSIX=0
13612 GL_GNULIB_MDA_FCLOSEALL=1
13616 GL_GNULIB_MDA_FDOPEN=1
13620 GL_GNULIB_MDA_FILENO=1
13624 GL_GNULIB_MDA_GETW=1
13628 GL_GNULIB_MDA_PUTW=1
13632 GL_GNULIB_MDA_TEMPNAM=1
13650 REPLACE_FCHMODAT=0;
13653 REPLACE_FUTIMENS=0;
13657 REPLACE_MKFIFOAT=0;
13661 REPLACE_UTIMENSAT=0;
13663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
13664 printf %s "checking whether stat file-mode macros are broken... " >&6; }
13665 if test ${ac_cv_header_stat_broken+y}
13667 printf %s "(cached) " >&6
13669 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13670 /* end confdefs.h. */
13671 #include <sys/types.h>
13672 #include <sys/stat.h>
13674 #if defined S_ISBLK && defined S_IFDIR
13675 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
13678 #if defined S_ISBLK && defined S_IFCHR
13679 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
13682 #if defined S_ISLNK && defined S_IFREG
13683 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
13686 #if defined S_ISSOCK && defined S_IFREG
13687 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
13691 if ac_fn_c_try_compile "$LINENO"
13693 ac_cv_header_stat_broken=no
13695 e) ac_cv_header_stat_broken=yes ;;
13698 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
13702 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
13703 if test $ac_cv_header_stat_broken = yes; then
13705 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
13713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
13714 printf %s "checking for 64-bit off_t... " >&6; }
13715 if test ${gl_cv_type_off_t_64+y}
13717 printf %s "(cached) " >&6
13719 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13720 /* end confdefs.h. */
13721 #include <sys/types.h>
13722 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
13732 if ac_fn_c_try_compile "$LINENO"
13734 gl_cv_type_off_t_64=yes
13736 e) gl_cv_type_off_t_64=no ;;
13739 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
13744 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
13745 if test $gl_cv_type_off_t_64 = no; then
13746 WINDOWS_64_BIT_OFF_T=1
13748 WINDOWS_64_BIT_OFF_T=0
13750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
13751 printf %s "checking for 64-bit st_size... " >&6; }
13752 if test ${gl_cv_member_st_size_64+y}
13754 printf %s "(cached) " >&6
13756 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13757 /* end confdefs.h. */
13758 #include <sys/types.h>
13760 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
13770 if ac_fn_c_try_compile "$LINENO"
13772 gl_cv_member_st_size_64=yes
13774 e) gl_cv_member_st_size_64=no ;;
13777 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
13782 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
13783 if test $gl_cv_member_st_size_64 = no; then
13784 WINDOWS_64_BIT_ST_SIZE=1
13786 WINDOWS_64_BIT_ST_SIZE=0
13790 WINDOWS_64_BIT_OFF_T=0
13791 WINDOWS_64_BIT_ST_SIZE=0
13809 if test $gl_cv_have_include_next = yes; then
13810 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
13812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
13813 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
13814 if test ${gl_cv_next_sys_stat_h+y}
13816 printf %s "(cached) " >&6
13819 if test $ac_cv_header_sys_stat_h = yes; then
13824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13825 /* end confdefs.h. */
13826 #include <sys/stat.h>
13829 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13830 *) gl_absname_cpp="$ac_cpp" ;;
13835 gl_dirsep_regex='[/\\]'
13838 gl_dirsep_regex='\/'
13841 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13842 gl_header_literal_regex=`echo 'sys/stat.h' \
13843 | sed -e "$gl_make_literal_regex_sed"`
13844 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13845 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13851 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13852 sed -n "$gl_absolute_header_sed"`
13854 gl_header=$gl_cv_absolute_sys_stat_h
13855 gl_cv_next_sys_stat_h='"'$gl_header'"'
13857 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
13863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
13864 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
13866 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
13868 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13869 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13870 gl_next_as_first_directive='<'sys/stat.h'>'
13872 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13873 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
13875 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
13884 WINDOWS_STAT_TIMESPEC=0
13893 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
13894 #include <sys/stat.h>
13896 if test "x$ac_cv_type_nlink_t" = xyes
13901 printf "%s\n" "#define nlink_t int" >>confdefs.h
13917 ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
13918 if test "x$ac_cv_header_sdkddkver_h" = xyes
13920 printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h
13937 GL_GNULIB_FCHMODAT=0
13945 GL_GNULIB_FSTATAT=0
13949 GL_GNULIB_FUTIMENS=0
13953 GL_GNULIB_GETUMASK=0
13969 GL_GNULIB_MKDIRAT=0
13977 GL_GNULIB_MKFIFOAT=0
13985 GL_GNULIB_MKNODAT=0
13993 GL_GNULIB_UTIMENSAT=0
13997 GL_GNULIB_OVERRIDES_STRUCT_STAT=0
14001 GL_GNULIB_MDA_CHMOD=1
14005 GL_GNULIB_MDA_MKDIR=1
14009 GL_GNULIB_MDA_UMASK=1
14014 ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14015 if test "x$ac_cv_have_decl_getdtablesize" = xyes
14019 e) ac_have_decl=0 ;;
14022 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
14038 if test $gl_cv_have_include_next = yes; then
14039 gl_cv_next_getopt_h='<'getopt.h'>'
14041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
14042 printf %s "checking absolute name of <getopt.h>... " >&6; }
14043 if test ${gl_cv_next_getopt_h+y}
14045 printf %s "(cached) " >&6
14048 if test $ac_cv_header_getopt_h = yes; then
14053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14054 /* end confdefs.h. */
14055 #include <getopt.h>
14058 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14059 *) gl_absname_cpp="$ac_cpp" ;;
14064 gl_dirsep_regex='[/\\]'
14067 gl_dirsep_regex='\/'
14070 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14071 gl_header_literal_regex=`echo 'getopt.h' \
14072 | sed -e "$gl_make_literal_regex_sed"`
14073 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14074 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14080 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14081 sed -n "$gl_absolute_header_sed"`
14083 gl_header=$gl_cv_absolute_getopt_h
14084 gl_cv_next_getopt_h='"'$gl_header'"'
14086 gl_cv_next_getopt_h='<'getopt.h'>'
14092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
14093 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
14095 NEXT_GETOPT_H=$gl_cv_next_getopt_h
14097 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14098 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14099 gl_next_as_first_directive='<'getopt.h'>'
14101 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14102 gl_next_as_first_directive=$gl_cv_next_getopt_h
14104 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
14109 if test $ac_cv_header_getopt_h = yes; then
14118 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
14119 for ac_header in getopt.h
14121 ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
14122 if test "x$ac_cv_header_getopt_h" = xyes
14124 printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
14127 e) gl_replace_getopt=yes ;;
14134 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
14136 for ac_func in getopt_long_only
14138 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
14139 if test "x$ac_cv_func_getopt_long_only" = xyes
14141 printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
14144 e) gl_replace_getopt=yes ;;
14151 if test -z "$gl_replace_getopt"; then
14152 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
14153 printf %s "checking whether getopt is POSIX compatible... " >&6; }
14154 if test ${gl_cv_func_getopt_posix+y}
14156 printf %s "(cached) " >&6
14159 if test $cross_compiling = no; then
14160 if test "$cross_compiling" = yes
14162 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
14163 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
14164 as_fn_error $? "cannot run test program while cross compiling
14165 See 'config.log' for more details" "$LINENO" 5; }
14167 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14168 /* end confdefs.h. */
14170 #include <unistd.h>
14171 #include <stdlib.h>
14172 #include <string.h>
14177 static char program[] = "program";
14178 static char a[] = "-a";
14179 static char foo[] = "foo";
14180 static char bar[] = "bar";
14181 char *argv[] = { program, a, foo, bar, NULL };
14184 c = getopt (4, argv, "ab");
14187 c = getopt (4, argv, "ab");
14190 if (!(optind == 2))
14196 if ac_fn_c_try_run "$LINENO"
14198 gl_cv_func_getopt_posix=maybe
14200 e) gl_cv_func_getopt_posix=no ;;
14203 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14204 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14208 if test $gl_cv_func_getopt_posix = maybe; then
14209 if test "$cross_compiling" = yes
14211 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
14212 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
14213 as_fn_error $? "cannot run test program while cross compiling
14214 See 'config.log' for more details" "$LINENO" 5; }
14216 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14217 /* end confdefs.h. */
14219 #include <unistd.h>
14220 #include <stdlib.h>
14221 #include <string.h>
14226 static char program[] = "program";
14227 static char donald[] = "donald";
14228 static char p[] = "-p";
14229 static char billy[] = "billy";
14230 static char duck[] = "duck";
14231 static char a[] = "-a";
14232 static char bar[] = "bar";
14233 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
14236 c = getopt (7, argv, "+abp:q:");
14239 if (!(strcmp (argv[0], "program") == 0))
14241 if (!(strcmp (argv[1], "donald") == 0))
14243 if (!(strcmp (argv[2], "-p") == 0))
14245 if (!(strcmp (argv[3], "billy") == 0))
14247 if (!(strcmp (argv[4], "duck") == 0))
14249 if (!(strcmp (argv[5], "-a") == 0))
14251 if (!(strcmp (argv[6], "bar") == 0))
14253 if (!(optind == 1))
14259 if ac_fn_c_try_run "$LINENO"
14261 gl_cv_func_getopt_posix=maybe
14263 e) gl_cv_func_getopt_posix=no ;;
14266 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14267 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14272 if test $gl_cv_func_getopt_posix = maybe; then
14273 if test "$cross_compiling" = yes
14275 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
14276 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
14277 as_fn_error $? "cannot run test program while cross compiling
14278 See 'config.log' for more details" "$LINENO" 5; }
14280 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14281 /* end confdefs.h. */
14283 #include <unistd.h>
14284 #include <stdlib.h>
14285 #include <string.h>
14290 static char program[] = "program";
14291 static char ab[] = "-ab";
14292 char *argv[3] = { program, ab, NULL };
14293 if (getopt (2, argv, "ab:") != 'a')
14295 if (getopt (2, argv, "ab:") != '?')
14305 if ac_fn_c_try_run "$LINENO"
14307 gl_cv_func_getopt_posix=yes
14309 e) gl_cv_func_getopt_posix=no ;;
14312 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14313 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14320 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
14321 *) gl_cv_func_getopt_posix="guessing yes";;
14327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
14328 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
14329 case "$gl_cv_func_getopt_posix" in
14330 *no) gl_replace_getopt=yes ;;
14334 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
14335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
14336 printf %s "checking for working GNU getopt function... " >&6; }
14337 if test ${gl_cv_func_getopt_gnu+y}
14339 printf %s "(cached) " >&6
14341 e) # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
14342 # optstring is necessary for programs like m4 that have POSIX-mandated
14343 # semantics for supporting options interspersed with files.
14344 # Also, since getopt_long is a GNU extension, we require optind=0.
14345 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
14346 # so take care to revert to the correct (non-)export state.
14347 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
14348 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
14349 xx) gl_had_POSIXLY_CORRECT=exported ;;
14350 x) gl_had_POSIXLY_CORRECT=yes ;;
14351 *) gl_had_POSIXLY_CORRECT= ;;
14354 export POSIXLY_CORRECT
14355 if test "$cross_compiling" = yes
14357 gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
14360 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14361 /* end confdefs.h. */
14362 #include <getopt.h>
14363 #include <stddef.h>
14364 #include <string.h>
14366 #include <stdlib.h>
14367 #if defined __MACH__ && defined __APPLE__
14368 /* Avoid a crash on Mac OS X. */
14369 #include <mach/mach.h>
14370 #include <mach/mach_error.h>
14371 #include <mach/thread_status.h>
14372 #include <mach/exception.h>
14373 #include <mach/task.h>
14374 #include <pthread.h>
14375 /* The exception port on which our thread listens. */
14376 static mach_port_t our_exception_port;
14377 /* The main function of the thread listening for exceptions of type
14380 mach_exception_thread (void *arg)
14382 /* Buffer for a message to be received. */
14384 mach_msg_header_t head;
14385 mach_msg_body_t msgh_body;
14388 mach_msg_return_t retval;
14389 /* Wait for a message on the exception port. */
14390 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
14391 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
14392 if (retval != MACH_MSG_SUCCESS)
14397 nocrash_init (void)
14399 mach_port_t self = mach_task_self ();
14400 /* Allocate a port on which the thread shall listen for exceptions. */
14401 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
14403 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
14404 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
14405 MACH_MSG_TYPE_MAKE_SEND)
14407 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
14409 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
14410 /* Create the thread listening on the exception port. */
14411 pthread_attr_t attr;
14413 if (pthread_attr_init (&attr) == 0
14414 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
14415 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
14416 pthread_attr_destroy (&attr);
14417 /* Replace the exception port info for these exceptions with our own.
14418 Note that we replace the exception port for the entire task, not only
14419 for a particular thread. This has the effect that when our exception
14420 port gets the message, the thread specific exception port has already
14421 been asked, and we don't need to bother about it.
14422 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
14423 task_set_exception_ports (self, mask, our_exception_port,
14424 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
14429 #elif defined _WIN32 && ! defined __CYGWIN__
14430 /* Avoid a crash on native Windows. */
14431 #define WIN32_LEAN_AND_MEAN
14432 #include <windows.h>
14433 #include <winerror.h>
14435 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
14437 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
14439 case EXCEPTION_ACCESS_VIOLATION:
14440 case EXCEPTION_IN_PAGE_ERROR:
14441 case EXCEPTION_STACK_OVERFLOW:
14442 case EXCEPTION_GUARD_PAGE:
14443 case EXCEPTION_PRIV_INSTRUCTION:
14444 case EXCEPTION_ILLEGAL_INSTRUCTION:
14445 case EXCEPTION_DATATYPE_MISALIGNMENT:
14446 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
14447 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
14450 return EXCEPTION_CONTINUE_SEARCH;
14453 nocrash_init (void)
14455 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
14458 /* Avoid a crash on POSIX systems. */
14459 #include <signal.h>
14460 #include <unistd.h>
14461 /* A POSIX signal handler. */
14463 exception_handler (int sig)
14468 nocrash_init (void)
14471 signal (SIGSEGV, exception_handler);
14474 signal (SIGBUS, exception_handler);
14488 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
14489 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
14490 OSF/1 5.1, Solaris 10. */
14492 static char conftest[] = "conftest";
14493 static char plus[] = "-+";
14494 char *argv[3] = { conftest, plus, NULL };
14496 if (getopt (2, argv, "+a") != '?')
14499 /* This code succeeds on glibc 2.8, mingw,
14500 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
14501 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
14503 static char program[] = "program";
14504 static char p[] = "-p";
14505 static char foo[] = "foo";
14506 static char bar[] = "bar";
14507 char *argv[] = { program, p, foo, bar, NULL };
14510 if (getopt (4, argv, "p::") != 'p')
14512 else if (optarg != NULL)
14514 else if (getopt (4, argv, "p::") != -1)
14516 else if (optind != 2)
14519 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
14521 static char program[] = "program";
14522 static char foo[] = "foo";
14523 static char p[] = "-p";
14524 char *argv[] = { program, foo, p, NULL };
14526 if (getopt (3, argv, "-p") != 1)
14528 else if (getopt (3, argv, "-p") != 'p')
14531 /* This code fails on glibc 2.11. */
14533 static char program[] = "program";
14534 static char b[] = "-b";
14535 static char a[] = "-a";
14536 char *argv[] = { program, b, a, NULL };
14537 optind = opterr = 0;
14538 if (getopt (3, argv, "+:a:b") != 'b')
14540 else if (getopt (3, argv, "+:a:b") != ':')
14543 /* This code dumps core on glibc 2.14. */
14545 static char program[] = "program";
14546 static char w[] = "-W";
14547 static char dummy[] = "dummy";
14548 char *argv[] = { program, w, dummy, NULL };
14549 optind = opterr = 1;
14550 if (getopt (3, argv, "W;") != 'W')
14559 if ac_fn_c_try_run "$LINENO"
14561 gl_cv_func_getopt_gnu=yes
14563 e) gl_cv_func_getopt_gnu=no ;;
14566 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14567 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14571 case $gl_had_POSIXLY_CORRECT in
14573 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
14574 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
14579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
14580 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
14581 if test "$gl_cv_func_getopt_gnu" != yes; then
14582 gl_replace_getopt=yes
14584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
14585 printf %s "checking for working GNU getopt_long function... " >&6; }
14586 if test ${gl_cv_func_getopt_long_gnu+y}
14588 printf %s "(cached) " >&6
14590 e) if test "$cross_compiling" = yes
14593 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
14594 *) gl_cv_func_getopt_long_gnu="guessing yes";;
14598 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14599 /* end confdefs.h. */
14600 #include <getopt.h>
14601 #include <stddef.h>
14602 #include <string.h>
14607 static const struct option long_options[] =
14609 { "xtremely-",no_argument, NULL, 1003 },
14610 { "xtra", no_argument, NULL, 1001 },
14611 { "xtreme", no_argument, NULL, 1002 },
14612 { "xtremely", no_argument, NULL, 1003 },
14613 { NULL, 0, NULL, 0 }
14615 /* This code fails on OpenBSD 5.0. */
14617 static char program[] = "program";
14618 static char xtremel[] = "--xtremel";
14619 char *argv[] = { program, xtremel, NULL };
14621 optind = 1; opterr = 0;
14622 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
14631 if ac_fn_c_try_run "$LINENO"
14633 gl_cv_func_getopt_long_gnu=yes
14635 e) gl_cv_func_getopt_long_gnu=no ;;
14638 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14639 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
14647 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
14648 case "$gl_cv_func_getopt_long_gnu" in
14650 *) gl_replace_getopt=yes ;;
14659 REPLACE_GETRANDOM=0;
14663 GL_GNULIB_GETRANDOM=0
14673 ac_fn_check_decl "$LINENO" "timespec_get" "ac_cv_have_decl_timespec_get" "#include <time.h>
14674 " "$ac_c_undeclared_builtin_options" "CFLAGS"
14675 if test "x$ac_cv_have_decl_timespec_get" = xyes
14679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timespec_get" >&5
14680 printf %s "checking for timespec_get... " >&6; }
14681 if test ${gl_cv_onwards_func_timespec_get+y}
14683 printf %s "(cached) " >&6
14685 e) if test $ac_cv_have_decl_timespec_get = yes; then
14686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14687 /* end confdefs.h. */
14689 struct timespec ts;
14694 return timespec_get (&ts, 0);
14700 if ac_fn_c_try_link "$LINENO"
14702 gl_cv_onwards_func_timespec_get=yes
14704 e) gl_cv_onwards_func_timespec_get=no ;;
14707 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14708 conftest$ac_exeext conftest.$ac_ext
14710 gl_cv_onwards_func_timespec_get=no
14714 if test $gl_cv_onwards_func_timespec_get = no; then
14715 gl_cv_onwards_func_timespec_get='future OS version'
14722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_timespec_get" >&5
14723 printf "%s\n" "$gl_cv_onwards_func_timespec_get" >&6; }
14724 case "$gl_cv_onwards_func_timespec_get" in
14725 future*) gl_cv_func_timespec_get=no ;;
14726 *) gl_cv_func_timespec_get=$gl_cv_onwards_func_timespec_get ;;
14730 HAVE_GETTIMEOFDAY=1;
14731 HAVE_STRUCT_TIMEVAL=1;
14733 REPLACE_GETTIMEOFDAY=0;
14734 REPLACE_STRUCT_TIMEVAL=0;
14750 if test $gl_cv_have_include_next = yes; then
14751 gl_cv_next_sys_time_h='<'sys/time.h'>'
14753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
14754 printf %s "checking absolute name of <sys/time.h>... " >&6; }
14755 if test ${gl_cv_next_sys_time_h+y}
14757 printf %s "(cached) " >&6
14760 if test $ac_cv_header_sys_time_h = yes; then
14765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14766 /* end confdefs.h. */
14767 #include <sys/time.h>
14770 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14771 *) gl_absname_cpp="$ac_cpp" ;;
14776 gl_dirsep_regex='[/\\]'
14779 gl_dirsep_regex='\/'
14782 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14783 gl_header_literal_regex=`echo 'sys/time.h' \
14784 | sed -e "$gl_make_literal_regex_sed"`
14785 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14786 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14792 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14793 sed -n "$gl_absolute_header_sed"`
14795 gl_header=$gl_cv_absolute_sys_time_h
14796 gl_cv_next_sys_time_h='"'$gl_header'"'
14798 gl_cv_next_sys_time_h='<'sys/time.h'>'
14804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
14805 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
14807 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
14809 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14810 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14811 gl_next_as_first_directive='<'sys/time.h'>'
14813 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14814 gl_next_as_first_directive=$gl_cv_next_sys_time_h
14816 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
14822 if test $ac_cv_header_sys_time_h != yes; then
14830 if test $ac_cv_header_sys_socket_h != yes; then
14831 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
14832 if test "x$ac_cv_header_winsock2_h" = xyes
14834 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
14839 if test "$ac_cv_header_winsock2_h" = yes; then
14841 UNISTD_H_HAVE_WINSOCK2_H=1
14842 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
14848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
14849 printf %s "checking for struct timeval... " >&6; }
14850 if test ${gl_cv_sys_struct_timeval+y}
14852 printf %s "(cached) " >&6
14854 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14855 /* end confdefs.h. */
14856 #if HAVE_SYS_TIME_H
14857 #include <sys/time.h>
14860 #if HAVE_WINSOCK2_H
14861 # include <winsock2.h>
14867 static struct timeval x; x.tv_sec = x.tv_usec;
14872 if ac_fn_c_try_compile "$LINENO"
14874 gl_cv_sys_struct_timeval=yes
14876 e) gl_cv_sys_struct_timeval=no ;;
14879 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
14884 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
14885 if test $gl_cv_sys_struct_timeval != yes; then
14886 HAVE_STRUCT_TIMEVAL=0
14888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
14889 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
14890 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
14892 printf %s "(cached) " >&6
14894 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895 /* end confdefs.h. */
14896 #if HAVE_SYS_TIME_H
14897 #include <sys/time.h>
14900 #if HAVE_WINSOCK2_H
14901 # include <winsock2.h>
14907 static struct timeval x;
14908 typedef int verify_tv_sec_type[
14909 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
14916 if ac_fn_c_try_compile "$LINENO"
14918 gl_cv_sys_struct_timeval_tv_sec=yes
14920 e) gl_cv_sys_struct_timeval_tv_sec=no ;;
14923 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
14928 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
14929 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
14930 REPLACE_STRUCT_TIMEVAL=1
14941 GL_GNULIB_GETTIMEOFDAY=0
14949 if test -z "$gl_pthreadlib_body_done"; then
14953 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14954 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14955 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14956 if test "x$ac_cv_header_pthread_h" = xyes
14958 gl_have_pthread_h=yes
14960 e) gl_have_pthread_h=no ;;
14964 if test "$gl_have_pthread_h" = yes; then
14965 # Other possible tests:
14966 # -lpthreads (FSU threads, PCthreads)
14968 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14969 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14970 # the second one only in libpthread, and lock.c needs it.
14972 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14973 # needs -pthread for some reason. See:
14974 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14976 for gl_pthread in '' '-pthread'; do
14977 LIBS="$LIBS $gl_pthread"
14978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14979 /* end confdefs.h. */
14980 #include <pthread.h>
14982 pthread_mutexattr_t ma;
14987 pthread_mutex_lock (&m);
14988 pthread_mutexattr_init (&ma);
14993 if ac_fn_c_try_link "$LINENO"
14996 LIBPTHREAD=$gl_pthread
14997 LIBPMULTITHREAD=$gl_pthread
14999 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15000 conftest$ac_exeext conftest.$ac_ext
15002 test $gl_pthread_api = yes && break
15004 echo "$as_me:15004: gl_pthread_api=$gl_pthread_api" >&5
15005 echo "$as_me:15005: LIBPTHREAD=$LIBPTHREAD" >&5
15007 gl_pthread_in_glibc=no
15008 # On Linux with glibc >= 2.34, libc contains the fully functional
15009 # pthread functions.
15012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15013 /* end confdefs.h. */
15014 #include <features.h>
15015 #ifdef __GNU_LIBRARY__
15016 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
15022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15023 $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
15025 gl_pthread_in_glibc=yes
15031 echo "$as_me:15031: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
15033 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
15034 # since it is defined as a macro on OSF/1.)
15035 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
15036 # The program links fine without libpthread. But it may actually
15037 # need to link with libpthread in order to create multiple threads.
15038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15039 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15040 if test ${ac_cv_lib_pthread_pthread_kill+y}
15042 printf %s "(cached) " >&6
15044 e) ac_check_lib_save_LIBS=$LIBS
15045 LIBS="-lpthread $LIBS"
15046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15047 /* end confdefs.h. */
15049 /* Override any GCC internal prototype to avoid an error.
15050 Use char because int might match the return type of a GCC
15051 builtin and then its argument prototype would still apply.
15052 The 'extern "C"' is for builds by C++ compilers;
15053 although this is not generally supported in C code supporting it here
15054 has little cost and some practical benefit (sr 110532). */
15058 char pthread_kill (void);
15062 return pthread_kill ();
15067 if ac_fn_c_try_link "$LINENO"
15069 ac_cv_lib_pthread_pthread_kill=yes
15071 e) ac_cv_lib_pthread_pthread_kill=no ;;
15074 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15075 conftest$ac_exeext conftest.$ac_ext
15076 LIBS=$ac_check_lib_save_LIBS ;;
15079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15080 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15081 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15083 if test $gl_pthread_in_glibc = yes; then
15086 LIBPMULTITHREAD=-lpthread
15087 # On Solaris and HP-UX, most pthread functions exist also in libc.
15088 # Therefore pthread_in_use() needs to actually try to create a
15089 # thread: pthread_create from libc will fail, whereas
15090 # pthread_create will actually create a thread.
15091 # On Solaris 10 or newer, this test is no longer needed, because
15092 # libc contains the fully functional pthread functions.
15094 solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
15096 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15103 elif test $gl_pthread_api != yes; then
15104 # Some library is needed. Try libpthread and libc_r.
15105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15106 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15107 if test ${ac_cv_lib_pthread_pthread_kill+y}
15109 printf %s "(cached) " >&6
15111 e) ac_check_lib_save_LIBS=$LIBS
15112 LIBS="-lpthread $LIBS"
15113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15114 /* end confdefs.h. */
15116 /* Override any GCC internal prototype to avoid an error.
15117 Use char because int might match the return type of a GCC
15118 builtin and then its argument prototype would still apply.
15119 The 'extern "C"' is for builds by C++ compilers;
15120 although this is not generally supported in C code supporting it here
15121 has little cost and some practical benefit (sr 110532). */
15125 char pthread_kill (void);
15129 return pthread_kill ();
15134 if ac_fn_c_try_link "$LINENO"
15136 ac_cv_lib_pthread_pthread_kill=yes
15138 e) ac_cv_lib_pthread_pthread_kill=no ;;
15141 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15142 conftest$ac_exeext conftest.$ac_ext
15143 LIBS=$ac_check_lib_save_LIBS ;;
15146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15147 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15148 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15151 LIBPTHREAD=-lpthread
15152 LIBPMULTITHREAD=-lpthread
15155 if test $gl_pthread_api != yes; then
15157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15158 printf %s "checking for pthread_kill in -lc_r... " >&6; }
15159 if test ${ac_cv_lib_c_r_pthread_kill+y}
15161 printf %s "(cached) " >&6
15163 e) ac_check_lib_save_LIBS=$LIBS
15165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15166 /* end confdefs.h. */
15168 /* Override any GCC internal prototype to avoid an error.
15169 Use char because int might match the return type of a GCC
15170 builtin and then its argument prototype would still apply.
15171 The 'extern "C"' is for builds by C++ compilers;
15172 although this is not generally supported in C code supporting it here
15173 has little cost and some practical benefit (sr 110532). */
15177 char pthread_kill (void);
15181 return pthread_kill ();
15186 if ac_fn_c_try_link "$LINENO"
15188 ac_cv_lib_c_r_pthread_kill=yes
15190 e) ac_cv_lib_c_r_pthread_kill=no ;;
15193 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15194 conftest$ac_exeext conftest.$ac_ext
15195 LIBS=$ac_check_lib_save_LIBS ;;
15198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15199 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
15200 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
15204 LIBPMULTITHREAD=-lc_r
15209 echo "$as_me:15209: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
15211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
15212 printf %s "checking whether POSIX threads API is available... " >&6; }
15213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
15214 printf "%s\n" "$gl_pthread_api" >&6; }
15217 if test $gl_pthread_api = yes; then
15219 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
15223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15224 /* end confdefs.h. */
15234 if ac_fn_c_try_link "$LINENO"
15239 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
15240 printf %s "checking for sched_yield in -lrt... " >&6; }
15241 if test ${ac_cv_lib_rt_sched_yield+y}
15243 printf %s "(cached) " >&6
15245 e) ac_check_lib_save_LIBS=$LIBS
15247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15248 /* end confdefs.h. */
15250 /* Override any GCC internal prototype to avoid an error.
15251 Use char because int might match the return type of a GCC
15252 builtin and then its argument prototype would still apply.
15253 The 'extern "C"' is for builds by C++ compilers;
15254 although this is not generally supported in C code supporting it here
15255 has little cost and some practical benefit (sr 110532). */
15259 char sched_yield (void);
15263 return sched_yield ();
15268 if ac_fn_c_try_link "$LINENO"
15270 ac_cv_lib_rt_sched_yield=yes
15272 e) ac_cv_lib_rt_sched_yield=no ;;
15275 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15276 conftest$ac_exeext conftest.$ac_ext
15277 LIBS=$ac_check_lib_save_LIBS ;;
15280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
15281 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
15282 if test "x$ac_cv_lib_rt_sched_yield" = xyes
15284 SCHED_YIELD_LIB=-lrt
15286 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
15287 printf %s "checking for sched_yield in -lposix4... " >&6; }
15288 if test ${ac_cv_lib_posix4_sched_yield+y}
15290 printf %s "(cached) " >&6
15292 e) ac_check_lib_save_LIBS=$LIBS
15293 LIBS="-lposix4 $LIBS"
15294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15295 /* end confdefs.h. */
15297 /* Override any GCC internal prototype to avoid an error.
15298 Use char because int might match the return type of a GCC
15299 builtin and then its argument prototype would still apply.
15300 The 'extern "C"' is for builds by C++ compilers;
15301 although this is not generally supported in C code supporting it here
15302 has little cost and some practical benefit (sr 110532). */
15306 char sched_yield (void);
15310 return sched_yield ();
15315 if ac_fn_c_try_link "$LINENO"
15317 ac_cv_lib_posix4_sched_yield=yes
15319 e) ac_cv_lib_posix4_sched_yield=no ;;
15322 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15323 conftest$ac_exeext conftest.$ac_ext
15324 LIBS=$ac_check_lib_save_LIBS ;;
15327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
15328 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
15329 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
15331 SCHED_YIELD_LIB=-lposix4
15340 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15341 conftest$ac_exeext conftest.$ac_ext
15343 LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
15346 gl_pthreadlib_body_done=done
15356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
15357 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
15358 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
15360 printf %s "(cached) " >&6
15362 e) case "$host_os" in
15363 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku.
15364 *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku*)
15365 gl_cv_func_setlocale_null_all_mtsafe=no ;;
15366 # Guess no on Cygwin < 3.4.6.
15368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15369 /* end confdefs.h. */
15371 #if defined __CYGWIN__
15372 #include <cygwin/version.h>
15373 #if CYGWIN_VERSION_DLL_COMBINED >= CYGWIN_VERSION_DLL_MAKE_COMBINED (3004, 6)
15379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15380 $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
15382 gl_cv_func_setlocale_null_all_mtsafe=yes
15384 e) gl_cv_func_setlocale_null_all_mtsafe=no ;;
15390 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
15391 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
15392 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
15393 # If we don't know, obey --enable-cross-guesses.
15395 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
15400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
15401 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
15405 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
15406 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
15410 case "$gl_cv_func_setlocale_null_all_mtsafe" in
15411 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
15412 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
15415 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
15418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
15419 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
15420 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
15422 printf %s "(cached) " >&6
15424 e) case "$host_os" in
15425 # Guess no on OpenBSD, AIX.
15427 gl_cv_func_setlocale_null_one_mtsafe=no ;;
15428 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
15429 *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
15430 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
15431 # If we don't know, obey --enable-cross-guesses.
15433 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
15438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
15439 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
15443 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
15444 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
15448 case "$gl_cv_func_setlocale_null_one_mtsafe" in
15449 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
15450 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
15453 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
15456 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
15458 mingw*) SETLOCALE_NULL_LIB= ;;
15462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
15463 printf %s "checking whether imported symbols can be declared weak... " >&6; }
15464 if test ${gl_cv_have_weak+y}
15466 printf %s "(cached) " >&6
15468 e) case "$host_os" in
15470 gl_cv_have_weak="guessing no"
15474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15475 /* end confdefs.h. */
15476 extern void xyzzy ();
15486 if ac_fn_c_try_link "$LINENO"
15488 gl_cv_have_weak=maybe
15490 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15491 conftest$ac_exeext conftest.$ac_ext
15492 if test $gl_cv_have_weak = maybe; then
15493 if test "$cross_compiling" = yes
15495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15496 /* end confdefs.h. */
15498 Extensible Linking Format
15502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15503 $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
15505 gl_cv_have_weak="guessing yes"
15507 e) gl_cv_have_weak="guessing no" ;;
15514 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15515 /* end confdefs.h. */
15521 return (fputs == NULL);
15524 if ac_fn_c_try_run "$LINENO"
15526 gl_cv_have_weak=yes
15528 e) gl_cv_have_weak=no ;;
15531 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15532 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
15539 case " $LDFLAGS " in
15540 *" -static "*) gl_cv_have_weak=no ;;
15542 case "$gl_cv_have_weak" in
15545 freebsd* | dragonfly* | midnightbsd*)
15547 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
15548 cat <<EOF > conftest2.c
15549 #include <pthread.h>
15550 #pragma weak pthread_mutexattr_gettype
15553 return (pthread_mutexattr_gettype != NULL);
15556 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
15557 || gl_cv_have_weak=no
15558 rm -f conftest1.c libempty.so conftest2.c conftest
15566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
15567 printf "%s\n" "$gl_cv_have_weak" >&6; }
15568 case "$gl_cv_have_weak" in
15571 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
15576 case "$gl_cv_have_weak" in
15577 *yes) SETLOCALE_NULL_LIB= ;;
15578 *) SETLOCALE_NULL_LIB="$LIBPTHREAD" ;;
15583 SETLOCALE_NULL_LIB=
15586 LIB_SETLOCALE_NULL="$SETLOCALE_NULL_LIB"
15590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15591 /* end confdefs.h. */
15598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15599 $EGREP_TRADITIONAL "MicrosoftCompiler" >/dev/null 2>&1
15602 echo 'int dummy;' > conftest.c
15603 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
15604 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
15605 (eval $ac_try) 2>&5
15607 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15608 test $ac_status = 0; }; } >/dev/null 2>&1
15609 if test -f conftest.o; then
15614 gl_c_asm_opt='-c -Fa'
15630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
15631 printf %s "checking host CPU and C ABI... " >&6; }
15632 if test ${gl_cv_host_cpu_c_abi+y}
15634 printf %s "(cached) " >&6
15636 e) case "$host_cpu" in
15639 gl_cv_host_cpu_c_abi=i386
15643 # On x86_64 systems, the C compiler may be generating code in one of
15645 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
15646 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
15647 # with native Windows (mingw, MSVC).
15648 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
15649 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
15650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15651 /* end confdefs.h. */
15652 #if (defined __x86_64__ || defined __amd64__ \
15653 || defined _M_X64 || defined _M_AMD64)
15660 if ac_fn_c_try_compile "$LINENO"
15662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15663 /* end confdefs.h. */
15664 #if defined __ILP32__ || defined _ILP32
15671 if ac_fn_c_try_compile "$LINENO"
15673 gl_cv_host_cpu_c_abi=x86_64-x32
15675 e) gl_cv_host_cpu_c_abi=x86_64 ;;
15678 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15680 e) gl_cv_host_cpu_c_abi=i386 ;;
15683 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15686 alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
15687 gl_cv_host_cpu_c_abi=alpha
15691 # Assume arm with EABI.
15692 # On arm64 systems, the C compiler may be generating code in one of
15694 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
15695 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
15696 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
15697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15698 /* end confdefs.h. */
15706 if ac_fn_c_try_compile "$LINENO"
15708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15709 /* end confdefs.h. */
15710 #if defined __ILP32__ || defined _ILP32
15717 if ac_fn_c_try_compile "$LINENO"
15719 gl_cv_host_cpu_c_abi=arm64-ilp32
15721 e) gl_cv_host_cpu_c_abi=arm64 ;;
15724 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15726 e) # Don't distinguish little-endian and big-endian arm, since they
15727 # don't require different machine code for simple operations and
15728 # since the user can distinguish them through the preprocessor
15729 # defines __ARMEL__ vs. __ARMEB__.
15730 # But distinguish arm which passes floating-point arguments and
15731 # return values in integer registers (r0, r1, ...) - this is
15732 # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
15733 # passes them in float registers (s0, s1, ...) and double registers
15734 # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
15735 # sets the preprocessor defines __ARM_PCS (for the first case) and
15736 # __ARM_PCS_VFP (for the second case), but older GCC does not.
15737 echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
15738 # Look for a reference to the register d0 in the .s file.
15739 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
15740 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
15741 (eval $ac_try) 2>&5
15743 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15744 test $ac_status = 0; }; } >/dev/null 2>&1
15745 if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
15746 gl_cv_host_cpu_c_abi=armhf
15748 gl_cv_host_cpu_c_abi=arm
15754 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15757 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
15758 # On hppa, the C compiler may be generating 32-bit code or 64-bit
15759 # code. In the latter case, it defines _LP64 and __LP64__.
15760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15761 /* end confdefs.h. */
15769 if ac_fn_c_try_compile "$LINENO"
15771 gl_cv_host_cpu_c_abi=hppa64
15773 e) gl_cv_host_cpu_c_abi=hppa ;;
15776 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15780 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
15781 # 32-bit code. In the latter case, it defines _ILP32.
15782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15783 /* end confdefs.h. */
15791 if ac_fn_c_try_compile "$LINENO"
15793 gl_cv_host_cpu_c_abi=ia64-ilp32
15795 e) gl_cv_host_cpu_c_abi=ia64 ;;
15798 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15802 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
15804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15805 /* end confdefs.h. */
15806 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
15813 if ac_fn_c_try_compile "$LINENO"
15815 gl_cv_host_cpu_c_abi=mips64
15817 e) # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
15818 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
15819 # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
15820 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
15821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15822 /* end confdefs.h. */
15823 #if (_MIPS_SIM == _ABIN32)
15830 if ac_fn_c_try_compile "$LINENO"
15832 gl_cv_host_cpu_c_abi=mipsn32
15834 e) gl_cv_host_cpu_c_abi=mips ;;
15837 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
15840 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15844 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
15845 # No need to distinguish them here; the caller may distinguish
15846 # them based on the OS.
15847 # On powerpc64 systems, the C compiler may still be generating
15848 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
15849 # be generating 64-bit code.
15850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15851 /* end confdefs.h. */
15852 #if defined __powerpc64__ || defined __LP64__
15859 if ac_fn_c_try_compile "$LINENO"
15861 # On powerpc64, there are two ABIs on Linux: The AIX compatible
15862 # one and the ELFv2 one. The latter defines _CALL_ELF=2.
15863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15864 /* end confdefs.h. */
15865 #if defined _CALL_ELF && _CALL_ELF == 2
15872 if ac_fn_c_try_compile "$LINENO"
15874 gl_cv_host_cpu_c_abi=powerpc64-elfv2
15876 e) gl_cv_host_cpu_c_abi=powerpc64 ;;
15879 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15882 e) gl_cv_host_cpu_c_abi=powerpc ;;
15885 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15889 gl_cv_host_cpu_c_abi=powerpc
15892 riscv32 | riscv64 )
15893 # There are 2 architectures (with variants): rv32* and rv64*.
15894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15895 /* end confdefs.h. */
15896 #if __riscv_xlen == 64
15903 if ac_fn_c_try_compile "$LINENO"
15910 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15911 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
15912 # Size of 'long' and 'void *':
15913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15914 /* end confdefs.h. */
15915 #if defined __LP64__
15922 if ac_fn_c_try_compile "$LINENO"
15926 e) main_abi=ilp32 ;;
15929 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15931 # __riscv_float_abi_double:
15932 # 'float' and 'double' are passed in floating-point registers.
15933 # __riscv_float_abi_single:
15934 # 'float' are passed in floating-point registers.
15935 # __riscv_float_abi_soft:
15936 # No values are passed in floating-point registers.
15937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15938 /* end confdefs.h. */
15939 #if defined __riscv_float_abi_double
15946 if ac_fn_c_try_compile "$LINENO"
15950 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15951 /* end confdefs.h. */
15952 #if defined __riscv_float_abi_single
15959 if ac_fn_c_try_compile "$LINENO"
15966 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15970 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15971 gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
15975 # On s390x, the C compiler may be generating 64-bit (= s390x) code
15976 # or 31-bit (= s390) code.
15977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15978 /* end confdefs.h. */
15979 #if defined __LP64__ || defined __s390x__
15986 if ac_fn_c_try_compile "$LINENO"
15988 gl_cv_host_cpu_c_abi=s390x
15990 e) gl_cv_host_cpu_c_abi=s390 ;;
15993 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15997 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
15998 # C compiler still generates 32-bit code.
15999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16000 /* end confdefs.h. */
16001 #if defined __sparcv9 || defined __arch64__
16008 if ac_fn_c_try_compile "$LINENO"
16010 gl_cv_host_cpu_c_abi=sparc64
16012 e) gl_cv_host_cpu_c_abi=sparc ;;
16015 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16019 gl_cv_host_cpu_c_abi="$host_cpu"
16025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
16026 printf "%s\n" "$gl_cv_host_cpu_c_abi" >&6; }
16028 HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
16029 HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
16034 # AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
16035 # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
16036 # earlier, but KAI C++ 3.2d doesn't like this.
16037 sed -e 's/-/_/g' >> confdefs.h <<EOF
16038 #ifndef __${HOST_CPU}__
16039 #define __${HOST_CPU}__ 1
16041 #ifndef __${HOST_CPU_C_ABI}__
16042 #define __${HOST_CPU_C_ABI}__ 1
16060 acl_save_prefix="$prefix"
16061 prefix="$acl_final_prefix"
16062 acl_save_exec_prefix="$exec_prefix"
16063 exec_prefix="$acl_final_exec_prefix"
16065 eval additional_includedir=\"$includedir\"
16066 eval additional_libdir=\"$libdir\"
16067 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
16068 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
16070 exec_prefix="$acl_save_exec_prefix"
16071 prefix="$acl_save_prefix"
16074 # Check whether --with-libiconv-prefix was given.
16075 if test ${with_libiconv_prefix+y}
16077 withval=$with_libiconv_prefix;
16078 if test "X$withval" = "Xno"; then
16081 if test "X$withval" = "X"; then
16083 acl_save_prefix="$prefix"
16084 prefix="$acl_final_prefix"
16085 acl_save_exec_prefix="$exec_prefix"
16086 exec_prefix="$acl_final_exec_prefix"
16088 eval additional_includedir=\"$includedir\"
16089 eval additional_libdir=\"$libdir\"
16090 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
16091 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
16093 exec_prefix="$acl_save_exec_prefix"
16094 prefix="$acl_save_prefix"
16097 additional_includedir="$withval/include"
16098 additional_libdir="$withval/$acl_libdirstem"
16099 additional_libdir2="$withval/$acl_libdirstem2"
16100 additional_libdir3="$withval/$acl_libdirstem3"
16106 if test "X$additional_libdir2" = "X$additional_libdir"; then
16107 additional_libdir2=
16109 if test "X$additional_libdir3" = "X$additional_libdir"; then
16110 additional_libdir3=
16119 names_already_handled=
16120 names_next_round='iconv '
16121 while test -n "$names_next_round"; do
16122 names_this_round="$names_next_round"
16124 for name in $names_this_round; do
16126 for n in $names_already_handled; do
16127 if test "$n" = "$name"; then
16128 already_handled=yes
16132 if test -z "$already_handled"; then
16133 names_already_handled="$names_already_handled $name"
16134 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
16135 eval value=\"\$HAVE_LIB$uppername\"
16136 if test -n "$value"; then
16137 if test "$value" = yes; then
16138 eval value=\"\$LIB$uppername\"
16139 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
16140 eval value=\"\$LTLIB$uppername\"
16141 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
16150 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
16151 if test -n "$acl_shlibext"; then
16152 shrext=".$acl_shlibext" # typically: shrext=.so
16156 if test $use_additional = yes; then
16157 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
16158 if test "X$found_dir" = "X"; then
16159 eval dir=\$$additional_libdir_variable
16160 if test -n "$dir"; then
16161 if test -n "$acl_shlibext"; then
16162 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
16164 found_so="$dir/$libname$shrext"
16166 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
16167 ver=`(cd "$dir" && \
16168 for f in "$libname$shrext".*; do echo "$f"; done \
16169 | sed -e "s,^$libname$shrext\\\\.,," \
16170 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
16171 | sed 1q ) 2>/dev/null`
16172 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
16174 found_so="$dir/$libname$shrext.$ver"
16177 eval library_names=\"$acl_library_names_spec\"
16178 for f in $library_names; do
16179 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
16188 if test "X$found_dir" = "X"; then
16189 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
16191 found_a="$dir/$libname.$acl_libext"
16194 if test "X$found_dir" != "X"; then
16195 if test -f "$dir/$libname.la"; then
16196 found_la="$dir/$libname.la"
16203 if test "X$found_dir" = "X"; then
16204 for x in $LDFLAGS $LTLIBICONV; do
16206 acl_save_prefix="$prefix"
16207 prefix="$acl_final_prefix"
16208 acl_save_exec_prefix="$exec_prefix"
16209 exec_prefix="$acl_final_exec_prefix"
16211 exec_prefix="$acl_save_exec_prefix"
16212 prefix="$acl_save_prefix"
16216 dir=`echo "X$x" | sed -e 's/^X-L//'`
16217 if test -n "$acl_shlibext"; then
16218 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
16220 found_so="$dir/$libname$shrext"
16222 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
16223 ver=`(cd "$dir" && \
16224 for f in "$libname$shrext".*; do echo "$f"; done \
16225 | sed -e "s,^$libname$shrext\\\\.,," \
16226 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
16227 | sed 1q ) 2>/dev/null`
16228 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
16230 found_so="$dir/$libname$shrext.$ver"
16233 eval library_names=\"$acl_library_names_spec\"
16234 for f in $library_names; do
16235 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
16244 if test "X$found_dir" = "X"; then
16245 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
16247 found_a="$dir/$libname.$acl_libext"
16250 if test "X$found_dir" != "X"; then
16251 if test -f "$dir/$libname.la"; then
16252 found_la="$dir/$libname.la"
16257 if test "X$found_dir" != "X"; then
16262 if test "X$found_dir" != "X"; then
16263 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
16264 if test "X$found_so" != "X"; then
16265 if test "$enable_rpath" = no \
16266 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
16267 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
16268 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
16269 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
16272 for x in $ltrpathdirs; do
16273 if test "X$x" = "X$found_dir"; then
16278 if test -z "$haveit"; then
16279 ltrpathdirs="$ltrpathdirs $found_dir"
16281 if test "$acl_hardcode_direct" = yes; then
16282 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
16284 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
16285 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
16287 for x in $rpathdirs; do
16288 if test "X$x" = "X$found_dir"; then
16293 if test -z "$haveit"; then
16294 rpathdirs="$rpathdirs $found_dir"
16298 for x in $LDFLAGS $LIBICONV; do
16300 acl_save_prefix="$prefix"
16301 prefix="$acl_final_prefix"
16302 acl_save_exec_prefix="$exec_prefix"
16303 exec_prefix="$acl_final_exec_prefix"
16305 exec_prefix="$acl_save_exec_prefix"
16306 prefix="$acl_save_prefix"
16308 if test "X$x" = "X-L$found_dir"; then
16313 if test -z "$haveit"; then
16314 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
16316 if test "$acl_hardcode_minus_L" != no; then
16317 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
16319 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
16325 if test "X$found_a" != "X"; then
16326 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
16328 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
16331 additional_includedir=
16332 case "$found_dir" in
16333 */$acl_libdirstem | */$acl_libdirstem/)
16334 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
16335 if test "$name" = 'iconv'; then
16336 LIBICONV_PREFIX="$basedir"
16338 additional_includedir="$basedir/include"
16340 */$acl_libdirstem2 | */$acl_libdirstem2/)
16341 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
16342 if test "$name" = 'iconv'; then
16343 LIBICONV_PREFIX="$basedir"
16345 additional_includedir="$basedir/include"
16347 */$acl_libdirstem3 | */$acl_libdirstem3/)
16348 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
16349 if test "$name" = 'iconv'; then
16350 LIBICONV_PREFIX="$basedir"
16352 additional_includedir="$basedir/include"
16355 if test "X$additional_includedir" != "X"; then
16356 if test "X$additional_includedir" != "X/usr/include"; then
16358 if test "X$additional_includedir" = "X/usr/local/include"; then
16359 if test -n "$GCC"; then
16361 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
16365 if test -z "$haveit"; then
16366 for x in $CPPFLAGS $INCICONV; do
16368 acl_save_prefix="$prefix"
16369 prefix="$acl_final_prefix"
16370 acl_save_exec_prefix="$exec_prefix"
16371 exec_prefix="$acl_final_exec_prefix"
16373 exec_prefix="$acl_save_exec_prefix"
16374 prefix="$acl_save_prefix"
16376 if test "X$x" = "X-I$additional_includedir"; then
16381 if test -z "$haveit"; then
16382 if test -d "$additional_includedir"; then
16383 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
16389 if test -n "$found_la"; then
16390 save_libdir="$libdir"
16391 case "$found_la" in
16392 */* | *\\*) . "$found_la" ;;
16393 *) . "./$found_la" ;;
16395 libdir="$save_libdir"
16396 for dep in $dependency_libs; do
16399 dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16400 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
16401 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
16402 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
16404 if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
16405 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
16406 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
16407 if test -n "$GCC"; then
16409 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
16413 if test -z "$haveit"; then
16415 for x in $LDFLAGS $LIBICONV; do
16417 acl_save_prefix="$prefix"
16418 prefix="$acl_final_prefix"
16419 acl_save_exec_prefix="$exec_prefix"
16420 exec_prefix="$acl_final_exec_prefix"
16422 exec_prefix="$acl_save_exec_prefix"
16423 prefix="$acl_save_prefix"
16425 if test "X$x" = "X-L$dependency_libdir"; then
16430 if test -z "$haveit"; then
16431 if test -d "$dependency_libdir"; then
16432 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
16436 for x in $LDFLAGS $LTLIBICONV; do
16438 acl_save_prefix="$prefix"
16439 prefix="$acl_final_prefix"
16440 acl_save_exec_prefix="$exec_prefix"
16441 exec_prefix="$acl_final_exec_prefix"
16443 exec_prefix="$acl_save_exec_prefix"
16444 prefix="$acl_save_prefix"
16446 if test "X$x" = "X-L$dependency_libdir"; then
16451 if test -z "$haveit"; then
16452 if test -d "$dependency_libdir"; then
16453 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
16460 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16461 if test "$enable_rpath" != no; then
16463 for x in $rpathdirs; do
16464 if test "X$x" = "X$dir"; then
16469 if test -z "$haveit"; then
16470 rpathdirs="$rpathdirs $dir"
16473 for x in $ltrpathdirs; do
16474 if test "X$x" = "X$dir"; then
16479 if test -z "$haveit"; then
16480 ltrpathdirs="$ltrpathdirs $dir"
16485 dep=`echo "X$dep" | sed -e 's/^X-l//'`
16486 if test "X$dep" != Xc \
16487 || case $host_os in
16488 linux* | gnu* | k*bsd*-gnu) false ;;
16491 names_next_round="$names_next_round $dep"
16495 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16498 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
16499 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
16505 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
16506 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
16512 if test "X$rpathdirs" != "X"; then
16513 if test -n "$acl_hardcode_libdir_separator"; then
16515 for found_dir in $rpathdirs; do
16516 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
16518 acl_save_libdir="$libdir"
16520 eval flag=\"$acl_hardcode_libdir_flag_spec\"
16521 libdir="$acl_save_libdir"
16522 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
16524 for found_dir in $rpathdirs; do
16525 acl_save_libdir="$libdir"
16526 libdir="$found_dir"
16527 eval flag=\"$acl_hardcode_libdir_flag_spec\"
16528 libdir="$acl_save_libdir"
16529 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
16533 if test "X$ltrpathdirs" != "X"; then
16534 for found_dir in $ltrpathdirs; do
16535 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
16548 REPLACE_ICONV_OPEN=0;
16549 REPLACE_ICONV_UTF=0;
16550 GL_GENERATE_ICONV_H=false
16552 GL_GENERATE_ICONV_H=true
16561 am_save_CPPFLAGS="$CPPFLAGS"
16563 for element in $INCICONV; do
16565 for x in $CPPFLAGS; do
16567 acl_save_prefix="$prefix"
16568 prefix="$acl_final_prefix"
16569 acl_save_exec_prefix="$exec_prefix"
16570 exec_prefix="$acl_final_exec_prefix"
16572 exec_prefix="$acl_save_exec_prefix"
16573 prefix="$acl_save_prefix"
16575 if test "X$x" = "X$element"; then
16580 if test -z "$haveit"; then
16581 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
16587 printf %s "checking for iconv... " >&6; }
16588 if test ${am_cv_func_iconv+y}
16590 printf %s "(cached) " >&6
16593 am_cv_func_iconv="no, consider installing GNU libiconv"
16595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16596 /* end confdefs.h. */
16598 #include <stdlib.h>
16604 iconv_t cd = iconv_open("","");
16605 iconv(cd,NULL,NULL,NULL,NULL);
16611 if ac_fn_c_try_link "$LINENO"
16613 am_cv_func_iconv=yes
16615 rm -f core conftest.err conftest.$ac_objext conftest.beam \
16616 conftest$ac_exeext conftest.$ac_ext
16617 if test "$am_cv_func_iconv" != yes; then
16618 am_save_LIBS="$LIBS"
16619 LIBS="$LIBS $LIBICONV"
16620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16621 /* end confdefs.h. */
16623 #include <stdlib.h>
16629 iconv_t cd = iconv_open("","");
16630 iconv(cd,NULL,NULL,NULL,NULL);
16636 if ac_fn_c_try_link "$LINENO"
16638 am_cv_lib_iconv=yes
16639 am_cv_func_iconv=yes
16641 rm -f core conftest.err conftest.$ac_objext conftest.beam \
16642 conftest$ac_exeext conftest.$ac_ext
16643 LIBS="$am_save_LIBS"
16648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
16649 printf "%s\n" "$am_cv_func_iconv" >&6; }
16650 if test "$am_cv_func_iconv" = yes; then
16651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
16652 printf %s "checking for working iconv... " >&6; }
16653 if test ${am_cv_func_iconv_works+y}
16655 printf %s "(cached) " >&6
16658 am_save_LIBS="$LIBS"
16659 if test $am_cv_lib_iconv = yes; then
16660 LIBS="$LIBS $LIBICONV"
16662 am_cv_func_iconv_works=no
16663 for ac_iconv_const in '' 'const'; do
16664 if test "$cross_compiling" = yes
16667 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
16668 *) am_cv_func_iconv_works="guessing yes" ;;
16671 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16672 /* end confdefs.h. */
16675 #include <string.h>
16677 #ifndef ICONV_CONST
16678 # define ICONV_CONST $ac_iconv_const
16685 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
16686 successful returns. This is even documented in
16687 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
16689 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
16690 if (cd_utf8_to_88591 != (iconv_t)(-1))
16692 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
16694 ICONV_CONST char *inptr = input;
16695 size_t inbytesleft = strlen (input);
16696 char *outptr = buf;
16697 size_t outbytesleft = sizeof (buf);
16698 size_t res = iconv (cd_utf8_to_88591,
16699 &inptr, &inbytesleft,
16700 &outptr, &outbytesleft);
16703 iconv_close (cd_utf8_to_88591);
16706 /* Test against Solaris 10 bug: Failures are not distinguishable from
16707 successful returns. */
16709 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
16710 if (cd_ascii_to_88591 != (iconv_t)(-1))
16712 static ICONV_CONST char input[] = "\263";
16714 ICONV_CONST char *inptr = input;
16715 size_t inbytesleft = strlen (input);
16716 char *outptr = buf;
16717 size_t outbytesleft = sizeof (buf);
16718 size_t res = iconv (cd_ascii_to_88591,
16719 &inptr, &inbytesleft,
16720 &outptr, &outbytesleft);
16723 iconv_close (cd_ascii_to_88591);
16726 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
16728 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
16729 if (cd_88591_to_utf8 != (iconv_t)(-1))
16731 static ICONV_CONST char input[] = "\304";
16732 static char buf[2] = { (char)0xDE, (char)0xAD };
16733 ICONV_CONST char *inptr = input;
16734 size_t inbytesleft = 1;
16735 char *outptr = buf;
16736 size_t outbytesleft = 1;
16737 size_t res = iconv (cd_88591_to_utf8,
16738 &inptr, &inbytesleft,
16739 &outptr, &outbytesleft);
16740 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
16742 iconv_close (cd_88591_to_utf8);
16745 #if 0 /* This bug could be worked around by the caller. */
16746 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
16748 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
16749 if (cd_88591_to_utf8 != (iconv_t)(-1))
16751 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
16753 ICONV_CONST char *inptr = input;
16754 size_t inbytesleft = strlen (input);
16755 char *outptr = buf;
16756 size_t outbytesleft = sizeof (buf);
16757 size_t res = iconv (cd_88591_to_utf8,
16758 &inptr, &inbytesleft,
16759 &outptr, &outbytesleft);
16762 iconv_close (cd_88591_to_utf8);
16766 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
16769 /* Try standardized names. */
16770 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
16771 /* Try IRIX, OSF/1 names. */
16772 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
16773 /* Try AIX names. */
16774 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
16775 /* Try HP-UX names. */
16776 iconv_t cd4 = iconv_open ("utf8", "eucJP");
16777 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
16778 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
16780 if (cd1 != (iconv_t)(-1))
16782 if (cd2 != (iconv_t)(-1))
16784 if (cd3 != (iconv_t)(-1))
16786 if (cd4 != (iconv_t)(-1))
16795 if ac_fn_c_try_run "$LINENO"
16797 am_cv_func_iconv_works=yes
16799 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16800 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16804 test "$am_cv_func_iconv_works" = no || break
16806 LIBS="$am_save_LIBS"
16810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
16811 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
16812 case "$am_cv_func_iconv_works" in
16813 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
16814 *) am_func_iconv=yes ;;
16817 am_func_iconv=no am_cv_lib_iconv=no
16819 if test "$am_func_iconv" = yes; then
16821 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
16824 if test "$am_cv_lib_iconv" = yes; then
16825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
16826 printf %s "checking how to link with libiconv... " >&6; }
16827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
16828 printf "%s\n" "$LIBICONV" >&6; }
16830 CPPFLAGS="$am_save_CPPFLAGS"
16837 if test "$am_cv_func_iconv" = yes; then
16838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
16839 printf %s "checking whether iconv is compatible with its POSIX signature... " >&6; }
16840 if test ${gl_cv_iconv_nonconst+y}
16842 printf %s "(cached) " >&6
16844 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16845 /* end confdefs.h. */
16847 #include <stdlib.h>
16853 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
16863 if ac_fn_c_try_compile "$LINENO"
16865 gl_cv_iconv_nonconst=yes
16867 e) gl_cv_iconv_nonconst=no ;;
16870 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
16875 printf "%s\n" "$gl_cv_iconv_nonconst" >&6; }
16877 gl_cv_iconv_nonconst=yes
16879 if test $gl_cv_iconv_nonconst = yes; then
16885 printf "%s\n" "#define ICONV_CONST $iconv_arg1" >>confdefs.h
16888 if test $gl_cv_iconv_nonconst != yes; then
16889 ICONV_CONST="const"
16893 if test "$am_func_iconv" = yes; then
16894 if test -n "$LIBICONV"; then
16895 am_cv_func_iconv_summary='yes, in libiconv'
16897 am_cv_func_iconv_summary='yes, in libc'
16900 if test "$am_cv_func_iconv" = yes; then
16901 am_cv_func_iconv_summary='not working, consider installing GNU libiconv'
16903 am_cv_func_iconv_summary='no, consider installing GNU libiconv'
16926 if test $gl_cv_have_include_next = yes; then
16927 gl_cv_next_iconv_h='<'iconv.h'>'
16929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
16930 printf %s "checking absolute name of <iconv.h>... " >&6; }
16931 if test ${gl_cv_next_iconv_h+y}
16933 printf %s "(cached) " >&6
16936 if test $ac_cv_header_iconv_h = yes; then
16941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16942 /* end confdefs.h. */
16946 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16947 *) gl_absname_cpp="$ac_cpp" ;;
16952 gl_dirsep_regex='[/\\]'
16955 gl_dirsep_regex='\/'
16958 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16959 gl_header_literal_regex=`echo 'iconv.h' \
16960 | sed -e "$gl_make_literal_regex_sed"`
16961 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16962 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16968 gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16969 sed -n "$gl_absolute_header_sed"`
16971 gl_header=$gl_cv_absolute_iconv_h
16972 gl_cv_next_iconv_h='"'$gl_header'"'
16974 gl_cv_next_iconv_h='<'iconv.h'>'
16980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
16981 printf "%s\n" "$gl_cv_next_iconv_h" >&6; }
16983 NEXT_ICONV_H=$gl_cv_next_iconv_h
16985 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16986 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16987 gl_next_as_first_directive='<'iconv.h'>'
16989 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16990 gl_next_as_first_directive=$gl_cv_next_iconv_h
16992 NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
17004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
17005 printf %s "checking for inline... " >&6; }
17006 if test ${ac_cv_c_inline+y}
17008 printf %s "(cached) " >&6
17010 e) ac_cv_c_inline=no
17011 for ac_kw in inline __inline__ __inline; do
17012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17013 /* end confdefs.h. */
17014 #ifndef __cplusplus
17016 static $ac_kw foo_t static_foo (void) {return 0; }
17017 $ac_kw foo_t foo (void) {return 0; }
17021 if ac_fn_c_try_compile "$LINENO"
17023 ac_cv_c_inline=$ac_kw
17025 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17026 test "$ac_cv_c_inline" != no && break
17031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
17032 printf "%s\n" "$ac_cv_c_inline" >&6; }
17034 case $ac_cv_c_inline in
17037 case $ac_cv_c_inline in
17039 *) ac_val=$ac_cv_c_inline;;
17041 cat >>confdefs.h <<_ACEOF
17042 #ifndef __cplusplus
17043 #define inline $ac_val
17049 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
17050 if test "x$ac_cv_type_off_t" = xyes
17055 printf "%s\n" "#define off_t long int" >>confdefs.h
17071 if test $gl_cv_have_include_next = yes; then
17072 gl_cv_next_limits_h='<'limits.h'>'
17074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
17075 printf %s "checking absolute name of <limits.h>... " >&6; }
17076 if test ${gl_cv_next_limits_h+y}
17078 printf %s "(cached) " >&6
17081 if test $ac_cv_header_limits_h = yes; then
17086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17087 /* end confdefs.h. */
17088 #include <limits.h>
17091 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17092 *) gl_absname_cpp="$ac_cpp" ;;
17097 gl_dirsep_regex='[/\\]'
17100 gl_dirsep_regex='\/'
17103 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17104 gl_header_literal_regex=`echo 'limits.h' \
17105 | sed -e "$gl_make_literal_regex_sed"`
17106 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17107 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17113 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17114 sed -n "$gl_absolute_header_sed"`
17116 gl_header=$gl_cv_absolute_limits_h
17117 gl_cv_next_limits_h='"'$gl_header'"'
17119 gl_cv_next_limits_h='<'limits.h'>'
17125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
17126 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
17128 NEXT_LIMITS_H=$gl_cv_next_limits_h
17130 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17131 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17132 gl_next_as_first_directive='<'limits.h'>'
17134 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17135 gl_next_as_first_directive=$gl_cv_next_limits_h
17137 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
17143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has WORD_BIT, BOOL_WIDTH etc." >&5
17144 printf %s "checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... " >&6; }
17145 if test ${gl_cv_header_limits_width+y}
17147 printf %s "(cached) " >&6
17149 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17150 /* end confdefs.h. */
17151 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
17152 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
17154 #include <limits.h>
17155 long long llm = LLONG_MAX;
17157 int ullw = ULLONG_WIDTH;
17158 int bw = BOOL_WIDTH;
17160 int mblm = MB_LEN_MAX;
17170 if ac_fn_c_try_compile "$LINENO"
17172 gl_cv_header_limits_width=yes
17174 e) gl_cv_header_limits_width=no ;;
17177 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
17181 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
17182 GL_GENERATE_LIMITS_H=true
17183 if test "$gl_cv_header_limits_width" = yes
17185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has SSIZE_MAX" >&5
17186 printf %s "checking whether limits.h has SSIZE_MAX... " >&6; }
17187 if test ${gl_cv_header_limits_ssize_max+y}
17189 printf %s "(cached) " >&6
17191 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17192 /* end confdefs.h. */
17193 #include <limits.h>
17195 #error "SSIZE_MAX is not defined"
17199 if ac_fn_c_try_compile "$LINENO"
17201 gl_cv_header_limits_ssize_max=yes
17203 e) gl_cv_header_limits_ssize_max=no ;;
17206 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_ssize_max" >&5
17210 printf "%s\n" "$gl_cv_header_limits_ssize_max" >&6; }
17211 if test "$gl_cv_header_limits_ssize_max" = yes; then
17212 GL_GENERATE_LIMITS_H=false
17217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
17218 printf %s "checking for wint_t... " >&6; }
17219 if test ${gt_cv_c_wint_t+y}
17221 printf %s "(cached) " >&6
17223 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17224 /* end confdefs.h. */
17226 wint_t foo = (wchar_t)'\0';
17235 if ac_fn_c_try_compile "$LINENO"
17239 e) gt_cv_c_wint_t=no ;;
17242 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
17246 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
17247 if test $gt_cv_c_wint_t = yes; then
17249 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
17252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
17253 printf %s "checking whether wint_t is large enough... " >&6; }
17254 if test ${gl_cv_type_wint_t_large_enough+y}
17256 printf %s "(cached) " >&6
17258 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17259 /* end confdefs.h. */
17261 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
17271 if ac_fn_c_try_compile "$LINENO"
17273 gl_cv_type_wint_t_large_enough=yes
17275 e) gl_cv_type_wint_t_large_enough=no ;;
17278 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
17282 printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; }
17283 if test $gl_cv_type_wint_t_large_enough = no; then
17284 GNULIBHEADERS_OVERRIDE_WINT_T=1
17286 GNULIBHEADERS_OVERRIDE_WINT_T=0
17289 GNULIBHEADERS_OVERRIDE_WINT_T=0
17294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
17295 printf %s "checking whether the compiler produces multi-arch binaries... " >&6; }
17296 if test ${gl_cv_c_multiarch+y}
17298 printf %s "(cached) " >&6
17300 e) gl_cv_c_multiarch=no
17301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17302 /* end confdefs.h. */
17303 #ifndef __APPLE_CC__
17304 not a universal capable compiler
17309 if ac_fn_c_try_compile "$LINENO"
17314 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
17315 if test -n "$prev"; then
17317 i?86 | x86_64 | ppc | ppc64 | arm | arm64)
17318 if test -z "$arch" || test "$arch" = "$word"; then
17321 gl_cv_c_multiarch=yes
17327 if test "x$word" = "x-arch"; then
17334 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
17339 printf "%s\n" "$gl_cv_c_multiarch" >&6; }
17340 if test $gl_cv_c_multiarch = yes; then
17341 APPLE_UNIVERSAL_BUILD=1
17343 APPLE_UNIVERSAL_BUILD=0
17353 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
17356 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
17360 if test $ac_cv_header_wchar_h = yes; then
17368 if test $ac_cv_header_inttypes_h = yes; then
17376 if test $ac_cv_header_sys_types_h = yes; then
17392 if test $gl_cv_have_include_next = yes; then
17393 gl_cv_next_stdint_h='<'stdint.h'>'
17395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
17396 printf %s "checking absolute name of <stdint.h>... " >&6; }
17397 if test ${gl_cv_next_stdint_h+y}
17399 printf %s "(cached) " >&6
17402 if test $ac_cv_header_stdint_h = yes; then
17407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17408 /* end confdefs.h. */
17409 #include <stdint.h>
17412 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17413 *) gl_absname_cpp="$ac_cpp" ;;
17418 gl_dirsep_regex='[/\\]'
17421 gl_dirsep_regex='\/'
17424 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17425 gl_header_literal_regex=`echo 'stdint.h' \
17426 | sed -e "$gl_make_literal_regex_sed"`
17427 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17428 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17434 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17435 sed -n "$gl_absolute_header_sed"`
17437 gl_header=$gl_cv_absolute_stdint_h
17438 gl_cv_next_stdint_h='"'$gl_header'"'
17440 gl_cv_next_stdint_h='<'stdint.h'>'
17446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
17447 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
17449 NEXT_STDINT_H=$gl_cv_next_stdint_h
17451 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17452 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17453 gl_next_as_first_directive='<'stdint.h'>'
17455 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17456 gl_next_as_first_directive=$gl_cv_next_stdint_h
17458 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
17463 if test $ac_cv_header_stdint_h = yes; then
17470 if test $ac_cv_header_stdint_h = yes; then
17471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
17472 printf %s "checking whether stdint.h conforms to C99... " >&6; }
17473 if test ${gl_cv_header_working_stdint_h+y}
17475 printf %s "(cached) " >&6
17477 e) gl_cv_header_working_stdint_h=no
17478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17479 /* end confdefs.h. */
17482 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17483 #define __STDC_CONSTANT_MACROS 1
17484 #define __STDC_LIMIT_MACROS 1
17485 #include <stdint.h>
17486 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
17487 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
17488 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
17492 #include <stddef.h>
17493 #include <signal.h>
17495 # include <wchar.h>
17500 int8_t a1 = INT8_MAX;
17501 int8_t a1min = INT8_MIN;
17504 int16_t a2 = INT16_MAX;
17505 int16_t a2min = INT16_MIN;
17508 int32_t a3 = INT32_MAX;
17509 int32_t a3min = INT32_MIN;
17512 int64_t a4 = INT64_MAX;
17513 int64_t a4min = INT64_MIN;
17516 uint8_t b1 = UINT8_MAX;
17518 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
17521 uint16_t b2 = UINT16_MAX;
17524 uint32_t b3 = UINT32_MAX;
17527 uint64_t b4 = UINT64_MAX;
17529 int_least8_t c1 = INT8_C (0x7f);
17530 int_least8_t c1max = INT_LEAST8_MAX;
17531 int_least8_t c1min = INT_LEAST8_MIN;
17532 int_least16_t c2 = INT16_C (0x7fff);
17533 int_least16_t c2max = INT_LEAST16_MAX;
17534 int_least16_t c2min = INT_LEAST16_MIN;
17535 int_least32_t c3 = INT32_C (0x7fffffff);
17536 int_least32_t c3max = INT_LEAST32_MAX;
17537 int_least32_t c3min = INT_LEAST32_MIN;
17538 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
17539 int_least64_t c4max = INT_LEAST64_MAX;
17540 int_least64_t c4min = INT_LEAST64_MIN;
17541 uint_least8_t d1 = UINT8_C (0xff);
17542 uint_least8_t d1max = UINT_LEAST8_MAX;
17543 uint_least16_t d2 = UINT16_C (0xffff);
17544 uint_least16_t d2max = UINT_LEAST16_MAX;
17545 uint_least32_t d3 = UINT32_C (0xffffffff);
17546 uint_least32_t d3max = UINT_LEAST32_MAX;
17547 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
17548 uint_least64_t d4max = UINT_LEAST64_MAX;
17549 int_fast8_t e1 = INT_FAST8_MAX;
17550 int_fast8_t e1min = INT_FAST8_MIN;
17551 int_fast16_t e2 = INT_FAST16_MAX;
17552 int_fast16_t e2min = INT_FAST16_MIN;
17553 int_fast32_t e3 = INT_FAST32_MAX;
17554 int_fast32_t e3min = INT_FAST32_MIN;
17555 int_fast64_t e4 = INT_FAST64_MAX;
17556 int_fast64_t e4min = INT_FAST64_MIN;
17557 uint_fast8_t f1 = UINT_FAST8_MAX;
17558 uint_fast16_t f2 = UINT_FAST16_MAX;
17559 uint_fast32_t f3 = UINT_FAST32_MAX;
17560 uint_fast64_t f4 = UINT_FAST64_MAX;
17562 intptr_t g = INTPTR_MAX;
17563 intptr_t gmin = INTPTR_MIN;
17566 uintptr_t h = UINTPTR_MAX;
17568 intmax_t i = INTMAX_MAX;
17569 uintmax_t j = UINTMAX_MAX;
17571 /* Check that SIZE_MAX has the correct type, if possible. */
17572 #if 201112 <= __STDC_VERSION__
17573 int k = _Generic (SIZE_MAX, size_t: 0);
17574 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
17575 || (0x5110 <= __SUNPRO_C && !__STDC__))
17577 extern __typeof__ (SIZE_MAX) k;
17580 #include <limits.h> /* for CHAR_BIT */
17581 #define TYPE_MINIMUM(t) \
17582 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
17583 #define TYPE_MAXIMUM(t) \
17584 ((t) ((t) 0 < (t) -1 \
17586 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
17589 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
17590 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
17592 /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64. */
17593 int check_SIG_ATOMIC:
17594 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
17595 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
17597 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
17599 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
17600 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
17602 /* Detect bug in mingw. */
17604 WINT_MIN == TYPE_MINIMUM (wint_t)
17605 && WINT_MAX == TYPE_MAXIMUM (wint_t)
17608 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
17610 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
17611 int check_UINT16_C:
17612 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
17614 /* Detect bugs in OpenBSD 3.9 stdint.h. */
17616 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
17619 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
17622 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
17625 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
17627 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
17628 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
17629 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
17630 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
17631 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
17632 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
17633 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
17634 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
17635 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
17636 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
17637 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
17648 if ac_fn_c_try_compile "$LINENO"
17650 if test "$cross_compiling" = yes
17653 # Guess yes on native Windows.
17654 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
17655 # In general, assume it works.
17656 *) gl_cv_header_working_stdint_h="guessing yes" ;;
17660 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17661 /* end confdefs.h. */
17664 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17665 #define __STDC_CONSTANT_MACROS 1
17666 #define __STDC_LIMIT_MACROS 1
17667 #include <stdint.h>
17670 #include <stddef.h>
17671 #include <signal.h>
17673 # include <wchar.h>
17678 #include <string.h>
17679 #define MVAL(macro) MVAL1(macro)
17680 #define MVAL1(expression) #expression
17681 static const char *macro_values[] =
17715 for (mv = macro_values; *mv != NULL; mv++)
17717 const char *value = *mv;
17718 /* Test whether it looks like a cast expression. */
17719 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
17720 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
17721 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
17722 || strncmp (value, "((int)"/*)*/, 6) == 0
17723 || strncmp (value, "((signed short)"/*)*/, 15) == 0
17724 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
17725 return mv - macro_values + 1;
17733 if ac_fn_c_try_run "$LINENO"
17735 gl_cv_header_working_stdint_h=yes
17737 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17738 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17744 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
17749 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
17752 HAVE_C99_STDINT_H=0
17753 HAVE_SYS_BITYPES_H=0
17754 HAVE_SYS_INTTYPES_H=0
17755 GL_GENERATE_STDINT_H=true
17756 case "$gl_cv_header_working_stdint_h" in
17758 HAVE_C99_STDINT_H=1
17759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
17760 printf %s "checking whether stdint.h works without ISO C predefines... " >&6; }
17761 if test ${gl_cv_header_stdint_without_STDC_macros+y}
17763 printf %s "(cached) " >&6
17765 e) gl_cv_header_stdint_without_STDC_macros=no
17766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17767 /* end confdefs.h. */
17770 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17771 #include <stdint.h>
17774 #include <stddef.h>
17775 #include <signal.h>
17777 # include <wchar.h>
17781 intmax_t im = INTMAX_MAX;
17782 int32_t i32 = INT32_C (0x7fffffff);
17792 if ac_fn_c_try_compile "$LINENO"
17794 gl_cv_header_stdint_without_STDC_macros=yes
17796 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
17801 printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; }
17803 if test $gl_cv_header_stdint_without_STDC_macros = no; then
17805 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
17808 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
17811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
17812 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
17813 if test ${gl_cv_header_stdint_width+y}
17815 printf %s "(cached) " >&6
17817 e) gl_cv_header_stdint_width=no
17818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17819 /* end confdefs.h. */
17821 /* Work if build is not clean. */
17822 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
17823 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
17824 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
17826 #include <stdint.h>
17828 #include <stddef.h>
17829 #include <signal.h>
17831 # include <wchar.h>
17834 int iw = UINTMAX_WIDTH;
17844 if ac_fn_c_try_compile "$LINENO"
17846 gl_cv_header_stdint_width=yes
17848 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
17852 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
17853 if test "$gl_cv_header_stdint_width" = yes; then
17854 GL_GENERATE_STDINT_H=false
17858 ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
17859 if test "x$ac_cv_header_sys_inttypes_h" = xyes
17861 printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
17864 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
17865 if test "x$ac_cv_header_sys_bitypes_h" = xyes
17867 printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
17871 if test $ac_cv_header_sys_inttypes_h = yes; then
17872 HAVE_SYS_INTTYPES_H=1
17874 if test $ac_cv_header_sys_bitypes_h = yes; then
17875 HAVE_SYS_BITYPES_H=1
17879 if test $APPLE_UNIVERSAL_BUILD = 0; then
17882 for gltype in ptrdiff_t size_t ; do
17883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17884 printf %s "checking for bit size of $gltype... " >&6; }
17885 if eval test \${gl_cv_bitsizeof_${gltype}+y}
17887 printf %s "(cached) " >&6
17889 e) if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
17890 #include <stddef.h>
17891 #include <signal.h>
17893 # include <wchar.h>
17896 #include <limits.h>"
17900 e) result=unknown ;;
17904 eval gl_cv_bitsizeof_${gltype}=\$result
17908 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17910 printf "%s\n" "$ac_res" >&6; }
17911 eval result=\$gl_cv_bitsizeof_${gltype}
17912 if test $result = unknown; then
17915 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17916 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
17918 eval BITSIZEOF_${GLTYPE}=\$result
17925 for gltype in sig_atomic_t wchar_t wint_t ; do
17926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17927 printf %s "checking for bit size of $gltype... " >&6; }
17928 if eval test \${gl_cv_bitsizeof_${gltype}+y}
17930 printf %s "(cached) " >&6
17932 e) if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
17933 #include <stddef.h>
17934 #include <signal.h>
17936 # include <wchar.h>
17939 #include <limits.h>"
17943 e) result=unknown ;;
17947 eval gl_cv_bitsizeof_${gltype}=\$result
17951 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17953 printf "%s\n" "$ac_res" >&6; }
17954 eval result=\$gl_cv_bitsizeof_${gltype}
17955 if test $result = unknown; then
17958 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17959 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
17961 eval BITSIZEOF_${GLTYPE}=\$result
17967 for gltype in sig_atomic_t wchar_t wint_t ; do
17968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
17969 printf %s "checking whether $gltype is signed... " >&6; }
17970 if eval test \${gl_cv_type_${gltype}_signed+y}
17972 printf %s "(cached) " >&6
17974 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17975 /* end confdefs.h. */
17977 #include <stddef.h>
17978 #include <signal.h>
17980 # include <wchar.h>
17983 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
17992 if ac_fn_c_try_compile "$LINENO"
17999 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18000 eval gl_cv_type_${gltype}_signed=\$result
18004 eval ac_res=\$gl_cv_type_${gltype}_signed
18005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18006 printf "%s\n" "$ac_res" >&6; }
18007 eval result=\$gl_cv_type_${gltype}_signed
18008 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18009 if test "$result" = yes; then
18010 printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
18012 eval HAVE_SIGNED_${GLTYPE}=1
18014 eval HAVE_SIGNED_${GLTYPE}=0
18019 gl_cv_type_ptrdiff_t_signed=yes
18020 gl_cv_type_size_t_signed=no
18021 if test $APPLE_UNIVERSAL_BUILD = 0; then
18024 for gltype in ptrdiff_t size_t ; do
18025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18026 printf %s "checking for $gltype integer literal suffix... " >&6; }
18027 if eval test \${gl_cv_type_${gltype}_suffix+y}
18029 printf %s "(cached) " >&6
18031 e) eval gl_cv_type_${gltype}_suffix=no
18032 eval result=\$gl_cv_type_${gltype}_signed
18033 if test "$result" = yes; then
18038 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18040 '') gltype1='int';;
18041 l) gltype1='long int';;
18042 ll) gltype1='long long int';;
18043 i64) gltype1='__int64';;
18044 u) gltype1='unsigned int';;
18045 ul) gltype1='unsigned long int';;
18046 ull) gltype1='unsigned long long int';;
18047 ui64)gltype1='unsigned __int64';;
18049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18050 /* end confdefs.h. */
18052 #include <stddef.h>
18053 #include <signal.h>
18055 # include <wchar.h>
18058 extern $gltype foo;
18059 extern $gltype1 foo;
18068 if ac_fn_c_try_compile "$LINENO"
18070 eval gl_cv_type_${gltype}_suffix=\$glsuf
18072 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18073 eval result=\$gl_cv_type_${gltype}_suffix
18074 test "$result" != no && break
18078 eval ac_res=\$gl_cv_type_${gltype}_suffix
18079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18080 printf "%s\n" "$ac_res" >&6; }
18081 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18082 eval result=\$gl_cv_type_${gltype}_suffix
18083 test "$result" = no && result=
18084 eval ${GLTYPE}_SUFFIX=\$result
18085 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
18093 for gltype in sig_atomic_t wchar_t wint_t ; do
18094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18095 printf %s "checking for $gltype integer literal suffix... " >&6; }
18096 if eval test \${gl_cv_type_${gltype}_suffix+y}
18098 printf %s "(cached) " >&6
18100 e) eval gl_cv_type_${gltype}_suffix=no
18101 eval result=\$gl_cv_type_${gltype}_signed
18102 if test "$result" = yes; then
18107 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18109 '') gltype1='int';;
18110 l) gltype1='long int';;
18111 ll) gltype1='long long int';;
18112 i64) gltype1='__int64';;
18113 u) gltype1='unsigned int';;
18114 ul) gltype1='unsigned long int';;
18115 ull) gltype1='unsigned long long int';;
18116 ui64)gltype1='unsigned __int64';;
18118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18119 /* end confdefs.h. */
18121 #include <stddef.h>
18122 #include <signal.h>
18124 # include <wchar.h>
18127 extern $gltype foo;
18128 extern $gltype1 foo;
18137 if ac_fn_c_try_compile "$LINENO"
18139 eval gl_cv_type_${gltype}_suffix=\$glsuf
18141 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18142 eval result=\$gl_cv_type_${gltype}_suffix
18143 test "$result" != no && break
18147 eval ac_res=\$gl_cv_type_${gltype}_suffix
18148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18149 printf "%s\n" "$ac_res" >&6; }
18150 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18151 eval result=\$gl_cv_type_${gltype}_suffix
18152 test "$result" = no && result=
18153 eval ${GLTYPE}_SUFFIX=\$result
18154 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
18160 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
18161 BITSIZEOF_WINT_T=32
18169 GL_GENERATE_LIMITS_H=true
18177 HAVE_DECL_IMAXABS=1;
18178 HAVE_DECL_IMAXDIV=1;
18179 HAVE_DECL_STRTOIMAX=1;
18180 HAVE_DECL_STRTOUMAX=1;
18186 REPLACE_STRTOIMAX=0;
18187 REPLACE_STRTOUMAX=0;
18188 INT32_MAX_LT_INTMAX_MAX=1;
18189 INT64_MAX_EQ_LONG_MAX='defined _LP64';
18190 PRIPTR_PREFIX=__PRIPTR_PREFIX;
18191 UINT32_MAX_LT_UINTMAX_MAX=1;
18192 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
18208 if test $gl_cv_have_include_next = yes; then
18209 gl_cv_next_inttypes_h='<'inttypes.h'>'
18211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
18212 printf %s "checking absolute name of <inttypes.h>... " >&6; }
18213 if test ${gl_cv_next_inttypes_h+y}
18215 printf %s "(cached) " >&6
18218 if test $ac_cv_header_inttypes_h = yes; then
18223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18224 /* end confdefs.h. */
18225 #include <inttypes.h>
18228 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18229 *) gl_absname_cpp="$ac_cpp" ;;
18234 gl_dirsep_regex='[/\\]'
18237 gl_dirsep_regex='\/'
18240 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18241 gl_header_literal_regex=`echo 'inttypes.h' \
18242 | sed -e "$gl_make_literal_regex_sed"`
18243 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18244 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18250 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18251 sed -n "$gl_absolute_header_sed"`
18253 gl_header=$gl_cv_absolute_inttypes_h
18254 gl_cv_next_inttypes_h='"'$gl_header'"'
18256 gl_cv_next_inttypes_h='<'inttypes.h'>'
18262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
18263 printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
18265 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
18267 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18268 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18269 gl_next_as_first_directive='<'inttypes.h'>'
18271 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18272 gl_next_as_first_directive=$gl_cv_next_inttypes_h
18274 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
18292 if $GL_GENERATE_STDINT_H; then
18293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18294 /* end confdefs.h. */
18309 if ac_fn_c_try_compile "$LINENO"
18311 PRIPTR_PREFIX='"l"'
18313 e) PRIPTR_PREFIX='"ll"' ;;
18316 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18318 for glpfx in '' l ll I64; do
18320 '') gltype1='int';;
18321 l) gltype1='long int';;
18322 ll) gltype1='long long int';;
18323 I64) gltype1='__int64';;
18325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18326 /* end confdefs.h. */
18327 #include <stdint.h>
18328 extern intptr_t foo;
18329 extern $gltype1 foo;
18338 if ac_fn_c_try_compile "$LINENO"
18340 PRIPTR_PREFIX='"'$glpfx'"'
18342 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18343 test -n "$PRIPTR_PREFIX" && break
18349 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
18350 printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
18351 if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
18353 printf %s "(cached) " >&6
18355 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18356 /* end confdefs.h. */
18357 /* Work also in C++ mode. */
18358 #define __STDC_LIMIT_MACROS 1
18360 /* Work if build is not clean. */
18361 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18363 #include <limits.h>
18365 #include <stdint.h>
18368 #if defined INT32_MAX && defined INTMAX_MAX
18369 #define CONDITION (INT32_MAX < INTMAX_MAX)
18371 #define CONDITION (sizeof (int) < sizeof (long long int))
18373 int test[CONDITION ? 1 : -1];
18382 if ac_fn_c_try_compile "$LINENO"
18384 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
18386 e) gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no ;;
18389 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
18393 printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
18394 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
18395 INT32_MAX_LT_INTMAX_MAX=1;
18397 INT32_MAX_LT_INTMAX_MAX=0;
18401 if test $APPLE_UNIVERSAL_BUILD = 0; then
18403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
18404 printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
18405 if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
18407 printf %s "(cached) " >&6
18409 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18410 /* end confdefs.h. */
18411 /* Work also in C++ mode. */
18412 #define __STDC_LIMIT_MACROS 1
18414 /* Work if build is not clean. */
18415 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18417 #include <limits.h>
18419 #include <stdint.h>
18422 #if defined INT64_MAX
18423 #define CONDITION (INT64_MAX == LONG_MAX)
18425 #define CONDITION (sizeof (long long int) == sizeof (long int))
18427 int test[CONDITION ? 1 : -1];
18436 if ac_fn_c_try_compile "$LINENO"
18438 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
18440 e) gl_cv_test_INT64_MAX_EQ_LONG_MAX=no ;;
18443 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
18447 printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
18448 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
18449 INT64_MAX_EQ_LONG_MAX=1;
18451 INT64_MAX_EQ_LONG_MAX=0;
18456 INT64_MAX_EQ_LONG_MAX=-1
18459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
18460 printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
18461 if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
18463 printf %s "(cached) " >&6
18465 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18466 /* end confdefs.h. */
18467 /* Work also in C++ mode. */
18468 #define __STDC_LIMIT_MACROS 1
18470 /* Work if build is not clean. */
18471 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18473 #include <limits.h>
18475 #include <stdint.h>
18478 #if defined UINT32_MAX && defined UINTMAX_MAX
18479 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
18481 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
18483 int test[CONDITION ? 1 : -1];
18492 if ac_fn_c_try_compile "$LINENO"
18494 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
18496 e) gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no ;;
18499 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
18503 printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
18504 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
18505 UINT32_MAX_LT_UINTMAX_MAX=1;
18507 UINT32_MAX_LT_UINTMAX_MAX=0;
18511 if test $APPLE_UNIVERSAL_BUILD = 0; then
18513 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
18514 printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
18515 if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
18517 printf %s "(cached) " >&6
18519 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18520 /* end confdefs.h. */
18521 /* Work also in C++ mode. */
18522 #define __STDC_LIMIT_MACROS 1
18524 /* Work if build is not clean. */
18525 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18527 #include <limits.h>
18529 #include <stdint.h>
18532 #if defined UINT64_MAX
18533 #define CONDITION (UINT64_MAX == ULONG_MAX)
18535 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
18537 int test[CONDITION ? 1 : -1];
18546 if ac_fn_c_try_compile "$LINENO"
18548 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
18550 e) gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no ;;
18553 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
18557 printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
18558 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
18559 UINT64_MAX_EQ_ULONG_MAX=1;
18561 UINT64_MAX_EQ_ULONG_MAX=0;
18566 UINT64_MAX_EQ_ULONG_MAX=-1
18572 GL_GNULIB_IMAXABS=0
18576 GL_GNULIB_IMAXDIV=0
18580 GL_GNULIB_STRTOIMAX=0
18584 GL_GNULIB_STRTOUMAX=0
18593 REPLACE_ISWBLANK=0;
18594 REPLACE_ISWDIGIT=0;
18595 REPLACE_ISWXDIGIT=0;
18601 if test $ac_cv_header_crtdefs_h = yes; then
18614 if test $ac_cv_func_iswcntrl = yes; then
18622 if test $gt_cv_c_wint_t = yes; then
18640 if test $gl_cv_have_include_next = yes; then
18641 gl_cv_next_wctype_h='<'wctype.h'>'
18643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
18644 printf %s "checking absolute name of <wctype.h>... " >&6; }
18645 if test ${gl_cv_next_wctype_h+y}
18647 printf %s "(cached) " >&6
18650 if test $ac_cv_header_wctype_h = yes; then
18655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18656 /* end confdefs.h. */
18657 #include <wctype.h>
18660 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18661 *) gl_absname_cpp="$ac_cpp" ;;
18666 gl_dirsep_regex='[/\\]'
18669 gl_dirsep_regex='\/'
18672 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18673 gl_header_literal_regex=`echo 'wctype.h' \
18674 | sed -e "$gl_make_literal_regex_sed"`
18675 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18676 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18682 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18683 sed -n "$gl_absolute_header_sed"`
18685 gl_header=$gl_cv_absolute_wctype_h
18686 gl_cv_next_wctype_h='"'$gl_header'"'
18688 gl_cv_next_wctype_h='<'wctype.h'>'
18694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
18695 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
18697 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
18699 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18700 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18701 gl_next_as_first_directive='<'wctype.h'>'
18703 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18704 gl_next_as_first_directive=$gl_cv_next_wctype_h
18706 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
18711 if test $ac_cv_header_wctype_h = yes; then
18712 if test $ac_cv_func_iswcntrl = yes; then
18713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
18714 printf %s "checking whether iswcntrl works... " >&6; }
18715 if test ${gl_cv_func_iswcntrl_works+y}
18717 printf %s "(cached) " >&6
18720 if test "$cross_compiling" = yes
18722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18723 /* end confdefs.h. */
18724 #include <stdlib.h>
18725 #if __GNU_LIBRARY__ == 1
18726 Linux libc5 i18n is broken.
18736 if ac_fn_c_try_compile "$LINENO"
18738 gl_cv_func_iswcntrl_works="guessing yes"
18740 e) gl_cv_func_iswcntrl_works="guessing no" ;;
18743 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18746 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18747 /* end confdefs.h. */
18750 #include <wctype.h>
18751 int main () { return iswprint ('x') == 0; }
18754 if ac_fn_c_try_run "$LINENO"
18756 gl_cv_func_iswcntrl_works=yes
18758 e) gl_cv_func_iswcntrl_works=no ;;
18761 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18762 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
18770 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
18778 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
18781 case "$gl_cv_func_iswcntrl_works" in
18782 *yes) REPLACE_ISWCNTRL=0 ;;
18783 *) REPLACE_ISWCNTRL=1 ;;
18788 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
18792 if test $REPLACE_ISWCNTRL = 1; then
18795 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
18796 if test "x$ac_cv_func_towlower" = xyes
18798 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
18802 if test $ac_cv_func_towlower = yes; then
18805 ac_fn_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
18807 # include <wctype.h>
18810 " "$ac_c_undeclared_builtin_options" "CFLAGS"
18811 if test "x$ac_cv_have_decl_towlower" = xyes
18815 e) ac_have_decl=0 ;;
18818 printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
18820 if test $ac_cv_have_decl_towlower = yes; then
18829 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
18833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
18834 printf %s "checking for wctype_t... " >&6; }
18835 if test ${gl_cv_type_wctype_t+y}
18837 printf %s "(cached) " >&6
18839 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18840 /* end confdefs.h. */
18843 # include <wctype.h>
18855 if ac_fn_c_try_compile "$LINENO"
18857 gl_cv_type_wctype_t=yes
18859 e) gl_cv_type_wctype_t=no ;;
18862 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
18867 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
18868 if test $gl_cv_type_wctype_t = no; then
18872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
18873 printf %s "checking for wctrans_t... " >&6; }
18874 if test ${gl_cv_type_wctrans_t+y}
18876 printf %s "(cached) " >&6
18878 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18879 /* end confdefs.h. */
18881 #include <wctype.h>
18892 if ac_fn_c_try_compile "$LINENO"
18894 gl_cv_type_wctrans_t=yes
18896 e) gl_cv_type_wctrans_t=no ;;
18899 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
18904 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
18905 if test $gl_cv_type_wctrans_t = no; then
18915 GL_GNULIB_ISWBLANK=0
18919 GL_GNULIB_ISWDIGIT=0
18923 GL_GNULIB_ISWXDIGIT=0
18931 GL_GNULIB_ISWCTYPE=0
18935 GL_GNULIB_WCTRANS=0
18939 GL_GNULIB_TOWCTRANS=0
18946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
18947 printf %s "checking for a traditional japanese locale... " >&6; }
18948 if test ${gt_cv_locale_ja+y}
18950 printf %s "(cached) " >&6
18953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18954 /* end confdefs.h. */
18956 #include <locale.h>
18958 #if HAVE_LANGINFO_CODESET
18959 # include <langinfo.h>
18961 #include <stdlib.h>
18962 #include <string.h>
18967 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
18968 imitates locale dependent behaviour by looking at the environment
18969 variables, and all locales use the UTF-8 encoding. */
18970 #if defined __BEOS__ || defined __HAIKU__
18973 /* Check whether the given locale name is recognized by the system. */
18974 # if defined _WIN32 && !defined __CYGWIN__
18975 /* On native Windows, setlocale(category, "") looks at the system settings,
18976 not at the environment variables. Also, when an encoding suffix such
18977 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
18978 category of the locale to "C". */
18979 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
18980 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
18983 if (setlocale (LC_ALL, "") == NULL) return 1;
18985 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
18986 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
18987 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
18988 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
18989 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
18990 some unit tests fail.
18991 On MirBSD 10, when an unsupported locale is specified, setlocale()
18992 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
18993 # if HAVE_LANGINFO_CODESET
18995 const char *cs = nl_langinfo (CODESET);
18996 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
18997 || strcmp (cs, "UTF-8") == 0)
19002 /* On Cygwin, avoid locale names without encoding suffix, because the
19003 locale_charset() function relies on the encoding suffix. Note that
19004 LC_ALL is set on the command line. */
19005 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
19007 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
19008 on Cygwin 1.5.x. */
19009 if (MB_CUR_MAX == 1)
19011 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
19012 This excludes the UTF-8 encoding (except on MirBSD). */
19015 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
19016 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
19017 for (p = buf; *p != '\0'; p++)
19018 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
19026 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19027 (eval $ac_link) 2>&5
19029 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19030 test $ac_status = 0; } && test -s conftest$ac_exeext; then
19032 # Handle native Windows specially, because there setlocale() interprets
19033 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
19034 # "fr" or "fra" as "French" or "French_France.1252",
19035 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
19036 # "ja" as "Japanese" or "Japanese_Japan.932",
19039 # Note that on native Windows, the Japanese locale is
19040 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
19041 # cannot use it here.
19042 gt_cv_locale_ja=none
19045 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
19046 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
19047 # configure script would override the LC_ALL setting. Likewise for
19048 # LC_CTYPE, which is also set at the beginning of the configure script.
19049 # Test for the AIX locale name.
19050 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19051 gt_cv_locale_ja=ja_JP
19053 # Test for the locale name with explicit encoding suffix.
19054 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19055 gt_cv_locale_ja=ja_JP.EUC-JP
19057 # Test for the HP-UX, OSF/1, NetBSD locale name.
19058 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19059 gt_cv_locale_ja=ja_JP.eucJP
19061 # Test for the IRIX, FreeBSD locale name.
19062 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19063 gt_cv_locale_ja=ja_JP.EUC
19065 # Test for the Solaris 7 locale name.
19066 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19069 # Special test for NetBSD 1.6.
19070 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
19071 gt_cv_locale_ja=ja_JP.eucJP
19074 gt_cv_locale_ja=none
19088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
19089 printf "%s\n" "$gt_cv_locale_ja" >&6; }
19090 LOCALE_JA=$gt_cv_locale_ja
19095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
19096 printf %s "checking for a french Unicode locale... " >&6; }
19097 if test ${gt_cv_locale_fr_utf8+y}
19099 printf %s "(cached) " >&6
19102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19103 /* end confdefs.h. */
19105 #include <locale.h>
19107 #if HAVE_LANGINFO_CODESET
19108 # include <langinfo.h>
19110 #include <stdlib.h>
19111 #include <string.h>
19115 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
19116 imitates locale dependent behaviour by looking at the environment
19117 variables, and all locales use the UTF-8 encoding. */
19118 #if !(defined __BEOS__ || defined __HAIKU__)
19119 /* Check whether the given locale name is recognized by the system. */
19120 # if defined _WIN32 && !defined __CYGWIN__
19121 /* On native Windows, setlocale(category, "") looks at the system settings,
19122 not at the environment variables. Also, when an encoding suffix such
19123 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
19124 category of the locale to "C". */
19125 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
19126 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
19129 if (setlocale (LC_ALL, "") == NULL) return 1;
19131 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
19132 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
19133 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
19134 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
19135 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
19136 some unit tests fail. */
19137 # if HAVE_LANGINFO_CODESET
19139 const char *cs = nl_langinfo (CODESET);
19140 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
19145 /* On Cygwin, avoid locale names without encoding suffix, because the
19146 locale_charset() function relies on the encoding suffix. Note that
19147 LC_ALL is set on the command line. */
19148 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
19150 /* Check whether in the abbreviation of the second month, the second
19151 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
19152 two bytes long, with UTF-8 encoding. */
19153 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
19154 if (strftime (buf, sizeof (buf), "%b", &t) < 4
19155 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
19158 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
19159 /* Check whether the decimal separator is a comma.
19160 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
19161 are nl_langinfo(RADIXCHAR) are both ".". */
19162 if (localeconv () ->decimal_point[0] != ',') return 1;
19168 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19169 (eval $ac_link) 2>&5
19171 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19172 test $ac_status = 0; } && test -s conftest$ac_exeext; then
19174 # Handle native Windows specially, because there setlocale() interprets
19175 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
19176 # "fr" or "fra" as "French" or "French_France.1252",
19177 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
19178 # "ja" as "Japanese" or "Japanese_Japan.932",
19181 # Test for the hypothetical native Windows locale name.
19182 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19183 gt_cv_locale_fr_utf8=French_France.65001
19186 gt_cv_locale_fr_utf8=none
19190 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
19191 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
19192 # configure script would override the LC_ALL setting. Likewise for
19193 # LC_CTYPE, which is also set at the beginning of the configure script.
19194 # Test for the usual locale name.
19195 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19196 gt_cv_locale_fr_utf8=fr_FR
19198 # Test for the locale name with explicit encoding suffix.
19199 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19200 gt_cv_locale_fr_utf8=fr_FR.UTF-8
19202 # Test for the Solaris 7 locale name.
19203 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19204 gt_cv_locale_fr_utf8=fr.UTF-8
19207 gt_cv_locale_fr_utf8=none
19218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
19219 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
19220 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
19226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
19227 printf %s "checking for a transitional chinese locale... " >&6; }
19228 if test ${gt_cv_locale_zh_CN+y}
19230 printf %s "(cached) " >&6
19233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19234 /* end confdefs.h. */
19236 #include <locale.h>
19237 #include <stdlib.h>
19239 #if HAVE_LANGINFO_CODESET
19240 # include <langinfo.h>
19242 #include <stdlib.h>
19243 #include <string.h>
19248 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
19249 imitates locale dependent behaviour by looking at the environment
19250 variables, and all locales use the UTF-8 encoding. */
19251 #if defined __BEOS__ || defined __HAIKU__
19254 /* Check whether the given locale name is recognized by the system. */
19255 # if defined _WIN32 && !defined __CYGWIN__
19256 /* On native Windows, setlocale(category, "") looks at the system settings,
19257 not at the environment variables. Also, when an encoding suffix such
19258 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
19259 category of the locale to "C". */
19260 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
19261 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
19264 if (setlocale (LC_ALL, "") == NULL) return 1;
19266 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
19267 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
19268 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
19269 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
19270 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
19271 some unit tests fail.
19272 On MirBSD 10, when an unsupported locale is specified, setlocale()
19273 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
19274 # if HAVE_LANGINFO_CODESET
19276 const char *cs = nl_langinfo (CODESET);
19277 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
19278 || strcmp (cs, "UTF-8") == 0)
19283 /* On Cygwin, avoid locale names without encoding suffix, because the
19284 locale_charset() function relies on the encoding suffix. Note that
19285 LC_ALL is set on the command line. */
19286 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
19288 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
19289 This excludes the UTF-8 encoding (except on MirBSD). */
19292 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
19293 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
19294 for (p = buf; *p != '\0'; p++)
19295 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
19298 /* Check whether a typical GB18030 multibyte sequence is recognized as a
19299 single wide character. This excludes the GB2312 and GBK encodings. */
19300 if (mblen ("\203\062\332\066", 5) != 4)
19307 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19308 (eval $ac_link) 2>&5
19310 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19311 test $ac_status = 0; } && test -s conftest$ac_exeext; then
19313 # Handle native Windows specially, because there setlocale() interprets
19314 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
19315 # "fr" or "fra" as "French" or "French_France.1252",
19316 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
19317 # "ja" as "Japanese" or "Japanese_Japan.932",
19320 # Test for the hypothetical native Windows locale name.
19321 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19322 gt_cv_locale_zh_CN=Chinese_China.54936
19325 gt_cv_locale_zh_CN=none
19329 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
19330 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
19331 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
19332 gt_cv_locale_zh_CN=none
19335 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
19336 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
19337 # configure script would override the LC_ALL setting. Likewise for
19338 # LC_CTYPE, which is also set at the beginning of the configure script.
19339 # Test for the locale name without encoding suffix.
19340 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19341 gt_cv_locale_zh_CN=zh_CN
19343 # Test for the locale name with explicit encoding suffix.
19344 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19345 gt_cv_locale_zh_CN=zh_CN.GB18030
19348 gt_cv_locale_zh_CN=none
19354 # If there was a link error, due to mblen(), the system is so old that
19355 # it certainly doesn't have a chinese locale.
19356 gt_cv_locale_zh_CN=none
19362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
19363 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
19364 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
19368 HAVE_NL_LANGINFO=1;
19369 REPLACE_NL_LANGINFO=0;
19386 if test $gl_cv_have_include_next = yes; then
19387 gl_cv_next_langinfo_h='<'langinfo.h'>'
19389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
19390 printf %s "checking absolute name of <langinfo.h>... " >&6; }
19391 if test ${gl_cv_next_langinfo_h+y}
19393 printf %s "(cached) " >&6
19396 if test $ac_cv_header_langinfo_h = yes; then
19401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19402 /* end confdefs.h. */
19403 #include <langinfo.h>
19406 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19407 *) gl_absname_cpp="$ac_cpp" ;;
19412 gl_dirsep_regex='[/\\]'
19415 gl_dirsep_regex='\/'
19418 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19419 gl_header_literal_regex=`echo 'langinfo.h' \
19420 | sed -e "$gl_make_literal_regex_sed"`
19421 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19422 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19428 gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19429 sed -n "$gl_absolute_header_sed"`
19431 gl_header=$gl_cv_absolute_langinfo_h
19432 gl_cv_next_langinfo_h='"'$gl_header'"'
19434 gl_cv_next_langinfo_h='<'langinfo.h'>'
19440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
19441 printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
19443 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
19445 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19446 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19447 gl_next_as_first_directive='<'langinfo.h'>'
19449 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19450 gl_next_as_first_directive=$gl_cv_next_langinfo_h
19452 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
19458 HAVE_LANGINFO_CODESET=0
19459 HAVE_LANGINFO_T_FMT_AMPM=0
19460 HAVE_LANGINFO_ALTMON=0
19461 HAVE_LANGINFO_ERA=0
19462 HAVE_LANGINFO_YESEXPR=0
19464 if test $ac_cv_header_langinfo_h = yes; then
19466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
19467 printf %s "checking whether langinfo.h defines CODESET... " >&6; }
19468 if test ${gl_cv_header_langinfo_codeset+y}
19470 printf %s "(cached) " >&6
19472 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19473 /* end confdefs.h. */
19474 #include <langinfo.h>
19485 if ac_fn_c_try_compile "$LINENO"
19487 gl_cv_header_langinfo_codeset=yes
19489 e) gl_cv_header_langinfo_codeset=no ;;
19492 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
19497 printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
19498 if test $gl_cv_header_langinfo_codeset = yes; then
19499 HAVE_LANGINFO_CODESET=1
19501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
19502 printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
19503 if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
19505 printf %s "(cached) " >&6
19507 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19508 /* end confdefs.h. */
19509 #include <langinfo.h>
19510 int a = T_FMT_AMPM;
19520 if ac_fn_c_try_compile "$LINENO"
19522 gl_cv_header_langinfo_t_fmt_ampm=yes
19524 e) gl_cv_header_langinfo_t_fmt_ampm=no ;;
19527 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
19532 printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
19533 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
19534 HAVE_LANGINFO_T_FMT_AMPM=1
19536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
19537 printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
19538 if test ${gl_cv_header_langinfo_altmon+y}
19540 printf %s "(cached) " >&6
19542 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19543 /* end confdefs.h. */
19544 #include <langinfo.h>
19555 if ac_fn_c_try_compile "$LINENO"
19557 gl_cv_header_langinfo_altmon=yes
19559 e) gl_cv_header_langinfo_altmon=no ;;
19562 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
19567 printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
19568 if test $gl_cv_header_langinfo_altmon = yes; then
19569 HAVE_LANGINFO_ALTMON=1
19571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
19572 printf %s "checking whether langinfo.h defines ERA... " >&6; }
19573 if test ${gl_cv_header_langinfo_era+y}
19575 printf %s "(cached) " >&6
19577 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19578 /* end confdefs.h. */
19579 #include <langinfo.h>
19590 if ac_fn_c_try_compile "$LINENO"
19592 gl_cv_header_langinfo_era=yes
19594 e) gl_cv_header_langinfo_era=no ;;
19597 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
19602 printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
19603 if test $gl_cv_header_langinfo_era = yes; then
19604 HAVE_LANGINFO_ERA=1
19606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
19607 printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
19608 if test ${gl_cv_header_langinfo_yesexpr+y}
19610 printf %s "(cached) " >&6
19612 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19613 /* end confdefs.h. */
19614 #include <langinfo.h>
19625 if ac_fn_c_try_compile "$LINENO"
19627 gl_cv_header_langinfo_yesexpr=yes
19629 e) gl_cv_header_langinfo_yesexpr=no ;;
19632 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
19637 printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
19638 if test $gl_cv_header_langinfo_yesexpr = yes; then
19639 HAVE_LANGINFO_YESEXPR=1
19657 GL_GNULIB_NL_LANGINFO=0
19665 REPLACE_LOCALECONV=0;
19666 REPLACE_SETLOCALE=0;
19667 REPLACE_NEWLOCALE=0;
19668 REPLACE_DUPLOCALE=0;
19669 REPLACE_FREELOCALE=0;
19670 REPLACE_STRUCT_LCONV=0;
19671 LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
19675 HAVE_MAX_ALIGN_T=1;
19679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
19680 printf %s "checking for wchar_t... " >&6; }
19681 if test ${gt_cv_c_wchar_t+y}
19683 printf %s "(cached) " >&6
19685 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19686 /* end confdefs.h. */
19687 #include <stddef.h>
19688 wchar_t foo = (wchar_t)'\0';
19697 if ac_fn_c_try_compile "$LINENO"
19699 gt_cv_c_wchar_t=yes
19701 e) gt_cv_c_wchar_t=no ;;
19704 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
19707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
19708 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
19709 if test $gt_cv_c_wchar_t = yes; then
19711 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
19721 GL_GENERATE_STDDEF_H=false
19723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
19724 printf %s "checking for good max_align_t... " >&6; }
19725 if test ${gl_cv_type_max_align_t+y}
19727 printf %s "(cached) " >&6
19729 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19730 /* end confdefs.h. */
19731 /* On FreeBSD 12.0/x86, max_align_t defined by <stddef.h> has
19732 the correct alignment with the default (wrong) definition of
19733 _Alignof, but a wrong alignment as soon as we activate an
19734 ISO C compliant _Alignof definition. */
19735 #if ((defined __GNUC__ && 4 <= __GNUC__) || defined __clang__) && !defined __cplusplus
19736 #define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b)
19738 #include <stddef.h>
19739 unsigned int s = sizeof (max_align_t);
19740 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
19741 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
19742 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
19744 typedef struct { char a; max_align_t b; } max_helper;
19745 typedef struct { char a; long b; } long_helper;
19746 typedef struct { char a; double b; } double_helper;
19747 typedef struct { char a; long double b; } long_double_helper;
19748 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
19749 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
19750 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
19760 if ac_fn_c_try_compile "$LINENO"
19762 gl_cv_type_max_align_t=yes
19764 e) gl_cv_type_max_align_t=no ;;
19767 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
19772 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
19773 if test $gl_cv_type_max_align_t = no; then
19775 GL_GENERATE_STDDEF_H=true
19778 if test $gt_cv_c_wchar_t = no; then
19780 GL_GENERATE_STDDEF_H=true
19783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
19784 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
19785 if test ${gl_cv_decl_null_works+y}
19787 printf %s "(cached) " >&6
19789 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19790 /* end confdefs.h. */
19791 #include <stddef.h>
19792 int test[2 * (sizeof NULL == sizeof (void *)) -1];
19802 if ac_fn_c_try_compile "$LINENO"
19804 gl_cv_decl_null_works=yes
19806 e) gl_cv_decl_null_works=no ;;
19809 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
19812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
19813 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
19814 if test $gl_cv_decl_null_works = no; then
19816 GL_GENERATE_STDDEF_H=true
19819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unreachable" >&5
19820 printf %s "checking for unreachable... " >&6; }
19821 if test ${gl_cv_func_unreachable+y}
19823 printf %s "(cached) " >&6
19825 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19826 /* end confdefs.h. */
19827 #include <stddef.h>
19838 if ac_fn_c_try_link "$LINENO"
19840 gl_cv_func_unreachable=yes
19842 e) gl_cv_func_unreachable=no ;;
19845 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19846 conftest$ac_exeext conftest.$ac_ext
19850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unreachable" >&5
19851 printf "%s\n" "$gl_cv_func_unreachable" >&6; }
19852 if test $gl_cv_func_unreachable = no; then
19853 GL_GENERATE_STDDEF_H=true
19856 if $GL_GENERATE_STDDEF_H; then
19865 if test $gl_cv_have_include_next = yes; then
19866 gl_cv_next_stddef_h='<'stddef.h'>'
19868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
19869 printf %s "checking absolute name of <stddef.h>... " >&6; }
19870 if test ${gl_cv_next_stddef_h+y}
19872 printf %s "(cached) " >&6
19877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19878 /* end confdefs.h. */
19879 #include <stddef.h>
19882 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19883 *) gl_absname_cpp="$ac_cpp" ;;
19888 gl_dirsep_regex='[/\\]'
19891 gl_dirsep_regex='\/'
19894 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19895 gl_header_literal_regex=`echo 'stddef.h' \
19896 | sed -e "$gl_make_literal_regex_sed"`
19897 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19898 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19904 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19905 sed -n "$gl_absolute_header_sed"`
19907 gl_header=$gl_cv_absolute_stddef_h
19908 gl_cv_next_stddef_h='"'$gl_header'"'
19913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
19914 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
19916 NEXT_STDDEF_H=$gl_cv_next_stddef_h
19918 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19919 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19920 gl_next_as_first_directive='<'stddef.h'>'
19922 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19923 gl_next_as_first_directive=$gl_cv_next_stddef_h
19925 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
19936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
19937 printf %s "checking whether locale.h defines locale_t... " >&6; }
19938 if test ${gl_cv_header_locale_has_locale_t+y}
19940 printf %s "(cached) " >&6
19942 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19943 /* end confdefs.h. */
19944 #include <locale.h>
19954 if ac_fn_c_try_compile "$LINENO"
19956 gl_cv_header_locale_has_locale_t=yes
19958 e) gl_cv_header_locale_has_locale_t=no ;;
19961 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
19966 printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
19969 if test $ac_cv_header_xlocale_h = yes; then
19971 if test $gl_cv_header_locale_has_locale_t = yes; then
19972 gl_cv_header_locale_h_needs_xlocale_h=no
19974 gl_cv_header_locale_h_needs_xlocale_h=yes
19979 gl_cv_header_locale_h_needs_xlocale_h=no
19980 if test $gl_cv_header_locale_has_locale_t = yes; then
20001 printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
20006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
20007 printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
20008 if test ${gl_cv_header_locale_h_posix2001+y}
20010 printf %s "(cached) " >&6
20012 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20013 /* end confdefs.h. */
20014 #include <locale.h>
20015 int x = LC_MESSAGES;
20016 int y = sizeof (((struct lconv *) 0)->decimal_point);
20025 if ac_fn_c_try_compile "$LINENO"
20027 gl_cv_header_locale_h_posix2001=yes
20029 e) gl_cv_header_locale_h_posix2001=no ;;
20032 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
20035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
20036 printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
20038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
20039 printf %s "checking whether struct lconv is properly defined... " >&6; }
20040 if test ${gl_cv_sys_struct_lconv_ok+y}
20042 printf %s "(cached) " >&6
20044 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20045 /* end confdefs.h. */
20046 #include <locale.h>
20048 int x = sizeof (l.decimal_point);
20049 int y = sizeof (l.int_p_cs_precedes);
20058 if ac_fn_c_try_compile "$LINENO"
20060 gl_cv_sys_struct_lconv_ok=yes
20062 e) gl_cv_sys_struct_lconv_ok=no ;;
20065 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
20070 printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
20071 if test $gl_cv_sys_struct_lconv_ok = no; then
20074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20075 /* end confdefs.h. */
20082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20083 $EGREP_TRADITIONAL "Special" >/dev/null 2>&1
20087 e) REPLACE_STRUCT_LCONV=1 ;;
20093 *) REPLACE_STRUCT_LCONV=1 ;;
20105 if test $gl_cv_have_include_next = yes; then
20106 gl_cv_next_locale_h='<'locale.h'>'
20108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
20109 printf %s "checking absolute name of <locale.h>... " >&6; }
20110 if test ${gl_cv_next_locale_h+y}
20112 printf %s "(cached) " >&6
20117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20118 /* end confdefs.h. */
20119 #include <locale.h>
20122 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20123 *) gl_absname_cpp="$ac_cpp" ;;
20128 gl_dirsep_regex='[/\\]'
20131 gl_dirsep_regex='\/'
20134 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20135 gl_header_literal_regex=`echo 'locale.h' \
20136 | sed -e "$gl_make_literal_regex_sed"`
20137 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20138 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20144 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20145 sed -n "$gl_absolute_header_sed"`
20147 gl_header=$gl_cv_absolute_locale_h
20148 gl_cv_next_locale_h='"'$gl_header'"'
20153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
20154 printf "%s\n" "$gl_cv_next_locale_h" >&6; }
20156 NEXT_LOCALE_H=$gl_cv_next_locale_h
20158 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20159 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20160 gl_next_as_first_directive='<'locale.h'>'
20162 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20163 gl_next_as_first_directive=$gl_cv_next_locale_h
20165 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
20177 GL_GNULIB_LOCALECONV=0
20181 GL_GNULIB_SETLOCALE=0
20185 GL_GNULIB_SETLOCALE_NULL=0
20189 GL_GNULIB_DUPLOCALE=0
20193 GL_GNULIB_LOCALENAME=0
20199 gl_threads_api=none
20204 if test "$gl_use_threads" != no; then
20207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
20208 printf %s "checking whether imported symbols can be declared weak... " >&6; }
20209 if test ${gl_cv_have_weak+y}
20211 printf %s "(cached) " >&6
20213 e) case "$host_os" in
20215 gl_cv_have_weak="guessing no"
20219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20220 /* end confdefs.h. */
20221 extern void xyzzy ();
20231 if ac_fn_c_try_link "$LINENO"
20233 gl_cv_have_weak=maybe
20235 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20236 conftest$ac_exeext conftest.$ac_ext
20237 if test $gl_cv_have_weak = maybe; then
20238 if test "$cross_compiling" = yes
20240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20241 /* end confdefs.h. */
20243 Extensible Linking Format
20247 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20248 $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
20250 gl_cv_have_weak="guessing yes"
20252 e) gl_cv_have_weak="guessing no" ;;
20259 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20260 /* end confdefs.h. */
20266 return (fputs == NULL);
20269 if ac_fn_c_try_run "$LINENO"
20271 gl_cv_have_weak=yes
20273 e) gl_cv_have_weak=no ;;
20276 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20277 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
20284 case " $LDFLAGS " in
20285 *" -static "*) gl_cv_have_weak=no ;;
20287 case "$gl_cv_have_weak" in
20290 freebsd* | dragonfly* | midnightbsd*)
20292 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
20293 cat <<EOF > conftest2.c
20294 #include <pthread.h>
20295 #pragma weak pthread_mutexattr_gettype
20298 return (pthread_mutexattr_gettype != NULL);
20301 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
20302 || gl_cv_have_weak=no
20303 rm -f conftest1.c libempty.so conftest2.c conftest
20311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
20312 printf "%s\n" "$gl_cv_have_weak" >&6; }
20313 case "$gl_cv_have_weak" in
20316 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
20321 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
20325 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
20327 gl_have_isoc_threads="$ac_cv_header_threads_h"
20329 if test "$gl_use_threads" = yes \
20330 || test "$gl_use_threads" = posix \
20331 || test "$gl_use_threads" = isoc+posix; then
20334 if test -z "$gl_pthreadlib_body_done"; then
20338 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
20339 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
20340 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
20341 if test "x$ac_cv_header_pthread_h" = xyes
20343 gl_have_pthread_h=yes
20345 e) gl_have_pthread_h=no ;;
20349 if test "$gl_have_pthread_h" = yes; then
20350 # Other possible tests:
20351 # -lpthreads (FSU threads, PCthreads)
20353 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
20354 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
20355 # the second one only in libpthread, and lock.c needs it.
20357 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
20358 # needs -pthread for some reason. See:
20359 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
20361 for gl_pthread in '' '-pthread'; do
20362 LIBS="$LIBS $gl_pthread"
20363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20364 /* end confdefs.h. */
20365 #include <pthread.h>
20367 pthread_mutexattr_t ma;
20372 pthread_mutex_lock (&m);
20373 pthread_mutexattr_init (&ma);
20378 if ac_fn_c_try_link "$LINENO"
20381 LIBPTHREAD=$gl_pthread
20382 LIBPMULTITHREAD=$gl_pthread
20384 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20385 conftest$ac_exeext conftest.$ac_ext
20387 test $gl_pthread_api = yes && break
20389 echo "$as_me:20389: gl_pthread_api=$gl_pthread_api" >&5
20390 echo "$as_me:20390: LIBPTHREAD=$LIBPTHREAD" >&5
20392 gl_pthread_in_glibc=no
20393 # On Linux with glibc >= 2.34, libc contains the fully functional
20394 # pthread functions.
20397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20398 /* end confdefs.h. */
20399 #include <features.h>
20400 #ifdef __GNU_LIBRARY__
20401 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
20407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20408 $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
20410 gl_pthread_in_glibc=yes
20416 echo "$as_me:20416: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
20418 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
20419 # since it is defined as a macro on OSF/1.)
20420 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
20421 # The program links fine without libpthread. But it may actually
20422 # need to link with libpthread in order to create multiple threads.
20423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
20424 printf %s "checking for pthread_kill in -lpthread... " >&6; }
20425 if test ${ac_cv_lib_pthread_pthread_kill+y}
20427 printf %s "(cached) " >&6
20429 e) ac_check_lib_save_LIBS=$LIBS
20430 LIBS="-lpthread $LIBS"
20431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20432 /* end confdefs.h. */
20434 /* Override any GCC internal prototype to avoid an error.
20435 Use char because int might match the return type of a GCC
20436 builtin and then its argument prototype would still apply.
20437 The 'extern "C"' is for builds by C++ compilers;
20438 although this is not generally supported in C code supporting it here
20439 has little cost and some practical benefit (sr 110532). */
20443 char pthread_kill (void);
20447 return pthread_kill ();
20452 if ac_fn_c_try_link "$LINENO"
20454 ac_cv_lib_pthread_pthread_kill=yes
20456 e) ac_cv_lib_pthread_pthread_kill=no ;;
20459 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20460 conftest$ac_exeext conftest.$ac_ext
20461 LIBS=$ac_check_lib_save_LIBS ;;
20464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
20465 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
20466 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
20468 if test $gl_pthread_in_glibc = yes; then
20471 LIBPMULTITHREAD=-lpthread
20472 # On Solaris and HP-UX, most pthread functions exist also in libc.
20473 # Therefore pthread_in_use() needs to actually try to create a
20474 # thread: pthread_create from libc will fail, whereas
20475 # pthread_create will actually create a thread.
20476 # On Solaris 10 or newer, this test is no longer needed, because
20477 # libc contains the fully functional pthread functions.
20479 solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
20481 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
20488 elif test $gl_pthread_api != yes; then
20489 # Some library is needed. Try libpthread and libc_r.
20490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
20491 printf %s "checking for pthread_kill in -lpthread... " >&6; }
20492 if test ${ac_cv_lib_pthread_pthread_kill+y}
20494 printf %s "(cached) " >&6
20496 e) ac_check_lib_save_LIBS=$LIBS
20497 LIBS="-lpthread $LIBS"
20498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20499 /* end confdefs.h. */
20501 /* Override any GCC internal prototype to avoid an error.
20502 Use char because int might match the return type of a GCC
20503 builtin and then its argument prototype would still apply.
20504 The 'extern "C"' is for builds by C++ compilers;
20505 although this is not generally supported in C code supporting it here
20506 has little cost and some practical benefit (sr 110532). */
20510 char pthread_kill (void);
20514 return pthread_kill ();
20519 if ac_fn_c_try_link "$LINENO"
20521 ac_cv_lib_pthread_pthread_kill=yes
20523 e) ac_cv_lib_pthread_pthread_kill=no ;;
20526 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20527 conftest$ac_exeext conftest.$ac_ext
20528 LIBS=$ac_check_lib_save_LIBS ;;
20531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
20532 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
20533 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
20536 LIBPTHREAD=-lpthread
20537 LIBPMULTITHREAD=-lpthread
20540 if test $gl_pthread_api != yes; then
20542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
20543 printf %s "checking for pthread_kill in -lc_r... " >&6; }
20544 if test ${ac_cv_lib_c_r_pthread_kill+y}
20546 printf %s "(cached) " >&6
20548 e) ac_check_lib_save_LIBS=$LIBS
20550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20551 /* end confdefs.h. */
20553 /* Override any GCC internal prototype to avoid an error.
20554 Use char because int might match the return type of a GCC
20555 builtin and then its argument prototype would still apply.
20556 The 'extern "C"' is for builds by C++ compilers;
20557 although this is not generally supported in C code supporting it here
20558 has little cost and some practical benefit (sr 110532). */
20562 char pthread_kill (void);
20566 return pthread_kill ();
20571 if ac_fn_c_try_link "$LINENO"
20573 ac_cv_lib_c_r_pthread_kill=yes
20575 e) ac_cv_lib_c_r_pthread_kill=no ;;
20578 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20579 conftest$ac_exeext conftest.$ac_ext
20580 LIBS=$ac_check_lib_save_LIBS ;;
20583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
20584 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
20585 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
20589 LIBPMULTITHREAD=-lc_r
20594 echo "$as_me:20594: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
20596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
20597 printf %s "checking whether POSIX threads API is available... " >&6; }
20598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
20599 printf "%s\n" "$gl_pthread_api" >&6; }
20602 if test $gl_pthread_api = yes; then
20604 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
20608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20609 /* end confdefs.h. */
20619 if ac_fn_c_try_link "$LINENO"
20624 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
20625 printf %s "checking for sched_yield in -lrt... " >&6; }
20626 if test ${ac_cv_lib_rt_sched_yield+y}
20628 printf %s "(cached) " >&6
20630 e) ac_check_lib_save_LIBS=$LIBS
20632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20633 /* end confdefs.h. */
20635 /* Override any GCC internal prototype to avoid an error.
20636 Use char because int might match the return type of a GCC
20637 builtin and then its argument prototype would still apply.
20638 The 'extern "C"' is for builds by C++ compilers;
20639 although this is not generally supported in C code supporting it here
20640 has little cost and some practical benefit (sr 110532). */
20644 char sched_yield (void);
20648 return sched_yield ();
20653 if ac_fn_c_try_link "$LINENO"
20655 ac_cv_lib_rt_sched_yield=yes
20657 e) ac_cv_lib_rt_sched_yield=no ;;
20660 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20661 conftest$ac_exeext conftest.$ac_ext
20662 LIBS=$ac_check_lib_save_LIBS ;;
20665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
20666 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
20667 if test "x$ac_cv_lib_rt_sched_yield" = xyes
20669 SCHED_YIELD_LIB=-lrt
20671 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
20672 printf %s "checking for sched_yield in -lposix4... " >&6; }
20673 if test ${ac_cv_lib_posix4_sched_yield+y}
20675 printf %s "(cached) " >&6
20677 e) ac_check_lib_save_LIBS=$LIBS
20678 LIBS="-lposix4 $LIBS"
20679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20680 /* end confdefs.h. */
20682 /* Override any GCC internal prototype to avoid an error.
20683 Use char because int might match the return type of a GCC
20684 builtin and then its argument prototype would still apply.
20685 The 'extern "C"' is for builds by C++ compilers;
20686 although this is not generally supported in C code supporting it here
20687 has little cost and some practical benefit (sr 110532). */
20691 char sched_yield (void);
20695 return sched_yield ();
20700 if ac_fn_c_try_link "$LINENO"
20702 ac_cv_lib_posix4_sched_yield=yes
20704 e) ac_cv_lib_posix4_sched_yield=no ;;
20707 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20708 conftest$ac_exeext conftest.$ac_ext
20709 LIBS=$ac_check_lib_save_LIBS ;;
20712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
20713 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
20714 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
20716 SCHED_YIELD_LIB=-lposix4
20725 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20726 conftest$ac_exeext conftest.$ac_ext
20728 LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
20731 gl_pthreadlib_body_done=done
20734 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
20735 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
20736 if test $gl_pthread_api = yes; then
20737 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
20738 gl_threads_api='isoc+posix'
20740 printf "%s\n" "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
20742 LIBTHREAD= LTLIBTHREAD=
20744 gl_threads_api=posix
20746 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
20748 if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
20750 printf "%s\n" "#define USE_POSIX_THREADS_FROM_LIBC 1" >>confdefs.h
20753 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
20755 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
20757 LIBTHREAD= LTLIBTHREAD=
20760 freebsd* | dragonfly* | midnightbsd*)
20761 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
20763 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
20773 if test $gl_threads_api = none; then
20774 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
20778 if test -z "$gl_stdthreadlib_body_done"; then
20788 if test -z "$gl_pthreadlib_body_done"; then
20792 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
20793 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
20794 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
20795 if test "x$ac_cv_header_pthread_h" = xyes
20797 gl_have_pthread_h=yes
20799 e) gl_have_pthread_h=no ;;
20803 if test "$gl_have_pthread_h" = yes; then
20804 # Other possible tests:
20805 # -lpthreads (FSU threads, PCthreads)
20807 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
20808 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
20809 # the second one only in libpthread, and lock.c needs it.
20811 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
20812 # needs -pthread for some reason. See:
20813 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
20815 for gl_pthread in '' '-pthread'; do
20816 LIBS="$LIBS $gl_pthread"
20817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20818 /* end confdefs.h. */
20819 #include <pthread.h>
20821 pthread_mutexattr_t ma;
20826 pthread_mutex_lock (&m);
20827 pthread_mutexattr_init (&ma);
20832 if ac_fn_c_try_link "$LINENO"
20835 LIBPTHREAD=$gl_pthread
20836 LIBPMULTITHREAD=$gl_pthread
20838 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20839 conftest$ac_exeext conftest.$ac_ext
20841 test $gl_pthread_api = yes && break
20843 echo "$as_me:20843: gl_pthread_api=$gl_pthread_api" >&5
20844 echo "$as_me:20844: LIBPTHREAD=$LIBPTHREAD" >&5
20846 gl_pthread_in_glibc=no
20847 # On Linux with glibc >= 2.34, libc contains the fully functional
20848 # pthread functions.
20851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20852 /* end confdefs.h. */
20853 #include <features.h>
20854 #ifdef __GNU_LIBRARY__
20855 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
20861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20862 $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
20864 gl_pthread_in_glibc=yes
20870 echo "$as_me:20870: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
20872 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
20873 # since it is defined as a macro on OSF/1.)
20874 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
20875 # The program links fine without libpthread. But it may actually
20876 # need to link with libpthread in order to create multiple threads.
20877 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
20878 printf %s "checking for pthread_kill in -lpthread... " >&6; }
20879 if test ${ac_cv_lib_pthread_pthread_kill+y}
20881 printf %s "(cached) " >&6
20883 e) ac_check_lib_save_LIBS=$LIBS
20884 LIBS="-lpthread $LIBS"
20885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20886 /* end confdefs.h. */
20888 /* Override any GCC internal prototype to avoid an error.
20889 Use char because int might match the return type of a GCC
20890 builtin and then its argument prototype would still apply.
20891 The 'extern "C"' is for builds by C++ compilers;
20892 although this is not generally supported in C code supporting it here
20893 has little cost and some practical benefit (sr 110532). */
20897 char pthread_kill (void);
20901 return pthread_kill ();
20906 if ac_fn_c_try_link "$LINENO"
20908 ac_cv_lib_pthread_pthread_kill=yes
20910 e) ac_cv_lib_pthread_pthread_kill=no ;;
20913 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20914 conftest$ac_exeext conftest.$ac_ext
20915 LIBS=$ac_check_lib_save_LIBS ;;
20918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
20919 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
20920 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
20922 if test $gl_pthread_in_glibc = yes; then
20925 LIBPMULTITHREAD=-lpthread
20926 # On Solaris and HP-UX, most pthread functions exist also in libc.
20927 # Therefore pthread_in_use() needs to actually try to create a
20928 # thread: pthread_create from libc will fail, whereas
20929 # pthread_create will actually create a thread.
20930 # On Solaris 10 or newer, this test is no longer needed, because
20931 # libc contains the fully functional pthread functions.
20933 solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
20935 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
20942 elif test $gl_pthread_api != yes; then
20943 # Some library is needed. Try libpthread and libc_r.
20944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
20945 printf %s "checking for pthread_kill in -lpthread... " >&6; }
20946 if test ${ac_cv_lib_pthread_pthread_kill+y}
20948 printf %s "(cached) " >&6
20950 e) ac_check_lib_save_LIBS=$LIBS
20951 LIBS="-lpthread $LIBS"
20952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20953 /* end confdefs.h. */
20955 /* Override any GCC internal prototype to avoid an error.
20956 Use char because int might match the return type of a GCC
20957 builtin and then its argument prototype would still apply.
20958 The 'extern "C"' is for builds by C++ compilers;
20959 although this is not generally supported in C code supporting it here
20960 has little cost and some practical benefit (sr 110532). */
20964 char pthread_kill (void);
20968 return pthread_kill ();
20973 if ac_fn_c_try_link "$LINENO"
20975 ac_cv_lib_pthread_pthread_kill=yes
20977 e) ac_cv_lib_pthread_pthread_kill=no ;;
20980 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20981 conftest$ac_exeext conftest.$ac_ext
20982 LIBS=$ac_check_lib_save_LIBS ;;
20985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
20986 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
20987 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
20990 LIBPTHREAD=-lpthread
20991 LIBPMULTITHREAD=-lpthread
20994 if test $gl_pthread_api != yes; then
20996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
20997 printf %s "checking for pthread_kill in -lc_r... " >&6; }
20998 if test ${ac_cv_lib_c_r_pthread_kill+y}
21000 printf %s "(cached) " >&6
21002 e) ac_check_lib_save_LIBS=$LIBS
21004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21005 /* end confdefs.h. */
21007 /* Override any GCC internal prototype to avoid an error.
21008 Use char because int might match the return type of a GCC
21009 builtin and then its argument prototype would still apply.
21010 The 'extern "C"' is for builds by C++ compilers;
21011 although this is not generally supported in C code supporting it here
21012 has little cost and some practical benefit (sr 110532). */
21016 char pthread_kill (void);
21020 return pthread_kill ();
21025 if ac_fn_c_try_link "$LINENO"
21027 ac_cv_lib_c_r_pthread_kill=yes
21029 e) ac_cv_lib_c_r_pthread_kill=no ;;
21032 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21033 conftest$ac_exeext conftest.$ac_ext
21034 LIBS=$ac_check_lib_save_LIBS ;;
21037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
21038 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
21039 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
21043 LIBPMULTITHREAD=-lc_r
21048 echo "$as_me:21048: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
21050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
21051 printf %s "checking whether POSIX threads API is available... " >&6; }
21052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
21053 printf "%s\n" "$gl_pthread_api" >&6; }
21056 if test $gl_pthread_api = yes; then
21058 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
21062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21063 /* end confdefs.h. */
21073 if ac_fn_c_try_link "$LINENO"
21078 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
21079 printf %s "checking for sched_yield in -lrt... " >&6; }
21080 if test ${ac_cv_lib_rt_sched_yield+y}
21082 printf %s "(cached) " >&6
21084 e) ac_check_lib_save_LIBS=$LIBS
21086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21087 /* end confdefs.h. */
21089 /* Override any GCC internal prototype to avoid an error.
21090 Use char because int might match the return type of a GCC
21091 builtin and then its argument prototype would still apply.
21092 The 'extern "C"' is for builds by C++ compilers;
21093 although this is not generally supported in C code supporting it here
21094 has little cost and some practical benefit (sr 110532). */
21098 char sched_yield (void);
21102 return sched_yield ();
21107 if ac_fn_c_try_link "$LINENO"
21109 ac_cv_lib_rt_sched_yield=yes
21111 e) ac_cv_lib_rt_sched_yield=no ;;
21114 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21115 conftest$ac_exeext conftest.$ac_ext
21116 LIBS=$ac_check_lib_save_LIBS ;;
21119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
21120 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
21121 if test "x$ac_cv_lib_rt_sched_yield" = xyes
21123 SCHED_YIELD_LIB=-lrt
21125 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
21126 printf %s "checking for sched_yield in -lposix4... " >&6; }
21127 if test ${ac_cv_lib_posix4_sched_yield+y}
21129 printf %s "(cached) " >&6
21131 e) ac_check_lib_save_LIBS=$LIBS
21132 LIBS="-lposix4 $LIBS"
21133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21134 /* end confdefs.h. */
21136 /* Override any GCC internal prototype to avoid an error.
21137 Use char because int might match the return type of a GCC
21138 builtin and then its argument prototype would still apply.
21139 The 'extern "C"' is for builds by C++ compilers;
21140 although this is not generally supported in C code supporting it here
21141 has little cost and some practical benefit (sr 110532). */
21145 char sched_yield (void);
21149 return sched_yield ();
21154 if ac_fn_c_try_link "$LINENO"
21156 ac_cv_lib_posix4_sched_yield=yes
21158 e) ac_cv_lib_posix4_sched_yield=no ;;
21161 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21162 conftest$ac_exeext conftest.$ac_ext
21163 LIBS=$ac_check_lib_save_LIBS ;;
21166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
21167 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
21168 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
21170 SCHED_YIELD_LIB=-lposix4
21179 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21180 conftest$ac_exeext conftest.$ac_ext
21182 LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
21185 gl_pthreadlib_body_done=done
21188 if test $ac_cv_header_threads_h = yes; then
21191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create" >&5
21192 printf %s "checking for thrd_create... " >&6; }
21193 if test ${gl_cv_onwards_func_thrd_create+y}
21195 printf %s "(cached) " >&6
21198 exec 9>&6 6>/dev/null
21203 ac_fn_check_decl "$LINENO" "thrd_create" "ac_cv_have_decl_thrd_create" "#include <threads.h>
21204 " "$ac_c_undeclared_builtin_options" "CFLAGS"
21205 if test "x$ac_cv_have_decl_thrd_create" = xyes
21209 if test $ac_cv_have_decl_thrd_create = yes; then
21210 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
21211 if test "x$ac_cv_func_thrd_create" = xyes
21216 if test $ac_cv_func_thrd_create = yes; then
21217 gl_cv_onwards_func_thrd_create=yes
21219 gl_cv_onwards_func_thrd_create='future OS version'
21222 gl_cv_onwards_func_thrd_create='future OS version'
21228 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
21229 if test "x$ac_cv_func_thrd_create" = xyes
21234 gl_cv_onwards_func_thrd_create=$ac_cv_func_thrd_create
21244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_thrd_create" >&5
21245 printf "%s\n" "$gl_cv_onwards_func_thrd_create" >&6; }
21247 case "$gl_cv_onwards_func_thrd_create" in
21248 future*) ac_cv_func_thrd_create=no ;;
21249 *) ac_cv_func_thrd_create=$gl_cv_onwards_func_thrd_create ;;
21251 if test $ac_cv_func_thrd_create = yes; then
21253 printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h
21258 if test $ac_cv_func_thrd_create = yes; then
21261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
21262 printf %s "checking for thrd_create in -lstdthreads... " >&6; }
21263 if test ${ac_cv_lib_stdthreads_thrd_create+y}
21265 printf %s "(cached) " >&6
21267 e) ac_check_lib_save_LIBS=$LIBS
21268 LIBS="-lstdthreads $LIBS"
21269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21270 /* end confdefs.h. */
21272 /* Override any GCC internal prototype to avoid an error.
21273 Use char because int might match the return type of a GCC
21274 builtin and then its argument prototype would still apply.
21275 The 'extern "C"' is for builds by C++ compilers;
21276 although this is not generally supported in C code supporting it here
21277 has little cost and some practical benefit (sr 110532). */
21281 char thrd_create (void);
21285 return thrd_create ();
21290 if ac_fn_c_try_link "$LINENO"
21292 ac_cv_lib_stdthreads_thrd_create=yes
21294 e) ac_cv_lib_stdthreads_thrd_create=no ;;
21297 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21298 conftest$ac_exeext conftest.$ac_ext
21299 LIBS=$ac_check_lib_save_LIBS ;;
21302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
21303 printf "%s\n" "$ac_cv_lib_stdthreads_thrd_create" >&6; }
21304 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes
21307 LIBSTDTHREAD='-lstdthreads -lpthread'
21311 LIBSTDTHREAD="$LIBPMULTITHREAD"
21318 LIBSTDTHREAD="$LIBPMULTITHREAD $SCHED_YIELD_LIB"
21324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
21325 printf %s "checking whether ISO C threads API is available... " >&6; }
21326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
21327 printf "%s\n" "$ac_cv_header_threads_h" >&6; }
21328 gl_stdthreadlib_body_done=done
21331 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
21332 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
21333 gl_threads_api=isoc
21335 printf "%s\n" "#define USE_ISOC_THREADS 1" >>confdefs.h
21339 if test $gl_threads_api = none; then
21340 case "$gl_use_threads" in
21341 yes | windows | win32) # The 'win32' is for backward compatibility.
21342 if { case "$host_os" in
21347 gl_threads_api=windows
21349 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
21356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
21357 printf %s "checking for multithread API to use... " >&6; }
21358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
21359 printf "%s\n" "$gl_threads_api" >&6; }
21371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
21372 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
21373 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
21375 printf %s "(cached) " >&6
21377 e) rm -f conftest.sym conftest.file
21378 echo >conftest.file
21379 if test "$cross_compiling" = yes
21383 # Guess yes on Linux systems.
21384 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
21386 # Guess yes on systems that emulate the Linux system calls.
21387 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
21389 # Guess yes on glibc systems.
21390 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
21392 # Guess no on native Windows.
21393 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
21395 # If we don't know, obey --enable-cross-guesses.
21396 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
21400 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21401 /* end confdefs.h. */
21402 $ac_includes_default
21407 if (symlink ("conftest.file", "conftest.sym") != 0)
21409 /* Linux will dereference the symlink and fail, as required by
21410 POSIX. That is better in the sense that it means we will not
21411 have to compile and use the lstat wrapper. */
21412 return lstat ("conftest.sym/", &sbuf) == 0;
21418 if ac_fn_c_try_run "$LINENO"
21420 gl_cv_func_lstat_dereferences_slashed_symlink=yes
21422 e) gl_cv_func_lstat_dereferences_slashed_symlink=no ;;
21425 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21426 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21430 rm -f conftest.sym conftest.file
21434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
21435 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
21436 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
21439 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
21444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
21445 printf %s "checking for a sed that does not truncate output... " >&6; }
21446 if test ${ac_cv_path_SED+y}
21448 printf %s "(cached) " >&6
21450 e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
21451 for ac_i in 1 2 3 4 5 6 7; do
21452 ac_script="$ac_script$as_nl$ac_script"
21454 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
21455 { ac_script=; unset ac_script;}
21456 if test -z "$SED"; then
21457 ac_path_SED_found=false
21458 # Loop through the user's path and test for each of PROGNAME-LIST
21459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21460 for as_dir in $PATH
21463 case $as_dir in #(((
21466 *) as_dir=$as_dir/ ;;
21468 for ac_prog in sed gsed
21470 for ac_exec_ext in '' $ac_executable_extensions; do
21471 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
21472 as_fn_executable_p "$ac_path_SED" || continue
21473 # Check for GNU ac_path_SED and select it if it is found.
21474 # Check for GNU $ac_path_SED
21475 case `"$ac_path_SED" --version 2>&1` in #(
21477 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
21481 printf %s 0123456789 >"conftest.in"
21484 cat "conftest.in" "conftest.in" >"conftest.tmp"
21485 mv "conftest.tmp" "conftest.in"
21486 cp "conftest.in" "conftest.nl"
21487 printf "%s\n" '' >> "conftest.nl"
21488 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
21489 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
21490 as_fn_arith $ac_count + 1 && ac_count=$as_val
21491 if test $ac_count -gt ${ac_path_SED_max-0}; then
21492 # Best one so far, save it but keep looking for a better one
21493 ac_cv_path_SED="$ac_path_SED"
21494 ac_path_SED_max=$ac_count
21496 # 10*(2^10) chars as input seems more than enough
21497 test $ac_count -gt 10 && break
21499 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
21502 $ac_path_SED_found && break 3
21507 if test -z "$ac_cv_path_SED"; then
21508 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
21511 ac_cv_path_SED=$SED
21516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
21517 printf "%s\n" "$ac_cv_path_SED" >&6; }
21518 SED="$ac_cv_path_SED"
21521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
21522 printf %s "checking for grep that handles long lines and -e... " >&6; }
21523 if test ${ac_cv_path_GREP+y}
21525 printf %s "(cached) " >&6
21527 e) if test -z "$GREP"; then
21528 ac_path_GREP_found=false
21529 # Loop through the user's path and test for each of PROGNAME-LIST
21530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21531 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
21534 case $as_dir in #(((
21537 *) as_dir=$as_dir/ ;;
21539 for ac_prog in grep ggrep
21541 for ac_exec_ext in '' $ac_executable_extensions; do
21542 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
21543 as_fn_executable_p "$ac_path_GREP" || continue
21544 # Check for GNU ac_path_GREP and select it if it is found.
21545 # Check for GNU $ac_path_GREP
21546 case `"$ac_path_GREP" --version 2>&1` in #(
21548 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
21552 printf %s 0123456789 >"conftest.in"
21555 cat "conftest.in" "conftest.in" >"conftest.tmp"
21556 mv "conftest.tmp" "conftest.in"
21557 cp "conftest.in" "conftest.nl"
21558 printf "%s\n" 'GREP' >> "conftest.nl"
21559 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
21560 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
21561 as_fn_arith $ac_count + 1 && ac_count=$as_val
21562 if test $ac_count -gt ${ac_path_GREP_max-0}; then
21563 # Best one so far, save it but keep looking for a better one
21564 ac_cv_path_GREP="$ac_path_GREP"
21565 ac_path_GREP_max=$ac_count
21567 # 10*(2^10) chars as input seems more than enough
21568 test $ac_count -gt 10 && break
21570 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
21573 $ac_path_GREP_found && break 3
21578 if test -z "$ac_cv_path_GREP"; then
21579 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
21582 ac_cv_path_GREP=$GREP
21587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
21588 printf "%s\n" "$ac_cv_path_GREP" >&6; }
21589 GREP="$ac_cv_path_GREP"
21594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
21595 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
21596 if test ${ac_cv_func_malloc_0_nonnull+y}
21598 printf %s "(cached) " >&6
21600 e) if test "$cross_compiling" = yes
21603 # Guess yes on platforms where we know the result.
21604 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
21605 | gnu* | *-musl* | midipix* | midnightbsd* \
21606 | hpux* | solaris* | cygwin* | mingw* | msys* )
21607 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
21608 # If we don't know, obey --enable-cross-guesses.
21609 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
21613 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21614 /* end confdefs.h. */
21615 #include <stdlib.h>
21620 void *p = malloc (0);
21629 if ac_fn_c_try_run "$LINENO"
21631 ac_cv_func_malloc_0_nonnull=yes
21633 e) ac_cv_func_malloc_0_nonnull=no ;;
21636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21637 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
21645 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
21646 case $ac_cv_func_malloc_0_nonnull in #(
21648 gl_cv_func_malloc_0_nonnull=1 ;; #(
21650 gl_cv_func_malloc_0_nonnull=0 ;;
21654 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
21665 if case "$host_os" in
21667 *) test $ac_cv_func_mbsinit = yes ;;
21669 && test $ac_cv_func_mbrtowc = yes; then
21674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21675 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
21676 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
21678 printf %s "(cached) " >&6
21682 # Guess no on AIX and OSF/1.
21683 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21684 # Guess yes otherwise.
21685 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21687 if test $LOCALE_JA != none; then
21688 if test "$cross_compiling" = yes
21692 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21693 /* end confdefs.h. */
21695 #include <locale.h>
21696 #include <string.h>
21700 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21702 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21706 memset (&state, '\0', sizeof (mbstate_t));
21707 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21708 if (mbsinit (&state))
21714 if ac_fn_c_try_run "$LINENO"
21716 gl_cv_func_mbrtowc_incomplete_state=yes
21718 e) gl_cv_func_mbrtowc_incomplete_state=no ;;
21721 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21722 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21727 if test $LOCALE_FR_UTF8 != none; then
21728 if test "$cross_compiling" = yes
21732 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21733 /* end confdefs.h. */
21735 #include <locale.h>
21736 #include <string.h>
21740 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21742 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
21746 memset (&state, '\0', sizeof (mbstate_t));
21747 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21748 if (mbsinit (&state))
21754 if ac_fn_c_try_run "$LINENO"
21756 gl_cv_func_mbrtowc_incomplete_state=yes
21758 e) gl_cv_func_mbrtowc_incomplete_state=no ;;
21761 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21762 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21772 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21778 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
21779 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
21781 printf %s "(cached) " >&6
21785 # Guess no on Solaris 8.
21786 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21787 # Guess yes otherwise.
21788 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21790 if test $LOCALE_ZH_CN != none; then
21791 if test "$cross_compiling" = yes
21795 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21796 /* end confdefs.h. */
21798 #include <locale.h>
21799 #include <stdlib.h>
21800 #include <string.h>
21804 /* This fails on Solaris 8:
21805 mbrtowc returns 2, and sets wc to 0x00F0.
21806 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
21807 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21809 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21813 memset (&state, '\0', sizeof (mbstate_t));
21814 if (mbrtowc (&wc, input + 3, 6, &state) != 4
21815 && mbtowc (&wc, input + 3, 6) == 4)
21821 if ac_fn_c_try_run "$LINENO"
21823 gl_cv_func_mbrtowc_sanitycheck=yes
21825 e) gl_cv_func_mbrtowc_sanitycheck=no ;;
21828 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21829 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21838 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21840 REPLACE_MBSTATE_T=0
21841 case "$gl_cv_func_mbrtowc_incomplete_state" in
21843 *) REPLACE_MBSTATE_T=1 ;;
21845 case "$gl_cv_func_mbrtowc_sanitycheck" in
21847 *) REPLACE_MBSTATE_T=1 ;;
21850 REPLACE_MBSTATE_T=1
21855 GL_GNULIB_EXPLICIT_BZERO=0
21875 GL_GNULIB_MEMPCPY=0
21879 GL_GNULIB_MEMRCHR=0
21883 GL_GNULIB_MEMSET_EXPLICIT=0
21887 GL_GNULIB_RAWMEMCHR=0
21895 GL_GNULIB_STPNCPY=0
21899 GL_GNULIB_STRCHRNUL=0
21907 GL_GNULIB_STRNCAT=0
21911 GL_GNULIB_STRNDUP=0
21915 GL_GNULIB_STRNLEN=0
21919 GL_GNULIB_STRPBRK=0
21931 GL_GNULIB_STRCASESTR=0
21935 GL_GNULIB_STRTOK_R=0
21943 GL_GNULIB_MBSNLEN=0
21951 GL_GNULIB_MBSRCHR=0
21959 GL_GNULIB_MBSCASECMP=0
21963 GL_GNULIB_MBSNCASECMP=0
21967 GL_GNULIB_MBSPCASECMP=0
21971 GL_GNULIB_MBSCASESTR=0
21975 GL_GNULIB_MBSCSPN=0
21979 GL_GNULIB_MBSPBRK=0
21991 GL_GNULIB_MBSTOK_R=0
21995 GL_GNULIB_STRERROR=0
21999 GL_GNULIB_STRERROR_R=0
22003 GL_GNULIB_STRERRORNAME_NP=0
22007 GL_GNULIB_SIGABBREV_NP=0
22011 GL_GNULIB_SIGDESCR_NP=0
22015 GL_GNULIB_STRSIGNAL=0
22019 GL_GNULIB_STRVERSCMP=0
22023 GL_GNULIB_MDA_MEMCCPY=1
22027 GL_GNULIB_MDA_STRDUP=1
22033 HAVE_EXPLICIT_BZERO=1;
22036 HAVE_DECL_MEMMEM=1;
22038 HAVE_MEMSET_EXPLICIT=1;
22039 HAVE_DECL_MEMRCHR=1;
22044 HAVE_DECL_STRDUP=1;
22045 HAVE_DECL_STRNDUP=1;
22046 HAVE_DECL_STRNLEN=1;
22050 HAVE_DECL_STRTOK_R=1;
22051 HAVE_DECL_STRERROR_R=1;
22052 HAVE_STRERRORNAME_NP=1;
22053 HAVE_SIGABBREV_NP=1;
22054 HAVE_SIGDESCR_NP=1;
22055 HAVE_DECL_STRSIGNAL=1;
22063 REPLACE_STRCHRNUL=0;
22069 REPLACE_STRCASESTR=0;
22070 REPLACE_STRTOK_R=0;
22071 REPLACE_STRERROR=0;
22072 REPLACE_STRERROR_R=0;
22073 REPLACE_STRERRORNAME_NP=0;
22074 REPLACE_STRSIGNAL=0;
22075 UNDEFINE_STRTOK_R=0;
22081 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
22082 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
22083 # irrelevant for anonymous mappings.
22084 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
22085 if test "x$ac_cv_func_mmap" = xyes
22089 e) gl_have_mmap=no ;;
22094 # Try to allow MAP_ANONYMOUS.
22095 gl_have_mmap_anonymous=no
22096 if test $gl_have_mmap = yes; then
22097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
22098 printf %s "checking for MAP_ANONYMOUS... " >&6; }
22099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22100 /* end confdefs.h. */
22102 #include <sys/mman.h>
22103 #ifdef MAP_ANONYMOUS
22104 I cannot identify this map
22108 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22109 $EGREP_TRADITIONAL "I cannot identify this map" >/dev/null 2>&1
22111 gl_have_mmap_anonymous=yes
22115 if test $gl_have_mmap_anonymous != yes; then
22116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22117 /* end confdefs.h. */
22119 #include <sys/mman.h>
22121 I cannot identify this map
22125 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22126 $EGREP_TRADITIONAL "I cannot identify this map" >/dev/null 2>&1
22129 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
22131 gl_have_mmap_anonymous=yes
22136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
22137 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
22138 if test $gl_have_mmap_anonymous = yes; then
22140 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
22154 # Detect platform-specific bugs in some versions of glibc:
22155 # memchr should not dereference anything with length 0
22156 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
22157 # memchr should not dereference overestimated length after a match
22158 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
22159 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
22160 # memchr should cast the second argument to 'unsigned char'.
22161 # This bug exists in Android 4.3.
22162 # Assume that memchr works on platforms that lack mprotect.
22163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
22164 printf %s "checking whether memchr works... " >&6; }
22165 if test ${gl_cv_func_memchr_works+y}
22167 printf %s "(cached) " >&6
22169 e) if test "$cross_compiling" = yes
22172 # Guess no on Android.
22173 linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
22174 # Guess yes on native Windows.
22175 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
22176 # If we don't know, obey --enable-cross-guesses.
22177 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
22181 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22182 /* end confdefs.h. */
22184 #include <string.h>
22185 #if HAVE_SYS_MMAN_H
22186 # include <fcntl.h>
22187 # include <unistd.h>
22188 # include <sys/types.h>
22189 # include <sys/mman.h>
22191 # define MAP_FILE 0
22200 char *fence = NULL;
22201 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
22202 # if HAVE_MAP_ANONYMOUS
22203 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
22205 # else /* !HAVE_MAP_ANONYMOUS */
22206 const int flags = MAP_FILE | MAP_PRIVATE;
22207 int fd = open ("/dev/zero", O_RDONLY, 0666);
22211 int pagesize = getpagesize ();
22213 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
22215 if (two_pages != (char *)(-1)
22216 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
22217 fence = two_pages + pagesize;
22222 /* Test against bugs on glibc systems. */
22223 if (memchr (fence, 0, 0))
22225 strcpy (fence - 9, "12345678");
22226 if (memchr (fence - 9, 0, 79) != fence - 1)
22228 if (memchr (fence - 1, 0, 3) != fence - 1)
22230 /* Test against bug on AIX 7.2. */
22231 if (memchr (fence - 4, '6', 16) != fence - 4)
22234 /* Test against bug on Android 4.3. */
22240 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
22249 if ac_fn_c_try_run "$LINENO"
22251 gl_cv_func_memchr_works=yes
22253 e) gl_cv_func_memchr_works=no ;;
22256 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22257 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
22265 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
22266 case "$gl_cv_func_memchr_works" in
22268 *) REPLACE_MEMCHR=1 ;;
22275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
22276 printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
22277 if test ${gl_cv_minmax_in_limits_h+y}
22279 printf %s "(cached) " >&6
22281 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22282 /* end confdefs.h. */
22283 #include <limits.h>
22284 int x = MIN (42, 17);
22293 if ac_fn_c_try_compile "$LINENO"
22295 gl_cv_minmax_in_limits_h=yes
22297 e) gl_cv_minmax_in_limits_h=no ;;
22300 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
22304 printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
22305 if test $gl_cv_minmax_in_limits_h = yes; then
22307 printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
22316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
22317 printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
22318 if test ${gl_cv_minmax_in_sys_param_h+y}
22320 printf %s "(cached) " >&6
22322 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22323 /* end confdefs.h. */
22324 #include <sys/param.h>
22325 int x = MIN (42, 17);
22334 if ac_fn_c_try_compile "$LINENO"
22336 gl_cv_minmax_in_sys_param_h=yes
22338 e) gl_cv_minmax_in_sys_param_h=no ;;
22341 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
22345 printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
22346 if test $gl_cv_minmax_in_sys_param_h = yes; then
22348 printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
22357 HAVE_DECL_LOCALTIME_R=1;
22361 HAVE_TIMESPEC_GET=1;
22362 HAVE_TIMESPEC_GETRES=1;
22364 REPLACE_CTIME=GNULIB_PORTCHECK;
22365 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
22366 REPLACE_MKTIME=GNULIB_PORTCHECK;
22367 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
22368 REPLACE_STRFTIME=GNULIB_PORTCHECK;
22370 REPLACE_TIMEGM=GNULIB_PORTCHECK;
22371 REPLACE_TIMESPEC_GET=GNULIB_PORTCHECK;
22372 REPLACE_TZSET=GNULIB_PORTCHECK;
22374 : ${GNULIB_GETTIMEOFDAY=0};
22376 REPLACE_LOCALTIME=0;
22379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5
22380 printf %s "checking whether time_t is signed... " >&6; }
22381 if test ${gl_cv_time_t_is_signed+y}
22383 printf %s "(cached) " >&6
22385 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22386 /* end confdefs.h. */
22388 char time_t_signed[(time_t) -1 < 0 ? 1 : -1];
22397 if ac_fn_c_try_compile "$LINENO"
22399 gl_cv_time_t_is_signed=yes
22401 e) gl_cv_time_t_is_signed=no ;;
22404 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_t_is_signed" >&5
22408 printf "%s\n" "$gl_cv_time_t_is_signed" >&6; }
22409 if test $gl_cv_time_t_is_signed = yes; then
22411 printf "%s\n" "#define TIME_T_IS_SIGNED 1" >>confdefs.h
22415 ac_fn_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22416 if test "x$ac_cv_have_decl_alarm" = xyes
22420 e) ac_have_decl=0 ;;
22423 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
22431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
22432 printf %s "checking for working mktime... " >&6; }
22433 if test ${gl_cv_func_working_mktime+y}
22435 printf %s "(cached) " >&6
22437 e) if test $APPLE_UNIVERSAL_BUILD = 1; then
22438 # A universal build on Apple Mac OS X platforms.
22439 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
22440 # But we need a configuration result that is valid in both modes.
22441 gl_cv_func_working_mktime="guessing no"
22443 if test "$cross_compiling" = yes
22446 # Guess no on native Windows.
22447 mingw*) gl_cv_func_working_mktime="guessing no" ;;
22448 *) gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
22452 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22453 /* end confdefs.h. */
22454 /* Test program from Paul Eggert and Tony Leneis. */
22455 #include <limits.h>
22456 #include <stdlib.h>
22459 #ifdef HAVE_UNISTD_H
22460 # include <unistd.h>
22463 #if HAVE_DECL_ALARM
22464 # include <signal.h>
22472 #ifndef TIME_T_IS_SIGNED
22473 # define TIME_T_IS_SIGNED 0
22476 static time_t time_t_max;
22477 static time_t time_t_min;
22479 /* Values we'll use to set the TZ environment variable. */
22480 static char *tz_strings[] = {
22481 (char *) 0, "TZ=GMT0", "TZ=JST-9",
22482 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
22484 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
22486 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
22487 Based on a problem report from Andreas Jaeger. */
22489 spring_forward_gap ()
22491 /* glibc (up to about 1998-10-07) failed this test. */
22494 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22495 instead of "TZ=America/Vancouver" in order to detect the bug even
22496 on systems that don't support the Olson extension, or don't have the
22497 full zoneinfo tables installed. */
22498 if (putenv ("TZ=PST8PDT,M4.1.0,M10.5.0") != 0)
22508 return mktime (&tm) != (time_t) -1;
22512 mktime_test1 (time_t now)
22515 return ! (lt = localtime (&now)) || mktime (lt) == now;
22519 mktime_test (time_t now)
22521 return (mktime_test1 (now)
22522 && mktime_test1 ((time_t) (time_t_max - now))
22523 && mktime_test1 ((time_t) (time_t_min + now)));
22529 /* Based on code from Ariel Faigon. */
22539 return tm.tm_mon == 2 && tm.tm_mday == 31;
22543 bigtime_test (int j)
22547 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
22548 now = mktime (&tm);
22549 if (now != (time_t) -1)
22551 struct tm *lt = localtime (&now);
22553 && lt->tm_year == tm.tm_year
22554 && lt->tm_mon == tm.tm_mon
22555 && lt->tm_mday == tm.tm_mday
22556 && lt->tm_hour == tm.tm_hour
22557 && lt->tm_min == tm.tm_min
22558 && lt->tm_sec == tm.tm_sec
22559 && lt->tm_yday == tm.tm_yday
22560 && lt->tm_wday == tm.tm_wday
22561 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
22562 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
22571 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
22572 ignoring leap seconds. */
22573 unsigned long int answer = 2527315200UL;
22577 tm.tm_year = 2050 - 1900;
22580 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
22583 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22584 instead of "TZ=America/Vancouver" in order to detect the bug even
22585 on systems that don't support the Olson extension, or don't have the
22586 full zoneinfo tables installed. */
22587 if (putenv ("TZ=PST8PDT,M4.1.0,M10.5.0") != 0)
22592 /* Check that the result is either a failure, or close enough
22593 to the correct answer that we can assume the discrepancy is
22594 due to leap seconds. */
22595 return (t == (time_t) -1
22596 || (0 < t && answer - 120 <= t && t <= answer + 120));
22602 if (putenv ("TZ=America/Indiana/Indianapolis") != 0)
22605 tm.tm_year = 1986 - 1900; tm.tm_mon = 4 - 1; tm.tm_mday = 28;
22606 tm.tm_hour = 16; tm.tm_min = 24; tm.tm_sec = 50; tm.tm_isdst = 0;
22607 time_t std = mktime (&tm);
22608 if (! (std == 515107490 || std == 515107503))
22611 /* This platform supports TZDB, either without or with leap seconds.
22612 Return true if GNU Bug#48085 is absent. */
22614 time_t dst = mktime (&tm);
22615 return std - dst == 60 * 60;
22624 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
22626 #if HAVE_DECL_ALARM
22627 /* This test makes some buggy mktime implementations loop.
22628 Give up after 60 seconds; a mktime slower than that
22629 isn't worth using anyway. */
22630 signal (SIGALRM, SIG_DFL);
22634 time_t_max = (! TIME_T_IS_SIGNED
22636 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
22638 time_t_min = (! TIME_T_IS_SIGNED
22640 : time_t_signed_magnitude
22644 delta = time_t_max / 997; /* a suitable prime number */
22645 for (i = 0; i < N_STRINGS; i++)
22648 putenv (tz_strings[i]);
22650 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
22651 if (! mktime_test (t))
22653 if ((result & 2) == 0
22654 && ! (mktime_test ((time_t) 1)
22655 && mktime_test ((time_t) (60 * 60))
22656 && mktime_test ((time_t) (60 * 60 * 24))))
22659 for (j = 1; (result & 4) == 0; j <<= 1)
22661 if (! bigtime_test (j))
22663 if (INT_MAX / 2 < j)
22666 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
22669 if (! irix_6_4_bug ())
22671 if (! spring_forward_gap ())
22673 if (! year_2050_test () || ! indiana_test ())
22678 if ac_fn_c_try_run "$LINENO"
22680 gl_cv_func_working_mktime=yes
22682 e) gl_cv_func_working_mktime=no ;;
22685 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22686 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
22695 printf "%s\n" "$gl_cv_func_working_mktime" >&6; }
22707 GL_GNULIB_LOCALTIME=0
22711 GL_GNULIB_NANOSLEEP=0
22715 GL_GNULIB_STRFTIME=0
22719 GL_GNULIB_STRPTIME=0
22731 GL_GNULIB_TIMESPEC_GET=0
22735 GL_GNULIB_TIMESPEC_GETRES=0
22743 GL_GNULIB_TIME_RZ=0
22751 GL_GNULIB_MDA_TZSET=1
22758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
22759 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
22760 if test ${ac_cv_struct_tm+y}
22762 printf %s "(cached) " >&6
22764 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22765 /* end confdefs.h. */
22766 #include <sys/types.h>
22773 int *p = &tm.tm_sec;
22779 if ac_fn_c_try_compile "$LINENO"
22781 ac_cv_struct_tm=time.h
22783 e) ac_cv_struct_tm=sys/time.h ;;
22786 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
22790 printf "%s\n" "$ac_cv_struct_tm" >&6; }
22791 if test $ac_cv_struct_tm = sys/time.h; then
22793 printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
22797 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
22798 #include <$ac_cv_struct_tm>
22801 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
22804 printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
22809 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
22811 printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
22814 ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
22815 " "$ac_c_undeclared_builtin_options" "CFLAGS"
22816 if test "x$ac_cv_have_decl_tzname" = xyes
22820 e) ac_have_decl=0 ;;
22823 printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
22825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
22826 printf %s "checking for tzname... " >&6; }
22827 if test ${ac_cv_var_tzname+y}
22829 printf %s "(cached) " >&6
22831 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22832 /* end confdefs.h. */
22834 #if !HAVE_DECL_TZNAME
22835 extern char *tzname[];
22841 return tzname[0][0];
22846 if ac_fn_c_try_link "$LINENO"
22848 ac_cv_var_tzname=yes
22850 e) ac_cv_var_tzname=no ;;
22853 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22854 conftest$ac_exeext conftest.$ac_ext ;;
22857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
22858 printf "%s\n" "$ac_cv_var_tzname" >&6; }
22859 if test $ac_cv_var_tzname = yes; then
22861 printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
22867 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
22869 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes
22872 printf "%s\n" "#define HAVE_TM_GMTOFF 1" >>confdefs.h
22878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
22879 printf %s "checking for O_CLOEXEC... " >&6; }
22880 if test ${gl_cv_macro_O_CLOEXEC+y}
22882 printf %s "(cached) " >&6
22884 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22885 /* end confdefs.h. */
22899 if ac_fn_c_try_compile "$LINENO"
22901 gl_cv_macro_O_CLOEXEC=yes
22903 e) gl_cv_macro_O_CLOEXEC=no ;;
22906 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
22910 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
22914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
22915 printf %s "checking for promoted mode_t type... " >&6; }
22916 if test ${gl_cv_promoted_mode_t+y}
22918 printf %s "(cached) " >&6
22921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22922 /* end confdefs.h. */
22923 #include <sys/types.h>
22927 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
22932 if ac_fn_c_try_compile "$LINENO"
22934 gl_cv_promoted_mode_t='int'
22936 e) gl_cv_promoted_mode_t='mode_t' ;;
22939 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
22944 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
22946 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
22951 HAVE_POSIX_SIGNALBLOCKING=1;
22952 HAVE_PTHREAD_SIGMASK=1;
22957 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
22959 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
22961 HAVE_SIGHANDLER_T=1;
22962 REPLACE_PTHREAD_SIGMASK=0;
22966 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
22967 #include <signal.h>
22968 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
22969 #include <sys/types.h>
22972 if test "x$ac_cv_type_sigset_t" = xyes
22975 printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
22977 gl_cv_type_sigset_t=yes
22979 e) gl_cv_type_sigset_t=no ;;
22983 if test $gl_cv_type_sigset_t != yes; then
22989 GL_GNULIB_PTHREAD_SIGMASK=0
22997 GL_GNULIB_SIGNAL_H_SIGPIPE=0
23001 GL_GNULIB_SIGPROCMASK=0
23005 GL_GNULIB_SIGACTION=0
23013 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
23014 REPLACE_REALLOC_FOR_REALLOC_POSIX=1
23019 ac_fn_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23020 if test "x$ac_cv_have_decl_setenv" = xyes
23024 e) ac_have_decl=0 ;;
23027 printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h
23033 if test $ac_cv_have_decl_setenv = no; then
23041 ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
23042 if test "x$ac_cv_header_search_h" = xyes
23044 printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h
23050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tsearch" >&5
23051 printf %s "checking for tsearch... " >&6; }
23052 if test ${gl_cv_onwards_func_tsearch+y}
23054 printf %s "(cached) " >&6
23057 exec 9>&6 6>/dev/null
23062 ac_fn_check_decl "$LINENO" "tsearch" "ac_cv_have_decl_tsearch" "#include <search.h>
23063 " "$ac_c_undeclared_builtin_options" "CFLAGS"
23064 if test "x$ac_cv_have_decl_tsearch" = xyes
23068 if test $ac_cv_have_decl_tsearch = yes; then
23069 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
23070 if test "x$ac_cv_func_tsearch" = xyes
23075 if test $ac_cv_func_tsearch = yes; then
23076 gl_cv_onwards_func_tsearch=yes
23078 gl_cv_onwards_func_tsearch='future OS version'
23081 gl_cv_onwards_func_tsearch='future OS version'
23087 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
23088 if test "x$ac_cv_func_tsearch" = xyes
23093 gl_cv_onwards_func_tsearch=$ac_cv_func_tsearch
23103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_tsearch" >&5
23104 printf "%s\n" "$gl_cv_onwards_func_tsearch" >&6; }
23106 case "$gl_cv_onwards_func_tsearch" in
23107 future*) ac_cv_func_tsearch=no ;;
23108 *) ac_cv_func_tsearch=$gl_cv_onwards_func_tsearch ;;
23110 if test $ac_cv_func_tsearch = yes; then
23112 printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
23119 ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default"
23120 if test "x$ac_cv_type_uid_t" = xyes
23125 printf "%s\n" "#define uid_t int" >>confdefs.h
23130 ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default"
23131 if test "x$ac_cv_type_gid_t" = xyes
23136 printf "%s\n" "#define gid_t int" >>confdefs.h
23152 if test $gl_cv_have_include_next = yes; then
23153 gl_cv_next_signal_h='<'signal.h'>'
23155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
23156 printf %s "checking absolute name of <signal.h>... " >&6; }
23157 if test ${gl_cv_next_signal_h+y}
23159 printf %s "(cached) " >&6
23164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23165 /* end confdefs.h. */
23166 #include <signal.h>
23169 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23170 *) gl_absname_cpp="$ac_cpp" ;;
23175 gl_dirsep_regex='[/\\]'
23178 gl_dirsep_regex='\/'
23181 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23182 gl_header_literal_regex=`echo 'signal.h' \
23183 | sed -e "$gl_make_literal_regex_sed"`
23184 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23185 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23191 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23192 sed -n "$gl_absolute_header_sed"`
23194 gl_header=$gl_cv_absolute_signal_h
23195 gl_cv_next_signal_h='"'$gl_header'"'
23200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
23201 printf "%s\n" "$gl_cv_next_signal_h" >&6; }
23203 NEXT_SIGNAL_H=$gl_cv_next_signal_h
23205 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23206 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23207 gl_next_as_first_directive='<'signal.h'>'
23209 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23210 gl_next_as_first_directive=$gl_cv_next_signal_h
23212 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
23218 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
23219 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
23220 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
23221 #include <signal.h>
23224 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
23228 e) HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 ;;
23238 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
23239 #include <signal.h>
23242 if test "x$ac_cv_type_sighandler_t" = xyes
23246 e) HAVE_SIGHANDLER_T=0 ;;
23260 *-musl* | midipix*)
23262 printf "%s\n" "#define MUSL_LIBC 1" >>confdefs.h
23274 ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23275 if test "x$ac_cv_have_decl_fcloseall" = xyes
23279 e) ac_have_decl=0 ;;
23282 printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
23284 ac_fn_check_decl "$LINENO" "getw" "ac_cv_have_decl_getw" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23285 if test "x$ac_cv_have_decl_getw" = xyes
23289 e) ac_have_decl=0 ;;
23292 printf "%s\n" "#define HAVE_DECL_GETW $ac_have_decl" >>confdefs.h
23294 ac_fn_check_decl "$LINENO" "putw" "ac_cv_have_decl_putw" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23295 if test "x$ac_cv_have_decl_putw" = xyes
23299 e) ac_have_decl=0 ;;
23302 printf "%s\n" "#define HAVE_DECL_PUTW $ac_have_decl" >>confdefs.h
23314 if test $gl_cv_have_include_next = yes; then
23315 gl_cv_next_stdio_h='<'stdio.h'>'
23317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
23318 printf %s "checking absolute name of <stdio.h>... " >&6; }
23319 if test ${gl_cv_next_stdio_h+y}
23321 printf %s "(cached) " >&6
23326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23327 /* end confdefs.h. */
23331 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23332 *) gl_absname_cpp="$ac_cpp" ;;
23337 gl_dirsep_regex='[/\\]'
23340 gl_dirsep_regex='\/'
23343 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23344 gl_header_literal_regex=`echo 'stdio.h' \
23345 | sed -e "$gl_make_literal_regex_sed"`
23346 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23347 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23353 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23354 sed -n "$gl_absolute_header_sed"`
23356 gl_header=$gl_cv_absolute_stdio_h
23357 gl_cv_next_stdio_h='"'$gl_header'"'
23362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
23363 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
23365 NEXT_STDIO_H=$gl_cv_next_stdio_h
23367 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23368 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23369 gl_next_as_first_directive='<'stdio.h'>'
23371 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23372 gl_next_as_first_directive=$gl_cv_next_stdio_h
23374 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
23380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
23381 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
23382 if test ${gl_cv_func_printf_attribute_flavor+y}
23384 printf %s "(cached) " >&6
23386 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23387 /* end confdefs.h. */
23389 #define __STDC_FORMAT_MACROS 1
23391 #include <inttypes.h>
23392 /* For non-mingw systems, compilation will trivially succeed.
23393 For mingw, compilation will succeed for older mingw (system
23394 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
23395 #if (defined _WIN32 && ! defined __CYGWIN__) && \
23396 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
23397 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
23408 if ac_fn_c_try_compile "$LINENO"
23410 gl_cv_func_printf_attribute_flavor=system
23412 e) gl_cv_func_printf_attribute_flavor=gnu ;;
23415 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
23418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
23419 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
23420 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
23422 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
23440 if test $ac_cv_have_decl_fcloseall = no; then
23441 HAVE_DECL_FCLOSEALL=0
23445 if test $ac_cv_have_decl_getw = no; then
23450 if test $ac_cv_have_decl_putw = no; then
23454 ac_fn_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23455 if test "x$ac_cv_have_decl_ecvt" = xyes
23459 e) ac_have_decl=0 ;;
23462 printf "%s\n" "#define HAVE_DECL_ECVT $ac_have_decl" >>confdefs.h
23464 ac_fn_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23465 if test "x$ac_cv_have_decl_fcvt" = xyes
23469 e) ac_have_decl=0 ;;
23472 printf "%s\n" "#define HAVE_DECL_FCVT $ac_have_decl" >>confdefs.h
23474 ac_fn_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23475 if test "x$ac_cv_have_decl_gcvt" = xyes
23479 e) ac_have_decl=0 ;;
23482 printf "%s\n" "#define HAVE_DECL_GCVT $ac_have_decl" >>confdefs.h
23494 if test $gl_cv_have_include_next = yes; then
23495 gl_cv_next_stdlib_h='<'stdlib.h'>'
23497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
23498 printf %s "checking absolute name of <stdlib.h>... " >&6; }
23499 if test ${gl_cv_next_stdlib_h+y}
23501 printf %s "(cached) " >&6
23506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23507 /* end confdefs.h. */
23508 #include <stdlib.h>
23511 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23512 *) gl_absname_cpp="$ac_cpp" ;;
23517 gl_dirsep_regex='[/\\]'
23520 gl_dirsep_regex='\/'
23523 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23524 gl_header_literal_regex=`echo 'stdlib.h' \
23525 | sed -e "$gl_make_literal_regex_sed"`
23526 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23527 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23533 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23534 sed -n "$gl_absolute_header_sed"`
23536 gl_header=$gl_cv_absolute_stdlib_h
23537 gl_cv_next_stdlib_h='"'$gl_header'"'
23542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
23543 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
23545 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
23547 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23548 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23549 gl_next_as_first_directive='<'stdlib.h'>'
23551 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23552 gl_next_as_first_directive=$gl_cv_next_stdlib_h
23554 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
23568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether MB_CUR_MAX is correct" >&5
23569 printf %s "checking whether MB_CUR_MAX is correct... " >&6; }
23570 if test ${gl_cv_macro_MB_CUR_MAX_good+y}
23572 printf %s "(cached) " >&6
23576 # Guess no on Solaris.
23577 solaris*) gl_cv_macro_MB_CUR_MAX_good="guessing no" ;;
23578 # Guess yes otherwise.
23579 *) gl_cv_macro_MB_CUR_MAX_good="guessing yes" ;;
23581 if test $LOCALE_FR_UTF8 != none; then
23582 if test "$cross_compiling" = yes
23586 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23587 /* end confdefs.h. */
23589 #include <locale.h>
23590 #include <stdlib.h>
23594 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23596 if (MB_CUR_MAX < 4)
23602 if ac_fn_c_try_run "$LINENO"
23604 gl_cv_macro_MB_CUR_MAX_good=yes
23606 e) gl_cv_macro_MB_CUR_MAX_good=no ;;
23609 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23610 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
23618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_MB_CUR_MAX_good" >&5
23619 printf "%s\n" "$gl_cv_macro_MB_CUR_MAX_good" >&6; }
23620 case "$gl_cv_macro_MB_CUR_MAX_good" in
23622 *) REPLACE_MB_CUR_MAX=1 ;;
23626 if test $ac_cv_have_decl_ecvt = no; then
23630 if test $ac_cv_have_decl_fcvt = no; then
23634 if test $ac_cv_have_decl_gcvt = no; then
23641 HAVE_DECL_STRNCASECMP=1;
23644 REPLACE_STRERROR_0=0
23645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
23646 printf %s "checking whether strerror(0) succeeds... " >&6; }
23647 if test ${gl_cv_func_strerror_0_works+y}
23649 printf %s "(cached) " >&6
23651 e) if test "$cross_compiling" = yes
23654 # Guess yes on glibc systems.
23655 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
23656 # Guess yes on musl systems.
23657 *-musl* | midipix*) gl_cv_func_strerror_0_works="guessing yes" ;;
23658 # Guess yes on native Windows.
23659 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
23660 # If we don't know, obey --enable-cross-guesses.
23661 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
23665 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23666 /* end confdefs.h. */
23667 #include <string.h>
23676 str = strerror (0);
23677 if (!*str) result |= 1;
23678 if (errno) result |= 2;
23679 if (strstr (str, "nknown") || strstr (str, "ndefined"))
23686 if ac_fn_c_try_run "$LINENO"
23688 gl_cv_func_strerror_0_works=yes
23690 e) gl_cv_func_strerror_0_works=no ;;
23693 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23694 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
23701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
23702 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
23703 case "$gl_cv_func_strerror_0_works" in
23706 REPLACE_STRERROR_0=1
23708 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
23723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r" >&5
23724 printf %s "checking for strerror_r... " >&6; }
23725 if test ${gl_cv_onwards_func_strerror_r+y}
23727 printf %s "(cached) " >&6
23730 exec 9>&6 6>/dev/null
23735 ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "#include <string.h>
23736 " "$ac_c_undeclared_builtin_options" "CFLAGS"
23737 if test "x$ac_cv_have_decl_strerror_r" = xyes
23741 if test $ac_cv_have_decl_strerror_r = yes; then
23742 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
23743 if test "x$ac_cv_func_strerror_r" = xyes
23748 if test $ac_cv_func_strerror_r = yes; then
23749 gl_cv_onwards_func_strerror_r=yes
23751 gl_cv_onwards_func_strerror_r='future OS version'
23754 gl_cv_onwards_func_strerror_r='future OS version'
23760 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
23761 if test "x$ac_cv_func_strerror_r" = xyes
23766 gl_cv_onwards_func_strerror_r=$ac_cv_func_strerror_r
23776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_strerror_r" >&5
23777 printf "%s\n" "$gl_cv_onwards_func_strerror_r" >&6; }
23779 case "$gl_cv_onwards_func_strerror_r" in
23780 future*) ac_cv_func_strerror_r=no ;;
23781 *) ac_cv_func_strerror_r=$gl_cv_onwards_func_strerror_r ;;
23783 if test $ac_cv_func_strerror_r = yes; then
23785 printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
23790 if test $ac_cv_func_strerror_r = yes; then
23791 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
23792 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
23793 printf %s "checking for strerror_r with POSIX signature... " >&6; }
23794 if test ${gl_cv_func_strerror_r_posix_signature+y}
23796 printf %s "(cached) " >&6
23798 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23799 /* end confdefs.h. */
23800 #include <string.h>
23801 int strerror_r (int, char *, size_t);
23811 if ac_fn_c_try_compile "$LINENO"
23813 gl_cv_func_strerror_r_posix_signature=yes
23815 e) gl_cv_func_strerror_r_posix_signature=no ;;
23818 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
23823 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
23824 if test $gl_cv_func_strerror_r_posix_signature = yes; then
23825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
23826 printf %s "checking whether strerror_r works... " >&6; }
23827 if test ${gl_cv_func_strerror_r_works+y}
23829 printf %s "(cached) " >&6
23831 e) if test "$cross_compiling" = yes
23836 aix*) gl_cv_func_strerror_r_works="guessing no";;
23837 # Guess no on HP-UX.
23838 hpux*) gl_cv_func_strerror_r_works="guessing no";;
23839 # Guess no on BSD variants.
23840 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
23841 # Guess yes otherwise.
23842 *) gl_cv_func_strerror_r_works="guessing yes";;
23846 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23847 /* end confdefs.h. */
23849 #include <string.h>
23856 if (strerror_r (EACCES, buf, 0) < 0)
23859 if (strerror_r (EACCES, buf, sizeof buf) != 0)
23861 strcpy (buf, "Unknown");
23862 if (strerror_r (0, buf, sizeof buf) != 0)
23866 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
23870 if (strerror_r (-3, buf, sizeof buf) < 0)
23882 if ac_fn_c_try_run "$LINENO"
23884 gl_cv_func_strerror_r_works=yes
23886 e) gl_cv_func_strerror_r_works=no ;;
23889 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23890 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
23897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
23898 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
23901 if test $ac_cv_func___xpg_strerror_r = yes; then
23902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
23903 printf %s "checking whether __xpg_strerror_r works... " >&6; }
23904 if test ${gl_cv_func_strerror_r_works+y}
23906 printf %s "(cached) " >&6
23908 e) if test "$cross_compiling" = yes
23910 gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
23913 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23914 /* end confdefs.h. */
23916 #include <string.h>
23921 int __xpg_strerror_r(int, char *, size_t);
23927 char buf[256] = "^";
23929 char *str = strerror (-1);
23930 strcpy (copy, str);
23931 if (__xpg_strerror_r (-2, buf, 1) == 0)
23935 __xpg_strerror_r (-2, buf, 256);
23936 if (strcmp (str, copy))
23944 if ac_fn_c_try_run "$LINENO"
23946 gl_cv_func_strerror_r_works=yes
23948 e) gl_cv_func_strerror_r_works=no ;;
23951 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23952 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
23959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
23960 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
23965 case "$gl_cv_onwards_func_strerror_r" in
23966 future*) REPLACE_STRERROR_R=1 ;;
23980 if test $gl_cv_have_include_next = yes; then
23981 gl_cv_next_string_h='<'string.h'>'
23983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
23984 printf %s "checking absolute name of <string.h>... " >&6; }
23985 if test ${gl_cv_next_string_h+y}
23987 printf %s "(cached) " >&6
23992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23993 /* end confdefs.h. */
23994 #include <string.h>
23997 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23998 *) gl_absname_cpp="$ac_cpp" ;;
24003 gl_dirsep_regex='[/\\]'
24006 gl_dirsep_regex='\/'
24009 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24010 gl_header_literal_regex=`echo 'string.h' \
24011 | sed -e "$gl_make_literal_regex_sed"`
24012 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24013 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24019 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24020 sed -n "$gl_absolute_header_sed"`
24022 gl_header=$gl_cv_absolute_string_h
24023 gl_cv_next_string_h='"'$gl_header'"'
24028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
24029 printf "%s\n" "$gl_cv_next_string_h" >&6; }
24031 NEXT_STRING_H=$gl_cv_next_string_h
24033 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24034 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24035 gl_next_as_first_directive='<'string.h'>'
24037 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24038 gl_next_as_first_directive=$gl_cv_next_string_h
24040 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
24064 if test $gl_cv_have_include_next = yes; then
24065 gl_cv_next_strings_h='<'strings.h'>'
24067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
24068 printf %s "checking absolute name of <strings.h>... " >&6; }
24069 if test ${gl_cv_next_strings_h+y}
24071 printf %s "(cached) " >&6
24074 if test $ac_cv_header_strings_h = yes; then
24079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24080 /* end confdefs.h. */
24081 #include <strings.h>
24084 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24085 *) gl_absname_cpp="$ac_cpp" ;;
24090 gl_dirsep_regex='[/\\]'
24093 gl_dirsep_regex='\/'
24096 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24097 gl_header_literal_regex=`echo 'strings.h' \
24098 | sed -e "$gl_make_literal_regex_sed"`
24099 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24100 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24106 gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24107 sed -n "$gl_absolute_header_sed"`
24109 gl_header=$gl_cv_absolute_strings_h
24110 gl_cv_next_strings_h='"'$gl_header'"'
24112 gl_cv_next_strings_h='<'strings.h'>'
24118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
24119 printf "%s\n" "$gl_cv_next_strings_h" >&6; }
24121 NEXT_STRINGS_H=$gl_cv_next_strings_h
24123 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24124 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24125 gl_next_as_first_directive='<'strings.h'>'
24127 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24128 gl_next_as_first_directive=$gl_cv_next_strings_h
24130 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
24135 if test $ac_cv_header_strings_h = yes; then
24152 ac_fn_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24153 if test "x$ac_cv_have_decl_strnlen" = xyes
24157 e) ac_have_decl=0 ;;
24160 printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
24164 ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24165 if test "x$ac_cv_have_decl_strtoimax" = xyes
24169 e) ac_have_decl=0 ;;
24172 printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h
24186 if test $gl_cv_have_include_next = yes; then
24187 gl_cv_next_sys_random_h='<'sys/random.h'>'
24189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
24190 printf %s "checking absolute name of <sys/random.h>... " >&6; }
24191 if test ${gl_cv_next_sys_random_h+y}
24193 printf %s "(cached) " >&6
24196 if test $ac_cv_header_sys_random_h = yes; then
24201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24202 /* end confdefs.h. */
24203 #include <sys/random.h>
24206 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24207 *) gl_absname_cpp="$ac_cpp" ;;
24212 gl_dirsep_regex='[/\\]'
24215 gl_dirsep_regex='\/'
24218 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24219 gl_header_literal_regex=`echo 'sys/random.h' \
24220 | sed -e "$gl_make_literal_regex_sed"`
24221 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24222 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24228 gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24229 sed -n "$gl_absolute_header_sed"`
24231 gl_header=$gl_cv_absolute_sys_random_h
24232 gl_cv_next_sys_random_h='"'$gl_header'"'
24234 gl_cv_next_sys_random_h='<'sys/random.h'>'
24240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
24241 printf "%s\n" "$gl_cv_next_sys_random_h" >&6; }
24243 NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
24245 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24246 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24247 gl_next_as_first_directive='<'sys/random.h'>'
24249 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24250 gl_next_as_first_directive=$gl_cv_next_sys_random_h
24252 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
24257 if test $ac_cv_header_sys_random_h = yes; then
24258 HAVE_SYS_RANDOM_H=1
24260 HAVE_SYS_RANDOM_H=0
24265 if test $ac_cv_header_sys_random_h = yes; then
24266 UNISTD_H_HAVE_SYS_RANDOM_H=1
24285 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
24296 if test $gl_cv_have_include_next = yes; then
24297 gl_cv_next_sys_types_h='<'sys/types.h'>'
24299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
24300 printf %s "checking absolute name of <sys/types.h>... " >&6; }
24301 if test ${gl_cv_next_sys_types_h+y}
24303 printf %s "(cached) " >&6
24308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24309 /* end confdefs.h. */
24310 #include <sys/types.h>
24313 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24314 *) gl_absname_cpp="$ac_cpp" ;;
24319 gl_dirsep_regex='[/\\]'
24322 gl_dirsep_regex='\/'
24325 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24326 gl_header_literal_regex=`echo 'sys/types.h' \
24327 | sed -e "$gl_make_literal_regex_sed"`
24328 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24329 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24335 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24336 sed -n "$gl_absolute_header_sed"`
24338 gl_header=$gl_cv_absolute_sys_types_h
24339 gl_cv_next_sys_types_h='"'$gl_header'"'
24344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
24345 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
24347 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
24349 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24350 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24351 gl_next_as_first_directive='<'sys/types.h'>'
24353 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24354 gl_next_as_first_directive=$gl_cv_next_sys_types_h
24356 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
24369 WINDOWS_STAT_INODES=0
24390 if test $gl_cv_have_include_next = yes; then
24391 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
24393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
24394 printf %s "checking absolute name of <sys/wait.h>... " >&6; }
24395 if test ${gl_cv_next_sys_wait_h+y}
24397 printf %s "(cached) " >&6
24400 if test $ac_cv_header_sys_wait_h = yes; then
24405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24406 /* end confdefs.h. */
24407 #include <sys/wait.h>
24410 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24411 *) gl_absname_cpp="$ac_cpp" ;;
24416 gl_dirsep_regex='[/\\]'
24419 gl_dirsep_regex='\/'
24422 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24423 gl_header_literal_regex=`echo 'sys/wait.h' \
24424 | sed -e "$gl_make_literal_regex_sed"`
24425 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24426 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24432 gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24433 sed -n "$gl_absolute_header_sed"`
24435 gl_header=$gl_cv_absolute_sys_wait_h
24436 gl_cv_next_sys_wait_h='"'$gl_header'"'
24438 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
24444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
24445 printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
24447 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
24449 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24450 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24451 gl_next_as_first_directive='<'sys/wait.h'>'
24453 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24454 gl_next_as_first_directive=$gl_cv_next_sys_wait_h
24456 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
24470 GL_GNULIB_WAITPID=0
24476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
24477 printf %s "checking for struct timespec in <time.h>... " >&6; }
24478 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
24480 printf %s "(cached) " >&6
24482 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24483 /* end confdefs.h. */
24489 static struct timespec x; x.tv_sec = x.tv_nsec;
24494 if ac_fn_c_try_compile "$LINENO"
24496 gl_cv_sys_struct_timespec_in_time_h=yes
24498 e) gl_cv_sys_struct_timespec_in_time_h=no ;;
24501 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
24505 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
24507 TIME_H_DEFINES_STRUCT_TIMESPEC=0
24508 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
24509 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
24510 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
24511 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
24512 TIME_H_DEFINES_STRUCT_TIMESPEC=1
24514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
24515 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
24516 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
24518 printf %s "(cached) " >&6
24520 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24521 /* end confdefs.h. */
24522 #include <sys/time.h>
24527 static struct timespec x; x.tv_sec = x.tv_nsec;
24532 if ac_fn_c_try_compile "$LINENO"
24534 gl_cv_sys_struct_timespec_in_sys_time_h=yes
24536 e) gl_cv_sys_struct_timespec_in_sys_time_h=no ;;
24539 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
24543 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
24544 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
24545 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
24547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
24548 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
24549 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
24551 printf %s "(cached) " >&6
24553 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24554 /* end confdefs.h. */
24555 #include <pthread.h>
24560 static struct timespec x; x.tv_sec = x.tv_nsec;
24565 if ac_fn_c_try_compile "$LINENO"
24567 gl_cv_sys_struct_timespec_in_pthread_h=yes
24569 e) gl_cv_sys_struct_timespec_in_pthread_h=no ;;
24572 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
24576 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
24577 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
24578 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
24580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
24581 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
24582 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
24584 printf %s "(cached) " >&6
24586 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24587 /* end confdefs.h. */
24588 #include <unistd.h>
24593 static struct timespec x; x.tv_sec = x.tv_nsec;
24598 if ac_fn_c_try_compile "$LINENO"
24600 gl_cv_sys_struct_timespec_in_unistd_h=yes
24602 e) gl_cv_sys_struct_timespec_in_unistd_h=no ;;
24605 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
24609 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
24610 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
24611 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
24632 if test $gl_cv_have_include_next = yes; then
24633 gl_cv_next_time_h='<'time.h'>'
24635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
24636 printf %s "checking absolute name of <time.h>... " >&6; }
24637 if test ${gl_cv_next_time_h+y}
24639 printf %s "(cached) " >&6
24644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24645 /* end confdefs.h. */
24649 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24650 *) gl_absname_cpp="$ac_cpp" ;;
24655 gl_dirsep_regex='[/\\]'
24658 gl_dirsep_regex='\/'
24661 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24662 gl_header_literal_regex=`echo 'time.h' \
24663 | sed -e "$gl_make_literal_regex_sed"`
24664 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24665 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24671 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24672 sed -n "$gl_absolute_header_sed"`
24674 gl_header=$gl_cv_absolute_time_h
24675 gl_cv_next_time_h='"'$gl_header'"'
24680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
24681 printf "%s\n" "$gl_cv_next_time_h" >&6; }
24683 NEXT_TIME_H=$gl_cv_next_time_h
24685 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24686 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24687 gl_next_as_first_directive='<'time.h'>'
24689 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24690 gl_next_as_first_directive=$gl_cv_next_time_h
24692 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
24705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
24706 printf %s "checking for TIME_UTC in <time.h>... " >&6; }
24707 if test ${gl_cv_time_h_has_TIME_UTC+y}
24709 printf %s "(cached) " >&6
24711 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24712 /* end confdefs.h. */
24718 static int x = TIME_UTC; x++;
24723 if ac_fn_c_try_compile "$LINENO"
24725 gl_cv_time_h_has_TIME_UTC=yes
24727 e) gl_cv_time_h_has_TIME_UTC=no ;;
24730 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
24734 printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
24735 if test $gl_cv_time_h_has_TIME_UTC = yes; then
24736 TIME_H_DEFINES_TIME_UTC=1
24738 TIME_H_DEFINES_TIME_UTC=0
24743 ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24744 if test "x$ac_cv_have_decl_execvpe" = xyes
24748 e) ac_have_decl=0 ;;
24751 printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h
24765 if test $gl_cv_have_include_next = yes; then
24766 gl_cv_next_unistd_h='<'unistd.h'>'
24768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
24769 printf %s "checking absolute name of <unistd.h>... " >&6; }
24770 if test ${gl_cv_next_unistd_h+y}
24772 printf %s "(cached) " >&6
24775 if test $ac_cv_header_unistd_h = yes; then
24780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24781 /* end confdefs.h. */
24782 #include <unistd.h>
24785 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24786 *) gl_absname_cpp="$ac_cpp" ;;
24791 gl_dirsep_regex='[/\\]'
24794 gl_dirsep_regex='\/'
24797 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24798 gl_header_literal_regex=`echo 'unistd.h' \
24799 | sed -e "$gl_make_literal_regex_sed"`
24800 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24801 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24807 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24808 sed -n "$gl_absolute_header_sed"`
24810 gl_header=$gl_cv_absolute_unistd_h
24811 gl_cv_next_unistd_h='"'$gl_header'"'
24813 gl_cv_next_unistd_h='<'unistd.h'>'
24819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
24820 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
24822 NEXT_UNISTD_H=$gl_cv_next_unistd_h
24824 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24825 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24826 gl_next_as_first_directive='<'unistd.h'>'
24828 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24829 gl_next_as_first_directive=$gl_cv_next_unistd_h
24831 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
24836 if test $ac_cv_header_unistd_h = yes; then
24854 if test $ac_cv_have_decl_execvpe = no; then
24855 HAVE_DECL_EXECVPE=0
24864 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
24869 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
24874 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;}
24881 if test "$HAVE_LIBUNISTRING" = yes; then
24882 LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
24883 LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
24884 LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
24887 if test "$HAVE_LIBUNISTRING" = yes; then
24888 for ac_header in unistring/woe32dll.h
24890 ac_fn_c_check_header_compile "$LINENO" "unistring/woe32dll.h" "ac_cv_header_unistring_woe32dll_h" "$ac_includes_default"
24891 if test "x$ac_cv_header_unistring_woe32dll_h" = xyes
24893 printf "%s\n" "#define HAVE_UNISTRING_WOE32DLL_H 1" >>confdefs.h
24894 HAVE_UNISTRING_WOE32DLL_H=1
24896 e) HAVE_UNISTRING_WOE32DLL_H=0 ;;
24902 HAVE_UNISTRING_WOE32DLL_H=0
24907 ac_fn_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24908 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
24912 e) ac_have_decl=0 ;;
24915 printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
24917 ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24918 if test "x$ac_cv_have_decl_feof_unlocked" = xyes
24922 e) ac_have_decl=0 ;;
24925 printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
24927 ac_fn_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24928 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
24932 e) ac_have_decl=0 ;;
24935 printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
24937 ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24938 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
24942 e) ac_have_decl=0 ;;
24945 printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
24947 ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24948 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
24952 e) ac_have_decl=0 ;;
24955 printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
24957 ac_fn_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24958 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
24962 e) ac_have_decl=0 ;;
24965 printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
24967 ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24968 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
24972 e) ac_have_decl=0 ;;
24975 printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
24977 ac_fn_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24978 if test "x$ac_cv_have_decl_fread_unlocked" = xyes
24982 e) ac_have_decl=0 ;;
24985 printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
24987 ac_fn_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24988 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
24992 e) ac_have_decl=0 ;;
24995 printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
24997 ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24998 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
25002 e) ac_have_decl=0 ;;
25005 printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
25007 ac_fn_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25008 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
25012 e) ac_have_decl=0 ;;
25015 printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
25017 ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25018 if test "x$ac_cv_have_decl_putc_unlocked" = xyes
25022 e) ac_have_decl=0 ;;
25025 printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
25027 ac_fn_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25028 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
25032 e) ac_have_decl=0 ;;
25035 printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
25037 ac_fn_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25038 if test "x$ac_cv_have_decl_unsetenv" = xyes
25042 e) ac_have_decl=0 ;;
25045 printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
25050 if test $ac_cv_header_features_h = yes; then
25069 if test $gl_cv_have_include_next = yes; then
25070 gl_cv_next_wchar_h='<'wchar.h'>'
25072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
25073 printf %s "checking absolute name of <wchar.h>... " >&6; }
25074 if test ${gl_cv_next_wchar_h+y}
25076 printf %s "(cached) " >&6
25079 if test $ac_cv_header_wchar_h = yes; then
25084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25085 /* end confdefs.h. */
25089 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25090 *) gl_absname_cpp="$ac_cpp" ;;
25095 gl_dirsep_regex='[/\\]'
25098 gl_dirsep_regex='\/'
25101 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25102 gl_header_literal_regex=`echo 'wchar.h' \
25103 | sed -e "$gl_make_literal_regex_sed"`
25104 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25105 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25111 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25112 sed -n "$gl_absolute_header_sed"`
25114 gl_header=$gl_cv_absolute_wchar_h
25115 gl_cv_next_wchar_h='"'$gl_header'"'
25117 gl_cv_next_wchar_h='<'wchar.h'>'
25123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
25124 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
25126 NEXT_WCHAR_H=$gl_cv_next_wchar_h
25128 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25129 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25130 gl_next_as_first_directive='<'wchar.h'>'
25132 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25133 gl_next_as_first_directive=$gl_cv_next_wchar_h
25135 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
25140 if test $ac_cv_header_wchar_h = yes; then
25150 if test $gt_cv_c_wint_t = yes; then
25165 ac_fn_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
25168 " "$ac_c_undeclared_builtin_options" "CFLAGS"
25169 if test "x$ac_cv_have_decl_wcsdup" = xyes
25173 e) ac_have_decl=0 ;;
25176 printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h
25178 if test $ac_cv_have_decl_wcsdup = no; then
25186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler option to allow warnings" >&5
25187 printf %s "checking for C compiler option to allow warnings... " >&6; }
25188 if test ${gl_cv_cc_wallow+y}
25190 printf %s "(cached) " >&6
25193 echo 'int dummy;' > conftest.c
25194 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err'
25195 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
25196 (eval $ac_try) 2>&5
25198 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25199 test $ac_status = 0; }; } >/dev/null
25200 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err'
25201 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
25202 (eval $ac_try) 2>&5
25204 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25205 test $ac_status = 0; }; } >/dev/null
25206 if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
25207 gl_cv_cc_wallow='-Wno-error'
25209 gl_cv_cc_wallow=none
25215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_wallow" >&5
25216 printf "%s\n" "$gl_cv_cc_wallow" >&6; }
25217 case "$gl_cv_cc_wallow" in
25218 none) GL_CFLAG_ALLOW_WARNINGS='' ;;
25219 *) GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;;
25224 if test -n "$CXX" && test "$CXX" != no; then
25225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler option to allow warnings" >&5
25226 printf %s "checking for C++ compiler option to allow warnings... " >&6; }
25227 if test ${gl_cv_cxx_wallow+y}
25229 printf %s "(cached) " >&6
25232 echo 'int dummy;' > conftest.cc
25233 { ac_try='${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>conftest1.err'
25234 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
25235 (eval $ac_try) 2>&5
25237 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25238 test $ac_status = 0; }; } >/dev/null
25239 { ac_try='${CXX-c++} $CXXFLAGS $CPPFLAGS -Wno-error -c conftest.cc 2>conftest2.err'
25240 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
25241 (eval $ac_try) 2>&5
25243 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25244 test $ac_status = 0; }; } >/dev/null
25245 if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
25246 gl_cv_cxx_wallow='-Wno-error'
25248 gl_cv_cxx_wallow=none
25254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cxx_wallow" >&5
25255 printf "%s\n" "$gl_cv_cxx_wallow" >&6; }
25256 case "$gl_cv_cxx_wallow" in
25257 none) GL_CXXFLAG_ALLOW_WARNINGS='' ;;
25258 *) GL_CXXFLAG_ALLOW_WARNINGS="$gl_cv_cxx_wallow" ;;
25261 GL_CXXFLAG_ALLOW_WARNINGS=''
25266 HAVE_STRUCT_SOCKADDR_STORAGE=1;
25267 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
25269 HAVE_SA_FAMILY_T=1;
25273 if test $ac_cv_header_sys_socket_h = no; then
25274 ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
25275 if test "x$ac_cv_header_ws2tcpip_h" = xyes
25277 printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
25290 printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
25295 GL_GENERATE_SYS_SOCKET_H=false
25296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
25297 printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
25298 if test ${gl_cv_header_sys_socket_h_selfcontained+y}
25300 printf %s "(cached) " >&6
25303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25304 /* end confdefs.h. */
25305 #include <sys/socket.h>
25314 if ac_fn_c_try_compile "$LINENO"
25316 gl_cv_header_sys_socket_h_selfcontained=yes
25318 e) gl_cv_header_sys_socket_h_selfcontained=no ;;
25321 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
25326 printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
25327 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
25328 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
25329 if test "x$ac_cv_func_shutdown" = xyes
25331 printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
25335 if test $ac_cv_func_shutdown = yes; then
25336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
25337 printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
25338 if test ${gl_cv_header_sys_socket_h_shut+y}
25340 printf %s "(cached) " >&6
25343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25344 /* end confdefs.h. */
25345 #include <sys/socket.h>
25349 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
25354 if ac_fn_c_try_compile "$LINENO"
25356 gl_cv_header_sys_socket_h_shut=yes
25358 e) gl_cv_header_sys_socket_h_shut=no ;;
25361 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
25366 printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
25367 if test $gl_cv_header_sys_socket_h_shut = no; then
25368 GL_GENERATE_SYS_SOCKET_H=true
25372 # We need to check for ws2tcpip.h now.
25384 if test $gl_cv_have_include_next = yes; then
25385 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
25387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
25388 printf %s "checking absolute name of <sys/socket.h>... " >&6; }
25389 if test ${gl_cv_next_sys_socket_h+y}
25391 printf %s "(cached) " >&6
25394 if test $ac_cv_header_sys_socket_h = yes; then
25399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25400 /* end confdefs.h. */
25401 #include <sys/socket.h>
25404 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25405 *) gl_absname_cpp="$ac_cpp" ;;
25410 gl_dirsep_regex='[/\\]'
25413 gl_dirsep_regex='\/'
25416 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25417 gl_header_literal_regex=`echo 'sys/socket.h' \
25418 | sed -e "$gl_make_literal_regex_sed"`
25419 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25420 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25426 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25427 sed -n "$gl_absolute_header_sed"`
25429 gl_header=$gl_cv_absolute_sys_socket_h
25430 gl_cv_next_sys_socket_h='"'$gl_header'"'
25432 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
25438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
25439 printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
25441 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
25443 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25444 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25445 gl_next_as_first_directive='<'sys/socket.h'>'
25447 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25448 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
25450 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
25455 if test $ac_cv_header_sys_socket_h = yes; then
25456 HAVE_SYS_SOCKET_H=1
25458 HAVE_SYS_SOCKET_H=0
25463 if test $ac_cv_header_sys_socket_h = yes; then
25466 if test $ac_cv_header_ws2tcpip_h = yes; then
25475 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
25476 /* sys/types.h is not needed according to POSIX, but the
25477 sys/socket.h in i386-unknown-freebsd4.10 and
25478 powerpc-apple-darwin5.5 required it. */
25479 #include <sys/types.h>
25480 #ifdef HAVE_SYS_SOCKET_H
25481 #include <sys/socket.h>
25483 #ifdef HAVE_WS2TCPIP_H
25484 #include <ws2tcpip.h>
25488 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
25491 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
25495 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
25496 /* sys/types.h is not needed according to POSIX, but the
25497 sys/socket.h in i386-unknown-freebsd4.10 and
25498 powerpc-apple-darwin5.5 required it. */
25499 #include <sys/types.h>
25500 #ifdef HAVE_SYS_SOCKET_H
25501 #include <sys/socket.h>
25503 #ifdef HAVE_WS2TCPIP_H
25504 #include <ws2tcpip.h>
25508 if test "x$ac_cv_type_sa_family_t" = xyes
25511 printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
25516 if test $ac_cv_type_struct_sockaddr_storage = no; then
25517 HAVE_STRUCT_SOCKADDR_STORAGE=0
25519 if test $ac_cv_type_sa_family_t = no; then
25522 if test $ac_cv_type_struct_sockaddr_storage != no; then
25523 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
25524 #ifdef HAVE_SYS_SOCKET_H
25525 #include <sys/socket.h>
25527 #ifdef HAVE_WS2TCPIP_H
25528 #include <ws2tcpip.h>
25532 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
25535 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
25539 e) HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 ;;
25544 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
25545 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
25546 GL_GENERATE_SYS_SOCKET_H=true
25552 if test $ac_cv_header_sys_socket_h != yes; then
25553 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
25554 if test "x$ac_cv_header_winsock2_h" = xyes
25556 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
25561 if test "$ac_cv_header_winsock2_h" = yes; then
25563 UNISTD_H_HAVE_WINSOCK2_H=1
25564 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
25583 GL_GNULIB_CONNECT=0
25595 GL_GNULIB_GETPEERNAME=0
25599 GL_GNULIB_GETSOCKNAME=0
25603 GL_GNULIB_GETSOCKOPT=0
25619 GL_GNULIB_RECVFROM=0
25627 GL_GNULIB_SETSOCKOPT=0
25631 GL_GNULIB_SHUTDOWN=0
25635 GL_GNULIB_ACCEPT4=0
25640 HAVE_DECL_INET_NTOP=1;
25641 HAVE_DECL_INET_PTON=1;
25642 REPLACE_INET_NTOP=0;
25643 REPLACE_INET_PTON=0;
25650 if test $ac_cv_header_arpa_inet_h = yes; then
25665 if test $gl_cv_have_include_next = yes; then
25666 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
25668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
25669 printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
25670 if test ${gl_cv_next_arpa_inet_h+y}
25672 printf %s "(cached) " >&6
25675 if test $ac_cv_header_arpa_inet_h = yes; then
25680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25681 /* end confdefs.h. */
25682 #include <arpa/inet.h>
25685 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25686 *) gl_absname_cpp="$ac_cpp" ;;
25691 gl_dirsep_regex='[/\\]'
25694 gl_dirsep_regex='\/'
25697 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25698 gl_header_literal_regex=`echo 'arpa/inet.h' \
25699 | sed -e "$gl_make_literal_regex_sed"`
25700 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25701 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25707 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25708 sed -n "$gl_absolute_header_sed"`
25710 gl_header=$gl_cv_absolute_arpa_inet_h
25711 gl_cv_next_arpa_inet_h='"'$gl_header'"'
25713 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
25719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
25720 printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
25722 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
25724 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25725 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25726 gl_next_as_first_directive='<'arpa/inet.h'>'
25728 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25729 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
25731 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
25741 if test $ac_cv_header_sys_socket_h = yes; then
25744 if test $ac_cv_header_ws2tcpip_h = yes; then
25759 GL_GNULIB_INET_NTOP=0
25763 GL_GNULIB_INET_PTON=0
25770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
25771 printf %s "checking for a turkish Unicode locale... " >&6; }
25772 if test ${gt_cv_locale_tr_utf8+y}
25774 printf %s "(cached) " >&6
25777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25778 /* end confdefs.h. */
25780 #include <locale.h>
25782 #if HAVE_LANGINFO_CODESET
25783 # include <langinfo.h>
25785 #include <stdlib.h>
25786 #include <string.h>
25787 #include <wctype.h>
25791 /* On BeOS, locales are not implemented in libc. Rather, libintl
25792 imitates locale dependent behaviour by looking at the environment
25793 variables, and all locales use the UTF-8 encoding. But BeOS does not
25794 implement the Turkish upper-/lowercase mappings. Therefore, let this
25795 program return 1 on BeOS. */
25796 /* Check whether the given locale name is recognized by the system. */
25797 #if defined _WIN32 && !defined __CYGWIN__
25798 /* On native Windows, setlocale(category, "") looks at the system settings,
25799 not at the environment variables. Also, when an encoding suffix such
25800 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
25801 category of the locale to "C". */
25802 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
25803 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
25806 if (setlocale (LC_ALL, "") == NULL) return 1;
25808 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
25809 On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
25810 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
25811 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
25812 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
25813 some unit tests fail. */
25814 #if HAVE_LANGINFO_CODESET
25816 const char *cs = nl_langinfo (CODESET);
25817 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
25822 /* On Cygwin, avoid locale names without encoding suffix, because the
25823 locale_charset() function relies on the encoding suffix. Note that
25824 LC_ALL is set on the command line. */
25825 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
25827 /* Check whether in the abbreviation of the eighth month, the second
25828 character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
25829 two bytes long, with UTF-8 encoding. */
25830 t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
25831 if (strftime (buf, sizeof (buf), "%b", &t) < 4
25832 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
25834 /* Check whether the upper-/lowercase mappings are as expected for
25836 if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
25837 || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
25843 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
25844 (eval $ac_link) 2>&5
25846 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25847 test $ac_status = 0; } && test -s conftest$ac_exeext; then
25849 # Handle native Windows specially, because there setlocale() interprets
25850 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
25851 # "fr" or "fra" as "French" or "French_France.1252",
25852 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
25853 # "ja" as "Japanese" or "Japanese_Japan.932",
25856 # Test for the hypothetical native Windows locale name.
25857 if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25858 gt_cv_locale_tr_utf8=Turkish_Turkey.65001
25861 gt_cv_locale_tr_utf8=none
25865 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
25866 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
25867 # configure script would override the LC_ALL setting. Likewise for
25868 # LC_CTYPE, which is also set at the beginning of the configure script.
25869 # Test for the usual locale name.
25870 if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25871 gt_cv_locale_tr_utf8=tr_TR
25873 # Test for the locale name with explicit encoding suffix.
25874 if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25875 gt_cv_locale_tr_utf8=tr_TR.UTF-8
25877 # Test for the Solaris 7 locale name.
25878 if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25879 gt_cv_locale_tr_utf8=tr.UTF-8
25882 gt_cv_locale_tr_utf8=none
25889 gt_cv_locale_tr_utf8=none
25895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
25896 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
25897 LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
25902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
25903 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
25904 if test ${gl_cv_func_getcwd_null+y}
25906 printf %s "(cached) " >&6
25908 e) if test "$cross_compiling" = yes
25911 # Guess yes on glibc systems.
25912 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
25913 # Guess yes on musl systems.
25914 *-musl*) gl_cv_func_getcwd_null="guessing yes";;
25915 # Guess yes on systems that emulate the Linux system calls.
25916 midipix*) gl_cv_func_getcwd_null="guessing yes";;
25917 # Guess yes on Cygwin.
25918 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
25919 # If we don't know, obey --enable-cross-guesses.
25920 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
25924 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25925 /* end confdefs.h. */
25927 # include <stdlib.h>
25929 # include <unistd.h>
25930 # else /* on Windows with MSVC */
25931 # include <direct.h>
25945 #if defined _WIN32 && ! defined __CYGWIN__
25946 /* mingw cwd does not start with '/', but _getcwd does allocate.
25947 However, mingw fails to honor non-zero size. */
25949 if (chdir ("/") != 0)
25953 char *f = getcwd (NULL, 0);
25957 { free (f); return 3; }
25959 { free (f); return 4; }
25969 if ac_fn_c_try_run "$LINENO"
25971 gl_cv_func_getcwd_null=yes
25973 e) gl_cv_func_getcwd_null=no ;;
25976 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25977 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
25983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
25984 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
25987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
25988 printf %s "checking for getcwd with POSIX signature... " >&6; }
25989 if test ${gl_cv_func_getcwd_posix_signature+y}
25991 printf %s "(cached) " >&6
25993 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25994 /* end confdefs.h. */
25995 #include <unistd.h>
26007 char *getcwd (char *, size_t);
26014 if ac_fn_c_try_compile "$LINENO"
26016 gl_cv_func_getcwd_posix_signature=yes
26018 e) gl_cv_func_getcwd_posix_signature=no ;;
26021 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
26026 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
26034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
26035 printf %s "checking for IPv4 sockets... " >&6; }
26036 if test ${gl_cv_socket_ipv4+y}
26038 printf %s "(cached) " >&6
26040 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26041 /* end confdefs.h. */
26042 #include <sys/types.h>
26043 #ifdef HAVE_SYS_SOCKET_H
26044 #include <sys/socket.h>
26046 #ifdef HAVE_NETINET_IN_H
26047 #include <netinet/in.h>
26049 #ifdef HAVE_WINSOCK2_H
26050 #include <winsock2.h>
26055 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
26056 if (&x && &y && &z) return 0;
26061 if ac_fn_c_try_compile "$LINENO"
26063 gl_cv_socket_ipv4=yes
26065 e) gl_cv_socket_ipv4=no ;;
26068 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
26071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
26072 printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
26073 if test $gl_cv_socket_ipv4 = yes; then
26075 printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
26079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
26080 printf %s "checking for IPv6 sockets... " >&6; }
26081 if test ${gl_cv_socket_ipv6+y}
26083 printf %s "(cached) " >&6
26085 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26086 /* end confdefs.h. */
26087 #include <sys/types.h>
26088 #ifdef HAVE_SYS_SOCKET_H
26089 #include <sys/socket.h>
26091 #ifdef HAVE_NETINET_IN_H
26092 #include <netinet/in.h>
26094 #ifdef HAVE_WINSOCK2_H
26095 #include <winsock2.h>
26097 #ifdef HAVE_WS2TCPIP_H
26098 #include <ws2tcpip.h>
26103 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
26104 if (&x && &y && &z) return 0;
26109 if ac_fn_c_try_compile "$LINENO"
26111 gl_cv_socket_ipv6=yes
26113 e) gl_cv_socket_ipv6=no ;;
26116 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
26119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
26120 printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
26121 if test $gl_cv_socket_ipv6 = yes; then
26123 printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
26138 if test $ac_cv_have_decl_strerror_r = no; then
26139 HAVE_DECL_STRERROR_R=0
26142 if test $ac_cv_func_strerror_r = yes; then
26143 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
26144 if test $gl_cv_func_strerror_r_posix_signature = yes; then
26145 case "$gl_cv_func_strerror_r_works" in
26146 *no) REPLACE_STRERROR_R=1 ;;
26149 REPLACE_STRERROR_R=1
26152 REPLACE_STRERROR_R=1
26166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
26167 printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
26168 if test ${gl_cv_header_sys_select_h_selfcontained+y}
26170 printf %s "(cached) " >&6
26173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26174 /* end confdefs.h. */
26175 #include <sys/select.h>
26184 if ac_fn_c_try_compile "$LINENO"
26186 gl_cv_header_sys_select_h_selfcontained=yes
26188 e) gl_cv_header_sys_select_h_selfcontained=no ;;
26191 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26192 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
26193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26194 /* end confdefs.h. */
26195 #include <sys/select.h>
26199 int memset; int bzero;
26205 if ac_fn_c_try_compile "$LINENO"
26207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26208 /* end confdefs.h. */
26209 #include <sys/select.h>
26215 #define memset nonexistent_memset
26220 void *memset (void *, int, unsigned long);
26222 #define bzero nonexistent_bzero
26227 void bzero (void *, unsigned long);
26236 if ac_fn_c_try_link "$LINENO"
26240 e) gl_cv_header_sys_select_h_selfcontained=no ;;
26243 rm -f core conftest.err conftest.$ac_objext conftest.beam \
26244 conftest$ac_exeext conftest.$ac_ext
26247 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
26253 printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
26263 if test $gl_cv_have_include_next = yes; then
26264 gl_cv_next_sys_select_h='<'sys/select.h'>'
26266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
26267 printf %s "checking absolute name of <sys/select.h>... " >&6; }
26268 if test ${gl_cv_next_sys_select_h+y}
26270 printf %s "(cached) " >&6
26273 if test $ac_cv_header_sys_select_h = yes; then
26278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26279 /* end confdefs.h. */
26280 #include <sys/select.h>
26283 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26284 *) gl_absname_cpp="$ac_cpp" ;;
26289 gl_dirsep_regex='[/\\]'
26292 gl_dirsep_regex='\/'
26295 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26296 gl_header_literal_regex=`echo 'sys/select.h' \
26297 | sed -e "$gl_make_literal_regex_sed"`
26298 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26299 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26305 gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26306 sed -n "$gl_absolute_header_sed"`
26308 gl_header=$gl_cv_absolute_sys_select_h
26309 gl_cv_next_sys_select_h='"'$gl_header'"'
26311 gl_cv_next_sys_select_h='<'sys/select.h'>'
26317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
26318 printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
26320 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
26322 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26323 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26324 gl_next_as_first_directive='<'sys/select.h'>'
26326 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26327 gl_next_as_first_directive=$gl_cv_next_sys_select_h
26329 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
26334 if test $ac_cv_header_sys_select_h = yes; then
26335 HAVE_SYS_SELECT_H=1
26337 HAVE_SYS_SELECT_H=0
26344 if test $ac_cv_header_sys_socket_h != yes; then
26345 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26346 if test "x$ac_cv_header_winsock2_h" = xyes
26348 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
26353 if test "$ac_cv_header_winsock2_h" = yes; then
26355 UNISTD_H_HAVE_WINSOCK2_H=1
26356 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26370 GL_GNULIB_PSELECT=0
26380 HAVE_PTHREAD_SPINLOCK_T=1;
26381 HAVE_PTHREAD_CREATE_DETACHED=1;
26382 HAVE_PTHREAD_MUTEX_RECURSIVE=1;
26383 HAVE_PTHREAD_MUTEX_ROBUST=1;
26384 HAVE_PTHREAD_PROCESS_SHARED=1;
26385 HAVE_PTHREAD_CREATE=1;
26386 HAVE_PTHREAD_ATTR_INIT=1;
26387 HAVE_PTHREAD_ATTR_GETDETACHSTATE=1;
26388 HAVE_PTHREAD_ATTR_SETDETACHSTATE=1;
26389 HAVE_PTHREAD_ATTR_DESTROY=1;
26390 HAVE_PTHREAD_SELF=1;
26391 HAVE_PTHREAD_EQUAL=1;
26392 HAVE_PTHREAD_DETACH=1;
26393 HAVE_PTHREAD_JOIN=1;
26394 HAVE_PTHREAD_EXIT=1;
26395 HAVE_PTHREAD_ONCE=1;
26396 HAVE_PTHREAD_MUTEX_INIT=1;
26397 HAVE_PTHREAD_MUTEXATTR_INIT=1;
26398 HAVE_PTHREAD_MUTEXATTR_GETTYPE=1;
26399 HAVE_PTHREAD_MUTEXATTR_SETTYPE=1;
26400 HAVE_PTHREAD_MUTEXATTR_GETROBUST=1;
26401 HAVE_PTHREAD_MUTEXATTR_SETROBUST=1;
26402 HAVE_PTHREAD_MUTEXATTR_DESTROY=1;
26403 HAVE_PTHREAD_MUTEX_LOCK=1;
26404 HAVE_PTHREAD_MUTEX_TRYLOCK=1;
26405 HAVE_PTHREAD_MUTEX_TIMEDLOCK=1;
26406 HAVE_PTHREAD_MUTEX_UNLOCK=1;
26407 HAVE_PTHREAD_MUTEX_DESTROY=1;
26408 HAVE_PTHREAD_RWLOCK_INIT=1;
26409 HAVE_PTHREAD_RWLOCKATTR_INIT=1;
26410 HAVE_PTHREAD_RWLOCKATTR_DESTROY=1;
26411 HAVE_PTHREAD_RWLOCK_RDLOCK=1;
26412 HAVE_PTHREAD_RWLOCK_WRLOCK=1;
26413 HAVE_PTHREAD_RWLOCK_TRYRDLOCK=1;
26414 HAVE_PTHREAD_RWLOCK_TRYWRLOCK=1;
26415 HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=1;
26416 HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=1;
26417 HAVE_PTHREAD_RWLOCK_UNLOCK=1;
26418 HAVE_PTHREAD_RWLOCK_DESTROY=1;
26419 HAVE_PTHREAD_COND_INIT=1;
26420 HAVE_PTHREAD_CONDATTR_INIT=1;
26421 HAVE_PTHREAD_CONDATTR_DESTROY=1;
26422 HAVE_PTHREAD_COND_WAIT=1;
26423 HAVE_PTHREAD_COND_TIMEDWAIT=1;
26424 HAVE_PTHREAD_COND_SIGNAL=1;
26425 HAVE_PTHREAD_COND_BROADCAST=1;
26426 HAVE_PTHREAD_COND_DESTROY=1;
26427 HAVE_PTHREAD_KEY_CREATE=1;
26428 HAVE_PTHREAD_SETSPECIFIC=1;
26429 HAVE_PTHREAD_GETSPECIFIC=1;
26430 HAVE_PTHREAD_KEY_DELETE=1;
26431 HAVE_PTHREAD_SPIN_INIT=1;
26432 HAVE_PTHREAD_SPIN_LOCK=1;
26433 HAVE_PTHREAD_SPIN_TRYLOCK=1;
26434 HAVE_PTHREAD_SPIN_UNLOCK=1;
26435 HAVE_PTHREAD_SPIN_DESTROY=1;
26436 REPLACE_PTHREAD_CREATE=0;
26437 REPLACE_PTHREAD_ATTR_INIT=0;
26438 REPLACE_PTHREAD_ATTR_GETDETACHSTATE=0;
26439 REPLACE_PTHREAD_ATTR_SETDETACHSTATE=0;
26440 REPLACE_PTHREAD_ATTR_DESTROY=0;
26441 REPLACE_PTHREAD_SELF=0;
26442 REPLACE_PTHREAD_EQUAL=0;
26443 REPLACE_PTHREAD_DETACH=0;
26444 REPLACE_PTHREAD_JOIN=0;
26445 REPLACE_PTHREAD_EXIT=0;
26446 REPLACE_PTHREAD_ONCE=0;
26447 REPLACE_PTHREAD_MUTEX_INIT=0;
26448 REPLACE_PTHREAD_MUTEXATTR_INIT=0;
26449 REPLACE_PTHREAD_MUTEXATTR_GETTYPE=0;
26450 REPLACE_PTHREAD_MUTEXATTR_SETTYPE=0;
26451 REPLACE_PTHREAD_MUTEXATTR_GETROBUST=0;
26452 REPLACE_PTHREAD_MUTEXATTR_SETROBUST=0;
26453 REPLACE_PTHREAD_MUTEXATTR_DESTROY=0;
26454 REPLACE_PTHREAD_MUTEX_LOCK=0;
26455 REPLACE_PTHREAD_MUTEX_TRYLOCK=0;
26456 REPLACE_PTHREAD_MUTEX_TIMEDLOCK=0;
26457 REPLACE_PTHREAD_MUTEX_UNLOCK=0;
26458 REPLACE_PTHREAD_MUTEX_DESTROY=0;
26459 REPLACE_PTHREAD_RWLOCK_INIT=0;
26460 REPLACE_PTHREAD_RWLOCKATTR_INIT=0;
26461 REPLACE_PTHREAD_RWLOCKATTR_DESTROY=0;
26462 REPLACE_PTHREAD_RWLOCK_RDLOCK=0;
26463 REPLACE_PTHREAD_RWLOCK_WRLOCK=0;
26464 REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=0;
26465 REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=0;
26466 REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=0;
26467 REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=0;
26468 REPLACE_PTHREAD_RWLOCK_UNLOCK=0;
26469 REPLACE_PTHREAD_RWLOCK_DESTROY=0;
26470 REPLACE_PTHREAD_COND_INIT=0;
26471 REPLACE_PTHREAD_CONDATTR_INIT=0;
26472 REPLACE_PTHREAD_CONDATTR_DESTROY=0;
26473 REPLACE_PTHREAD_COND_WAIT=0;
26474 REPLACE_PTHREAD_COND_TIMEDWAIT=0;
26475 REPLACE_PTHREAD_COND_SIGNAL=0;
26476 REPLACE_PTHREAD_COND_BROADCAST=0;
26477 REPLACE_PTHREAD_COND_DESTROY=0;
26478 REPLACE_PTHREAD_KEY_CREATE=0;
26479 REPLACE_PTHREAD_SETSPECIFIC=0;
26480 REPLACE_PTHREAD_GETSPECIFIC=0;
26481 REPLACE_PTHREAD_KEY_DELETE=0;
26482 REPLACE_PTHREAD_SPIN_INIT=0;
26483 REPLACE_PTHREAD_SPIN_LOCK=0;
26484 REPLACE_PTHREAD_SPIN_TRYLOCK=0;
26485 REPLACE_PTHREAD_SPIN_UNLOCK=0;
26486 REPLACE_PTHREAD_SPIN_DESTROY=0;
26504 if test $gl_cv_have_include_next = yes; then
26505 gl_cv_next_pthread_h='<'pthread.h'>'
26507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <pthread.h>" >&5
26508 printf %s "checking absolute name of <pthread.h>... " >&6; }
26509 if test ${gl_cv_next_pthread_h+y}
26511 printf %s "(cached) " >&6
26514 if test $ac_cv_header_pthread_h = yes; then
26519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26520 /* end confdefs.h. */
26521 #include <pthread.h>
26524 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26525 *) gl_absname_cpp="$ac_cpp" ;;
26530 gl_dirsep_regex='[/\\]'
26533 gl_dirsep_regex='\/'
26536 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26537 gl_header_literal_regex=`echo 'pthread.h' \
26538 | sed -e "$gl_make_literal_regex_sed"`
26539 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26540 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26546 gl_cv_absolute_pthread_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26547 sed -n "$gl_absolute_header_sed"`
26549 gl_header=$gl_cv_absolute_pthread_h
26550 gl_cv_next_pthread_h='"'$gl_header'"'
26552 gl_cv_next_pthread_h='<'pthread.h'>'
26558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_pthread_h" >&5
26559 printf "%s\n" "$gl_cv_next_pthread_h" >&6; }
26561 NEXT_PTHREAD_H=$gl_cv_next_pthread_h
26563 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26564 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26565 gl_next_as_first_directive='<'pthread.h'>'
26567 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26568 gl_next_as_first_directive=$gl_cv_next_pthread_h
26570 NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H=$gl_next_as_first_directive
26575 if test $ac_cv_header_pthread_h = yes; then
26579 if { case "$host_os" in mingw*) true;; *) false;; esac; } \
26580 && test $gl_threads_api = windows; then
26589 ac_fn_c_check_type "$LINENO" "pthread_t" "ac_cv_type_pthread_t" "$ac_includes_default
26591 #include <pthread.h>
26594 if test "x$ac_cv_type_pthread_t" = xyes
26597 printf "%s\n" "#define HAVE_PTHREAD_T 1" >>confdefs.h
26601 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "$ac_includes_default
26603 #include <pthread.h>
26606 if test "x$ac_cv_type_pthread_spinlock_t" = xyes
26609 printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
26614 if test $ac_cv_type_pthread_t != yes; then
26617 if test $ac_cv_type_pthread_spinlock_t != yes; then
26618 HAVE_PTHREAD_SPINLOCK_T=0
26622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_CREATE_DETACHED" >&5
26623 printf %s "checking for PTHREAD_CREATE_DETACHED... " >&6; }
26624 if test ${gl_cv_const_PTHREAD_CREATE_DETACHED+y}
26626 printf %s "(cached) " >&6
26628 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26629 /* end confdefs.h. */
26630 #include <pthread.h>
26631 int x = PTHREAD_CREATE_DETACHED;
26641 if ac_fn_c_try_compile "$LINENO"
26643 gl_cv_const_PTHREAD_CREATE_DETACHED=yes
26645 e) gl_cv_const_PTHREAD_CREATE_DETACHED=no ;;
26648 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_CREATE_DETACHED" >&5
26653 printf "%s\n" "$gl_cv_const_PTHREAD_CREATE_DETACHED" >&6; }
26654 if test $gl_cv_const_PTHREAD_CREATE_DETACHED != yes; then
26655 HAVE_PTHREAD_CREATE_DETACHED=0
26658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_RECURSIVE" >&5
26659 printf %s "checking for PTHREAD_MUTEX_RECURSIVE... " >&6; }
26660 if test ${gl_cv_const_PTHREAD_MUTEX_RECURSIVE+y}
26662 printf %s "(cached) " >&6
26664 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26665 /* end confdefs.h. */
26666 #include <pthread.h>
26667 int x = PTHREAD_MUTEX_RECURSIVE;
26677 if ac_fn_c_try_compile "$LINENO"
26679 gl_cv_const_PTHREAD_MUTEX_RECURSIVE=yes
26681 e) gl_cv_const_PTHREAD_MUTEX_RECURSIVE=no ;;
26684 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&5
26689 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&6; }
26690 if test $gl_cv_const_PTHREAD_MUTEX_RECURSIVE != yes; then
26691 HAVE_PTHREAD_MUTEX_RECURSIVE=0
26694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_ROBUST" >&5
26695 printf %s "checking for PTHREAD_MUTEX_ROBUST... " >&6; }
26696 if test ${gl_cv_const_PTHREAD_MUTEX_ROBUST+y}
26698 printf %s "(cached) " >&6
26700 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26701 /* end confdefs.h. */
26702 #include <pthread.h>
26703 int x = PTHREAD_MUTEX_ROBUST;
26713 if ac_fn_c_try_compile "$LINENO"
26715 gl_cv_const_PTHREAD_MUTEX_ROBUST=yes
26717 e) gl_cv_const_PTHREAD_MUTEX_ROBUST=no ;;
26720 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_ROBUST" >&5
26725 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_ROBUST" >&6; }
26726 if test $gl_cv_const_PTHREAD_MUTEX_ROBUST != yes; then
26727 HAVE_PTHREAD_MUTEX_ROBUST=0
26730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PROCESS_SHARED" >&5
26731 printf %s "checking for PTHREAD_PROCESS_SHARED... " >&6; }
26732 if test ${gl_cv_const_PTHREAD_PROCESS_SHARED+y}
26734 printf %s "(cached) " >&6
26736 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26737 /* end confdefs.h. */
26738 #include <pthread.h>
26739 int x = PTHREAD_PROCESS_SHARED;
26749 if ac_fn_c_try_compile "$LINENO"
26751 gl_cv_const_PTHREAD_PROCESS_SHARED=yes
26753 e) gl_cv_const_PTHREAD_PROCESS_SHARED=no ;;
26756 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_PROCESS_SHARED" >&5
26761 printf "%s\n" "$gl_cv_const_PTHREAD_PROCESS_SHARED" >&6; }
26762 if test $gl_cv_const_PTHREAD_PROCESS_SHARED != yes; then
26763 HAVE_PTHREAD_PROCESS_SHARED=0
26772 LIB_PTHREAD="$LIBPMULTITHREAD"
26777 GL_GNULIB_PTHREAD_THREAD=0
26781 GL_GNULIB_PTHREAD_ONCE=0
26785 GL_GNULIB_PTHREAD_MUTEX=0
26789 GL_GNULIB_PTHREAD_RWLOCK=0
26793 GL_GNULIB_PTHREAD_COND=0
26797 GL_GNULIB_PTHREAD_TSS=0
26801 GL_GNULIB_PTHREAD_SPIN=0
26805 GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK=0
26811 HAVE_SCHED_YIELD=1;
26812 REPLACE_SCHED_YIELD=0;
26820 ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
26821 #include <sys/cdefs.h>
26825 if test "x$ac_cv_header_sched_h" = xyes
26827 printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
26839 if test $gl_cv_have_include_next = yes; then
26840 gl_cv_next_sched_h='<'sched.h'>'
26842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
26843 printf %s "checking absolute name of <sched.h>... " >&6; }
26844 if test ${gl_cv_next_sched_h+y}
26846 printf %s "(cached) " >&6
26851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26852 /* end confdefs.h. */
26856 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26857 *) gl_absname_cpp="$ac_cpp" ;;
26862 gl_dirsep_regex='[/\\]'
26865 gl_dirsep_regex='\/'
26868 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26869 gl_header_literal_regex=`echo 'sched.h' \
26870 | sed -e "$gl_make_literal_regex_sed"`
26871 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26872 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26878 gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26879 sed -n "$gl_absolute_header_sed"`
26881 gl_header=$gl_cv_absolute_sched_h
26882 gl_cv_next_sched_h='"'$gl_header'"'
26887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
26888 printf "%s\n" "$gl_cv_next_sched_h" >&6; }
26890 NEXT_SCHED_H=$gl_cv_next_sched_h
26892 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26893 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26894 gl_next_as_first_directive='<'sched.h'>'
26896 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26897 gl_next_as_first_directive=$gl_cv_next_sched_h
26899 NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
26905 if test "$ac_cv_header_sched_h" = yes; then
26912 if test "$HAVE_SCHED_H" = 1; then
26913 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
26914 #include <sys/cdefs.h>
26919 if test "x$ac_cv_type_struct_sched_param" = xyes
26921 HAVE_STRUCT_SCHED_PARAM=1
26923 e) HAVE_STRUCT_SCHED_PARAM=0 ;;
26928 HAVE_STRUCT_SCHED_PARAM=0
26931 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
26933 if test "x$ac_cv_type_struct_sched_param" = xyes
26935 HAVE_STRUCT_SCHED_PARAM=1
26940 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
26942 if test "x$ac_cv_type_struct_sched_param" = xyes
26944 HAVE_STRUCT_SCHED_PARAM=1
26952 if test "$ac_cv_header_sys_cdefs_h" = yes; then
26967 GL_GNULIB_SCHED_YIELD=0
26976 if test $ac_cv_header_sys_socket_h != yes; then
26977 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26978 if test "x$ac_cv_header_winsock2_h" = xyes
26980 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
26985 if test "$ac_cv_header_winsock2_h" = yes; then
26987 UNISTD_H_HAVE_WINSOCK2_H=1
26988 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26994 if test $HAVE_WINSOCK2_H = 1; then
26995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
26996 printf %s "checking for WSAStartup... " >&6; }
26997 if test ${gl_cv_func_wsastartup+y}
26999 printf %s "(cached) " >&6
27002 gl_save_LIBS="$LIBS"
27003 LIBS="$LIBS -lws2_32"
27004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27005 /* end confdefs.h. */
27007 #ifdef HAVE_WINSOCK2_H
27008 # include <winsock2.h>
27014 WORD wVersionRequested = MAKEWORD(1, 1);
27016 int err = WSAStartup(wVersionRequested, &wsaData);
27024 if ac_fn_c_try_link "$LINENO"
27026 gl_cv_func_wsastartup=yes
27028 e) gl_cv_func_wsastartup=no ;;
27031 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27032 conftest$ac_exeext conftest.$ac_ext
27033 LIBS="$gl_save_LIBS"
27037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
27038 printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
27039 if test "$gl_cv_func_wsastartup" = "yes"; then
27041 printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
27043 LIBSOCKET='-lws2_32'
27046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
27047 printf %s "checking for library containing setsockopt... " >&6; }
27048 if test ${gl_cv_lib_socket+y}
27050 printf %s "(cached) " >&6
27054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27055 /* end confdefs.h. */
27069 if ac_fn_c_try_link "$LINENO"
27073 e) gl_save_LIBS="$LIBS"
27074 LIBS="$gl_save_LIBS -lsocket"
27075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27076 /* end confdefs.h. */
27090 if ac_fn_c_try_link "$LINENO"
27092 gl_cv_lib_socket="-lsocket"
27094 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27095 conftest$ac_exeext conftest.$ac_ext
27096 if test -z "$gl_cv_lib_socket"; then
27097 LIBS="$gl_save_LIBS -lnetwork"
27098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27099 /* end confdefs.h. */
27113 if ac_fn_c_try_link "$LINENO"
27115 gl_cv_lib_socket="-lnetwork"
27117 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27118 conftest$ac_exeext conftest.$ac_ext
27119 if test -z "$gl_cv_lib_socket"; then
27120 LIBS="$gl_save_LIBS -lnet"
27121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27122 /* end confdefs.h. */
27136 if ac_fn_c_try_link "$LINENO"
27138 gl_cv_lib_socket="-lnet"
27140 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27141 conftest$ac_exeext conftest.$ac_ext
27144 LIBS="$gl_save_LIBS"
27148 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27149 conftest$ac_exeext conftest.$ac_ext
27150 if test -z "$gl_cv_lib_socket"; then
27151 gl_cv_lib_socket="none needed"
27156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
27157 printf "%s\n" "$gl_cv_lib_socket" >&6; }
27158 if test "$gl_cv_lib_socket" != "none needed"; then
27159 LIBSOCKET="$gl_cv_lib_socket"
27179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
27180 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
27181 if test ${gl_cv_func_snprintf_retval_c99+y}
27183 printf %s "(cached) " >&6
27186 if test "$cross_compiling" = yes
27189 # Guess yes on glibc systems.
27190 *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
27191 # Guess yes on musl systems.
27192 *-musl* | midipix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
27193 # Guess yes on FreeBSD >= 5.
27194 freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
27195 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
27196 midnightbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
27197 # Guess yes on Mac OS X >= 10.3.
27198 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
27199 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
27200 # Guess yes on OpenBSD >= 3.9.
27201 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
27202 gl_cv_func_snprintf_retval_c99="guessing no";;
27203 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
27204 # Guess yes on Solaris >= 2.10.
27205 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
27206 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
27207 # Guess yes on AIX >= 4.
27208 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
27209 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
27210 # Guess yes on NetBSD >= 3.
27211 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
27212 gl_cv_func_snprintf_retval_c99="guessing no";;
27213 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
27214 # Guess yes on BeOS.
27215 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
27216 # Guess yes on Android.
27217 linux*-android*) gl_cv_func_snprintf_retval_c99="guessing yes";;
27218 # Guess yes on MSVC, no on mingw.
27219 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27220 /* end confdefs.h. */
27227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27228 $EGREP_TRADITIONAL "Known" >/dev/null 2>&1
27230 gl_cv_func_snprintf_retval_c99="guessing yes"
27232 e) gl_cv_func_snprintf_retval_c99="guessing no" ;;
27238 # If we don't know, obey --enable-cross-guesses.
27239 *) gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
27243 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27244 /* end confdefs.h. */
27247 #include <string.h>
27249 # define my_snprintf snprintf
27251 # include <stdarg.h>
27252 static int my_snprintf (char *buf, int size, const char *format, ...)
27256 va_start (args, format);
27257 ret = vsnprintf (buf, size, format, args);
27262 static char buf[100];
27265 strcpy (buf, "ABCDEF");
27266 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
27268 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
27270 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
27275 if ac_fn_c_try_run "$LINENO"
27277 gl_cv_func_snprintf_retval_c99=yes
27279 e) gl_cv_func_snprintf_retval_c99=no ;;
27282 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27283 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
27291 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
27295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
27296 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
27297 if test ${gl_cv_func_printf_positions+y}
27299 printf %s "(cached) " >&6
27302 if test "$cross_compiling" = yes
27306 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
27307 gl_cv_func_printf_positions="guessing no";;
27308 beos*) gl_cv_func_printf_positions="guessing no";;
27309 # Guess yes on Android.
27310 linux*-android*) gl_cv_func_printf_positions="guessing yes";;
27311 # Guess no on native Windows.
27312 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
27313 *) gl_cv_func_printf_positions="guessing yes";;
27317 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27318 /* end confdefs.h. */
27321 #include <string.h>
27322 /* The string "%2$d %1$d", with dollar characters protected from the shell's
27323 dollar expansion (possibly an autoconf bug). */
27324 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
27325 static char buf[100];
27328 sprintf (buf, format, 33, 55);
27329 return (strcmp (buf, "55 33") != 0);
27332 if ac_fn_c_try_run "$LINENO"
27334 gl_cv_func_printf_positions=yes
27336 e) gl_cv_func_printf_positions=no ;;
27339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27340 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
27348 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
27350 ac_fn_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
27351 if test "x$ac_cv_have_decl_snprintf" = xyes
27355 e) ac_have_decl=0 ;;
27358 printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
27361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
27362 printf %s "checking where to find the exponent in a 'double'... " >&6; }
27363 if test ${gl_cv_cc_double_expbit0+y}
27365 printf %s "(cached) " >&6
27368 if test "$cross_compiling" = yes
27371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27372 /* end confdefs.h. */
27374 #if defined arm || defined __arm || defined __arm__
27379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27380 $EGREP_TRADITIONAL "mixed_endianness" >/dev/null 2>&1
27382 gl_cv_cc_double_expbit0="unknown"
27386 if test ${ac_cv_c_bigendian+y}
27388 printf %s "(cached) " >&6
27390 e) ac_cv_c_bigendian=unknown
27391 # See if we're dealing with a universal compiler.
27392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27393 /* end confdefs.h. */
27394 #ifndef __APPLE_CC__
27395 not a universal capable compiler
27400 if ac_fn_c_try_compile "$LINENO"
27403 # Check for potential -arch flags. It is not universal unless
27404 # there are at least two -arch flags with different values.
27407 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27408 if test -n "$ac_prev"; then
27410 i?86 | x86_64 | ppc | ppc64)
27411 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27414 ac_cv_c_bigendian=universal
27420 elif test "x$ac_word" = "x-arch"; then
27425 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27426 if test $ac_cv_c_bigendian = unknown; then
27427 # See if sys/param.h defines the BYTE_ORDER macro.
27428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27429 /* end confdefs.h. */
27430 #include <sys/types.h>
27431 #include <sys/param.h>
27436 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
27437 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
27439 bogus endian macros
27446 if ac_fn_c_try_compile "$LINENO"
27448 # It does; now see whether it defined to BIG_ENDIAN or not.
27449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27450 /* end confdefs.h. */
27451 #include <sys/types.h>
27452 #include <sys/param.h>
27457 #if BYTE_ORDER != BIG_ENDIAN
27465 if ac_fn_c_try_compile "$LINENO"
27467 ac_cv_c_bigendian=yes
27469 e) ac_cv_c_bigendian=no ;;
27472 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27474 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27476 if test $ac_cv_c_bigendian = unknown; then
27477 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27479 /* end confdefs.h. */
27480 #include <limits.h>
27485 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27486 bogus endian macros
27493 if ac_fn_c_try_compile "$LINENO"
27495 # It does; now see whether it defined to _BIG_ENDIAN or not.
27496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27497 /* end confdefs.h. */
27498 #include <limits.h>
27503 #ifndef _BIG_ENDIAN
27511 if ac_fn_c_try_compile "$LINENO"
27513 ac_cv_c_bigendian=yes
27515 e) ac_cv_c_bigendian=no ;;
27518 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27520 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27522 if test $ac_cv_c_bigendian = unknown; then
27523 # Compile a test program.
27524 if test "$cross_compiling" = yes
27526 # Try to guess by grepping values from an object file.
27527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27528 /* end confdefs.h. */
27529 unsigned short int ascii_mm[] =
27530 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27531 unsigned short int ascii_ii[] =
27532 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27533 int use_ascii (int i) {
27534 return ascii_mm[i] + ascii_ii[i];
27536 unsigned short int ebcdic_ii[] =
27537 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27538 unsigned short int ebcdic_mm[] =
27539 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27540 int use_ebcdic (int i) {
27541 return ebcdic_mm[i] + ebcdic_ii[i];
27544 main (int argc, char **argv)
27546 /* Intimidate the compiler so that it does not
27547 optimize the arrays away. */
27549 ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
27550 ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
27551 return use_ascii (argc) == use_ebcdic (*p);
27554 if ac_fn_c_try_link "$LINENO"
27556 if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
27557 ac_cv_c_bigendian=yes
27559 if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
27560 if test "$ac_cv_c_bigendian" = unknown; then
27561 ac_cv_c_bigendian=no
27563 # finding both strings is unlikely to happen, but who knows?
27564 ac_cv_c_bigendian=unknown
27568 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27569 conftest$ac_exeext conftest.$ac_ext
27571 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27572 /* end confdefs.h. */
27573 $ac_includes_default
27578 /* Are we little or big endian? From Harbison&Steele. */
27582 char c[sizeof (long int)];
27585 return u.c[sizeof (long int) - 1] == 1;
27591 if ac_fn_c_try_run "$LINENO"
27593 ac_cv_c_bigendian=no
27595 e) ac_cv_c_bigendian=yes ;;
27598 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27599 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27607 case $ac_cv_c_bigendian in #(
27609 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
27611 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
27614 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
27618 gl_cv_cc_double_expbit0="unknown" ;;
27628 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27629 /* end confdefs.h. */
27632 #include <stddef.h>
27634 #include <string.h>
27636 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27637 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
27638 static unsigned int ored_words[NWORDS];
27639 static unsigned int anded_words[NWORDS];
27640 static void add_to_ored_words (double x)
27644 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
27645 memset (&m, 0, sizeof (memory_double));
27647 for (i = 0; i < NWORDS; i++)
27649 ored_words[i] |= m.word[i];
27650 anded_words[i] &= m.word[i];
27656 FILE *fp = fopen ("conftest.out", "w");
27659 for (j = 0; j < NWORDS; j++)
27660 anded_words[j] = ~ (unsigned int) 0;
27661 add_to_ored_words (0.25);
27662 add_to_ored_words (0.5);
27663 add_to_ored_words (1.0);
27664 add_to_ored_words (2.0);
27665 add_to_ored_words (4.0);
27666 /* Remove bits that are common (e.g. if representation of the first mantissa
27667 bit is explicit). */
27668 for (j = 0; j < NWORDS; j++)
27669 ored_words[j] &= ~anded_words[j];
27670 /* Now find the nonzero word. */
27671 for (j = 0; j < NWORDS; j++)
27672 if (ored_words[j] != 0)
27677 for (i = j + 1; i < NWORDS; i++)
27678 if (ored_words[i] != 0)
27680 fprintf (fp, "unknown");
27681 return (fclose (fp) != 0);
27684 if ((ored_words[j] >> i) & 1)
27686 fprintf (fp, "word %d bit %d", (int) j, (int) i);
27687 return (fclose (fp) != 0);
27690 fprintf (fp, "unknown");
27691 return (fclose (fp) != 0);
27695 if ac_fn_c_try_run "$LINENO"
27697 gl_cv_cc_double_expbit0=`cat conftest.out`
27699 e) gl_cv_cc_double_expbit0="unknown" ;;
27702 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27703 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
27712 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
27713 case "$gl_cv_cc_double_expbit0" in
27715 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
27716 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
27718 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
27721 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
27731 if test $ac_cv_header_sys_ioctl_h = yes; then
27733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
27734 printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
27735 if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
27737 printf %s "(cached) " >&6
27739 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27740 /* end confdefs.h. */
27741 #include <sys/ioctl.h>
27750 if ac_fn_c_try_compile "$LINENO"
27752 gl_cv_decl_ioctl_in_sys_ioctl_h=yes
27754 e) gl_cv_decl_ioctl_in_sys_ioctl_h=no ;;
27757 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
27762 printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
27776 if test $gl_cv_have_include_next = yes; then
27777 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
27779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
27780 printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
27781 if test ${gl_cv_next_sys_ioctl_h+y}
27783 printf %s "(cached) " >&6
27786 if test $ac_cv_header_sys_ioctl_h = yes; then
27791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27792 /* end confdefs.h. */
27793 #include <sys/ioctl.h>
27796 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27797 *) gl_absname_cpp="$ac_cpp" ;;
27802 gl_dirsep_regex='[/\\]'
27805 gl_dirsep_regex='\/'
27808 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27809 gl_header_literal_regex=`echo 'sys/ioctl.h' \
27810 | sed -e "$gl_make_literal_regex_sed"`
27811 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27812 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27818 gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27819 sed -n "$gl_absolute_header_sed"`
27821 gl_header=$gl_cv_absolute_sys_ioctl_h
27822 gl_cv_next_sys_ioctl_h='"'$gl_header'"'
27824 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
27830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
27831 printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
27833 NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
27835 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27836 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27837 gl_next_as_first_directive='<'sys/ioctl.h'>'
27839 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27840 gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
27842 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
27867 if test $gl_cv_have_include_next = yes; then
27868 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
27870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
27871 printf %s "checking absolute name of <sys/uio.h>... " >&6; }
27872 if test ${gl_cv_next_sys_uio_h+y}
27874 printf %s "(cached) " >&6
27877 if test $ac_cv_header_sys_uio_h = yes; then
27882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27883 /* end confdefs.h. */
27884 #include <sys/uio.h>
27887 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27888 *) gl_absname_cpp="$ac_cpp" ;;
27893 gl_dirsep_regex='[/\\]'
27896 gl_dirsep_regex='\/'
27899 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27900 gl_header_literal_regex=`echo 'sys/uio.h' \
27901 | sed -e "$gl_make_literal_regex_sed"`
27902 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27903 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27909 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27910 sed -n "$gl_absolute_header_sed"`
27912 gl_header=$gl_cv_absolute_sys_uio_h
27913 gl_cv_next_sys_uio_h='"'$gl_header'"'
27915 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
27921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
27922 printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
27924 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
27926 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27927 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27928 gl_next_as_first_directive='<'sys/uio.h'>'
27930 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27931 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
27933 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
27938 if test $ac_cv_header_sys_uio_h = yes; then
27949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
27950 printf %s "checking for inttypes.h... " >&6; }
27951 if test ${gl_cv_header_inttypes_h+y}
27953 printf %s "(cached) " >&6
27955 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27956 /* end confdefs.h. */
27958 #include <sys/types.h>
27959 #include <inttypes.h>
27964 uintmax_t i = (uintmax_t) -1; return !i;
27969 if ac_fn_c_try_compile "$LINENO"
27971 gl_cv_header_inttypes_h=yes
27973 e) gl_cv_header_inttypes_h=no ;;
27976 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
27980 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
27981 if test $gl_cv_header_inttypes_h = yes; then
27983 printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
27988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
27989 printf %s "checking for stdint.h... " >&6; }
27990 if test ${gl_cv_header_stdint_h+y}
27992 printf %s "(cached) " >&6
27994 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27995 /* end confdefs.h. */
27996 #include <sys/types.h>
27997 #include <stdint.h>
28001 uintmax_t i = (uintmax_t) -1; return !i;
28006 if ac_fn_c_try_compile "$LINENO"
28008 gl_cv_header_stdint_h=yes
28010 e) gl_cv_header_stdint_h=no ;;
28013 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
28017 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
28018 if test $gl_cv_header_stdint_h = yes; then
28020 printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
28027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
28028 printf %s "checking for intmax_t... " >&6; }
28029 if test ${gt_cv_c_intmax_t+y}
28031 printf %s "(cached) " >&6
28033 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28034 /* end confdefs.h. */
28036 #include <stddef.h>
28037 #include <stdlib.h>
28038 #if HAVE_STDINT_H_WITH_UINTMAX
28039 #include <stdint.h>
28041 #if HAVE_INTTYPES_H_WITH_UINTMAX
28042 #include <inttypes.h>
28048 intmax_t x = -1; return !x;
28053 if ac_fn_c_try_compile "$LINENO"
28055 gt_cv_c_intmax_t=yes
28057 e) gt_cv_c_intmax_t=no ;;
28060 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
28064 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
28065 if test $gt_cv_c_intmax_t = yes; then
28067 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
28071 printf "%s\n" "#define intmax_t long long" >>confdefs.h
28078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
28079 printf %s "checking whether snprintf truncates the result as in C99... " >&6; }
28080 if test ${gl_cv_func_snprintf_truncation_c99+y}
28082 printf %s "(cached) " >&6
28085 if test "$cross_compiling" = yes
28089 # Guess yes on glibc systems.
28090 *-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28091 # Guess yes on musl systems.
28092 *-musl* | midipix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28093 # Guess yes on FreeBSD >= 5.
28094 freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
28095 freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28096 midnightbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28097 # Guess yes on Mac OS X >= 10.3.
28098 darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
28099 darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28100 # Guess yes on OpenBSD >= 3.9.
28101 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
28102 gl_cv_func_snprintf_truncation_c99="guessing no";;
28103 openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28104 # Guess yes on Solaris >= 2.6.
28105 solaris2.[0-5] | solaris2.[0-5].*)
28106 gl_cv_func_snprintf_truncation_c99="guessing no";;
28107 solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28108 # Guess yes on AIX >= 4.
28109 aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
28110 aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28111 # Guess yes on HP-UX >= 11.
28112 hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
28113 hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28114 # Guess yes on IRIX >= 6.5.
28115 irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28116 # Guess yes on OSF/1 >= 5.
28117 osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
28118 osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28119 # Guess yes on NetBSD >= 3.
28120 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
28121 gl_cv_func_snprintf_truncation_c99="guessing no";;
28122 netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28123 # Guess yes on BeOS.
28124 beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28125 # Guess yes on Android.
28126 linux*-android*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
28127 # Guess no on native Windows.
28128 mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";;
28129 # If we don't know, obey --enable-cross-guesses.
28130 *) gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
28134 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28135 /* end confdefs.h. */
28138 #include <string.h>
28140 # define my_snprintf snprintf
28142 # include <stdarg.h>
28143 static int my_snprintf (char *buf, int size, const char *format, ...)
28147 va_start (args, format);
28148 ret = vsnprintf (buf, size, format, args);
28153 static char buf[100];
28156 strcpy (buf, "ABCDEF");
28157 my_snprintf (buf, 3, "%d %d", 4567, 89);
28158 if (memcmp (buf, "45\0DEF", 6) != 0)
28163 if ac_fn_c_try_run "$LINENO"
28165 gl_cv_func_snprintf_truncation_c99=yes
28167 e) gl_cv_func_snprintf_truncation_c99=no ;;
28170 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28171 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
28179 printf "%s\n" "$gl_cv_func_snprintf_truncation_c99" >&6; }
28185 ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
28186 if test "x$ac_cv_func_wcslen" = xyes
28188 printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
28195 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
28196 if test "x$ac_cv_func_snprintf" = xyes
28198 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
28201 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
28202 if test "x$ac_cv_func_strnlen" = xyes
28204 printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
28207 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
28208 if test "x$ac_cv_func_wcrtomb" = xyes
28210 printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
28214 ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
28215 " "$ac_c_undeclared_builtin_options" "CFLAGS"
28216 if test "x$ac_cv_have_decl__snprintf" = xyes
28220 e) ac_have_decl=0 ;;
28223 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
28226 case "$gl_cv_func_snprintf_retval_c99" in
28229 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
28234 case "$gl_cv_func_snprintf_truncation_c99" in
28237 printf "%s\n" "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h
28246 GL_CFLAG_GNULIB_WARNINGS=''
28247 if test -n "$GL_CFLAG_ALLOW_WARNINGS"; then
28248 cat > conftest.c <<\EOF
28249 #if __GNUC__ >= 3 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
28255 -Wno-unused-function
28256 -Wno-unused-parameter
28258 #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
28259 -Wno-float-conversion
28261 #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
28262 -Wimplicit-fallthrough
28264 #if __GNUC__ >= 4 && __GNUC__ < 11 && !defined __clang__
28265 -Wno-missing-field-initializers
28267 #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
28270 #if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
28271 -Wno-sign-conversion
28274 #if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4
28275 -Wno-unsuffixed-float-constants
28278 gl_command="$CC $CFLAGS $CPPFLAGS -E conftest.c > conftest.out"
28279 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gl_command\""; } >&5
28280 (eval $gl_command) 2>&5
28282 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28283 test $ac_status = 0; }; then
28284 gl_options=`grep -v '#' conftest.out`
28285 for word in $gl_options; do
28286 GL_CFLAG_GNULIB_WARNINGS="$GL_CFLAG_GNULIB_WARNINGS $word"
28289 rm -f conftest.c conftest.out
28296 GL_COND_LIBTOOL_TRUE=
28297 GL_COND_LIBTOOL_FALSE='#'
28299 GL_COND_LIBTOOL_TRUE='#'
28300 GL_COND_LIBTOOL_FALSE=
28303 gl_cond_libtool=false
28319 gl_source_base='lib'
28320 gl_source_base_prefix=
28322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alignas and alignof" >&5
28323 printf %s "checking for alignas and alignof... " >&6; }
28324 if test ${gl_cv_header_working_stdalign_h+y}
28326 printf %s "(cached) " >&6
28328 e) gl_save_CFLAGS=$CFLAGS
28329 for gl_working in "yes, keywords" "yes, <stdalign.h> macros"; do
28330 case $gl_working in #(
28332 CFLAGS="$gl_save_CFLAGS -DINCLUDE_STDALIGN_H" ;; #(
28336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28337 /* end confdefs.h. */
28338 #include <stdint.h>
28339 #ifdef INCLUDE_STDALIGN_H
28340 #include <stdalign.h>
28342 #include <stddef.h>
28344 /* Test that alignof yields a result consistent with offsetof.
28345 This catches GCC bug 52023
28346 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
28348 template <class t> struct alignof_helper { char a; t b; };
28349 # define ao(type) offsetof (alignof_helper<type>, b)
28351 # define ao(type) offsetof (struct { char a; type b; }, b)
28353 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
28354 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
28355 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
28357 /* Test alignas only on platforms where gnulib can help. */
28359 ((defined __cplusplus && 201103 <= __cplusplus) \
28360 || (__TINYC__ && defined __attribute__) \
28361 || (defined __APPLE__ && defined __MACH__ \
28362 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
28364 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
28365 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
28366 || 1300 <= _MSC_VER)
28367 struct alignas_test { char c; char alignas (8) alignas_8; };
28368 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
28380 if ac_fn_c_try_compile "$LINENO"
28382 gl_cv_header_working_stdalign_h=$gl_working
28384 e) gl_cv_header_working_stdalign_h=no ;;
28387 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28389 CFLAGS=$gl_save_CFLAGS
28390 test "$gl_cv_header_working_stdalign_h" != no && break
28394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
28395 printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
28397 case $gl_cv_header_working_stdalign_h in #(
28400 printf "%s\n" "#define HAVE_C_ALIGNASOF 1" >>confdefs.h
28410 if test $ac_cv_func_alloca_works = no; then
28414 # Define an additional variable used in the Makefile substitution.
28415 if test $ac_cv_working_alloca_h = yes; then
28416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
28417 printf %s "checking for alloca as a compiler built-in... " >&6; }
28418 if test ${gl_cv_rpl_alloca+y}
28420 printf %s "(cached) " >&6
28423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28424 /* end confdefs.h. */
28426 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
28431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28432 $EGREP_TRADITIONAL "Need own alloca" >/dev/null 2>&1
28434 gl_cv_rpl_alloca=yes
28436 e) gl_cv_rpl_alloca=no ;;
28444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
28445 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
28446 if test $gl_cv_rpl_alloca = yes; then
28448 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
28450 GL_GENERATE_ALLOCA_H=true
28452 GL_GENERATE_ALLOCA_H=false
28455 GL_GENERATE_ALLOCA_H=true
28458 if test $ac_cv_working_alloca_h = yes; then
28469 case "$GL_GENERATE_ALLOCA_H" in
28470 false) ALLOCA_H='' ;;
28472 if test -z "$ALLOCA_H"; then
28473 ALLOCA_H="${gl_source_base_prefix}alloca.h"
28476 *) echo "*** GL_GENERATE_ALLOCA_H is not set correctly" 1>&2; exit 1 ;;
28480 if $GL_GENERATE_ALLOCA_H; then
28481 GL_GENERATE_ALLOCA_H_TRUE=
28482 GL_GENERATE_ALLOCA_H_FALSE='#'
28484 GL_GENERATE_ALLOCA_H_TRUE='#'
28485 GL_GENERATE_ALLOCA_H_FALSE=
28488 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
28489 GL_GENERATE_ALLOCA_H_TRUE='#'
28490 GL_GENERATE_ALLOCA_H_FALSE='#'
28499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for static_assert" >&5
28500 printf %s "checking for static_assert... " >&6; }
28501 if test ${gl_cv_static_assert+y}
28503 printf %s "(cached) " >&6
28505 e) gl_save_CFLAGS=$CFLAGS
28506 for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do
28507 case $gl_working in #(
28509 CFLAGS="$gl_save_CFLAGS -DINCLUDE_ASSERT_H" ;; #(
28514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28515 /* end confdefs.h. */
28516 #if defined __clang__ && __STDC_VERSION__ < 202311
28517 #pragma clang diagnostic error "-Wc2x-extensions"
28518 #pragma clang diagnostic error "-Wc++1z-extensions"
28520 #ifdef INCLUDE_ASSERT_H
28521 #include <assert.h>
28523 static_assert (2 + 2 == 4, "arithmetic does not work");
28524 static_assert (2 + 2 == 4);
28530 static_assert (sizeof (char) == 1, "sizeof does not work");
28531 static_assert (sizeof (char) == 1);
28537 if ac_fn_c_try_compile "$LINENO"
28539 gl_cv_static_assert=$gl_working
28541 e) gl_cv_static_assert=no ;;
28544 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28545 CFLAGS=$gl_save_CFLAGS
28546 test "$gl_cv_static_assert" != no && break
28550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_static_assert" >&5
28551 printf "%s\n" "$gl_cv_static_assert" >&6; }
28553 GL_GENERATE_ASSERT_H=false
28554 case $gl_cv_static_assert in #(
28557 printf "%s\n" "#define HAVE_C_STATIC_ASSERT 1" >>confdefs.h
28560 GL_GENERATE_ASSERT_H=true
28569 if test $gl_cv_have_include_next = yes; then
28570 gl_cv_next_assert_h='<'assert.h'>'
28572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <assert.h>" >&5
28573 printf %s "checking absolute name of <assert.h>... " >&6; }
28574 if test ${gl_cv_next_assert_h+y}
28576 printf %s "(cached) " >&6
28581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28582 /* end confdefs.h. */
28583 #include <assert.h>
28586 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28587 *) gl_absname_cpp="$ac_cpp" ;;
28592 gl_dirsep_regex='[/\\]'
28595 gl_dirsep_regex='\/'
28598 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28599 gl_header_literal_regex=`echo 'assert.h' \
28600 | sed -e "$gl_make_literal_regex_sed"`
28601 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28602 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28608 gl_cv_absolute_assert_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28609 sed -n "$gl_absolute_header_sed"`
28611 gl_header=$gl_cv_absolute_assert_h
28612 gl_cv_next_assert_h='"'$gl_header'"'
28617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_assert_h" >&5
28618 printf "%s\n" "$gl_cv_next_assert_h" >&6; }
28620 NEXT_ASSERT_H=$gl_cv_next_assert_h
28622 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28623 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28624 gl_next_as_first_directive='<'assert.h'>'
28626 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28627 gl_next_as_first_directive=$gl_cv_next_assert_h
28629 NEXT_AS_FIRST_DIRECTIVE_ASSERT_H=$gl_next_as_first_directive
28644 case "$GL_GENERATE_ASSERT_H" in
28645 false) ASSERT_H='' ;;
28647 if test -z "$ASSERT_H"; then
28648 ASSERT_H="${gl_source_base_prefix}assert.h"
28651 *) echo "*** GL_GENERATE_ASSERT_H is not set correctly" 1>&2; exit 1 ;;
28655 if $GL_GENERATE_ASSERT_H; then
28656 GL_GENERATE_ASSERT_H_TRUE=
28657 GL_GENERATE_ASSERT_H_FALSE='#'
28659 GL_GENERATE_ASSERT_H_TRUE='#'
28660 GL_GENERATE_ASSERT_H_FALSE=
28663 if test -z "${GL_GENERATE_ASSERT_H_TRUE}" && test -z "${GL_GENERATE_ASSERT_H_FALSE}"; then
28664 GL_GENERATE_ASSERT_H_TRUE='#'
28665 GL_GENERATE_ASSERT_H_FALSE='#'
28679 if test $ac_cv_func_btowc = no; then
28686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
28687 printf %s "checking whether btowc(0) is correct... " >&6; }
28688 if test ${gl_cv_func_btowc_nul+y}
28690 printf %s "(cached) " >&6
28693 if test "$cross_compiling" = yes
28697 # Guess no on Cygwin.
28698 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
28699 # Guess yes on native Windows.
28700 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
28701 # Guess yes otherwise.
28702 *) gl_cv_func_btowc_nul="guessing yes" ;;
28706 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28707 /* end confdefs.h. */
28712 if (btowc ('\0') != 0)
28717 if ac_fn_c_try_run "$LINENO"
28719 gl_cv_func_btowc_nul=yes
28721 e) gl_cv_func_btowc_nul=no ;;
28724 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28725 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
28733 printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
28735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
28736 printf %s "checking whether btowc(EOF) is correct... " >&6; }
28737 if test ${gl_cv_func_btowc_eof+y}
28739 printf %s "(cached) " >&6
28743 # Guess no on IRIX.
28744 irix*) gl_cv_func_btowc_eof="guessing no" ;;
28745 # Guess yes on native Windows.
28746 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
28747 # Guess yes otherwise.
28748 *) gl_cv_func_btowc_eof="guessing yes" ;;
28750 if test $LOCALE_FR != none; then
28751 if test "$cross_compiling" = yes
28755 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28756 /* end confdefs.h. */
28758 #include <locale.h>
28763 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
28765 if (btowc (EOF) != WEOF)
28771 if ac_fn_c_try_run "$LINENO"
28773 gl_cv_func_btowc_eof=yes
28775 e) gl_cv_func_btowc_eof=no ;;
28778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28779 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
28788 printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
28791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc is consistent with mbrtowc in the C locale" >&5
28792 printf %s "checking whether btowc is consistent with mbrtowc in the C locale... " >&6; }
28793 if test ${gl_cv_func_btowc_consistent+y}
28795 printf %s "(cached) " >&6
28798 if test "$cross_compiling" = yes
28801 # Guess no on mingw.
28802 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28803 /* end confdefs.h. */
28810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28811 $EGREP_TRADITIONAL "Problem" >/dev/null 2>&1
28813 gl_cv_func_btowc_consistent="guessing no"
28815 e) gl_cv_func_btowc_consistent="guessing yes" ;;
28821 # Guess yes otherwise.
28822 *) gl_cv_func_btowc_consistent="guessing yes" ;;
28826 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28827 /* end confdefs.h. */
28829 #include <stdlib.h>
28830 #include <string.h>
28835 wint_t wc1 = btowc (0x80);
28836 wchar_t wc2 = (wchar_t) 0xbadface;
28837 char buf[1] = { 0x80 };
28839 memset (&state, 0, sizeof (mbstate_t));
28840 if (mbrtowc (&wc2, buf, 1, &state) != 1 || wc1 != wc2)
28846 if ac_fn_c_try_run "$LINENO"
28848 gl_cv_func_btowc_consistent=yes
28850 e) gl_cv_func_btowc_consistent=no ;;
28853 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28854 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_consistent" >&5
28862 printf "%s\n" "$gl_cv_func_btowc_consistent" >&6; }
28864 case "$gl_cv_func_btowc_nul" in
28866 *) REPLACE_BTOWC=1 ;;
28868 case "$gl_cv_func_btowc_eof" in
28870 *) REPLACE_BTOWC=1 ;;
28872 case "$gl_cv_func_btowc_consistent" in
28874 *) REPLACE_BTOWC=1 ;;
28876 if test $REPLACE_BTOWC = 0; then
28878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
28879 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
28880 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
28882 printf %s "(cached) " >&6
28885 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
28887 if test "$cross_compiling" = yes
28890 # Guess yes on native Windows.
28891 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
28895 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28896 /* end confdefs.h. */
28897 #include <limits.h>
28898 #include <locale.h>
28906 char *locale = setlocale (LC_ALL, "C");
28909 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
28913 mbstate_t mbs = { 0, };
28914 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
28924 if ac_fn_c_try_run "$LINENO"
28926 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
28928 e) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no ;;
28931 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28932 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
28940 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
28942 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
28944 *) REPLACE_BTOWC=1 ;;
28950 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
28951 GL_COND_OBJ_BTOWC_TRUE=
28952 GL_COND_OBJ_BTOWC_FALSE='#'
28954 GL_COND_OBJ_BTOWC_TRUE='#'
28955 GL_COND_OBJ_BTOWC_FALSE=
28958 if test -z "${GL_COND_OBJ_BTOWC_TRUE}" && test -z "${GL_COND_OBJ_BTOWC_FALSE}"; then
28959 GL_COND_OBJ_BTOWC_TRUE='#'
28960 GL_COND_OBJ_BTOWC_FALSE='#'
28963 if test -z "$GL_COND_OBJ_BTOWC_TRUE"; then :
28991 printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
28996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
28997 printf %s "checking for __builtin_expect... " >&6; }
28998 if test ${gl_cv___builtin_expect+y}
29000 printf %s "(cached) " >&6
29002 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29003 /* end confdefs.h. */
29006 main (int argc, char **argv)
29008 argc = __builtin_expect (argc, 100);
29009 return argv[argc != 100][0];
29012 if ac_fn_c_try_link "$LINENO"
29014 gl_cv___builtin_expect=yes
29016 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29017 /* end confdefs.h. */
29019 #include <builtins.h>
29021 main (int argc, char **argv)
29023 argc = __builtin_expect (argc, 100);
29024 return argv[argc != 100][0];
29027 if ac_fn_c_try_link "$LINENO"
29029 gl_cv___builtin_expect="in <builtins.h>"
29031 e) gl_cv___builtin_expect=no ;;
29034 rm -f core conftest.err conftest.$ac_objext conftest.beam \
29035 conftest$ac_exeext conftest.$ac_ext ;;
29038 rm -f core conftest.err conftest.$ac_objext conftest.beam \
29039 conftest$ac_exeext conftest.$ac_ext ;;
29042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
29043 printf "%s\n" "$gl_cv___builtin_expect" >&6; }
29044 if test "$gl_cv___builtin_expect" = yes; then
29045 printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
29047 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
29048 printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
29055 if test $gl_sigsegv_uses_libsigsegv = yes; then
29056 LIBCSTACK=$LIBSIGSEGV
29058 LTLIBCSTACK=$LTLIBSIGSEGV
29065 REPLACE_CALLOC_FOR_CALLOC_GNU="$REPLACE_CALLOC_FOR_CALLOC_POSIX"
29066 if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 0; then
29068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether calloc (0, n) and calloc (n, 0) return nonnull" >&5
29069 printf %s "checking whether calloc (0, n) and calloc (n, 0) return nonnull... " >&6; }
29070 if test ${ac_cv_func_calloc_0_nonnull+y}
29072 printf %s "(cached) " >&6
29074 e) if test $cross_compiling != yes; then
29075 ac_cv_func_calloc_0_nonnull=yes
29076 if test "$cross_compiling" = yes
29078 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
29079 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
29080 as_fn_error $? "cannot run test program while cross compiling
29081 See 'config.log' for more details" "$LINENO" 5; }
29083 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29084 /* end confdefs.h. */
29085 $ac_includes_default
29090 char * volatile p = calloc (0, 0);
29100 if ac_fn_c_try_run "$LINENO"
29104 e) ac_cv_func_calloc_0_nonnull=no ;;
29107 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29108 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
29114 # Guess yes on glibc systems.
29115 *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
29116 # Guess yes on musl systems.
29117 *-musl* | midipix*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
29118 # Guess yes on native Windows.
29119 mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
29120 # If we don't know, obey --enable-cross-guesses.
29121 *) ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
29127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
29128 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
29129 case $ac_cv_func_calloc_0_nonnull in #(
29133 REPLACE_CALLOC_FOR_CALLOC_GNU=1 ;;
29138 if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 1; then
29147 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
29159 GL_GNULIB_CALLOC_GNU=1
29165 printf "%s\n" "#define GNULIB_TEST_CALLOC_GNU 1" >>confdefs.h
29172 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
29173 REPLACE_CALLOC_FOR_CALLOC_POSIX=1
29176 if test $REPLACE_CALLOC_FOR_CALLOC_POSIX = 1; then
29185 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
29197 GL_GNULIB_CALLOC_POSIX=1
29203 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
29210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readlinkat" >&5
29211 printf %s "checking for readlinkat... " >&6; }
29212 if test ${gl_cv_onwards_func_readlinkat+y}
29214 printf %s "(cached) " >&6
29217 exec 9>&6 6>/dev/null
29222 ac_fn_check_decl "$LINENO" "readlinkat" "ac_cv_have_decl_readlinkat" "#include <unistd.h>
29223 " "$ac_c_undeclared_builtin_options" "CFLAGS"
29224 if test "x$ac_cv_have_decl_readlinkat" = xyes
29228 if test $ac_cv_have_decl_readlinkat = yes; then
29229 ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
29230 if test "x$ac_cv_func_readlinkat" = xyes
29235 if test $ac_cv_func_readlinkat = yes; then
29236 gl_cv_onwards_func_readlinkat=yes
29238 gl_cv_onwards_func_readlinkat='future OS version'
29241 gl_cv_onwards_func_readlinkat='future OS version'
29247 ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
29248 if test "x$ac_cv_func_readlinkat" = xyes
29253 gl_cv_onwards_func_readlinkat=$ac_cv_func_readlinkat
29263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_readlinkat" >&5
29264 printf "%s\n" "$gl_cv_onwards_func_readlinkat" >&6; }
29266 case "$gl_cv_onwards_func_readlinkat" in
29267 future*) ac_cv_func_readlinkat=no ;;
29268 *) ac_cv_func_readlinkat=$gl_cv_onwards_func_readlinkat ;;
29270 if test $ac_cv_func_readlinkat = yes; then
29272 printf "%s\n" "#define HAVE_READLINKAT 1" >>confdefs.h
29280 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
29281 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
29283 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
29284 # programs in the package would end up linked with that potentially-shared
29285 # library, inducing unnecessary run-time overhead.
29288 gl_saved_libs=$LIBS
29289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
29290 printf %s "checking for library containing clock_gettime... " >&6; }
29291 if test ${ac_cv_search_clock_gettime+y}
29293 printf %s "(cached) " >&6
29295 e) ac_func_search_save_LIBS=$LIBS
29296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29297 /* end confdefs.h. */
29299 /* Override any GCC internal prototype to avoid an error.
29300 Use char because int might match the return type of a GCC
29301 builtin and then its argument prototype would still apply.
29302 The 'extern "C"' is for builds by C++ compilers;
29303 although this is not generally supported in C code supporting it here
29304 has little cost and some practical benefit (sr 110532). */
29308 char clock_gettime (void);
29312 return clock_gettime ();
29317 for ac_lib in '' rt posix4
29319 if test -z "$ac_lib"; then
29320 ac_res="none required"
29323 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
29325 if ac_fn_c_try_link "$LINENO"
29327 ac_cv_search_clock_gettime=$ac_res
29329 rm -f core conftest.err conftest.$ac_objext conftest.beam \
29331 if test ${ac_cv_search_clock_gettime+y}
29336 if test ${ac_cv_search_clock_gettime+y}
29340 e) ac_cv_search_clock_gettime=no ;;
29343 rm conftest.$ac_ext
29344 LIBS=$ac_func_search_save_LIBS ;;
29347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
29348 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
29349 ac_res=$ac_cv_search_clock_gettime
29350 if test "$ac_res" != no
29352 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
29353 test "$ac_cv_search_clock_gettime" = "none required" ||
29354 CLOCK_TIME_LIB=$ac_cv_search_clock_gettime
29357 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
29358 if test "x$ac_cv_func_clock_getres" = xyes
29360 printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
29363 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
29364 if test "x$ac_cv_func_clock_gettime" = xyes
29366 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
29369 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
29370 if test "x$ac_cv_func_clock_settime" = xyes
29372 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
29376 LIBS=$gl_saved_libs
29377 # For backward compatibility.
29378 LIB_CLOCK_GETTIME="$CLOCK_TIME_LIB"
29383 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
29388 if test $REPLACE_CLOSE = 1; then
29389 GL_COND_OBJ_CLOSE_TRUE=
29390 GL_COND_OBJ_CLOSE_FALSE='#'
29392 GL_COND_OBJ_CLOSE_TRUE='#'
29393 GL_COND_OBJ_CLOSE_FALSE=
29396 if test -z "${GL_COND_OBJ_CLOSE_TRUE}" && test -z "${GL_COND_OBJ_CLOSE_FALSE}"; then
29397 GL_COND_OBJ_CLOSE_TRUE='#'
29398 GL_COND_OBJ_CLOSE_FALSE='#'
29416 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
29430 printf "%s\n" "#define GNULIB_DIRNAME 1" >>confdefs.h
29435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
29436 printf %s "checking whether // is distinct from /... " >&6; }
29437 if test ${gl_cv_double_slash_root+y}
29439 printf %s "(cached) " >&6
29441 e) if test x"$cross_compiling" = xyes ; then
29442 # When cross-compiling, there is no way to tell whether // is special
29443 # short of a list of hosts. However, the only known hosts to date
29444 # that have a distinct // are Apollo DomainOS (too old to port to),
29445 # Cygwin, and z/OS. If anyone knows of another system for which // has
29446 # special semantics and is distinct from /, please report it to
29447 # <bug-gnulib@gnu.org>.
29449 *-cygwin | i370-ibm-openedition)
29450 gl_cv_double_slash_root=yes ;;
29452 # Be optimistic and assume that / and // are the same when we
29454 gl_cv_double_slash_root='unknown, assuming no' ;;
29457 set x `ls -di / // 2>/dev/null`
29458 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
29459 gl_cv_double_slash_root=no
29461 gl_cv_double_slash_root=yes
29466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
29467 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
29468 if test "$gl_cv_double_slash_root" = yes; then
29470 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
29477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
29478 printf %s "checking whether dup2 works... " >&6; }
29479 if test ${gl_cv_func_dup2_works+y}
29481 printf %s "(cached) " >&6
29483 e) if test "$cross_compiling" = yes
29486 mingw*) # on this platform, dup2 always returns 0 for success
29487 gl_cv_func_dup2_works="guessing no" ;;
29488 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
29489 gl_cv_func_dup2_works="guessing no" ;;
29491 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
29493 gl_cv_func_dup2_works="guessing no" ;;
29494 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
29495 gl_cv_func_dup2_works="guessing no" ;;
29496 *-android*) # implemented using dup3(), which fails if oldfd == newfd
29497 gl_cv_func_dup2_works="guessing no" ;;
29498 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
29499 gl_cv_func_dup2_works="guessing no" ;;
29500 *) gl_cv_func_dup2_works="guessing yes" ;;
29503 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29504 /* end confdefs.h. */
29508 #include <limits.h>
29509 #include <sys/resource.h>
29510 #include <unistd.h>
29515 #ifndef RLIM_SAVED_CUR
29516 # define RLIM_SAVED_CUR RLIM_INFINITY
29518 #ifndef RLIM_SAVED_MAX
29519 # define RLIM_SAVED_MAX RLIM_INFINITY
29526 int bad_fd = INT_MAX;
29527 struct rlimit rlim;
29528 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
29529 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
29530 && rlim.rlim_cur != RLIM_INFINITY
29531 && rlim.rlim_cur != RLIM_SAVED_MAX
29532 && rlim.rlim_cur != RLIM_SAVED_CUR)
29533 bad_fd = rlim.rlim_cur;
29535 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
29538 if (dup2 (1, 1) != 1)
29541 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
29545 if (dup2 (0, 0) != -1)
29547 /* Many gnulib modules require POSIX conformance of EBADF. */
29548 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
29550 /* Flush out some cygwin core dumps. */
29551 if (dup2 (2, -1) != -1 || errno != EBADF)
29555 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
29557 int fd = open (".", O_RDONLY);
29560 else if (dup2 (fd, fd + 1) == -1)
29570 if ac_fn_c_try_run "$LINENO"
29572 gl_cv_func_dup2_works=yes
29574 e) gl_cv_func_dup2_works=no ;;
29577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29578 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
29585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
29586 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
29587 case "$gl_cv_func_dup2_works" in
29591 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
29592 if test "x$ac_cv_func_setdtablesize" = xyes
29594 printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
29603 if test $REPLACE_DUP2 = 1; then
29604 GL_COND_OBJ_DUP2_TRUE=
29605 GL_COND_OBJ_DUP2_FALSE='#'
29607 GL_COND_OBJ_DUP2_TRUE='#'
29608 GL_COND_OBJ_DUP2_FALSE=
29611 if test -z "${GL_COND_OBJ_DUP2_TRUE}" && test -z "${GL_COND_OBJ_DUP2_FALSE}"; then
29612 GL_COND_OBJ_DUP2_TRUE='#'
29613 GL_COND_OBJ_DUP2_FALSE='#'
29616 if test -z "$GL_COND_OBJ_DUP2_TRUE"; then :
29636 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
29650 GL_GNULIB_ENVIRON=1
29656 printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
29665 case "$GL_GENERATE_ERRNO_H" in
29666 false) ERRNO_H='' ;;
29668 if test -z "$ERRNO_H"; then
29669 ERRNO_H="${gl_source_base_prefix}errno.h"
29672 *) echo "*** GL_GENERATE_ERRNO_H is not set correctly" 1>&2; exit 1 ;;
29676 if $GL_GENERATE_ERRNO_H; then
29677 GL_GENERATE_ERRNO_H_TRUE=
29678 GL_GENERATE_ERRNO_H_FALSE='#'
29680 GL_GENERATE_ERRNO_H_TRUE='#'
29681 GL_GENERATE_ERRNO_H_FALSE=
29684 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29685 GL_GENERATE_ERRNO_H_TRUE='#'
29686 GL_GENERATE_ERRNO_H_FALSE='#'
29698 if test $GL_GENERATE_ERROR_H = true; then
29699 GL_COND_OBJ_ERROR_TRUE=
29700 GL_COND_OBJ_ERROR_FALSE='#'
29702 GL_COND_OBJ_ERROR_TRUE='#'
29703 GL_COND_OBJ_ERROR_FALSE=
29706 if test -z "${GL_COND_OBJ_ERROR_TRUE}" && test -z "${GL_COND_OBJ_ERROR_FALSE}"; then
29707 GL_COND_OBJ_ERROR_TRUE='#'
29708 GL_COND_OBJ_ERROR_FALSE='#'
29711 if test -z "$GL_COND_OBJ_ERROR_TRUE"; then :
29723 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
29727 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
29734 case "$GL_GENERATE_ERROR_H" in
29735 false) ERROR_H='' ;;
29737 if test -z "$ERROR_H"; then
29738 ERROR_H="${gl_source_base_prefix}error.h"
29741 *) echo "*** GL_GENERATE_ERROR_H is not set correctly" 1>&2; exit 1 ;;
29745 if $GL_GENERATE_ERROR_H; then
29746 GL_GENERATE_ERROR_H_TRUE=
29747 GL_GENERATE_ERROR_H_FALSE='#'
29749 GL_GENERATE_ERROR_H_TRUE='#'
29750 GL_GENERATE_ERROR_H_FALSE=
29753 if test -z "${GL_GENERATE_ERROR_H_TRUE}" && test -z "${GL_GENERATE_ERROR_H_FALSE}"; then
29754 GL_GENERATE_ERROR_H_TRUE='#'
29755 GL_GENERATE_ERROR_H_FALSE='#'
29769 if test $ac_cv_func_fcntl = no; then
29773 if test $ac_cv_func_fcntl = no; then
29780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
29781 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
29782 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
29784 printf %s "(cached) " >&6
29786 e) if test "$cross_compiling" = yes
29789 aix* | cygwin* | haiku*)
29790 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
29791 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
29794 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29795 /* end confdefs.h. */
29798 #include <limits.h>
29799 #include <sys/resource.h>
29800 #include <unistd.h>
29805 #ifndef RLIM_SAVED_CUR
29806 # define RLIM_SAVED_CUR RLIM_INFINITY
29808 #ifndef RLIM_SAVED_MAX
29809 # define RLIM_SAVED_MAX RLIM_INFINITY
29816 int bad_fd = INT_MAX;
29817 struct rlimit rlim;
29818 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
29819 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
29820 && rlim.rlim_cur != RLIM_INFINITY
29821 && rlim.rlim_cur != RLIM_SAVED_MAX
29822 && rlim.rlim_cur != RLIM_SAVED_CUR)
29823 bad_fd = rlim.rlim_cur;
29824 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
29825 if (errno != EINVAL) result |= 2;
29826 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
29827 if (errno != EINVAL) result |= 8;
29828 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
29831 fd = open (".", O_RDONLY);
29834 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
29844 if ac_fn_c_try_run "$LINENO"
29846 gl_cv_func_fcntl_f_dupfd_works=yes
29848 e) gl_cv_func_fcntl_f_dupfd_works=no ;;
29851 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29852 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
29858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
29859 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
29860 case $gl_cv_func_fcntl_f_dupfd_works in
29865 if test $ac_cv_func_fcntl = no; then
29872 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
29876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
29877 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
29878 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
29880 printf %s "(cached) " >&6
29882 e) if test "$cross_compiling" = yes
29885 # Guess no on NetBSD.
29886 netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
29887 *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
29891 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29892 /* end confdefs.h. */
29894 #include <unistd.h>
29895 int main (int argc, char *argv[])
29898 /* parent process */
29900 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
29902 return execl ("./conftest", "./conftest", "child", NULL);
29905 /* child process */
29906 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
29911 if ac_fn_c_try_run "$LINENO"
29913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29914 /* end confdefs.h. */
29917 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
29918 it to support the semantics on older kernels that failed with EINVAL. */
29930 if ac_fn_c_try_compile "$LINENO"
29932 gl_cv_func_fcntl_f_dupfd_cloexec=yes
29934 e) gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" ;;
29937 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29940 e) gl_cv_func_fcntl_f_dupfd_cloexec=no ;;
29943 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29944 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
29951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
29952 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
29953 case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
29958 if test $ac_cv_func_fcntl = no; then
29970 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
29971 GL_COND_OBJ_FCNTL_TRUE=
29972 GL_COND_OBJ_FCNTL_FALSE='#'
29974 GL_COND_OBJ_FCNTL_TRUE='#'
29975 GL_COND_OBJ_FCNTL_FALSE=
29978 if test -z "${GL_COND_OBJ_FCNTL_TRUE}" && test -z "${GL_COND_OBJ_FCNTL_FALSE}"; then
29979 GL_COND_OBJ_FCNTL_TRUE='#'
29980 GL_COND_OBJ_FCNTL_FALSE='#'
29998 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
30014 printf "%s\n" "#define GNULIB_FILENAMECAT 1" >>confdefs.h
30020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mempcpy" >&5
30021 printf %s "checking for mempcpy... " >&6; }
30022 if test ${gl_cv_onwards_func_mempcpy+y}
30024 printf %s "(cached) " >&6
30027 exec 9>&6 6>/dev/null
30032 ac_fn_check_decl "$LINENO" "mempcpy" "ac_cv_have_decl_mempcpy" "#include <string.h>
30033 " "$ac_c_undeclared_builtin_options" "CFLAGS"
30034 if test "x$ac_cv_have_decl_mempcpy" = xyes
30038 if test $ac_cv_have_decl_mempcpy = yes; then
30039 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
30040 if test "x$ac_cv_func_mempcpy" = xyes
30045 if test $ac_cv_func_mempcpy = yes; then
30046 gl_cv_onwards_func_mempcpy=yes
30048 gl_cv_onwards_func_mempcpy='future OS version'
30051 gl_cv_onwards_func_mempcpy='future OS version'
30057 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
30058 if test "x$ac_cv_func_mempcpy" = xyes
30063 gl_cv_onwards_func_mempcpy=$ac_cv_func_mempcpy
30073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mempcpy" >&5
30074 printf "%s\n" "$gl_cv_onwards_func_mempcpy" >&6; }
30076 case "$gl_cv_onwards_func_mempcpy" in
30077 future*) ac_cv_func_mempcpy=no ;;
30078 *) ac_cv_func_mempcpy=$gl_cv_onwards_func_mempcpy ;;
30080 if test $ac_cv_func_mempcpy = yes; then
30082 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
30089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
30090 printf %s "checking for flexible array member... " >&6; }
30091 if test ${ac_cv_c_flexmember+y}
30093 printf %s "(cached) " >&6
30095 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30096 /* end confdefs.h. */
30097 #include <stdlib.h>
30099 #include <stddef.h>
30100 struct m { struct m *next, **list; char name[]; };
30101 struct s { struct s *p; struct m *m; int n; double d[]; };
30105 int m = getchar ();
30106 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
30107 nbytes += sizeof (struct s) - 1;
30108 nbytes -= nbytes % sizeof (struct s);
30109 struct s *p = malloc (nbytes);
30113 return p->d != (double *) NULL;
30118 if ac_fn_c_try_compile "$LINENO"
30120 ac_cv_c_flexmember=yes
30122 e) ac_cv_c_flexmember=no ;;
30125 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
30129 printf "%s\n" "$ac_cv_c_flexmember" >&6; }
30130 if test $ac_cv_c_flexmember = yes; then
30132 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
30135 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
30143 gl_fnmatch_required_lowercase=`
30144 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
30147 if test $ac_cv_func_fnmatch = no; then
30150 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
30151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
30152 printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; }
30153 if eval test \${$gl_fnmatch_cache_var+y}
30155 printf %s "(cached) " >&6
30157 e) if test $gl_fnmatch_required = GNU; then
30158 gl_fnmatch_gnu_start=
30159 gl_fnmatch_gnu_end=
30161 gl_fnmatch_gnu_start='#if 0'
30162 gl_fnmatch_gnu_end='#endif'
30164 if test "$cross_compiling" = yes
30167 # Guess yes on musl systems.
30168 *-musl* | midipix*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
30169 # Guess no otherwise, even on glibc systems.
30170 *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
30174 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30175 /* end confdefs.h. */
30176 #include <fnmatch.h>
30178 y (char const *pattern, char const *string, int flags)
30180 return fnmatch (pattern, string, flags) == 0;
30183 n (char const *pattern, char const *string, int flags)
30185 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
30191 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
30192 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
30193 static char const A_1[] = { 'A' - 1, 0 };
30194 static char const A01[] = { 'A' + 1, 0 };
30195 static char const a_1[] = { 'a' - 1, 0 };
30196 static char const a01[] = { 'a' + 1, 0 };
30197 static char const bs_1[] = { '\\\\' - 1, 0 };
30198 static char const bs01[] = { '\\\\' + 1, 0 };
30200 if (!n ("a*", "", 0))
30202 if (!y ("a*", "abc", 0))
30204 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
30206 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
30208 if (!y ("a\\\\bc", "abc", 0))
30210 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
30212 if (!y ("*x", ".x", 0))
30214 if (!n ("*x", ".x", FNM_PERIOD))
30216 if (!y (Apat, "\\\\", 0))
30218 if (!y (Apat, "A", 0))
30220 if (!y (apat, "\\\\", 0))
30222 if (!y (apat, "a", 0))
30224 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
30226 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
30228 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
30230 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
30232 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
30234 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
30236 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
30238 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
30240 $gl_fnmatch_gnu_start
30241 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
30243 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
30245 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
30247 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
30249 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
30251 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
30253 $gl_fnmatch_gnu_end
30260 if ac_fn_c_try_run "$LINENO"
30262 eval "$gl_fnmatch_cache_var=yes"
30264 e) eval "$gl_fnmatch_cache_var=no" ;;
30267 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30268 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30275 eval ac_res=\$$gl_fnmatch_cache_var
30276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30277 printf "%s\n" "$ac_res" >&6; }
30278 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
30279 case "$gl_fnmatch_result" in
30281 *) REPLACE_FNMATCH=1 ;;
30284 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
30291 GL_GENERATE_FNMATCH_H=true
30299 case "$GL_GENERATE_FNMATCH_H" in
30300 false) FNMATCH_H='' ;;
30302 if test -z "$FNMATCH_H"; then
30303 FNMATCH_H="${gl_source_base_prefix}fnmatch.h"
30306 *) echo "*** GL_GENERATE_FNMATCH_H is not set correctly" 1>&2; exit 1 ;;
30310 if $GL_GENERATE_FNMATCH_H; then
30311 GL_GENERATE_FNMATCH_H_TRUE=
30312 GL_GENERATE_FNMATCH_H_FALSE='#'
30314 GL_GENERATE_FNMATCH_H_TRUE='#'
30315 GL_GENERATE_FNMATCH_H_FALSE=
30318 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
30319 GL_GENERATE_FNMATCH_H_TRUE='#'
30320 GL_GENERATE_FNMATCH_H_FALSE='#'
30327 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
30336 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
30352 GL_GNULIB_FNMATCH=1
30358 printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
30367 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
30376 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
30385 printf "%s\n" "#define GNULIB_FNMATCH_GNU 1" >>confdefs.h
30398 case "$GL_GENERATE_FNMATCH_H" in
30399 false) FNMATCH_H='' ;;
30401 if test -z "$FNMATCH_H"; then
30402 FNMATCH_H="${gl_source_base_prefix}fnmatch.h"
30405 *) echo "*** GL_GENERATE_FNMATCH_H is not set correctly" 1>&2; exit 1 ;;
30409 if $GL_GENERATE_FNMATCH_H; then
30410 GL_GENERATE_FNMATCH_H_TRUE=
30411 GL_GENERATE_FNMATCH_H_FALSE='#'
30413 GL_GENERATE_FNMATCH_H_TRUE='#'
30414 GL_GENERATE_FNMATCH_H_FALSE=
30417 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
30418 GL_GENERATE_FNMATCH_H_TRUE='#'
30419 GL_GENERATE_FNMATCH_H_FALSE='#'
30430 if test $REPLACE_FCLOSE = 1; then
30434 if test $REPLACE_FOPEN = 1; then
30443 gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
30462 printf "%s\n" "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
30468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'x'" >&5
30469 printf %s "checking whether fopen supports the mode character 'x'... " >&6; }
30470 if test ${gl_cv_func_fopen_mode_x+y}
30472 printf %s "(cached) " >&6
30474 e) rm -f conftest.x
30475 if test "$cross_compiling" = yes
30478 # Guess yes on glibc and musl systems.
30479 linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl* | midipix*)
30480 gl_cv_func_fopen_mode_x="guessing yes" ;;
30481 # If we don't know, obey --enable-cross-guesses.
30483 gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
30487 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30488 /* end confdefs.h. */
30495 fp = fopen ("conftest.x", "w");
30497 fp = fopen ("conftest.x", "wx");
30501 else if (errno == EEXIST)
30508 if ac_fn_c_try_run "$LINENO"
30510 gl_cv_func_fopen_mode_x=yes
30512 e) gl_cv_func_fopen_mode_x=no ;;
30515 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30516 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_x" >&5
30525 printf "%s\n" "$gl_cv_func_fopen_mode_x" >&6; }
30526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'e'" >&5
30527 printf %s "checking whether fopen supports the mode character 'e'... " >&6; }
30528 if test ${gl_cv_func_fopen_mode_e+y}
30530 printf %s "(cached) " >&6
30532 e) echo foo > conftest.x
30533 if test "$cross_compiling" = yes
30536 # Guess yes on glibc and musl systems.
30537 linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl* | midipix*)
30538 gl_cv_func_fopen_mode_e="guessing yes" ;;
30539 # Guess no on native Windows.
30541 gl_cv_func_fopen_mode_e="guessing no" ;;
30542 # If we don't know, obey --enable-cross-guesses.
30544 gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
30548 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30549 /* end confdefs.h. */
30560 FILE *fp = fopen ("conftest.x", "re");
30563 if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
30574 if ac_fn_c_try_run "$LINENO"
30576 gl_cv_func_fopen_mode_e=yes
30578 e) gl_cv_func_fopen_mode_e=no ;;
30581 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30582 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_e" >&5
30591 printf "%s\n" "$gl_cv_func_fopen_mode_e" >&6; }
30592 REPLACE_FOPEN_FOR_FOPEN_GNU="$REPLACE_FOPEN"
30593 case "$gl_cv_func_fopen_mode_x" in
30594 *no) REPLACE_FOPEN_FOR_FOPEN_GNU=1 ;;
30596 case "$gl_cv_func_fopen_mode_e" in
30597 *no) REPLACE_FOPEN_FOR_FOPEN_GNU=1 ;;
30600 if test $REPLACE_FOPEN_FOR_FOPEN_GNU = 1; then
30609 gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
30615 printf "%s\n" "#define GNULIB_FOPEN_GNU 1" >>confdefs.h
30627 GL_GNULIB_FOPEN_GNU=1
30633 printf "%s\n" "#define GNULIB_TEST_FOPEN_GNU 1" >>confdefs.h
30640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
30641 printf %s "checking whether free is known to preserve errno... " >&6; }
30642 if test ${gl_cv_func_free_preserves_errno+y}
30644 printf %s "(cached) " >&6
30646 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30647 /* end confdefs.h. */
30648 #include <stdlib.h>
30653 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
30654 #elif defined __OpenBSD__
30655 #elif defined __sun
30657 #error "'free' is not known to preserve errno"
30664 if ac_fn_c_try_compile "$LINENO"
30666 gl_cv_func_free_preserves_errno=yes
30668 e) gl_cv_func_free_preserves_errno=no ;;
30671 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
30676 printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; }
30678 case $gl_cv_func_free_preserves_errno in
30681 printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h
30684 *) REPLACE_FREE=1 ;;
30688 if test $REPLACE_FREE = 1; then
30689 GL_COND_OBJ_FREE_TRUE=
30690 GL_COND_OBJ_FREE_FALSE='#'
30692 GL_COND_OBJ_FREE_TRUE='#'
30693 GL_COND_OBJ_FREE_FALSE=
30696 if test -z "${GL_COND_OBJ_FREE_TRUE}" && test -z "${GL_COND_OBJ_FREE_FALSE}"; then
30697 GL_COND_OBJ_FREE_TRUE='#'
30698 GL_COND_OBJ_FREE_FALSE='#'
30701 if test -z "$GL_COND_OBJ_FREE_TRUE"; then :
30715 GL_GNULIB_FREE_POSIX=1
30721 printf "%s\n" "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
30729 mingw* | pw* | os2*)
30733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether freopen works on closed fds" >&5
30734 printf %s "checking whether freopen works on closed fds... " >&6; }
30735 if test ${gl_cv_func_freopen_works_on_closed+y}
30737 printf %s "(cached) " >&6
30739 e) if test "$cross_compiling" = yes
30742 *gnu*) gl_cv_func_freopen_works_on_closed="guessing no" ;;
30743 *) gl_cv_func_freopen_works_on_closed="guessing yes";;
30746 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30747 /* end confdefs.h. */
30749 #include <unistd.h>
30758 return !(freopen ("/dev/null", "r", stdin)
30759 && getchar () == EOF
30760 && !ferror (stdin) && feof (stdin));
30765 if ac_fn_c_try_run "$LINENO"
30767 gl_cv_func_freopen_works_on_closed=yes
30769 e) gl_cv_func_freopen_works_on_closed=no ;;
30772 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30773 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_freopen_works_on_closed" >&5
30780 printf "%s\n" "$gl_cv_func_freopen_works_on_closed" >&6; }
30781 case $gl_cv_func_freopen_works_on_closed in
30782 *no) REPLACE_FREOPEN=1;;
30787 if test $REPLACE_FREOPEN = 1; then
30788 GL_COND_OBJ_FREOPEN_TRUE=
30789 GL_COND_OBJ_FREOPEN_FALSE='#'
30791 GL_COND_OBJ_FREOPEN_TRUE='#'
30792 GL_COND_OBJ_FREOPEN_FALSE=
30795 if test -z "${GL_COND_OBJ_FREOPEN_TRUE}" && test -z "${GL_COND_OBJ_FREOPEN_FALSE}"; then
30796 GL_COND_OBJ_FREOPEN_TRUE='#'
30797 GL_COND_OBJ_FREOPEN_FALSE='#'
30800 if test -z "$GL_COND_OBJ_FREOPEN_TRUE"; then :
30814 GL_GNULIB_FREOPEN=1
30820 printf "%s\n" "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h
30837 if test $REPLACE_FSTAT = 1; then
30838 GL_COND_OBJ_FSTAT_TRUE=
30839 GL_COND_OBJ_FSTAT_FALSE='#'
30841 GL_COND_OBJ_FSTAT_TRUE='#'
30842 GL_COND_OBJ_FSTAT_FALSE=
30845 if test -z "${GL_COND_OBJ_FSTAT_TRUE}" && test -z "${GL_COND_OBJ_FSTAT_FALSE}"; then
30846 GL_COND_OBJ_FSTAT_TRUE='#'
30847 GL_COND_OBJ_FSTAT_FALSE='#'
30850 if test -z "$GL_COND_OBJ_FSTAT_TRUE"; then :
30862 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
30888 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
30897 if test $ac_cv_func_getdtablesize = yes &&
30898 test $ac_cv_have_decl_getdtablesize = yes; then
30899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
30900 printf %s "checking whether getdtablesize works... " >&6; }
30901 if test ${gl_cv_func_getdtablesize_works+y}
30903 printf %s "(cached) " >&6
30905 e) case "$host_os" in
30906 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
30908 if test "$cross_compiling" = yes
30911 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
30912 gl_cv_func_getdtablesize_works="guessing no" ;;
30913 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
30917 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30918 /* end confdefs.h. */
30920 #include <unistd.h>
30929 int size = getdtablesize();
30930 if (dup2 (0, getdtablesize()) != -1)
30932 if (size != getdtablesize())
30939 if ac_fn_c_try_run "$LINENO"
30941 gl_cv_func_getdtablesize_works=yes
30943 e) gl_cv_func_getdtablesize_works=no ;;
30946 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30947 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
30957 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
30958 case "$gl_cv_func_getdtablesize_works" in
30959 *yes | "no (limitation)") ;;
30960 *) REPLACE_GETDTABLESIZE=1 ;;
30963 HAVE_GETDTABLESIZE=0
30967 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
30968 GL_COND_OBJ_GETDTABLESIZE_TRUE=
30969 GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
30971 GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
30972 GL_COND_OBJ_GETDTABLESIZE_FALSE=
30975 if test -z "${GL_COND_OBJ_GETDTABLESIZE_TRUE}" && test -z "${GL_COND_OBJ_GETDTABLESIZE_FALSE}"; then
30976 GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
30977 GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
30980 if test -z "$GL_COND_OBJ_GETDTABLESIZE_TRUE"; then :
30994 GL_GNULIB_GETDTABLESIZE=1
31000 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
31014 if test -n "$gl_replace_getopt"; then
31018 GL_GENERATE_GETOPT_H=false
31019 GL_GENERATE_GETOPT_CDEFS_H=false
31020 if test $REPLACE_GETOPT = 1; then
31023 if test $ac_cv_header_sys_cdefs_h = yes; then
31031 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
31033 GL_GENERATE_GETOPT_H=true
31034 GL_GENERATE_GETOPT_CDEFS_H=true
31042 case "$GL_GENERATE_GETOPT_H" in
31043 false) GETOPT_H='' ;;
31045 if test -z "$GETOPT_H"; then
31046 GETOPT_H="${gl_source_base_prefix}getopt.h"
31049 *) echo "*** GL_GENERATE_GETOPT_H is not set correctly" 1>&2; exit 1 ;;
31053 if $GL_GENERATE_GETOPT_H; then
31054 GL_GENERATE_GETOPT_H_TRUE=
31055 GL_GENERATE_GETOPT_H_FALSE='#'
31057 GL_GENERATE_GETOPT_H_TRUE='#'
31058 GL_GENERATE_GETOPT_H_FALSE=
31061 if test -z "${GL_GENERATE_GETOPT_H_TRUE}" && test -z "${GL_GENERATE_GETOPT_H_FALSE}"; then
31062 GL_GENERATE_GETOPT_H_TRUE='#'
31063 GL_GENERATE_GETOPT_H_FALSE='#'
31074 case "$GL_GENERATE_GETOPT_CDEFS_H" in
31075 false) GETOPT_CDEFS_H='' ;;
31077 if test -z "$GETOPT_CDEFS_H"; then
31078 GETOPT_CDEFS_H="${gl_source_base_prefix}getopt-cdefs.h"
31081 *) echo "*** GL_GENERATE_GETOPT_CDEFS_H is not set correctly" 1>&2; exit 1 ;;
31085 if $GL_GENERATE_GETOPT_CDEFS_H; then
31086 GL_GENERATE_GETOPT_CDEFS_H_TRUE=
31087 GL_GENERATE_GETOPT_CDEFS_H_FALSE='#'
31089 GL_GENERATE_GETOPT_CDEFS_H_TRUE='#'
31090 GL_GENERATE_GETOPT_CDEFS_H_FALSE=
31093 if test -z "${GL_GENERATE_GETOPT_CDEFS_H_TRUE}" && test -z "${GL_GENERATE_GETOPT_CDEFS_H_FALSE}"; then
31094 GL_GENERATE_GETOPT_CDEFS_H_TRUE='#'
31095 GL_GENERATE_GETOPT_CDEFS_H_FALSE='#'
31104 if test $REPLACE_GETOPT = 1; then
31105 GL_COND_OBJ_GETOPT_TRUE=
31106 GL_COND_OBJ_GETOPT_FALSE='#'
31108 GL_COND_OBJ_GETOPT_TRUE='#'
31109 GL_COND_OBJ_GETOPT_FALSE=
31112 if test -z "${GL_COND_OBJ_GETOPT_TRUE}" && test -z "${GL_COND_OBJ_GETOPT_FALSE}"; then
31113 GL_COND_OBJ_GETOPT_TRUE='#'
31114 GL_COND_OBJ_GETOPT_FALSE='#'
31117 if test -z "$GL_COND_OBJ_GETOPT_TRUE"; then :
31125 GL_GNULIB_UNISTD_H_GETOPT=1
31139 GL_GNULIB_GETOPT_POSIX=1
31145 printf "%s\n" "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h
31153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
31154 printf %s "checking for getpagesize... " >&6; }
31155 if test ${gl_cv_func_getpagesize+y}
31157 printf %s "(cached) " >&6
31159 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31160 /* end confdefs.h. */
31161 #include <unistd.h>
31165 return getpagesize();
31171 if ac_fn_c_try_link "$LINENO"
31173 gl_cv_func_getpagesize=yes
31175 e) gl_cv_func_getpagesize=no ;;
31178 rm -f core conftest.err conftest.$ac_objext conftest.beam \
31179 conftest$ac_exeext conftest.$ac_ext
31183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
31184 printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
31186 if test $gl_cv_func_getpagesize = no; then
31188 ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
31189 if test "x$ac_cv_header_OS_h" = xyes
31191 printf "%s\n" "#define HAVE_OS_H 1" >>confdefs.h
31195 if test $ac_cv_header_OS_h = yes; then
31198 ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
31199 if test "x$ac_cv_header_sys_param_h" = xyes
31201 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
31205 if test $ac_cv_header_sys_param_h = yes; then
31211 REPLACE_GETPAGESIZE=1
31214 ac_fn_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
31215 if test "x$ac_cv_have_decl_getpagesize" = xyes
31219 e) HAVE_DECL_GETPAGESIZE=0 ;;
31224 if test $REPLACE_GETPAGESIZE = 1; then
31225 GL_COND_OBJ_GETPAGESIZE_TRUE=
31226 GL_COND_OBJ_GETPAGESIZE_FALSE='#'
31228 GL_COND_OBJ_GETPAGESIZE_TRUE='#'
31229 GL_COND_OBJ_GETPAGESIZE_FALSE=
31232 if test -z "${GL_COND_OBJ_GETPAGESIZE_TRUE}" && test -z "${GL_COND_OBJ_GETPAGESIZE_FALSE}"; then
31233 GL_COND_OBJ_GETPAGESIZE_TRUE='#'
31234 GL_COND_OBJ_GETPAGESIZE_FALSE='#'
31246 GL_GNULIB_GETPAGESIZE=1
31252 printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
31261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getprogname" >&5
31262 printf %s "checking for getprogname... " >&6; }
31263 if test ${gl_cv_onwards_func_getprogname+y}
31265 printf %s "(cached) " >&6
31268 exec 9>&6 6>/dev/null
31273 ac_fn_check_decl "$LINENO" "getprogname" "ac_cv_have_decl_getprogname" "#include <stdlib.h>
31274 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31275 if test "x$ac_cv_have_decl_getprogname" = xyes
31279 if test $ac_cv_have_decl_getprogname = yes; then
31280 ac_fn_c_check_func "$LINENO" "getprogname" "ac_cv_func_getprogname"
31281 if test "x$ac_cv_func_getprogname" = xyes
31286 if test $ac_cv_func_getprogname = yes; then
31287 gl_cv_onwards_func_getprogname=yes
31289 gl_cv_onwards_func_getprogname='future OS version'
31292 gl_cv_onwards_func_getprogname='future OS version'
31298 ac_fn_c_check_func "$LINENO" "getprogname" "ac_cv_func_getprogname"
31299 if test "x$ac_cv_func_getprogname" = xyes
31304 gl_cv_onwards_func_getprogname=$ac_cv_func_getprogname
31314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_getprogname" >&5
31315 printf "%s\n" "$gl_cv_onwards_func_getprogname" >&6; }
31317 case "$gl_cv_onwards_func_getprogname" in
31318 future*) ac_cv_func_getprogname=no ;;
31319 *) ac_cv_func_getprogname=$gl_cv_onwards_func_getprogname ;;
31321 if test $ac_cv_func_getprogname = yes; then
31323 printf "%s\n" "#define HAVE_GETPROGNAME 1" >>confdefs.h
31328 if test $ac_cv_func_getprogname = no; then
31330 case "$gl_cv_onwards_func_getprogname" in
31331 future*) REPLACE_GETPROGNAME=1 ;;
31334 ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
31335 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31336 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
31340 e) ac_have_decl=0 ;;
31343 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
31344 if test $ac_have_decl = 1
31348 e) HAVE_DECL_PROGRAM_INVOCATION_NAME=0 ;;
31354 if test $HAVE_GETPROGNAME = 0 || test $REPLACE_GETPROGNAME = 1; then
31355 GL_COND_OBJ_GETPROGNAME_TRUE=
31356 GL_COND_OBJ_GETPROGNAME_FALSE='#'
31358 GL_COND_OBJ_GETPROGNAME_TRUE='#'
31359 GL_COND_OBJ_GETPROGNAME_FALSE=
31362 if test -z "${GL_COND_OBJ_GETPROGNAME_TRUE}" && test -z "${GL_COND_OBJ_GETPROGNAME_FALSE}"; then
31363 GL_COND_OBJ_GETPROGNAME_TRUE='#'
31364 GL_COND_OBJ_GETPROGNAME_FALSE='#'
31367 if test -z "$GL_COND_OBJ_GETPROGNAME_TRUE"; then :
31373 ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
31374 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31375 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
31379 e) ac_have_decl=0 ;;
31382 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
31383 if test $ac_have_decl = 1
31388 ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
31389 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31390 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
31394 e) ac_have_decl=0 ;;
31397 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
31398 if test $ac_have_decl = 1
31403 ac_fn_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
31404 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31405 if test "x$ac_cv_have_decl___argv" = xyes
31409 e) ac_have_decl=0 ;;
31412 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
31413 if test $ac_have_decl = 1
31419 # Incur the cost of this test only if none of the above worked.
31420 if test $ac_found = 0; then
31421 # On OpenBSD 5.1, using the global __progname variable appears to be
31422 # the only way to implement getprogname.
31423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
31424 printf %s "checking whether __progname is defined in default libraries... " >&6; }
31425 if test ${gl_cv_var___progname+y}
31427 printf %s "(cached) " >&6
31430 gl_cv_var___progname=
31431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31432 /* end confdefs.h. */
31433 extern char *__progname;
31437 return *__progname;
31443 if ac_fn_c_try_link "$LINENO"
31445 gl_cv_var___progname=yes
31448 rm -f core conftest.err conftest.$ac_objext conftest.beam \
31449 conftest$ac_exeext conftest.$ac_ext
31454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
31455 printf "%s\n" "$gl_cv_var___progname" >&6; }
31456 if test "$gl_cv_var___progname" = yes; then
31458 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
31474 GL_GNULIB_GETPROGNAME=1
31480 printf "%s\n" "#define GNULIB_TEST_GETPROGNAME 1" >>confdefs.h
31489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getrandom" >&5
31490 printf %s "checking for getrandom... " >&6; }
31491 if test ${gl_cv_onwards_func_getrandom+y}
31493 printf %s "(cached) " >&6
31496 exec 9>&6 6>/dev/null
31501 ac_fn_check_decl "$LINENO" "getrandom" "ac_cv_have_decl_getrandom" "/* Additional includes are needed before <sys/random.h> on uClibc
31503 #include <sys/types.h>
31504 #include <stdlib.h>
31505 #include <sys/random.h>
31507 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31508 if test "x$ac_cv_have_decl_getrandom" = xyes
31512 if test $ac_cv_have_decl_getrandom = yes; then
31513 ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom"
31514 if test "x$ac_cv_func_getrandom" = xyes
31519 if test $ac_cv_func_getrandom = yes; then
31520 gl_cv_onwards_func_getrandom=yes
31522 gl_cv_onwards_func_getrandom='future OS version'
31525 gl_cv_onwards_func_getrandom='future OS version'
31531 ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom"
31532 if test "x$ac_cv_func_getrandom" = xyes
31537 gl_cv_onwards_func_getrandom=$ac_cv_func_getrandom
31547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_getrandom" >&5
31548 printf "%s\n" "$gl_cv_onwards_func_getrandom" >&6; }
31550 case "$gl_cv_onwards_func_getrandom" in
31551 future*) ac_cv_func_getrandom=no ;;
31552 *) ac_cv_func_getrandom=$gl_cv_onwards_func_getrandom ;;
31554 if test $ac_cv_func_getrandom = yes; then
31556 printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h
31561 if test "$ac_cv_func_getrandom" != yes; then
31563 case "$gl_cv_onwards_func_getrandom" in
31564 future*) REPLACE_GETRANDOM=1 ;;
31567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
31568 printf %s "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
31569 if test ${gl_cv_func_getrandom_ok+y}
31571 printf %s "(cached) " >&6
31573 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31574 /* end confdefs.h. */
31575 /* Additional includes are needed before <sys/random.h> on uClibc
31577 #include <sys/types.h>
31578 #include <stdlib.h>
31579 #include <sys/random.h>
31580 ssize_t getrandom (void *, size_t, unsigned int);
31591 if ac_fn_c_try_compile "$LINENO"
31593 gl_cv_func_getrandom_ok=yes
31595 e) gl_cv_func_getrandom_ok=no ;;
31598 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
31603 printf "%s\n" "$gl_cv_func_getrandom_ok" >&6; }
31604 if test $gl_cv_func_getrandom_ok = no; then
31605 REPLACE_GETRANDOM=1
31611 ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
31614 if test "x$ac_cv_header_bcrypt_h" = xyes
31616 printf "%s\n" "#define HAVE_BCRYPT_H 1" >>confdefs.h
31620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
31621 printf %s "checking whether the bcrypt library is guaranteed to be present... " >&6; }
31622 if test ${gl_cv_lib_assume_bcrypt+y}
31624 printf %s "(cached) " >&6
31626 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31627 /* end confdefs.h. */
31628 #include <windows.h>
31632 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
31641 if ac_fn_c_try_compile "$LINENO"
31643 gl_cv_lib_assume_bcrypt=yes
31645 e) gl_cv_lib_assume_bcrypt=no ;;
31648 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
31653 printf "%s\n" "$gl_cv_lib_assume_bcrypt" >&6; }
31654 if test $gl_cv_lib_assume_bcrypt = yes; then
31656 printf "%s\n" "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
31658 GETRANDOM_LIB='-lbcrypt'
31660 GETRANDOM_LIB='-ladvapi32'
31667 LIB_GETRANDOM="$GETRANDOM_LIB"
31671 if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
31672 GL_COND_OBJ_GETRANDOM_TRUE=
31673 GL_COND_OBJ_GETRANDOM_FALSE='#'
31675 GL_COND_OBJ_GETRANDOM_TRUE='#'
31676 GL_COND_OBJ_GETRANDOM_FALSE=
31679 if test -z "${GL_COND_OBJ_GETRANDOM_TRUE}" && test -z "${GL_COND_OBJ_GETRANDOM_FALSE}"; then
31680 GL_COND_OBJ_GETRANDOM_TRUE='#'
31681 GL_COND_OBJ_GETRANDOM_FALSE='#'
31693 GL_GNULIB_GETRANDOM=1
31699 printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
31710 if test $gl_cv_func_timespec_get = yes; then
31712 printf "%s\n" "#define HAVE_TIMESPEC_GET 1" >>confdefs.h
31723 gl_gettimeofday_timezone=void
31724 if test $ac_cv_func_gettimeofday != yes; then
31725 HAVE_GETTIMEOFDAY=0
31727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
31728 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
31729 if test ${gl_cv_func_gettimeofday_posix_signature+y}
31731 printf %s "(cached) " >&6
31733 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31734 /* end confdefs.h. */
31735 #include <sys/time.h>
31737 int gettimeofday (struct timeval *restrict, void *restrict);
31742 /* glibc uses struct timezone * rather than the POSIX void *
31743 if _GNU_SOURCE is defined. However, since the only portable
31744 use of gettimeofday uses NULL as the second parameter, and
31745 since the glibc definition is actually more typesafe, it is
31746 not worth wrapping this to get a compliant signature. */
31747 int (*f) (struct timeval *restrict, void *restrict)
31750 return !(x | c.tv_sec | c.tv_usec);
31756 if ac_fn_c_try_compile "$LINENO"
31758 gl_cv_func_gettimeofday_posix_signature=yes
31760 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31761 /* end confdefs.h. */
31762 #include <sys/time.h>
31763 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
31773 if ac_fn_c_try_compile "$LINENO"
31775 gl_cv_func_gettimeofday_posix_signature=almost
31777 e) gl_cv_func_gettimeofday_posix_signature=no ;;
31780 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
31783 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
31786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
31787 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
31788 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
31789 gl_gettimeofday_timezone='struct timezone'
31790 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
31791 REPLACE_GETTIMEOFDAY=1
31793 if test $REPLACE_STRUCT_TIMEVAL = 1; then
31794 REPLACE_GETTIMEOFDAY=1
31797 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
31801 printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
31805 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
31806 GL_COND_OBJ_GETTIMEOFDAY_TRUE=
31807 GL_COND_OBJ_GETTIMEOFDAY_FALSE='#'
31809 GL_COND_OBJ_GETTIMEOFDAY_TRUE='#'
31810 GL_COND_OBJ_GETTIMEOFDAY_FALSE=
31813 if test -z "${GL_COND_OBJ_GETTIMEOFDAY_TRUE}" && test -z "${GL_COND_OBJ_GETTIMEOFDAY_FALSE}"; then
31814 GL_COND_OBJ_GETTIMEOFDAY_TRUE='#'
31815 GL_COND_OBJ_GETTIMEOFDAY_FALSE='#'
31818 if test -z "$GL_COND_OBJ_GETTIMEOFDAY_TRUE"; then :
31832 GL_GNULIB_GETTIMEOFDAY=1
31838 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
31844 if LC_ALL=C ${MAKE-make} --version 2>/dev/null | sed -e '2,$d' | grep GNU >/dev/null; then
31853 # Autoconf 2.61a.99 and earlier don't support linking a file only
31854 # in VPATH builds. But since GNUmakefile is for maintainer use
31855 # only, it does not matter if we skip the link with older autoconf.
31856 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
31857 # builds, so use a shell variable to bypass this.
31858 GNUmakefile=GNUmakefile
31859 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
31862 HARD_LOCALE_LIB="$SETLOCALE_NULL_LIB"
31864 LIB_HARD_LOCALE="$HARD_LOCALE_LIB"
31893 case "$GL_GENERATE_ICONV_H" in
31894 false) ICONV_H='' ;;
31896 if test -z "$ICONV_H"; then
31897 ICONV_H="${gl_source_base_prefix}iconv.h"
31900 *) echo "*** GL_GENERATE_ICONV_H is not set correctly" 1>&2; exit 1 ;;
31904 if $GL_GENERATE_ICONV_H; then
31905 GL_GENERATE_ICONV_H_TRUE=
31906 GL_GENERATE_ICONV_H_FALSE='#'
31908 GL_GENERATE_ICONV_H_TRUE='#'
31909 GL_GENERATE_ICONV_H_FALSE=
31912 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
31913 GL_GENERATE_ICONV_H_TRUE='#'
31914 GL_GENERATE_ICONV_H_FALSE='#'
31926 if test "$am_cv_func_iconv" = yes; then
31933 GL_GENERATE_ICONV_H=true
31935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31936 /* end confdefs.h. */
31939 #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
31944 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31945 $EGREP_TRADITIONAL "gnu_iconv" >/dev/null 2>&1
31947 gl_func_iconv_gnu=yes
31949 e) gl_func_iconv_gnu=no ;;
31954 if test $gl_func_iconv_gnu = no; then
31957 aix*) iconv_flavor=ICONV_FLAVOR_AIX ;;
31958 irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
31959 hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
31960 osf*) iconv_flavor=ICONV_FLAVOR_OSF ;;
31961 solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
31962 openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;;
31964 if test -n "$iconv_flavor"; then
31966 printf "%s\n" "#define ICONV_FLAVOR $iconv_flavor" >>confdefs.h
31975 GL_GENERATE_ICONV_H=true
31977 REPLACE_ICONV_OPEN=1
31988 case "$GL_GENERATE_ICONV_H" in
31989 false) ICONV_H='' ;;
31991 if test -z "$ICONV_H"; then
31992 ICONV_H="${gl_source_base_prefix}iconv.h"
31995 *) echo "*** GL_GENERATE_ICONV_H is not set correctly" 1>&2; exit 1 ;;
31999 if $GL_GENERATE_ICONV_H; then
32000 GL_GENERATE_ICONV_H_TRUE=
32001 GL_GENERATE_ICONV_H_FALSE='#'
32003 GL_GENERATE_ICONV_H_TRUE='#'
32004 GL_GENERATE_ICONV_H_FALSE=
32007 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
32008 GL_GENERATE_ICONV_H_TRUE='#'
32009 GL_GENERATE_ICONV_H_FALSE='#'
32017 if test $REPLACE_ICONV_OPEN = 1; then
32018 GL_COND_OBJ_ICONV_OPEN_TRUE=
32019 GL_COND_OBJ_ICONV_OPEN_FALSE='#'
32021 GL_COND_OBJ_ICONV_OPEN_TRUE='#'
32022 GL_COND_OBJ_ICONV_OPEN_FALSE=
32025 if test -z "${GL_COND_OBJ_ICONV_OPEN_TRUE}" && test -z "${GL_COND_OBJ_ICONV_OPEN_FALSE}"; then
32026 GL_COND_OBJ_ICONV_OPEN_TRUE='#'
32027 GL_COND_OBJ_ICONV_OPEN_FALSE='#'
32031 if test $REPLACE_ICONV = 1; then
32032 GL_COND_OBJ_ICONV_TRUE=
32033 GL_COND_OBJ_ICONV_FALSE='#'
32035 GL_COND_OBJ_ICONV_TRUE='#'
32036 GL_COND_OBJ_ICONV_FALSE=
32039 if test -z "${GL_COND_OBJ_ICONV_TRUE}" && test -z "${GL_COND_OBJ_ICONV_FALSE}"; then
32040 GL_COND_OBJ_ICONV_TRUE='#'
32041 GL_COND_OBJ_ICONV_FALSE='#'
32046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
32047 printf %s "checking whether the compiler generally respects inline... " >&6; }
32048 if test ${gl_cv_c_inline_effective+y}
32050 printf %s "(cached) " >&6
32052 e) if test $ac_cv_c_inline = no; then
32053 gl_cv_c_inline_effective=no
32055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32056 /* end confdefs.h. */
32061 #ifdef __NO_INLINE__
32062 #error "inline is not effective"
32068 if ac_fn_c_try_compile "$LINENO"
32070 gl_cv_c_inline_effective=yes
32072 e) gl_cv_c_inline_effective=no ;;
32075 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
32081 printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
32082 if test $gl_cv_c_inline_effective = yes; then
32084 printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
32111 if test $ac_cv_func_isblank = no; then
32116 if test $HAVE_ISBLANK = 0; then
32117 GL_COND_OBJ_ISBLANK_TRUE=
32118 GL_COND_OBJ_ISBLANK_FALSE='#'
32120 GL_COND_OBJ_ISBLANK_TRUE='#'
32121 GL_COND_OBJ_ISBLANK_FALSE=
32124 if test -z "${GL_COND_OBJ_ISBLANK_TRUE}" && test -z "${GL_COND_OBJ_ISBLANK_FALSE}"; then
32125 GL_COND_OBJ_ISBLANK_TRUE='#'
32126 GL_COND_OBJ_ISBLANK_FALSE='#'
32131 printf "%s\n" "#define GNULIB_ISBLANK 1" >>confdefs.h
32143 GL_GNULIB_ISBLANK=1
32154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iswblank" >&5
32155 printf %s "checking for iswblank... " >&6; }
32156 if test ${gl_cv_onwards_func_iswblank+y}
32158 printf %s "(cached) " >&6
32161 exec 9>&6 6>/dev/null
32166 ac_fn_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "#include <wctype.h>
32167 " "$ac_c_undeclared_builtin_options" "CFLAGS"
32168 if test "x$ac_cv_have_decl_iswblank" = xyes
32172 if test $ac_cv_have_decl_iswblank = yes; then
32173 ac_fn_c_check_func "$LINENO" "iswblank" "ac_cv_func_iswblank"
32174 if test "x$ac_cv_func_iswblank" = xyes
32179 if test $ac_cv_func_iswblank = yes; then
32180 gl_cv_onwards_func_iswblank=yes
32182 gl_cv_onwards_func_iswblank='future OS version'
32185 gl_cv_onwards_func_iswblank='future OS version'
32191 ac_fn_c_check_func "$LINENO" "iswblank" "ac_cv_func_iswblank"
32192 if test "x$ac_cv_func_iswblank" = xyes
32197 gl_cv_onwards_func_iswblank=$ac_cv_func_iswblank
32207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_iswblank" >&5
32208 printf "%s\n" "$gl_cv_onwards_func_iswblank" >&6; }
32210 case "$gl_cv_onwards_func_iswblank" in
32211 future*) ac_cv_func_iswblank=no ;;
32212 *) ac_cv_func_iswblank=$gl_cv_onwards_func_iswblank ;;
32214 if test $ac_cv_func_iswblank = yes; then
32216 printf "%s\n" "#define HAVE_ISWBLANK 1" >>confdefs.h
32221 ac_fn_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
32223 #include <wctype.h>
32225 " "$ac_c_undeclared_builtin_options" "CFLAGS"
32226 if test "x$ac_cv_have_decl_iswblank" = xyes
32230 e) ac_have_decl=0 ;;
32233 printf "%s\n" "#define HAVE_DECL_ISWBLANK $ac_have_decl" >>confdefs.h
32235 if test $ac_cv_func_iswblank = no; then
32237 if test $ac_cv_have_decl_iswblank = yes \
32238 || case "$gl_cv_onwards_func_iswblank" in \
32245 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
32248 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
32255 if ! { test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; } && { test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; }; then
32256 GL_COND_OBJ_ISWBLANK_TRUE=
32257 GL_COND_OBJ_ISWBLANK_FALSE='#'
32259 GL_COND_OBJ_ISWBLANK_TRUE='#'
32260 GL_COND_OBJ_ISWBLANK_FALSE=
32263 if test -z "${GL_COND_OBJ_ISWBLANK_TRUE}" && test -z "${GL_COND_OBJ_ISWBLANK_FALSE}"; then
32264 GL_COND_OBJ_ISWBLANK_TRUE='#'
32265 GL_COND_OBJ_ISWBLANK_FALSE='#'
32277 GL_GNULIB_ISWBLANK=1
32283 printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
32295 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
32296 REPLACE_ISWDIGIT="$REPLACE_ISWCNTRL"
32298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswdigit is ISO C compliant" >&5
32299 printf %s "checking whether iswdigit is ISO C compliant... " >&6; }
32300 if test ${gl_cv_func_iswdigit_works+y}
32302 printf %s "(cached) " >&6
32306 # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
32307 freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
32308 gl_cv_func_iswdigit_works="guessing no" ;;
32309 # Guess yes otherwise.
32310 *) gl_cv_func_iswdigit_works="guessing yes" ;;
32312 if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
32313 if test "$cross_compiling" = yes
32317 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32318 /* end confdefs.h. */
32320 #include <locale.h>
32321 #include <stdlib.h>
32322 #include <string.h>
32324 #include <wctype.h>
32326 /* Returns the value of iswdigit for the multibyte character s[0..n-1]. */
32328 for_character (const char *s, size_t n)
32334 memset (&state, '\0', sizeof (mbstate_t));
32335 wc = (wchar_t) 0xBADFACE;
32336 ret = mbrtowc (&wc, s, n, &state);
32340 return iswdigit (wc);
32344 main (int argc, char *argv[])
32349 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
32351 /* This fails on mingw, MSVC 14. */
32352 /* U+00B2 SUPERSCRIPT TWO */
32353 is = for_character ("\262", 1);
32357 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
32359 /* This fails on NetBSD 8.0. */
32360 /* U+FF11 FULLWIDTH DIGIT ONE */
32361 is = for_character ("\243\261", 2);
32365 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
32367 /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14. */
32368 /* U+0663 ARABIC-INDIC DIGIT THREE */
32369 is = for_character ("\331\243", 2);
32372 /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14. */
32373 /* U+FF11 FULLWIDTH DIGIT ONE */
32374 is = for_character ("\357\274\221", 3);
32378 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
32380 /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4. */
32381 /* U+FF11 FULLWIDTH DIGIT ONE */
32382 is = for_character ("\243\261", 2);
32389 if ac_fn_c_try_run "$LINENO"
32391 gl_cv_func_iswdigit_works=yes
32393 e) gl_cv_func_iswdigit_works=no ;;
32396 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32397 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswdigit_works" >&5
32406 printf "%s\n" "$gl_cv_func_iswdigit_works" >&6; }
32407 case "$gl_cv_func_iswdigit_works" in
32409 *) REPLACE_ISWDIGIT=1 ;;
32414 if ! { test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; } && test $REPLACE_ISWDIGIT = 1; then
32415 GL_COND_OBJ_ISWDIGIT_TRUE=
32416 GL_COND_OBJ_ISWDIGIT_FALSE='#'
32418 GL_COND_OBJ_ISWDIGIT_TRUE='#'
32419 GL_COND_OBJ_ISWDIGIT_FALSE=
32422 if test -z "${GL_COND_OBJ_ISWDIGIT_TRUE}" && test -z "${GL_COND_OBJ_ISWDIGIT_FALSE}"; then
32423 GL_COND_OBJ_ISWDIGIT_TRUE='#'
32424 GL_COND_OBJ_ISWDIGIT_FALSE='#'
32436 GL_GNULIB_ISWDIGIT=1
32442 printf "%s\n" "#define GNULIB_TEST_ISWDIGIT 1" >>confdefs.h
32453 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
32454 REPLACE_ISWXDIGIT="$REPLACE_ISWCNTRL"
32456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswxdigit is ISO C compliant" >&5
32457 printf %s "checking whether iswxdigit is ISO C compliant... " >&6; }
32458 if test ${gl_cv_func_iswxdigit_works+y}
32460 printf %s "(cached) " >&6
32464 # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
32465 freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
32466 gl_cv_func_iswxdigit_works="guessing no" ;;
32467 # Guess yes otherwise.
32468 *) gl_cv_func_iswxdigit_works="guessing yes" ;;
32470 if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
32471 if test "$cross_compiling" = yes
32475 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32476 /* end confdefs.h. */
32478 #include <locale.h>
32479 #include <stdlib.h>
32480 #include <string.h>
32482 #include <wctype.h>
32484 /* Returns the value of iswxdigit for the multibyte character s[0..n-1]. */
32486 for_character (const char *s, size_t n)
32492 memset (&state, '\0', sizeof (mbstate_t));
32493 wc = (wchar_t) 0xBADFACE;
32494 ret = mbrtowc (&wc, s, n, &state);
32498 return iswxdigit (wc);
32502 main (int argc, char *argv[])
32507 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
32509 /* This fails on NetBSD 8.0. */
32510 /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
32511 is = for_character ("\243\301", 2);
32515 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
32517 /* This fails on FreeBSD 13.0. */
32518 /* U+0663 ARABIC-INDIC DIGIT THREE */
32519 is = for_character ("\331\243", 2);
32522 /* This fails on MSVC 14. */
32523 /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
32524 is = for_character ("\357\274\241", 3);
32528 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
32530 /* This fails on Solaris 10, Solaris 11.4. */
32531 /* U+FF11 FULLWIDTH DIGIT ONE */
32532 is = for_character ("\243\261", 2);
32539 if ac_fn_c_try_run "$LINENO"
32541 gl_cv_func_iswxdigit_works=yes
32543 e) gl_cv_func_iswxdigit_works=no ;;
32546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32547 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswxdigit_works" >&5
32556 printf "%s\n" "$gl_cv_func_iswxdigit_works" >&6; }
32557 case "$gl_cv_func_iswxdigit_works" in
32559 *) REPLACE_ISWXDIGIT=1 ;;
32564 if ! { test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; } && test $REPLACE_ISWXDIGIT = 1; then
32565 GL_COND_OBJ_ISWXDIGIT_TRUE=
32566 GL_COND_OBJ_ISWXDIGIT_FALSE='#'
32568 GL_COND_OBJ_ISWXDIGIT_TRUE='#'
32569 GL_COND_OBJ_ISWXDIGIT_FALSE=
32572 if test -z "${GL_COND_OBJ_ISWXDIGIT_TRUE}" && test -z "${GL_COND_OBJ_ISWXDIGIT_FALSE}"; then
32573 GL_COND_OBJ_ISWXDIGIT_TRUE='#'
32574 GL_COND_OBJ_ISWXDIGIT_FALSE='#'
32586 GL_GNULIB_ISWXDIGIT=1
32592 printf "%s\n" "#define GNULIB_TEST_ISWXDIGIT 1" >>confdefs.h
32605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
32606 printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
32607 if test ${gl_cv_c___inline+y}
32609 printf %s "(cached) " >&6
32611 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32612 /* end confdefs.h. */
32614 static __inline foo_t foo (void) { return 0; }
32623 if ac_fn_c_try_compile "$LINENO"
32625 gl_cv_c___inline=yes
32627 e) gl_cv_c___inline=no ;;
32630 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
32634 printf "%s\n" "$gl_cv_c___inline" >&6; }
32635 if test $gl_cv_c___inline = yes; then
32637 printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
32646 case "$GL_GENERATE_LIMITS_H" in
32647 false) LIMITS_H='' ;;
32649 if test -z "$LIMITS_H"; then
32650 LIMITS_H="${gl_source_base_prefix}limits.h"
32653 *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
32657 if $GL_GENERATE_LIMITS_H; then
32658 GL_GENERATE_LIMITS_H_TRUE=
32659 GL_GENERATE_LIMITS_H_FALSE='#'
32661 GL_GENERATE_LIMITS_H_TRUE='#'
32662 GL_GENERATE_LIMITS_H_FALSE=
32665 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32666 GL_GENERATE_LIMITS_H_TRUE='#'
32667 GL_GENERATE_LIMITS_H_FALSE='#'
32678 LOCALCHARSET_TESTS_ENVIRONMENT=
32691 if test $REPLACE_STRUCT_LCONV = 1; then
32692 REPLACE_LOCALECONV=1
32694 if test $REPLACE_LOCALECONV = 0; then
32695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localeconv works" >&5
32696 printf %s "checking whether localeconv works... " >&6; }
32697 if test ${gl_cv_func_localeconv_works+y}
32699 printf %s "(cached) " >&6
32701 e) if test "$cross_compiling" = yes
32704 # Guess yes on glibc systems.
32705 *-gnu* | gnu*) gl_cv_func_localeconv_works="guessing yes" ;;
32706 # Guess yes on musl systems.
32707 *-musl* | midipix*) gl_cv_func_localeconv_works="guessing yes" ;;
32708 # Guess no on native Windows.
32709 mingw*) gl_cv_func_localeconv_works="guessing no" ;;
32710 # If we don't know, obey --enable-cross-guesses.
32711 *) gl_cv_func_localeconv_works="$gl_cross_guess_normal" ;;
32715 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32716 /* end confdefs.h. */
32718 #include <locale.h>
32719 #include <limits.h>
32722 struct lconv *l = localeconv ();
32723 return l->frac_digits != CHAR_MAX && l->frac_digits < 0;
32727 if ac_fn_c_try_run "$LINENO"
32729 gl_cv_func_localeconv_works=yes
32731 e) gl_cv_func_localeconv_works=no ;;
32734 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32735 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localeconv_works" >&5
32743 printf "%s\n" "$gl_cv_func_localeconv_works" >&6; }
32744 case "$gl_cv_func_localeconv_works" in
32746 *) REPLACE_LOCALECONV=1 ;;
32751 if test $REPLACE_LOCALECONV = 1; then
32752 GL_COND_OBJ_LOCALECONV_TRUE=
32753 GL_COND_OBJ_LOCALECONV_FALSE='#'
32755 GL_COND_OBJ_LOCALECONV_TRUE='#'
32756 GL_COND_OBJ_LOCALECONV_FALSE=
32759 if test -z "${GL_COND_OBJ_LOCALECONV_TRUE}" && test -z "${GL_COND_OBJ_LOCALECONV_FALSE}"; then
32760 GL_COND_OBJ_LOCALECONV_TRUE='#'
32761 GL_COND_OBJ_LOCALECONV_FALSE='#'
32764 if test -z "$GL_COND_OBJ_LOCALECONV_TRUE"; then :
32767 ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
32769 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
32772 printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
32777 ac_fn_c_check_member "$LINENO" "struct lconv" "int_p_cs_precedes" "ac_cv_member_struct_lconv_int_p_cs_precedes" "#include <locale.h>
32779 if test "x$ac_cv_member_struct_lconv_int_p_cs_precedes" = xyes
32782 printf "%s\n" "#define HAVE_STRUCT_LCONV_INT_P_CS_PRECEDES 1" >>confdefs.h
32799 GL_GNULIB_LOCALECONV=1
32805 printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
32811 if test "$gl_threads_api" = posix; then
32812 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
32813 # pthread_rwlock_* functions.
32815 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
32817 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
32821 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
32825 if $has_rwlock; then
32828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
32829 printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
32830 if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
32832 printf %s "(cached) " >&6
32834 e) save_LIBS="$LIBS"
32835 LIBS="$LIBS $LIBMULTITHREAD"
32836 if test "$cross_compiling" = yes
32839 # Guess no on glibc systems.
32840 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
32841 # Guess no on musl systems.
32842 *-musl* | midipix*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
32843 # Guess no on bionic systems.
32844 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
32845 # Guess yes on native Windows with the mingw-w64 winpthreads library.
32846 # Guess no on native Windows with the gnulib windows-rwlock module.
32847 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
32848 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
32850 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
32853 # If we don't know, obey --enable-cross-guesses.
32854 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
32858 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32859 /* end confdefs.h. */
32862 #include <pthread.h>
32863 #include <stdlib.h>
32864 #include <unistd.h>
32866 #define SUCCEED() exit (0)
32867 #define FAILURE() exit (1)
32868 #define UNEXPECTED(n) (exit (10 + (n)))
32870 /* The main thread creates the waiting writer and the requesting reader threads
32871 in the default way; this guarantees that they have the same priority.
32872 We can reuse the main thread as first reader thread. */
32874 static pthread_rwlock_t lock;
32875 static pthread_t reader1;
32876 static pthread_t writer;
32877 static pthread_t reader2;
32878 static pthread_t timer;
32879 /* Used to pass control from writer to reader2 and from reader2 to timer,
32880 as in a relay race.
32881 Passing control from one running thread to another running thread
32882 is most likely faster than to create the second thread. */
32883 static pthread_mutex_t baton;
32886 timer_func (void *ignored)
32888 /* Step 13 (can be before or after step 12):
32889 The timer thread takes the baton, then waits a moment to make sure
32890 it can tell whether the second reader thread is blocked at step 12. */
32891 if (pthread_mutex_lock (&baton))
32894 /* By the time we get here, it's clear that the second reader thread is
32895 blocked at step 12. This is the desired behaviour. */
32900 reader2_func (void *ignored)
32904 /* Step 8 (can be before or after step 7):
32905 The second reader thread takes the baton, then waits a moment to make sure
32906 the writer thread has reached step 7. */
32907 if (pthread_mutex_lock (&baton))
32910 /* Step 9: The second reader thread requests the lock. */
32911 err = pthread_rwlock_tryrdlock (&lock);
32914 else if (err != EBUSY)
32916 /* Step 10: Launch a timer, to test whether the next call blocks. */
32917 if (pthread_create (&timer, NULL, timer_func, NULL))
32919 /* Step 11: Release the baton. */
32920 if (pthread_mutex_unlock (&baton))
32922 /* Step 12: The second reader thread requests the lock. */
32923 err = pthread_rwlock_rdlock (&lock);
32931 writer_func (void *ignored)
32933 /* Step 4: Take the baton, so that the second reader thread does not go ahead
32935 if (pthread_mutex_lock (&baton))
32937 /* Step 5: Create the second reader thread. */
32938 if (pthread_create (&reader2, NULL, reader2_func, NULL))
32940 /* Step 6: Release the baton. */
32941 if (pthread_mutex_unlock (&baton))
32943 /* Step 7: The writer thread requests the lock. */
32944 if (pthread_rwlock_wrlock (&lock))
32952 reader1 = pthread_self ();
32954 /* Step 1: The main thread initializes the lock and the baton. */
32955 if (pthread_rwlock_init (&lock, NULL))
32957 if (pthread_mutex_init (&baton, NULL))
32959 /* Step 2: The main thread acquires the lock as a reader. */
32960 if (pthread_rwlock_rdlock (&lock))
32962 /* Step 3: Create the writer thread. */
32963 if (pthread_create (&writer, NULL, writer_func, NULL))
32965 /* Job done. Go to sleep. */
32973 if ac_fn_c_try_run "$LINENO"
32975 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
32977 e) gl_cv_pthread_rwlock_rdlock_prefer_writer=no ;;
32980 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32981 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
32990 printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
32991 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
32994 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
33000 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
33001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33002 /* end confdefs.h. */
33004 #include <pthread.h>
33009 #if __FreeBSD__ == 4
33010 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
33011 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
33012 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
33013 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
33015 int x = (int)PTHREAD_MUTEX_RECURSIVE;
33023 if ac_fn_c_try_compile "$LINENO"
33026 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
33029 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33035 printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
33042 if test $ac_cv_func_lstat = yes; then
33044 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
33054 if test $REPLACE_LSTAT = 1; then
33055 GL_COND_OBJ_LSTAT_TRUE=
33056 GL_COND_OBJ_LSTAT_FALSE='#'
33058 GL_COND_OBJ_LSTAT_TRUE='#'
33059 GL_COND_OBJ_LSTAT_FALSE=
33062 if test -z "${GL_COND_OBJ_LSTAT_TRUE}" && test -z "${GL_COND_OBJ_LSTAT_FALSE}"; then
33063 GL_COND_OBJ_LSTAT_TRUE='#'
33064 GL_COND_OBJ_LSTAT_FALSE='#'
33067 if test -z "$GL_COND_OBJ_LSTAT_TRUE"; then :
33087 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
33097 REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX"
33098 if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then
33100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
33101 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
33102 if test ${ac_cv_func_malloc_0_nonnull+y}
33104 printf %s "(cached) " >&6
33106 e) if test "$cross_compiling" = yes
33109 # Guess yes on platforms where we know the result.
33110 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
33111 | gnu* | *-musl* | midipix* | midnightbsd* \
33112 | hpux* | solaris* | cygwin* | mingw* | msys* )
33113 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
33114 # If we don't know, obey --enable-cross-guesses.
33115 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
33119 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33120 /* end confdefs.h. */
33121 #include <stdlib.h>
33126 void *p = malloc (0);
33135 if ac_fn_c_try_run "$LINENO"
33137 ac_cv_func_malloc_0_nonnull=yes
33139 e) ac_cv_func_malloc_0_nonnull=no ;;
33142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33143 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
33151 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
33152 case $ac_cv_func_malloc_0_nonnull in #(
33156 REPLACE_MALLOC_FOR_MALLOC_GNU=1 ;;
33161 if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then
33170 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
33182 GL_GNULIB_MALLOC_GNU=1
33188 printf "%s\n" "#define GNULIB_TEST_MALLOC_GNU 1" >>confdefs.h
33193 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
33202 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
33214 GL_GNULIB_MALLOC_POSIX=1
33220 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
33243 if test $ac_cv_func_mbrtowc = no; then
33245 ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
33248 " "$ac_c_undeclared_builtin_options" "CFLAGS"
33249 if test "x$ac_cv_have_decl_mbrtowc" = xyes
33253 e) ac_have_decl=0 ;;
33256 printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
33258 if test $ac_cv_have_decl_mbrtowc = yes; then
33262 if test $REPLACE_MBSTATE_T = 1; then
33268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
33269 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
33270 if test ${gl_cv_func_mbrtowc_null_arg1+y}
33272 printf %s "(cached) " >&6
33276 # Guess no on Solaris.
33277 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
33278 # Guess yes otherwise.
33279 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
33281 if test $LOCALE_FR_UTF8 != none; then
33282 if test "$cross_compiling" = yes
33286 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33287 /* end confdefs.h. */
33289 #include <locale.h>
33290 #include <stdlib.h>
33291 #include <string.h>
33297 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33299 char input[] = "\303\237er";
33304 memset (&state, '\0', sizeof (mbstate_t));
33305 wc = (wchar_t) 0xBADFACE;
33306 ret = mbrtowc (&wc, input, 5, &state);
33309 if (!mbsinit (&state))
33312 memset (&state, '\0', sizeof (mbstate_t));
33313 ret = mbrtowc (NULL, input, 5, &state);
33314 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
33316 if (!mbsinit (&state))
33322 if ac_fn_c_try_run "$LINENO"
33324 gl_cv_func_mbrtowc_null_arg1=yes
33326 e) gl_cv_func_mbrtowc_null_arg1=no ;;
33329 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33330 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
33339 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
33344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
33345 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
33346 if test ${gl_cv_func_mbrtowc_null_arg2+y}
33348 printf %s "(cached) " >&6
33352 # Guess no on OSF/1.
33353 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
33354 # Guess yes otherwise.
33355 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
33357 if test $LOCALE_FR_UTF8 != none; then
33358 if test "$cross_compiling" = yes
33362 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33363 /* end confdefs.h. */
33365 #include <locale.h>
33366 #include <string.h>
33370 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33376 memset (&state, '\0', sizeof (mbstate_t));
33377 wc = (wchar_t) 0xBADFACE;
33378 mbrtowc (&wc, NULL, 5, &state);
33379 /* Check that wc was not modified. */
33380 if (wc != (wchar_t) 0xBADFACE)
33386 if ac_fn_c_try_run "$LINENO"
33388 gl_cv_func_mbrtowc_null_arg2=yes
33390 e) gl_cv_func_mbrtowc_null_arg2=no ;;
33393 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33394 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
33403 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
33410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
33411 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
33412 if test ${gl_cv_func_mbrtowc_retval+y}
33414 printf %s "(cached) " >&6
33418 # Guess no on HP-UX, Solaris, native Windows.
33419 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
33420 # Guess yes otherwise.
33421 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
33423 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
33424 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
33425 if test "$cross_compiling" = yes
33429 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33430 /* end confdefs.h. */
33432 #include <locale.h>
33433 #include <string.h>
33438 int found_some_locale = 0;
33439 /* This fails on Solaris. */
33440 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33442 char input[] = "B\303\274\303\237er"; /* "Büßer" */
33446 memset (&state, '\0', sizeof (mbstate_t));
33447 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
33450 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
33453 found_some_locale = 1;
33455 /* This fails on HP-UX 11.11. */
33456 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
33458 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
33462 memset (&state, '\0', sizeof (mbstate_t));
33463 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
33466 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
33469 found_some_locale = 1;
33471 /* This fails on native Windows. */
33472 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
33474 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
33478 memset (&state, '\0', sizeof (mbstate_t));
33479 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
33482 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
33485 found_some_locale = 1;
33487 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
33489 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
33493 memset (&state, '\0', sizeof (mbstate_t));
33494 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
33497 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
33500 found_some_locale = 1;
33502 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
33504 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
33508 memset (&state, '\0', sizeof (mbstate_t));
33509 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
33512 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
33515 found_some_locale = 1;
33517 return (found_some_locale ? result : 77);
33520 if ac_fn_c_try_run "$LINENO"
33522 gl_cv_func_mbrtowc_retval=yes
33524 e) if test $? != 77; then
33525 gl_cv_func_mbrtowc_retval=no
33530 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33531 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
33540 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
33545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
33546 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
33547 if test ${gl_cv_func_mbrtowc_nul_retval+y}
33549 printf %s "(cached) " >&6
33553 # Guess no on Solaris 8 and 9.
33554 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
33555 # Guess yes otherwise.
33556 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
33558 if test $LOCALE_ZH_CN != none; then
33559 if test "$cross_compiling" = yes
33563 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33564 /* end confdefs.h. */
33566 #include <locale.h>
33567 #include <string.h>
33571 /* This fails on Solaris 8 and 9. */
33572 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
33577 memset (&state, '\0', sizeof (mbstate_t));
33578 if (mbrtowc (&wc, "", 1, &state) != 0)
33584 if ac_fn_c_try_run "$LINENO"
33586 gl_cv_func_mbrtowc_nul_retval=yes
33588 e) gl_cv_func_mbrtowc_nul_retval=no ;;
33591 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33592 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
33601 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
33605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
33606 printf %s "checking whether mbrtowc stores incomplete characters... " >&6; }
33607 if test ${gl_cv_func_mbrtowc_stores_incomplete+y}
33609 printf %s "(cached) " >&6
33613 # Guess yes on native Windows.
33614 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
33615 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
33619 if test "$cross_compiling" = yes
33623 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33624 /* end confdefs.h. */
33626 #include <locale.h>
33627 #include <string.h>
33632 if (setlocale (LC_ALL, "French_France.65001") != NULL)
33634 wchar_t wc = (wchar_t) 0xBADFACE;
33637 memset (&state, '\0', sizeof (mbstate_t));
33638 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
33639 && wc != (wchar_t) 0xBADFACE)
33642 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
33644 wchar_t wc = (wchar_t) 0xBADFACE;
33647 memset (&state, '\0', sizeof (mbstate_t));
33648 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
33649 && wc != (wchar_t) 0xBADFACE)
33652 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
33654 wchar_t wc = (wchar_t) 0xBADFACE;
33657 memset (&state, '\0', sizeof (mbstate_t));
33658 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
33659 && wc != (wchar_t) 0xBADFACE)
33662 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
33664 wchar_t wc = (wchar_t) 0xBADFACE;
33667 memset (&state, '\0', sizeof (mbstate_t));
33668 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
33669 && wc != (wchar_t) 0xBADFACE)
33675 if ac_fn_c_try_run "$LINENO"
33677 gl_cv_func_mbrtowc_stores_incomplete=no
33679 e) gl_cv_func_mbrtowc_stores_incomplete=yes ;;
33682 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33683 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33690 if test $LOCALE_FR_UTF8 != none; then
33691 if test "$cross_compiling" = yes
33695 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33696 /* end confdefs.h. */
33698 #include <locale.h>
33699 #include <string.h>
33703 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33705 wchar_t wc = (wchar_t) 0xBADFACE;
33708 memset (&state, '\0', sizeof (mbstate_t));
33709 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
33710 && wc != (wchar_t) 0xBADFACE)
33716 if ac_fn_c_try_run "$LINENO"
33718 gl_cv_func_mbrtowc_stores_incomplete=no
33720 e) gl_cv_func_mbrtowc_stores_incomplete=yes ;;
33723 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33724 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
33735 printf "%s\n" "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
33739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
33740 printf %s "checking whether mbrtowc works on empty input... " >&6; }
33741 if test ${gl_cv_func_mbrtowc_empty_input+y}
33743 printf %s "(cached) " >&6
33747 # Guess no on AIX and glibc systems.
33748 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
33749 # Guess yes on native Windows.
33750 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
33751 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
33753 if test "$cross_compiling" = yes
33757 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33758 /* end confdefs.h. */
33762 static mbstate_t mbs;
33766 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
33769 if ac_fn_c_try_run "$LINENO"
33771 gl_cv_func_mbrtowc_empty_input=yes
33773 e) gl_cv_func_mbrtowc_empty_input=no ;;
33776 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33777 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
33785 printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
33788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
33789 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
33790 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
33792 printf %s "(cached) " >&6
33795 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
33797 if test "$cross_compiling" = yes
33800 # Guess yes on native Windows.
33801 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
33805 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33806 /* end confdefs.h. */
33807 #include <limits.h>
33808 #include <locale.h>
33816 char *locale = setlocale (LC_ALL, "C");
33819 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
33823 mbstate_t mbs = { 0, };
33824 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
33834 if ac_fn_c_try_run "$LINENO"
33836 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
33838 e) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no ;;
33841 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33842 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
33850 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
33852 case "$gl_cv_func_mbrtowc_null_arg1" in
33855 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
33860 case "$gl_cv_func_mbrtowc_null_arg2" in
33863 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
33868 case "$gl_cv_func_mbrtowc_retval" in
33871 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
33876 case "$gl_cv_func_mbrtowc_nul_retval" in
33879 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
33884 case "$gl_cv_func_mbrtowc_stores_incomplete" in
33887 printf "%s\n" "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
33892 case "$gl_cv_func_mbrtowc_empty_input" in
33895 printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
33900 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
33903 printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
33910 if test $REPLACE_MBSTATE_T = 1; then
33912 mingw*) MBRTOWC_LIB= ;;
33916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
33917 printf %s "checking whether imported symbols can be declared weak... " >&6; }
33918 if test ${gl_cv_have_weak+y}
33920 printf %s "(cached) " >&6
33922 e) case "$host_os" in
33924 gl_cv_have_weak="guessing no"
33928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33929 /* end confdefs.h. */
33930 extern void xyzzy ();
33940 if ac_fn_c_try_link "$LINENO"
33942 gl_cv_have_weak=maybe
33944 rm -f core conftest.err conftest.$ac_objext conftest.beam \
33945 conftest$ac_exeext conftest.$ac_ext
33946 if test $gl_cv_have_weak = maybe; then
33947 if test "$cross_compiling" = yes
33949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33950 /* end confdefs.h. */
33952 Extensible Linking Format
33956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33957 $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
33959 gl_cv_have_weak="guessing yes"
33961 e) gl_cv_have_weak="guessing no" ;;
33968 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33969 /* end confdefs.h. */
33975 return (fputs == NULL);
33978 if ac_fn_c_try_run "$LINENO"
33980 gl_cv_have_weak=yes
33982 e) gl_cv_have_weak=no ;;
33985 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33986 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33993 case " $LDFLAGS " in
33994 *" -static "*) gl_cv_have_weak=no ;;
33996 case "$gl_cv_have_weak" in
33999 freebsd* | dragonfly* | midnightbsd*)
34001 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
34002 cat <<EOF > conftest2.c
34003 #include <pthread.h>
34004 #pragma weak pthread_mutexattr_gettype
34007 return (pthread_mutexattr_gettype != NULL);
34010 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
34011 || gl_cv_have_weak=no
34012 rm -f conftest1.c libempty.so conftest2.c conftest
34020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
34021 printf "%s\n" "$gl_cv_have_weak" >&6; }
34022 case "$gl_cv_have_weak" in
34025 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
34030 case "$gl_cv_have_weak" in
34031 *yes) MBRTOWC_LIB= ;;
34032 *) MBRTOWC_LIB="$LIBPTHREAD" ;;
34040 LIB_MBRTOWC="$MBRTOWC_LIB"
34044 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
34045 GL_COND_OBJ_MBRTOWC_TRUE=
34046 GL_COND_OBJ_MBRTOWC_FALSE='#'
34048 GL_COND_OBJ_MBRTOWC_TRUE='#'
34049 GL_COND_OBJ_MBRTOWC_FALSE=
34052 if test -z "${GL_COND_OBJ_MBRTOWC_TRUE}" && test -z "${GL_COND_OBJ_MBRTOWC_FALSE}"; then
34053 GL_COND_OBJ_MBRTOWC_TRUE='#'
34054 GL_COND_OBJ_MBRTOWC_FALSE='#'
34057 if test -z "$GL_COND_OBJ_MBRTOWC_TRUE"; then :
34059 if test $REPLACE_MBSTATE_T = 1; then
34068 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
34078 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
34085 if test -n "$GCC"; then
34086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
34087 printf %s "checking whether the -Werror option is usable... " >&6; }
34088 if test ${gl_cv_cc_vis_werror+y}
34090 printf %s "(cached) " >&6
34092 e) gl_save_CFLAGS="$CFLAGS"
34093 CFLAGS="$CFLAGS -Werror"
34094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34095 /* end confdefs.h. */
34105 if ac_fn_c_try_compile "$LINENO"
34107 gl_cv_cc_vis_werror=yes
34109 e) gl_cv_cc_vis_werror=no ;;
34112 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34113 CFLAGS="$gl_save_CFLAGS"
34117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
34118 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
34119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
34120 printf %s "checking for simple visibility declarations... " >&6; }
34121 if test ${gl_cv_cc_visibility+y}
34123 printf %s "(cached) " >&6
34125 e) gl_save_CFLAGS="$CFLAGS"
34126 CFLAGS="$CFLAGS -fvisibility=hidden"
34127 if test $gl_cv_cc_vis_werror = yes; then
34128 CFLAGS="$CFLAGS -Werror"
34130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34131 /* end confdefs.h. */
34132 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
34133 extern __attribute__((__visibility__("default"))) int exportedvar;
34134 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
34135 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
34136 void dummyfunc (void);
34139 int hiddenfunc (void) { return 51; }
34140 int exportedfunc (void) { return 1225736919; }
34141 void dummyfunc (void) {}
34151 if ac_fn_c_try_compile "$LINENO"
34153 gl_cv_cc_visibility=yes
34155 e) gl_cv_cc_visibility=no ;;
34158 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34159 CFLAGS="$gl_save_CFLAGS"
34163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
34164 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
34165 if test $gl_cv_cc_visibility = yes; then
34166 CFLAG_VISIBILITY="-fvisibility=hidden"
34173 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
34198 GL_GNULIB_MBRTOWC=1
34204 printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
34222 GL_GNULIB_MBSCASECMP=1
34228 printf "%s\n" "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
34240 if test $ac_cv_func_mbsinit = no; then
34242 ac_fn_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
34245 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34246 if test "x$ac_cv_have_decl_mbsinit" = xyes
34250 e) ac_have_decl=0 ;;
34253 printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
34255 if test $ac_cv_have_decl_mbsinit = yes; then
34259 if test $REPLACE_MBSTATE_T = 1; then
34263 mingw*) REPLACE_MBSINIT=1 ;;
34269 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
34270 GL_COND_OBJ_MBSINIT_TRUE=
34271 GL_COND_OBJ_MBSINIT_FALSE='#'
34273 GL_COND_OBJ_MBSINIT_TRUE='#'
34274 GL_COND_OBJ_MBSINIT_FALSE=
34277 if test -z "${GL_COND_OBJ_MBSINIT_TRUE}" && test -z "${GL_COND_OBJ_MBSINIT_FALSE}"; then
34278 GL_COND_OBJ_MBSINIT_TRUE='#'
34279 GL_COND_OBJ_MBSINIT_FALSE='#'
34282 if test -z "$GL_COND_OBJ_MBSINIT_TRUE"; then :
34303 GL_GNULIB_MBSINIT=1
34309 printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
34316 if test $ac_cv_func_mbslen = yes; then
34342 printf "%s\n" "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
34353 if test $ac_cv_func_mbsrtowcs = no; then
34355 ac_fn_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
34358 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34359 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes
34363 e) ac_have_decl=0 ;;
34366 printf "%s\n" "#define HAVE_DECL_MBSRTOWCS $ac_have_decl" >>confdefs.h
34368 if test $ac_cv_have_decl_mbsrtowcs = yes; then
34369 REPLACE_MBSRTOWCS=1
34372 if test $REPLACE_MBSTATE_T = 1; then
34373 REPLACE_MBSRTOWCS=1
34381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
34382 printf %s "checking whether mbsrtowcs works... " >&6; }
34383 if test ${gl_cv_func_mbsrtowcs_works+y}
34385 printf %s "(cached) " >&6
34389 # Guess no on HP-UX, Solaris, mingw.
34390 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
34391 # Guess yes otherwise.
34392 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
34394 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
34395 if test "$cross_compiling" = yes
34399 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34400 /* end confdefs.h. */
34402 #include <locale.h>
34403 #include <string.h>
34408 /* Test whether the function supports a NULL destination argument.
34409 This fails on native Windows. */
34410 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
34412 const char input[] = "\337er";
34413 const char *src = input;
34416 memset (&state, '\0', sizeof (mbstate_t));
34417 if (mbsrtowcs (NULL, &src, 1, &state) != 3
34421 /* Test whether the function works when started with a conversion state
34422 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
34423 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
34425 const char input[] = "B\303\274\303\237er";
34428 memset (&state, '\0', sizeof (mbstate_t));
34429 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
34430 if (!mbsinit (&state))
34432 const char *src = input + 2;
34433 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
34437 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
34439 const char input[] = "<\306\374\313\334\270\354>";
34442 memset (&state, '\0', sizeof (mbstate_t));
34443 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
34444 if (!mbsinit (&state))
34446 const char *src = input + 4;
34447 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
34451 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
34453 const char input[] = "B\250\271\201\060\211\070er";
34456 memset (&state, '\0', sizeof (mbstate_t));
34457 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
34458 if (!mbsinit (&state))
34460 const char *src = input + 2;
34461 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
34468 if ac_fn_c_try_run "$LINENO"
34470 gl_cv_func_mbsrtowcs_works=yes
34472 e) gl_cv_func_mbsrtowcs_works=no ;;
34475 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34476 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
34484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
34485 printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
34487 case "$gl_cv_func_mbsrtowcs_works" in
34489 *) REPLACE_MBSRTOWCS=1 ;;
34491 if test $REPLACE_MBSRTOWCS = 0; then
34493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
34494 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
34495 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
34497 printf %s "(cached) " >&6
34500 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
34502 if test "$cross_compiling" = yes
34505 # Guess yes on native Windows.
34506 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
34510 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34511 /* end confdefs.h. */
34512 #include <limits.h>
34513 #include <locale.h>
34521 char *locale = setlocale (LC_ALL, "C");
34524 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
34528 mbstate_t mbs = { 0, };
34529 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
34539 if ac_fn_c_try_run "$LINENO"
34541 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
34543 e) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no ;;
34546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34547 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
34554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
34555 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
34557 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
34559 *) REPLACE_MBSRTOWCS=1 ;;
34566 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
34567 GL_COND_OBJ_MBSRTOWCS_TRUE=
34568 GL_COND_OBJ_MBSRTOWCS_FALSE='#'
34570 GL_COND_OBJ_MBSRTOWCS_TRUE='#'
34571 GL_COND_OBJ_MBSRTOWCS_FALSE=
34574 if test -z "${GL_COND_OBJ_MBSRTOWCS_TRUE}" && test -z "${GL_COND_OBJ_MBSRTOWCS_FALSE}"; then
34575 GL_COND_OBJ_MBSRTOWCS_TRUE='#'
34576 GL_COND_OBJ_MBSRTOWCS_FALSE='#'
34579 if test -z "$GL_COND_OBJ_MBSRTOWCS_TRUE"; then :
34589 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
34610 GL_GNULIB_MBSRTOWCS=1
34616 printf "%s\n" "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
34640 printf "%s\n" "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
34649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbtowc" >&5
34650 printf %s "checking for mbtowc... " >&6; }
34651 if test ${gl_cv_onwards_func_mbtowc+y}
34653 printf %s "(cached) " >&6
34656 exec 9>&6 6>/dev/null
34661 ac_fn_check_decl "$LINENO" "mbtowc" "ac_cv_have_decl_mbtowc" "#include <stdlib.h>
34662 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34663 if test "x$ac_cv_have_decl_mbtowc" = xyes
34667 if test $ac_cv_have_decl_mbtowc = yes; then
34668 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
34669 if test "x$ac_cv_func_mbtowc" = xyes
34674 if test $ac_cv_func_mbtowc = yes; then
34675 gl_cv_onwards_func_mbtowc=yes
34677 gl_cv_onwards_func_mbtowc='future OS version'
34680 gl_cv_onwards_func_mbtowc='future OS version'
34686 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
34687 if test "x$ac_cv_func_mbtowc" = xyes
34692 gl_cv_onwards_func_mbtowc=$ac_cv_func_mbtowc
34702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mbtowc" >&5
34703 printf "%s\n" "$gl_cv_onwards_func_mbtowc" >&6; }
34705 case "$gl_cv_onwards_func_mbtowc" in
34706 future*) ac_cv_func_mbtowc=no ;;
34707 *) ac_cv_func_mbtowc=$gl_cv_onwards_func_mbtowc ;;
34709 if test $ac_cv_func_mbtowc = yes; then
34711 printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
34716 if test $ac_cv_func_mbtowc = no; then
34718 case "$gl_cv_onwards_func_mbtowc" in
34719 future*) REPLACE_MBTOWC=1 ;;
34728 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
34729 GL_COND_OBJ_MBTOWC_TRUE=
34730 GL_COND_OBJ_MBTOWC_FALSE='#'
34732 GL_COND_OBJ_MBTOWC_TRUE='#'
34733 GL_COND_OBJ_MBTOWC_FALSE=
34736 if test -z "${GL_COND_OBJ_MBTOWC_TRUE}" && test -z "${GL_COND_OBJ_MBTOWC_FALSE}"; then
34737 GL_COND_OBJ_MBTOWC_TRUE='#'
34738 GL_COND_OBJ_MBTOWC_FALSE='#'
34741 if test -z "$GL_COND_OBJ_MBTOWC_TRUE"; then :
34763 printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
34773 if test $REPLACE_MEMCHR = 1; then
34774 GL_COND_OBJ_MEMCHR_TRUE=
34775 GL_COND_OBJ_MEMCHR_FALSE='#'
34777 GL_COND_OBJ_MEMCHR_TRUE='#'
34778 GL_COND_OBJ_MEMCHR_FALSE=
34781 if test -z "${GL_COND_OBJ_MEMCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMCHR_FALSE}"; then
34782 GL_COND_OBJ_MEMCHR_TRUE='#'
34783 GL_COND_OBJ_MEMCHR_FALSE='#'
34786 if test -z "$GL_COND_OBJ_MEMCHR_TRUE"; then :
34789 ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
34790 if test "x$ac_cv_header_bp_sym_h" = xyes
34792 printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
34819 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
34831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mempcpy" >&5
34832 printf %s "checking for mempcpy... " >&6; }
34833 if test ${gl_cv_onwards_func_mempcpy+y}
34835 printf %s "(cached) " >&6
34838 exec 9>&6 6>/dev/null
34843 ac_fn_check_decl "$LINENO" "mempcpy" "ac_cv_have_decl_mempcpy" "#include <string.h>
34844 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34845 if test "x$ac_cv_have_decl_mempcpy" = xyes
34849 if test $ac_cv_have_decl_mempcpy = yes; then
34850 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
34851 if test "x$ac_cv_func_mempcpy" = xyes
34856 if test $ac_cv_func_mempcpy = yes; then
34857 gl_cv_onwards_func_mempcpy=yes
34859 gl_cv_onwards_func_mempcpy='future OS version'
34862 gl_cv_onwards_func_mempcpy='future OS version'
34868 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
34869 if test "x$ac_cv_func_mempcpy" = xyes
34874 gl_cv_onwards_func_mempcpy=$ac_cv_func_mempcpy
34884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_mempcpy" >&5
34885 printf "%s\n" "$gl_cv_onwards_func_mempcpy" >&6; }
34887 case "$gl_cv_onwards_func_mempcpy" in
34888 future*) ac_cv_func_mempcpy=no ;;
34889 *) ac_cv_func_mempcpy=$gl_cv_onwards_func_mempcpy ;;
34891 if test $ac_cv_func_mempcpy = yes; then
34893 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
34898 if test $ac_cv_func_mempcpy = no; then
34900 case "$gl_cv_onwards_func_mempcpy" in
34901 future*) REPLACE_MEMPCPY=1 ;;
34906 if test $HAVE_MEMPCPY = 0 || test $REPLACE_MEMPCPY = 1; then
34907 GL_COND_OBJ_MEMPCPY_TRUE=
34908 GL_COND_OBJ_MEMPCPY_FALSE='#'
34910 GL_COND_OBJ_MEMPCPY_TRUE='#'
34911 GL_COND_OBJ_MEMPCPY_FALSE=
34914 if test -z "${GL_COND_OBJ_MEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_MEMPCPY_FALSE}"; then
34915 GL_COND_OBJ_MEMPCPY_TRUE='#'
34916 GL_COND_OBJ_MEMPCPY_FALSE='#'
34919 if test -z "$GL_COND_OBJ_MEMPCPY_TRUE"; then :
34940 GL_GNULIB_MEMPCPY=1
34946 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
34955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
34956 printf %s "checking whether mkdir handles trailing slash... " >&6; }
34957 if test ${gl_cv_func_mkdir_trailing_slash_works+y}
34959 printf %s "(cached) " >&6
34961 e) rm -rf conftest.dir
34962 if test "$cross_compiling" = yes
34965 # Guess yes on Linux systems.
34966 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
34967 # Guess yes on systems that emulate the Linux system calls.
34968 midipix*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
34969 # Guess yes on glibc systems.
34970 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
34971 # Guess yes on MSVC, no on mingw.
34972 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34973 /* end confdefs.h. */
34980 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34981 $EGREP_TRADITIONAL "Known" >/dev/null 2>&1
34983 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
34985 e) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
34991 # If we don't know, obey --enable-cross-guesses.
34992 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
34996 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34997 /* end confdefs.h. */
34999 #include <sys/types.h>
35000 #include <sys/stat.h>
35008 return mkdir ("conftest.dir/", 0700);
35013 if ac_fn_c_try_run "$LINENO"
35015 gl_cv_func_mkdir_trailing_slash_works=yes
35017 e) gl_cv_func_mkdir_trailing_slash_works=no ;;
35020 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35021 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35025 rm -rf conftest.dir
35029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
35030 printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
35031 case "$gl_cv_func_mkdir_trailing_slash_works" in
35038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
35039 printf %s "checking whether mkdir handles trailing dot... " >&6; }
35040 if test ${gl_cv_func_mkdir_trailing_dot_works+y}
35042 printf %s "(cached) " >&6
35044 e) rm -rf conftest.dir
35045 if test "$cross_compiling" = yes
35048 # Guess yes on glibc systems.
35049 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
35050 # Guess yes on musl systems.
35051 *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
35052 # Guess yes on systems that emulate the Linux system calls.
35053 midipix*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
35054 # Guess no on native Windows.
35055 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
35056 # If we don't know, obey --enable-cross-guesses.
35057 *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
35061 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35062 /* end confdefs.h. */
35064 #include <sys/types.h>
35065 #include <sys/stat.h>
35073 return !mkdir ("conftest.dir/./", 0700);
35078 if ac_fn_c_try_run "$LINENO"
35080 gl_cv_func_mkdir_trailing_dot_works=yes
35082 e) gl_cv_func_mkdir_trailing_dot_works=no ;;
35085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35086 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35090 rm -rf conftest.dir
35095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
35096 printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
35097 case "$gl_cv_func_mkdir_trailing_dot_works" in
35102 printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
35108 if test $REPLACE_MKDIR = 1; then
35109 GL_COND_OBJ_MKDIR_TRUE=
35110 GL_COND_OBJ_MKDIR_FALSE='#'
35112 GL_COND_OBJ_MKDIR_TRUE='#'
35113 GL_COND_OBJ_MKDIR_FALSE=
35116 if test -z "${GL_COND_OBJ_MKDIR_TRUE}" && test -z "${GL_COND_OBJ_MKDIR_FALSE}"; then
35117 GL_COND_OBJ_MKDIR_TRUE='#'
35118 GL_COND_OBJ_MKDIR_FALSE='#'
35136 printf "%s\n" "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
35144 if test $ac_cv_func_mkstemp = yes; then
35145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
35146 printf %s "checking for working mkstemp... " >&6; }
35147 if test ${gl_cv_func_working_mkstemp+y}
35149 printf %s "(cached) " >&6
35152 mkdir conftest.mkstemp
35153 if test "$cross_compiling" = yes
35156 # Guess yes on glibc systems.
35157 *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
35158 # Guess yes on musl systems.
35159 *-musl* | midipix*) gl_cv_func_working_mkstemp="guessing yes" ;;
35160 # Guess no on native Windows.
35161 mingw*) gl_cv_func_working_mkstemp="guessing no" ;;
35162 # If we don't know, obey --enable-cross-guesses.
35163 *) gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
35167 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35168 /* end confdefs.h. */
35169 $ac_includes_default
35179 off_t large = (off_t) 4294967295u;
35181 large = 2147483647;
35183 for (i = 0; i < 70; i++)
35185 char templ[] = "conftest.mkstemp/coXXXXXX";
35186 int (*mkstemp_function) (char *) = mkstemp;
35187 int fd = mkstemp_function (templ);
35193 if (lseek (fd, large, SEEK_SET) != large)
35195 if (fstat (fd, &st) < 0)
35197 else if (st.st_mode & 0077)
35208 if ac_fn_c_try_run "$LINENO"
35210 gl_cv_func_working_mkstemp=yes
35212 e) gl_cv_func_working_mkstemp=no ;;
35215 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35216 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35220 rm -rf conftest.mkstemp
35224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
35225 printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
35226 case "$gl_cv_func_working_mkstemp" in
35237 if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
35238 GL_COND_OBJ_MKSTEMP_TRUE=
35239 GL_COND_OBJ_MKSTEMP_FALSE='#'
35241 GL_COND_OBJ_MKSTEMP_TRUE='#'
35242 GL_COND_OBJ_MKSTEMP_FALSE=
35245 if test -z "${GL_COND_OBJ_MKSTEMP_TRUE}" && test -z "${GL_COND_OBJ_MKSTEMP_FALSE}"; then
35246 GL_COND_OBJ_MKSTEMP_TRUE='#'
35247 GL_COND_OBJ_MKSTEMP_FALSE='#'
35250 if test -z "$GL_COND_OBJ_MKSTEMP_TRUE"; then :
35265 GL_GNULIB_MKSTEMP=1
35271 printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
35281 if test "$gl_cv_func_working_mktime" != yes; then
35284 printf "%s\n" "#define NEED_MKTIME_WORKING 1" >>confdefs.h
35291 printf "%s\n" "#define NEED_MKTIME_WINDOWS 1" >>confdefs.h
35296 if test $REPLACE_MKTIME = 1; then
35305 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
35324 printf "%s\n" "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
35331 WANT_MKTIME_INTERNAL=0
35332 ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
35333 if test "x$ac_cv_func___mktime_internal" = xyes
35336 printf "%s\n" "#define mktime_internal __mktime_internal" >>confdefs.h
35340 e) WANT_MKTIME_INTERNAL=1
35342 printf "%s\n" "#define NEED_MKTIME_INTERNAL 1" >>confdefs.h
35349 if test $WANT_MKTIME_INTERNAL = 1; then
35358 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
35364 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
35365 GL_COND_OBJ_MSVC_INVAL_TRUE=
35366 GL_COND_OBJ_MSVC_INVAL_FALSE='#'
35368 GL_COND_OBJ_MSVC_INVAL_TRUE='#'
35369 GL_COND_OBJ_MSVC_INVAL_FALSE=
35372 if test -z "${GL_COND_OBJ_MSVC_INVAL_TRUE}" && test -z "${GL_COND_OBJ_MSVC_INVAL_FALSE}"; then
35373 GL_COND_OBJ_MSVC_INVAL_TRUE='#'
35374 GL_COND_OBJ_MSVC_INVAL_FALSE='#'
35379 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
35380 GL_COND_OBJ_MSVC_NOTHROW_TRUE=
35381 GL_COND_OBJ_MSVC_NOTHROW_FALSE='#'
35383 GL_COND_OBJ_MSVC_NOTHROW_TRUE='#'
35384 GL_COND_OBJ_MSVC_NOTHROW_FALSE=
35387 if test -z "${GL_COND_OBJ_MSVC_NOTHROW_TRUE}" && test -z "${GL_COND_OBJ_MSVC_NOTHROW_FALSE}"; then
35388 GL_COND_OBJ_MSVC_NOTHROW_TRUE='#'
35389 GL_COND_OBJ_MSVC_NOTHROW_FALSE='#'
35394 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
35403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo" >&5
35404 printf %s "checking for nl_langinfo... " >&6; }
35405 if test ${gl_cv_onwards_func_nl_langinfo+y}
35407 printf %s "(cached) " >&6
35410 exec 9>&6 6>/dev/null
35415 ac_fn_check_decl "$LINENO" "nl_langinfo" "ac_cv_have_decl_nl_langinfo" "#include <langinfo.h>
35416 " "$ac_c_undeclared_builtin_options" "CFLAGS"
35417 if test "x$ac_cv_have_decl_nl_langinfo" = xyes
35421 if test $ac_cv_have_decl_nl_langinfo = yes; then
35422 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
35423 if test "x$ac_cv_func_nl_langinfo" = xyes
35428 if test $ac_cv_func_nl_langinfo = yes; then
35429 gl_cv_onwards_func_nl_langinfo=yes
35431 gl_cv_onwards_func_nl_langinfo='future OS version'
35434 gl_cv_onwards_func_nl_langinfo='future OS version'
35440 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
35441 if test "x$ac_cv_func_nl_langinfo" = xyes
35446 gl_cv_onwards_func_nl_langinfo=$ac_cv_func_nl_langinfo
35456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_nl_langinfo" >&5
35457 printf "%s\n" "$gl_cv_onwards_func_nl_langinfo" >&6; }
35459 case "$gl_cv_onwards_func_nl_langinfo" in
35460 future*) ac_cv_func_nl_langinfo=no ;;
35461 *) ac_cv_func_nl_langinfo=$gl_cv_onwards_func_nl_langinfo ;;
35463 if test $ac_cv_func_nl_langinfo = yes; then
35465 printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
35474 if test $ac_cv_func_nl_langinfo = yes; then
35475 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
35476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
35477 printf %s "checking whether YESEXPR works... " >&6; }
35478 if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
35480 printf %s "(cached) " >&6
35482 e) if test "$cross_compiling" = yes
35486 # Guess no on irix systems.
35487 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
35488 # Guess yes elsewhere.
35489 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
35493 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35494 /* end confdefs.h. */
35495 #include <langinfo.h>
35500 return !*nl_langinfo(YESEXPR);
35506 if ac_fn_c_try_run "$LINENO"
35508 gl_cv_func_nl_langinfo_yesexpr_works=yes
35510 e) gl_cv_func_nl_langinfo_yesexpr_works=no ;;
35513 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35514 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
35522 printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
35523 case $gl_cv_func_nl_langinfo_yesexpr_works in
35524 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
35525 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
35528 printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
35530 # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
35532 solaris*) NL_LANGINFO_MTSAFE=0 ;;
35533 *) NL_LANGINFO_MTSAFE=1 ;;
35536 printf "%s\n" "#define NL_LANGINFO_MTSAFE $NL_LANGINFO_MTSAFE" >>confdefs.h
35538 if test $HAVE_LANGINFO_CODESET = 1 \
35539 && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
35540 && test $HAVE_LANGINFO_ALTMON = 1 \
35541 && test $HAVE_LANGINFO_ERA = 1 \
35542 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
35543 && test $NL_LANGINFO_MTSAFE = 1; then
35546 REPLACE_NL_LANGINFO=1
35548 printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
35553 case "$gl_cv_onwards_func_nl_langinfo" in
35554 future*) REPLACE_NL_LANGINFO=1 ;;
35557 if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
35558 LIB_NL_LANGINFO="$SETLOCALE_NULL_LIB"
35565 if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
35566 GL_COND_OBJ_NL_LANGINFO_TRUE=
35567 GL_COND_OBJ_NL_LANGINFO_FALSE='#'
35569 GL_COND_OBJ_NL_LANGINFO_TRUE='#'
35570 GL_COND_OBJ_NL_LANGINFO_FALSE=
35573 if test -z "${GL_COND_OBJ_NL_LANGINFO_TRUE}" && test -z "${GL_COND_OBJ_NL_LANGINFO_FALSE}"; then
35574 GL_COND_OBJ_NL_LANGINFO_TRUE='#'
35575 GL_COND_OBJ_NL_LANGINFO_FALSE='#'
35579 if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
35580 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE=
35581 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE='#'
35583 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE='#'
35584 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE=
35587 if test -z "${GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE}" && test -z "${GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE}"; then
35588 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE='#'
35589 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE='#'
35592 if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
35598 if test -n "$GCC"; then
35599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
35600 printf %s "checking whether the -Werror option is usable... " >&6; }
35601 if test ${gl_cv_cc_vis_werror+y}
35603 printf %s "(cached) " >&6
35605 e) gl_save_CFLAGS="$CFLAGS"
35606 CFLAGS="$CFLAGS -Werror"
35607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35608 /* end confdefs.h. */
35618 if ac_fn_c_try_compile "$LINENO"
35620 gl_cv_cc_vis_werror=yes
35622 e) gl_cv_cc_vis_werror=no ;;
35625 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35626 CFLAGS="$gl_save_CFLAGS"
35630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
35631 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
35632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
35633 printf %s "checking for simple visibility declarations... " >&6; }
35634 if test ${gl_cv_cc_visibility+y}
35636 printf %s "(cached) " >&6
35638 e) gl_save_CFLAGS="$CFLAGS"
35639 CFLAGS="$CFLAGS -fvisibility=hidden"
35640 if test $gl_cv_cc_vis_werror = yes; then
35641 CFLAGS="$CFLAGS -Werror"
35643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35644 /* end confdefs.h. */
35645 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
35646 extern __attribute__((__visibility__("default"))) int exportedvar;
35647 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
35648 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
35649 void dummyfunc (void);
35652 int hiddenfunc (void) { return 51; }
35653 int exportedfunc (void) { return 1225736919; }
35654 void dummyfunc (void) {}
35664 if ac_fn_c_try_compile "$LINENO"
35666 gl_cv_cc_visibility=yes
35668 e) gl_cv_cc_visibility=no ;;
35671 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35672 CFLAGS="$gl_save_CFLAGS"
35676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
35677 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
35678 if test $gl_cv_cc_visibility = yes; then
35679 CFLAG_VISIBILITY="-fvisibility=hidden"
35686 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
35700 GL_GNULIB_NL_LANGINFO=1
35706 printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
35713 # This defines (or not) HAVE_TZNAME and HAVE_STRUCT_TM_TM_ZONE.
35719 printf "%s\n" "#define my_strftime nstrftime" >>confdefs.h
35724 ac_cpp='$CPP $CPPFLAGS'
35725 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35726 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35727 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C nullptr" >&5
35730 printf %s "checking for C nullptr... " >&6; }
35731 if test ${gl_cv_c_nullptr+y}
35733 printf %s "(cached) " >&6
35735 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35736 /* end confdefs.h. */
35739 if ac_fn_c_try_compile "$LINENO"
35741 gl_cv_c_nullptr=yes
35743 e) gl_cv_c_nullptr=no ;;
35746 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_nullptr" >&5
35750 printf "%s\n" "$gl_cv_c_nullptr" >&6; }
35751 gl_c_nullptr=$gl_cv_c_nullptr
35753 ac_cpp='$CPP $CPPFLAGS'
35754 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35755 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35756 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35758 if test "$gl_c_nullptr" = yes; then
35760 printf "%s\n" "#define HAVE_C_NULLPTR 1" >>confdefs.h
35775 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
35780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
35781 printf %s "checking whether open recognizes a trailing slash... " >&6; }
35782 if test ${gl_cv_func_open_slash+y}
35784 printf %s "(cached) " >&6
35786 e) # Assume that if we have lstat, we can also check symlinks.
35787 if test $ac_cv_func_lstat = yes; then
35789 ln -s conftest.tmp conftest.lnk
35791 if test "$cross_compiling" = yes
35795 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
35796 gl_cv_func_open_slash="guessing no" ;;
35798 gl_cv_func_open_slash="guessing yes" ;;
35802 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35803 /* end confdefs.h. */
35807 # include <unistd.h>
35817 if (open ("conftest.lnk/", O_RDONLY) != -1)
35820 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
35825 if ac_fn_c_try_run "$LINENO"
35827 gl_cv_func_open_slash=yes
35829 e) gl_cv_func_open_slash=no ;;
35832 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35833 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35837 rm -f conftest.sl conftest.tmp conftest.lnk
35841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
35842 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
35843 case "$gl_cv_func_open_slash" in
35846 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
35851 case "$gl_cv_func_open_slash" in
35862 if test $REPLACE_OPEN = 1; then
35863 GL_COND_OBJ_OPEN_TRUE=
35864 GL_COND_OBJ_OPEN_FALSE='#'
35866 GL_COND_OBJ_OPEN_TRUE='#'
35867 GL_COND_OBJ_OPEN_FALSE=
35870 if test -z "${GL_COND_OBJ_OPEN_TRUE}" && test -z "${GL_COND_OBJ_OPEN_FALSE}"; then
35871 GL_COND_OBJ_OPEN_TRUE='#'
35872 GL_COND_OBJ_OPEN_FALSE='#'
35875 if test -z "$GL_COND_OBJ_OPEN_TRUE"; then :
35898 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
35906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Perl 5.005 or newer" >&5
35907 printf %s "checking for Perl 5.005 or newer... " >&6; }
35908 if test ${gl_cv_prog_perl+y}
35910 printf %s "(cached) " >&6
35913 if test "${PERL+set}" = set; then
35914 # 'PERL' is set in the user's environment.
35915 candidate_perl_names="$PERL"
35918 candidate_perl_names='perl perl5'
35923 for perl in $candidate_perl_names; do
35924 # Run test in a subshell; some versions of sh will print an error if
35925 # an executable is not found, even if stderr is redirected.
35926 if ( $perl -e 'require 5.005; use File::Compare; use warnings;' ) > /dev/null 2>&1; then
35927 gl_cv_prog_perl=$perl
35934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_perl" >&5
35935 printf "%s\n" "$gl_cv_prog_perl" >&6; }
35937 if test "$gl_cv_prog_perl" != no; then
35938 PERL=$gl_cv_prog_perl
35940 PERL="$am_missing_run perl"
35941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:
35942 WARNING: You don't seem to have perl5.005 or newer installed, or you lack
35943 a usable version of the Perl File::Compare module. As a result,
35944 you may be unable to run a few tests or to regenerate certain
35945 files if you modify the sources from which they are derived.
35947 printf "%s\n" "$as_me: WARNING:
35948 WARNING: You don't seem to have perl5.005 or newer installed, or you lack
35949 a usable version of the Perl File::Compare module. As a result,
35950 you may be unable to run a few tests or to regenerate certain
35951 files if you modify the sources from which they are derived.
35958 ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
35959 " "$ac_c_undeclared_builtin_options" "CFLAGS"
35960 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
35964 e) ac_have_decl=0 ;;
35967 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
35969 ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
35970 " "$ac_c_undeclared_builtin_options" "CFLAGS"
35971 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
35975 e) ac_have_decl=0 ;;
35978 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
35982 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
35986 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
35998 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
35999 if test "x$ac_cv_func_raise" = xyes
36001 printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
36005 if test $ac_cv_func_raise = no; then
36010 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
36018 HAVE_POSIX_SIGNALBLOCKING=0
36019 if test "$gl_cv_type_sigset_t" = yes; then
36020 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
36021 if test "x$ac_cv_func_sigprocmask" = xyes
36023 HAVE_POSIX_SIGNALBLOCKING=1
36028 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
36035 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
36036 GL_COND_OBJ_RAISE_TRUE=
36037 GL_COND_OBJ_RAISE_FALSE='#'
36039 GL_COND_OBJ_RAISE_TRUE='#'
36040 GL_COND_OBJ_RAISE_FALSE=
36043 if test -z "${GL_COND_OBJ_RAISE_TRUE}" && test -z "${GL_COND_OBJ_RAISE_FALSE}"; then
36044 GL_COND_OBJ_RAISE_TRUE='#'
36045 GL_COND_OBJ_RAISE_FALSE='#'
36048 if test -z "$GL_COND_OBJ_RAISE_TRUE"; then :
36068 printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
36076 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
36077 if test "x$ac_cv_func_rawmemchr" = xyes
36079 printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
36083 if test $ac_cv_func_rawmemchr = no; then
36088 if test $HAVE_RAWMEMCHR = 0; then
36089 GL_COND_OBJ_RAWMEMCHR_TRUE=
36090 GL_COND_OBJ_RAWMEMCHR_FALSE='#'
36092 GL_COND_OBJ_RAWMEMCHR_TRUE='#'
36093 GL_COND_OBJ_RAWMEMCHR_FALSE=
36096 if test -z "${GL_COND_OBJ_RAWMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_RAWMEMCHR_FALSE}"; then
36097 GL_COND_OBJ_RAWMEMCHR_TRUE='#'
36098 GL_COND_OBJ_RAWMEMCHR_FALSE='#'
36101 if test -z "$GL_COND_OBJ_RAWMEMCHR_TRUE"; then :
36120 GL_GNULIB_RAWMEMCHR=1
36126 printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
36133 if test $ac_cv_func_readlink = no; then
36136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
36137 printf %s "checking whether readlink signature is correct... " >&6; }
36138 if test ${gl_cv_decl_readlink_works+y}
36140 printf %s "(cached) " >&6
36142 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36143 /* end confdefs.h. */
36144 #include <unistd.h>
36145 /* Cause compilation failure if original declaration has wrong type. */
36146 ssize_t readlink (const char *, char *, size_t);
36155 if ac_fn_c_try_compile "$LINENO"
36157 gl_cv_decl_readlink_works=yes
36159 e) gl_cv_decl_readlink_works=no ;;
36162 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
36165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
36166 printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
36167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
36168 printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
36169 if test ${gl_cv_func_readlink_trailing_slash+y}
36171 printf %s "(cached) " >&6
36173 e) # We have readlink, so assume ln -s works.
36174 ln -s conftest.no-such conftest.link
36175 ln -s conftest.link conftest.lnk2
36176 if test "$cross_compiling" = yes
36179 # Guess yes on Linux or glibc systems.
36180 linux-* | linux | *-gnu* | gnu*)
36181 gl_cv_func_readlink_trailing_slash="guessing yes" ;;
36182 # Guess yes on systems that emulate the Linux system calls.
36184 gl_cv_func_readlink_trailing_slash="guessing yes" ;;
36185 # Guess no on AIX or HP-UX.
36187 gl_cv_func_readlink_trailing_slash="guessing no" ;;
36188 # If we don't know, obey --enable-cross-guesses.
36190 gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
36194 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36195 /* end confdefs.h. */
36196 #include <unistd.h>
36202 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
36207 if ac_fn_c_try_run "$LINENO"
36209 gl_cv_func_readlink_trailing_slash=yes
36211 e) gl_cv_func_readlink_trailing_slash=no ;;
36214 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36215 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
36219 rm -f conftest.link conftest.lnk2 ;;
36222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
36223 printf "%s\n" "$gl_cv_func_readlink_trailing_slash" >&6; }
36224 case "$gl_cv_func_readlink_trailing_slash" in
36226 if test "$gl_cv_decl_readlink_works" != yes; then
36232 printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
36238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
36239 printf %s "checking whether readlink truncates results correctly... " >&6; }
36240 if test ${gl_cv_func_readlink_truncate+y}
36242 printf %s "(cached) " >&6
36244 e) # We have readlink, so assume ln -s works.
36245 ln -s ab conftest.link
36246 if test "$cross_compiling" = yes
36249 # Guess yes on Linux or glibc systems.
36250 linux-* | linux | *-gnu* | gnu*)
36251 gl_cv_func_readlink_truncate="guessing yes" ;;
36252 # Guess yes on systems that emulate the Linux system calls.
36254 gl_cv_func_readlink_truncate="guessing yes" ;;
36255 # Guess no on AIX or HP-UX.
36257 gl_cv_func_readlink_truncate="guessing no" ;;
36258 # If we don't know, obey --enable-cross-guesses.
36260 gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
36264 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36265 /* end confdefs.h. */
36266 #include <unistd.h>
36272 return readlink ("conftest.link", &c, 1) != 1;
36277 if ac_fn_c_try_run "$LINENO"
36279 gl_cv_func_readlink_truncate=yes
36281 e) gl_cv_func_readlink_truncate=no ;;
36284 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36285 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
36289 rm -f conftest.link conftest.lnk2 ;;
36292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
36293 printf "%s\n" "$gl_cv_func_readlink_truncate" >&6; }
36294 case $gl_cv_func_readlink_truncate in
36296 if test "$gl_cv_decl_readlink_works" != yes; then
36302 printf "%s\n" "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
36310 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
36311 GL_COND_OBJ_READLINK_TRUE=
36312 GL_COND_OBJ_READLINK_FALSE='#'
36314 GL_COND_OBJ_READLINK_TRUE='#'
36315 GL_COND_OBJ_READLINK_FALSE=
36318 if test -z "${GL_COND_OBJ_READLINK_TRUE}" && test -z "${GL_COND_OBJ_READLINK_FALSE}"; then
36319 GL_COND_OBJ_READLINK_TRUE='#'
36320 GL_COND_OBJ_READLINK_FALSE='#'
36323 if test -z "$GL_COND_OBJ_READLINK_TRUE"; then :
36339 GL_GNULIB_READLINK=1
36345 printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
36352 if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 0; then
36354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realloc (0, 0) returns nonnull" >&5
36355 printf %s "checking whether realloc (0, 0) returns nonnull... " >&6; }
36356 if test ${ac_cv_func_realloc_0_nonnull+y}
36358 printf %s "(cached) " >&6
36360 e) if test "$cross_compiling" = yes
36363 # Guess yes on platforms where we know the result.
36364 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
36365 | gnu* | *-musl* | midipix* | midnightbsd* \
36366 | hpux* | solaris* | cygwin* | mingw* | msys* )
36367 ac_cv_func_realloc_0_nonnull="guessing yes" ;;
36368 # If we don't know, obey --enable-cross-guesses.
36369 *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
36373 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36374 /* end confdefs.h. */
36375 #include <stdlib.h>
36380 void *p = realloc (0, 0);
36389 if ac_fn_c_try_run "$LINENO"
36391 ac_cv_func_realloc_0_nonnull=yes
36393 e) ac_cv_func_realloc_0_nonnull=no ;;
36396 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36397 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
36404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
36405 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
36406 case $ac_cv_func_realloc_0_nonnull in #(
36410 REPLACE_REALLOC_FOR_REALLOC_GNU=1 ;;
36415 if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
36424 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
36436 GL_GNULIB_REALLOC_GNU=1
36442 printf "%s\n" "#define GNULIB_TEST_REALLOC_GNU 1" >>confdefs.h
36449 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
36450 REPLACE_REALLOC_FOR_REALLOC_POSIX=1
36453 if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
36462 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
36474 GL_GNULIB_REALLOC_POSIX=1
36480 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
36491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
36492 printf %s "checking for reallocarray... " >&6; }
36493 if test ${gl_cv_onwards_func_reallocarray+y}
36495 printf %s "(cached) " >&6
36498 exec 9>&6 6>/dev/null
36503 ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "#include <stdlib.h>
36504 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36505 if test "x$ac_cv_have_decl_reallocarray" = xyes
36509 if test $ac_cv_have_decl_reallocarray = yes; then
36510 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
36511 if test "x$ac_cv_func_reallocarray" = xyes
36516 if test $ac_cv_func_reallocarray = yes; then
36517 gl_cv_onwards_func_reallocarray=yes
36519 gl_cv_onwards_func_reallocarray='future OS version'
36522 gl_cv_onwards_func_reallocarray='future OS version'
36528 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
36529 if test "x$ac_cv_func_reallocarray" = xyes
36534 gl_cv_onwards_func_reallocarray=$ac_cv_func_reallocarray
36544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_reallocarray" >&5
36545 printf "%s\n" "$gl_cv_onwards_func_reallocarray" >&6; }
36547 case "$gl_cv_onwards_func_reallocarray" in
36548 future*) ac_cv_func_reallocarray=no ;;
36549 *) ac_cv_func_reallocarray=$gl_cv_onwards_func_reallocarray ;;
36551 if test $ac_cv_func_reallocarray = yes; then
36553 printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
36558 if test "$ac_cv_func_reallocarray" = no; then
36559 HAVE_REALLOCARRAY=0
36560 case "$gl_cv_onwards_func_reallocarray" in
36561 future*) REPLACE_REALLOCARRAY=1 ;;
36563 elif test "$gl_cv_malloc_ptrdiff" = no; then
36564 REPLACE_REALLOCARRAY=1
36568 if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then
36569 GL_COND_OBJ_REALLOCARRAY_TRUE=
36570 GL_COND_OBJ_REALLOCARRAY_FALSE='#'
36572 GL_COND_OBJ_REALLOCARRAY_TRUE='#'
36573 GL_COND_OBJ_REALLOCARRAY_FALSE=
36576 if test -z "${GL_COND_OBJ_REALLOCARRAY_TRUE}" && test -z "${GL_COND_OBJ_REALLOCARRAY_FALSE}"; then
36577 GL_COND_OBJ_REALLOCARRAY_TRUE='#'
36578 GL_COND_OBJ_REALLOCARRAY_FALSE='#'
36581 if test -z "$GL_COND_OBJ_REALLOCARRAY_TRUE"; then :
36588 printf "%s\n" "#define GNULIB_REALLOCARRAY 1" >>confdefs.h
36600 GL_GNULIB_REALLOCARRAY=1
36606 printf "%s\n" "#define GNULIB_TEST_REALLOCARRAY 1" >>confdefs.h
36612 # Check whether --with-included-regex was given.
36613 if test ${with_included_regex+y}
36615 withval=$with_included_regex;
36619 case $with_included_regex in #(
36620 yes|no) ac_use_included_regex=$with_included_regex
36623 # If the system regex support is good enough that it passes the
36624 # following run test, then default to *not* using the included regex.c.
36625 # If cross compiling, assume the test would fail and use the included
36629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
36630 printf %s "checking for working re_compile_pattern... " >&6; }
36631 if test ${gl_cv_func_re_compile_pattern_working+y}
36633 printf %s "(cached) " >&6
36635 e) if test "$cross_compiling" = yes
36638 # Guess no on native Windows.
36639 mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
36640 # Otherwise obey --enable-cross-guesses.
36641 *) gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
36645 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36646 /* end confdefs.h. */
36649 #include <locale.h>
36650 #include <limits.h>
36651 #include <string.h>
36653 #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
36654 # include <signal.h>
36655 # include <unistd.h>
36659 # include <malloc.h>
36662 #ifdef M_CHECK_ACTION
36663 /* Exit with distinguishable exit code. */
36664 static void sigabrt_no_core (int sig) { raise (SIGTERM); }
36671 static struct re_pattern_buffer regex;
36672 unsigned char folded_chars[UCHAR_MAX + 1];
36675 struct re_registers regs;
36677 /* Some builds of glibc go into an infinite loop on this
36678 test. Use alarm to force death, and mallopt to avoid
36679 malloc recursion in diagnosing the corrupted heap. */
36680 #if HAVE_DECL_ALARM
36681 signal (SIGALRM, SIG_DFL);
36684 #ifdef M_CHECK_ACTION
36685 signal (SIGABRT, sigabrt_no_core);
36686 mallopt (M_CHECK_ACTION, 2);
36689 if (setlocale (LC_ALL, "en_US.UTF-8"))
36692 /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
36693 This test needs valgrind to catch the bug on Debian
36694 GNU/Linux 3.1 x86, but it might catch the bug better
36695 on other platforms and it shouldn't hurt to try the
36697 static char const pat[] = "insert into";
36698 static char const data[] =
36699 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
36700 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
36702 memset (®ex, 0, sizeof regex);
36703 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
36708 if (re_search (®ex, data, sizeof data - 1,
36709 0, sizeof data - 1, ®s)
36717 /* This test is from glibc bug 15078.
36718 The test case is from Andreas Schwab in
36719 <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
36721 static char const pat[] = "[^x]x";
36722 static char const data[] =
36723 /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
36734 memset (®ex, 0, sizeof regex);
36735 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
36740 i = re_search (®ex, data, sizeof data - 1,
36741 0, sizeof data - 1, 0);
36742 if (i != 0 && i != 21)
36748 if (! setlocale (LC_ALL, "C"))
36752 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
36753 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
36754 memset (®ex, 0, sizeof regex);
36755 s = re_compile_pattern ("a[^x]b", 6, ®ex);
36760 /* This should fail, but succeeds for glibc-2.5. */
36761 if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1)
36766 /* This regular expression is from Spencer ere test number 75
36768 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
36769 memset (®ex, 0, sizeof regex);
36770 for (i = 0; i <= UCHAR_MAX; i++)
36771 folded_chars[i] = i;
36772 regex.translate = folded_chars;
36773 s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex);
36774 /* This should fail with _Invalid character class name_ error. */
36781 /* Ensure that [b-a] is diagnosed as invalid, when
36782 using RE_NO_EMPTY_RANGES. */
36783 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
36784 memset (®ex, 0, sizeof regex);
36785 s = re_compile_pattern ("a[b-a]", 6, ®ex);
36792 /* This should succeed, but does not for glibc-2.1.3. */
36793 memset (®ex, 0, sizeof regex);
36794 s = re_compile_pattern ("{1", 2, ®ex);
36800 /* The following example is derived from a problem report
36801 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
36802 memset (®ex, 0, sizeof regex);
36803 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
36808 /* This should match, but does not for glibc-2.2.1. */
36809 if (re_match (®ex, "an", 2, 0, ®s) != 2)
36819 memset (®ex, 0, sizeof regex);
36820 s = re_compile_pattern ("x", 1, ®ex);
36825 /* glibc-2.2.93 does not work with a negative RANGE argument. */
36826 if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
36836 /* The version of regex.c in older versions of gnulib
36837 ignored RE_ICASE. Detect that problem too. */
36838 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
36839 memset (®ex, 0, sizeof regex);
36840 s = re_compile_pattern ("x", 1, ®ex);
36845 if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0)
36855 /* Catch a bug reported by Vin Shelton in
36856 https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
36858 re_set_syntax (RE_SYNTAX_POSIX_BASIC
36859 & ~RE_CONTEXT_INVALID_DUP
36860 & ~RE_NO_EMPTY_RANGES);
36861 memset (®ex, 0, sizeof regex);
36862 s = re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, ®ex);
36868 /* REG_STARTEND was added to glibc on 2004-01-15.
36869 Reject older versions. */
36870 if (! REG_STARTEND)
36873 /* Matching with the compiled form of this regexp would provoke
36874 an assertion failure prior to glibc-2.28:
36875 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
36876 With glibc-2.28, compilation fails and reports the invalid
36878 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
36879 memset (®ex, 0, sizeof regex);
36880 s = re_compile_pattern ("0|()0|\\\\1|0", 10, ®ex);
36883 memset (®s, 0, sizeof regs);
36884 i = re_search (®ex, "x", 1, 0, 1, ®s);
36896 if (strcmp (s, "Invalid back reference"))
36900 /* glibc bug 11053. */
36901 re_set_syntax (RE_SYNTAX_POSIX_BASIC);
36902 memset (®ex, 0, sizeof regex);
36903 static char const pat_sub2[] = "\\\\(a*\\\\)*a*\\\\1";
36904 s = re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, ®ex);
36909 memset (®s, 0, sizeof regs);
36910 static char const data[] = "a";
36911 int datalen = sizeof data - 1;
36912 i = re_search (®ex, data, datalen, 0, datalen, ®s);
36915 else if (regs.num_regs < 2)
36917 else if (! (regs.start[0] == 0 && regs.end[0] == 1))
36919 else if (! (regs.start[1] == 0 && regs.end[1] == 0))
36927 /* It would be nice to reject hosts whose regoff_t values are too
36928 narrow (including glibc on hosts with 64-bit ptrdiff_t and
36929 32-bit int), but we should wait until glibc implements this
36930 feature. Otherwise, support for equivalence classes and
36931 multibyte collation symbols would always be broken except
36932 when compiling --without-included-regex. */
36933 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
36934 || sizeof (regoff_t) < sizeof (ssize_t))
36944 if ac_fn_c_try_run "$LINENO"
36946 gl_cv_func_re_compile_pattern_working=yes
36948 e) gl_cv_func_re_compile_pattern_working=no ;;
36951 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36952 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
36959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
36960 printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
36961 case "$gl_cv_func_re_compile_pattern_working" in #(
36962 *yes) ac_use_included_regex=no;; #(
36963 *no) ac_use_included_regex=yes;;
36966 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
36970 if test $ac_use_included_regex = yes; then
36972 printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
36975 printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
36978 printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
36981 printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
36984 printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
36987 printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
36990 printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
36993 printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
36996 printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
36999 printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
37002 printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
37005 printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
37008 printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
37011 printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
37014 printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
37017 printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
37020 printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
37025 if test $ac_use_included_regex = yes; then
37026 GL_COND_OBJ_REGEX_TRUE=
37027 GL_COND_OBJ_REGEX_FALSE='#'
37029 GL_COND_OBJ_REGEX_TRUE='#'
37030 GL_COND_OBJ_REGEX_FALSE=
37033 if test -z "${GL_COND_OBJ_REGEX_TRUE}" && test -z "${GL_COND_OBJ_REGEX_FALSE}"; then
37034 GL_COND_OBJ_REGEX_TRUE='#'
37035 GL_COND_OBJ_REGEX_FALSE='#'
37038 if test -z "$GL_COND_OBJ_REGEX_TRUE"; then :
37046 ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
37047 if test "x$ac_cv_header_libintl_h" = xyes
37049 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
37054 ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
37055 " "$ac_c_undeclared_builtin_options" "CFLAGS"
37056 if test "x$ac_cv_have_decl_isblank" = xyes
37060 e) ac_have_decl=0 ;;
37063 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
37070 if test $ac_cv_func_setenv = no; then
37073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
37074 printf %s "checking whether setenv validates arguments... " >&6; }
37075 if test ${gl_cv_func_setenv_works+y}
37077 printf %s "(cached) " >&6
37079 e) if test "$cross_compiling" = yes
37082 # Guess yes on glibc systems.
37083 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
37084 # Guess yes on musl systems.
37085 *-musl* | midipix*) gl_cv_func_setenv_works="guessing yes" ;;
37086 # If we don't know, obey --enable-cross-guesses.
37087 *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
37091 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37092 /* end confdefs.h. */
37094 #include <stdlib.h>
37096 #include <string.h>
37104 if (setenv ("", "", 0) != -1)
37106 else if (errno != EINVAL)
37110 if (setenv ("a", "=", 1) != 0)
37112 else if (strcmp (getenv ("a"), "=") != 0)
37121 if ac_fn_c_try_run "$LINENO"
37123 gl_cv_func_setenv_works=yes
37125 e) gl_cv_func_setenv_works=no ;;
37128 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37129 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
37135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
37136 printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
37137 case "$gl_cv_func_setenv_works" in
37146 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
37147 GL_COND_OBJ_SETENV_TRUE=
37148 GL_COND_OBJ_SETENV_FALSE='#'
37150 GL_COND_OBJ_SETENV_TRUE='#'
37151 GL_COND_OBJ_SETENV_FALSE=
37154 if test -z "${GL_COND_OBJ_SETENV_TRUE}" && test -z "${GL_COND_OBJ_SETENV_FALSE}"; then
37155 GL_COND_OBJ_SETENV_TRUE='#'
37156 GL_COND_OBJ_SETENV_FALSE='#'
37174 printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
37183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
37184 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
37185 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
37187 printf %s "(cached) " >&6
37189 e) case "$host_os" in
37190 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku.
37191 *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku*)
37192 gl_cv_func_setlocale_null_all_mtsafe=no ;;
37193 # Guess no on Cygwin < 3.4.6.
37195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37196 /* end confdefs.h. */
37198 #if defined __CYGWIN__
37199 #include <cygwin/version.h>
37200 #if CYGWIN_VERSION_DLL_COMBINED >= CYGWIN_VERSION_DLL_MAKE_COMBINED (3004, 6)
37206 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37207 $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
37209 gl_cv_func_setlocale_null_all_mtsafe=yes
37211 e) gl_cv_func_setlocale_null_all_mtsafe=no ;;
37217 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
37218 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
37219 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
37220 # If we don't know, obey --enable-cross-guesses.
37222 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
37227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
37228 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
37232 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
37233 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
37237 case "$gl_cv_func_setlocale_null_all_mtsafe" in
37238 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
37239 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
37242 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
37245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
37246 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
37247 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
37249 printf %s "(cached) " >&6
37251 e) case "$host_os" in
37252 # Guess no on OpenBSD, AIX.
37254 gl_cv_func_setlocale_null_one_mtsafe=no ;;
37255 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
37256 *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
37257 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
37258 # If we don't know, obey --enable-cross-guesses.
37260 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
37265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
37266 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
37270 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
37271 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
37275 case "$gl_cv_func_setlocale_null_one_mtsafe" in
37276 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
37277 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
37280 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
37283 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
37285 mingw*) SETLOCALE_NULL_LIB= ;;
37289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
37290 printf %s "checking whether imported symbols can be declared weak... " >&6; }
37291 if test ${gl_cv_have_weak+y}
37293 printf %s "(cached) " >&6
37295 e) case "$host_os" in
37297 gl_cv_have_weak="guessing no"
37301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37302 /* end confdefs.h. */
37303 extern void xyzzy ();
37313 if ac_fn_c_try_link "$LINENO"
37315 gl_cv_have_weak=maybe
37317 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37318 conftest$ac_exeext conftest.$ac_ext
37319 if test $gl_cv_have_weak = maybe; then
37320 if test "$cross_compiling" = yes
37322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37323 /* end confdefs.h. */
37325 Extensible Linking Format
37329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37330 $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
37332 gl_cv_have_weak="guessing yes"
37334 e) gl_cv_have_weak="guessing no" ;;
37341 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37342 /* end confdefs.h. */
37348 return (fputs == NULL);
37351 if ac_fn_c_try_run "$LINENO"
37353 gl_cv_have_weak=yes
37355 e) gl_cv_have_weak=no ;;
37358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37359 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
37366 case " $LDFLAGS " in
37367 *" -static "*) gl_cv_have_weak=no ;;
37369 case "$gl_cv_have_weak" in
37372 freebsd* | dragonfly* | midnightbsd*)
37374 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
37375 cat <<EOF > conftest2.c
37376 #include <pthread.h>
37377 #pragma weak pthread_mutexattr_gettype
37380 return (pthread_mutexattr_gettype != NULL);
37383 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
37384 || gl_cv_have_weak=no
37385 rm -f conftest1.c libempty.so conftest2.c conftest
37393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
37394 printf "%s\n" "$gl_cv_have_weak" >&6; }
37395 case "$gl_cv_have_weak" in
37398 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
37403 case "$gl_cv_have_weak" in
37404 *yes) SETLOCALE_NULL_LIB= ;;
37405 *) SETLOCALE_NULL_LIB="$LIBPTHREAD" ;;
37410 SETLOCALE_NULL_LIB=
37413 LIB_SETLOCALE_NULL="$SETLOCALE_NULL_LIB"
37417 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
37418 GL_COND_OBJ_SETLOCALE_LOCK_TRUE=
37419 GL_COND_OBJ_SETLOCALE_LOCK_FALSE='#'
37421 GL_COND_OBJ_SETLOCALE_LOCK_TRUE='#'
37422 GL_COND_OBJ_SETLOCALE_LOCK_FALSE=
37425 if test -z "${GL_COND_OBJ_SETLOCALE_LOCK_TRUE}" && test -z "${GL_COND_OBJ_SETLOCALE_LOCK_FALSE}"; then
37426 GL_COND_OBJ_SETLOCALE_LOCK_TRUE='#'
37427 GL_COND_OBJ_SETLOCALE_LOCK_FALSE='#'
37430 if test -z "$GL_COND_OBJ_SETLOCALE_LOCK_TRUE"; then :
37437 if test -n "$GCC"; then
37438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
37439 printf %s "checking whether the -Werror option is usable... " >&6; }
37440 if test ${gl_cv_cc_vis_werror+y}
37442 printf %s "(cached) " >&6
37444 e) gl_save_CFLAGS="$CFLAGS"
37445 CFLAGS="$CFLAGS -Werror"
37446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37447 /* end confdefs.h. */
37457 if ac_fn_c_try_compile "$LINENO"
37459 gl_cv_cc_vis_werror=yes
37461 e) gl_cv_cc_vis_werror=no ;;
37464 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37465 CFLAGS="$gl_save_CFLAGS"
37469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
37470 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
37471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
37472 printf %s "checking for simple visibility declarations... " >&6; }
37473 if test ${gl_cv_cc_visibility+y}
37475 printf %s "(cached) " >&6
37477 e) gl_save_CFLAGS="$CFLAGS"
37478 CFLAGS="$CFLAGS -fvisibility=hidden"
37479 if test $gl_cv_cc_vis_werror = yes; then
37480 CFLAGS="$CFLAGS -Werror"
37482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37483 /* end confdefs.h. */
37484 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
37485 extern __attribute__((__visibility__("default"))) int exportedvar;
37486 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
37487 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
37488 void dummyfunc (void);
37491 int hiddenfunc (void) { return 51; }
37492 int exportedfunc (void) { return 1225736919; }
37493 void dummyfunc (void) {}
37503 if ac_fn_c_try_compile "$LINENO"
37505 gl_cv_cc_visibility=yes
37507 e) gl_cv_cc_visibility=no ;;
37510 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37511 CFLAGS="$gl_save_CFLAGS"
37515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
37516 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
37517 if test $gl_cv_cc_visibility = yes; then
37518 CFLAG_VISIBILITY="-fvisibility=hidden"
37525 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
37540 GL_GNULIB_SETLOCALE_NULL=1
37546 printf "%s\n" "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
37561 HAVE_POSIX_SIGNALBLOCKING=0
37562 if test "$gl_cv_type_sigset_t" = yes; then
37563 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
37564 if test "x$ac_cv_func_sigprocmask" = xyes
37566 HAVE_POSIX_SIGNALBLOCKING=1
37572 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
37573 GL_COND_OBJ_SIGPROCMASK_TRUE=
37574 GL_COND_OBJ_SIGPROCMASK_FALSE='#'
37576 GL_COND_OBJ_SIGPROCMASK_TRUE='#'
37577 GL_COND_OBJ_SIGPROCMASK_FALSE=
37580 if test -z "${GL_COND_OBJ_SIGPROCMASK_TRUE}" && test -z "${GL_COND_OBJ_SIGPROCMASK_FALSE}"; then
37581 GL_COND_OBJ_SIGPROCMASK_TRUE='#'
37582 GL_COND_OBJ_SIGPROCMASK_FALSE='#'
37585 if test -z "$GL_COND_OBJ_SIGPROCMASK_TRUE"; then :
37599 GL_GNULIB_SIGPROCMASK=1
37605 printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
37610 if test $gl_sigsegv_uses_libsigsegv = yes; then
37611 GL_GENERATE_SIGSEGV_H=false
37613 GL_GENERATE_SIGSEGV_H=true
37619 case "$GL_GENERATE_SIGSEGV_H" in
37620 false) SIGSEGV_H='' ;;
37622 if test -z "$SIGSEGV_H"; then
37623 SIGSEGV_H="${gl_source_base_prefix}sigsegv.h"
37626 *) echo "*** GL_GENERATE_SIGSEGV_H is not set correctly" 1>&2; exit 1 ;;
37630 if $GL_GENERATE_SIGSEGV_H; then
37631 GL_GENERATE_SIGSEGV_H_TRUE=
37632 GL_GENERATE_SIGSEGV_H_FALSE='#'
37634 GL_GENERATE_SIGSEGV_H_TRUE='#'
37635 GL_GENERATE_SIGSEGV_H_FALSE=
37638 if test -z "${GL_GENERATE_SIGSEGV_H_TRUE}" && test -z "${GL_GENERATE_SIGSEGV_H_FALSE}"; then
37639 GL_GENERATE_SIGSEGV_H_TRUE='#'
37640 GL_GENERATE_SIGSEGV_H_FALSE='#'
37648 if $GL_GENERATE_SIGSEGV_H; then
37655 printf "%s\n" "#define SOLARIS11 1" >>confdefs.h
37662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack direction" >&5
37663 printf %s "checking for stack direction... " >&6; }
37664 if test ${sv_cv_stack_direction_msg+y}
37666 printf %s "(cached) " >&6
37669 case "$host_cpu" in
37673 arc | arceb | arc32 | arc64 | \
37674 arm* | strongarm* | xscale* | \
37677 c1 | c2 | c32 | c34 | c38 | \
37708 nios2 | nios2eb | nios2el | \
37714 powerpc* | rs6000 | \
37730 sv_cv_stack_direction=-1 ;;
37734 hppa* | parisc* | \
37737 sv_cv_stack_direction=1 ;;
37739 if test $cross_compiling = no; then
37740 cat > conftest.c <<EOF
37743 find_stack_direction (int *addr, int depth)
37745 int dir, dummy = 0;
37748 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
37749 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
37750 return dir + dummy;
37753 main (int argc, char *argv[])
37755 printf ("%d\n", find_stack_direction (NULL, argc + 20));
37759 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37760 (eval $ac_link) 2>&5
37762 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37763 test $ac_status = 0; }
37764 sv_cv_stack_direction=`./conftest`
37766 sv_cv_stack_direction=0
37770 case $sv_cv_stack_direction in
37771 1) sv_cv_stack_direction_msg="grows up";;
37772 -1) sv_cv_stack_direction_msg="grows down";;
37773 *) sv_cv_stack_direction_msg="unknown";;
37778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_stack_direction_msg" >&5
37779 printf "%s\n" "$sv_cv_stack_direction_msg" >&6; }
37781 printf "%s\n" "#define STACK_DIRECTION $sv_cv_stack_direction" >>confdefs.h
37790 if test "$ac_cv_func_sigaltstack" = yes; then
37791 ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "
37792 #include <signal.h>
37793 #if HAVE_SYS_SIGNAL_H
37794 # include <sys/signal.h>
37798 if test "x$ac_cv_type_stack_t" = xyes
37803 printf "%s\n" "#define stack_t struct sigaltstack" >>confdefs.h
37811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sigaltstack" >&5
37812 printf %s "checking for working sigaltstack... " >&6; }
37813 if test ${sv_cv_sigaltstack+y}
37815 printf %s "(cached) " >&6
37818 if test "$ac_cv_func_sigaltstack" = yes; then
37820 macos* | darwin[6-9]* | darwin[1-9][0-9]*)
37821 # On MacOS X 10.2 or newer, just assume that if it compiles, it will
37822 # work. If we were to perform the real test, 1 Crash Report dialog
37823 # window would pop up.
37824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37825 /* end confdefs.h. */
37827 #include <signal.h>
37831 int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
37836 if ac_fn_c_try_link "$LINENO"
37838 sv_cv_sigaltstack="guessing yes"
37840 e) sv_cv_sigaltstack=no ;;
37843 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37844 conftest$ac_exeext conftest.$ac_ext
37847 if test "$cross_compiling" = yes
37852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37853 /* end confdefs.h. */
37855 #include <signal.h>
37859 int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
37864 if ac_fn_c_try_link "$LINENO"
37866 sv_cv_sigaltstack="guessing yes"
37868 e) sv_cv_sigaltstack=no ;;
37871 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37872 conftest$ac_exeext conftest.$ac_ext
37877 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37878 /* end confdefs.h. */
37881 #include <stdlib.h>
37882 #include <signal.h>
37883 #if HAVE_SYS_SIGNAL_H
37884 # include <sys/signal.h>
37887 # include <sys/types.h>
37888 # include <sys/time.h>
37889 # include <sys/resource.h>
37891 void stackoverflow_handler (int sig)
37893 /* If we get here, the stack overflow was caught. */
37896 volatile int * recurse_1 (volatile int n, volatile int *p)
37899 *recurse_1 (n + 1, p) += n;
37902 int recurse (volatile int n)
37905 return *recurse_1 (n, &sum);
37907 char mystack[2 * (1 << 24)];
37911 struct sigaction action;
37912 #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK
37913 /* Before starting the endless recursion, try to be friendly to the user's
37914 machine. On some Linux 2.2.x systems, there is no stack limit for user
37915 processes at all. We don't want to kill such systems. */
37917 rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
37918 setrlimit (RLIMIT_STACK, &rl);
37920 /* Install the alternate stack. Use the midpoint of mystack, to guard
37921 against a buggy interpretation of ss_sp on IRIX. */
37923 if (sizeof mystack / 2 < SIGSTKSZ)
37926 altstack.ss_sp = mystack + sizeof mystack / 2;
37927 altstack.ss_size = sizeof mystack / 2;
37928 altstack.ss_flags = 0; /* no SS_DISABLE */
37929 if (sigaltstack (&altstack, NULL) < 0)
37931 /* Install the SIGSEGV handler. */
37932 sigemptyset (&action.sa_mask);
37933 action.sa_handler = &stackoverflow_handler;
37934 action.sa_flags = SA_ONSTACK;
37935 sigaction (SIGSEGV, &action, (struct sigaction *) NULL);
37936 sigaction (SIGBUS, &action, (struct sigaction *) NULL);
37937 /* Provoke a stack overflow. */
37942 if ac_fn_c_try_run "$LINENO"
37944 sv_cv_sigaltstack=yes
37946 e) sv_cv_sigaltstack=no ;;
37949 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37950 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
37957 sv_cv_sigaltstack=no
37962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack" >&5
37963 printf "%s\n" "$sv_cv_sigaltstack" >&6; }
37964 if test "$sv_cv_sigaltstack" != no; then
37966 printf "%s\n" "#define HAVE_WORKING_SIGALTSTACK 1" >>confdefs.h
37969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
37970 printf %s "checking for correct stack_t interpretation... " >&6; }
37971 if test ${sv_cv_sigaltstack_low_base+y}
37973 printf %s "(cached) " >&6
37976 if test "$cross_compiling" = yes
37980 irix5*) sv_cv_sigaltstack_low_base="no" ;;
37981 *) sv_cv_sigaltstack_low_base="guessing yes" ;;
37985 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37986 /* end confdefs.h. */
37989 #include <stdlib.h>
37990 #include <signal.h>
37991 #if HAVE_SYS_SIGNAL_H
37992 # include <sys/signal.h>
37994 volatile char *stack_lower_bound;
37995 volatile char *stack_upper_bound;
37996 static void check_stack_location (volatile char *addr)
37998 if (addr >= stack_lower_bound && addr <= stack_upper_bound)
38003 static void stackoverflow_handler (int sig)
38006 check_stack_location (&dummy);
38008 char mystack[2 * (1 << 24)];
38012 struct sigaction action;
38013 /* Install the alternate stack. */
38014 altstack.ss_sp = mystack + sizeof mystack / 2;
38015 altstack.ss_size = sizeof mystack / 2;
38016 stack_lower_bound = (char *) altstack.ss_sp;
38017 stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
38018 altstack.ss_flags = 0; /* no SS_DISABLE */
38019 if (sigaltstack (&altstack, NULL) < 0)
38021 /* Install the SIGSEGV handler. */
38022 sigemptyset (&action.sa_mask);
38023 action.sa_handler = &stackoverflow_handler;
38024 action.sa_flags = SA_ONSTACK;
38025 if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
38027 /* Provoke a SIGSEGV. */
38032 if ac_fn_c_try_run "$LINENO"
38034 sv_cv_sigaltstack_low_base=yes
38036 e) sv_cv_sigaltstack_low_base=no ;;
38039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38040 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack_low_base" >&5
38048 printf "%s\n" "$sv_cv_sigaltstack_low_base" >&6; }
38049 if test "$sv_cv_sigaltstack_low_base" = no; then
38051 printf "%s\n" "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
38059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
38060 printf %s "checking for ssize_t... " >&6; }
38061 if test ${gt_cv_ssize_t+y}
38063 printf %s "(cached) " >&6
38065 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38066 /* end confdefs.h. */
38067 #include <sys/types.h>
38071 int x = sizeof (ssize_t *) + sizeof (ssize_t);
38077 if ac_fn_c_try_compile "$LINENO"
38081 e) gt_cv_ssize_t=no ;;
38084 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
38088 printf "%s\n" "$gt_cv_ssize_t" >&6; }
38089 if test $gt_cv_ssize_t = no; then
38091 printf "%s\n" "#define ssize_t int" >>confdefs.h
38104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
38105 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
38106 if test ${gl_cv_func_stat_file_slash+y}
38108 printf %s "(cached) " >&6
38110 e) touch conftest.tmp
38111 # Assume that if we have lstat, we can also check symlinks.
38112 if test $ac_cv_func_lstat = yes; then
38113 ln -s conftest.tmp conftest.lnk
38115 if test "$cross_compiling" = yes
38118 # Guess yes on Linux systems.
38119 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
38120 # Guess yes on systems that emulate the Linux system calls.
38121 midipix*) gl_cv_func_stat_file_slash="guessing yes" ;;
38122 # Guess yes on glibc systems.
38123 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
38124 # If we don't know, obey --enable-cross-guesses.
38125 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
38129 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38130 /* end confdefs.h. */
38131 #include <sys/stat.h>
38138 if (!stat ("conftest.tmp/", &st))
38141 if (!stat ("conftest.lnk/", &st))
38150 if ac_fn_c_try_run "$LINENO"
38152 gl_cv_func_stat_file_slash=yes
38154 e) gl_cv_func_stat_file_slash=no ;;
38157 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38158 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38162 rm -f conftest.tmp conftest.lnk ;;
38165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
38166 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
38167 case $gl_cv_func_stat_file_slash in
38171 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
38182 if test $REPLACE_STAT = 1; then
38183 GL_COND_OBJ_STAT_TRUE=
38184 GL_COND_OBJ_STAT_FALSE='#'
38186 GL_COND_OBJ_STAT_TRUE='#'
38187 GL_COND_OBJ_STAT_FALSE=
38190 if test -z "${GL_COND_OBJ_STAT_TRUE}" && test -z "${GL_COND_OBJ_STAT_FALSE}"; then
38191 GL_COND_OBJ_STAT_TRUE='#'
38192 GL_COND_OBJ_STAT_FALSE='#'
38195 if test -z "$GL_COND_OBJ_STAT_TRUE"; then :
38207 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
38233 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
38241 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>
38242 #include <sys/stat.h>
38244 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
38247 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
38249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
38250 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
38251 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
38253 printf %s "(cached) " >&6
38255 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38256 /* end confdefs.h. */
38258 #include <sys/types.h>
38259 #include <sys/stat.h>
38260 #if HAVE_SYS_TIME_H
38261 # include <sys/time.h>
38264 struct timespec ts;
38277 if ac_fn_c_try_compile "$LINENO"
38279 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
38281 e) ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no ;;
38284 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
38288 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
38289 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
38291 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
38295 e) 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>
38296 #include <sys/stat.h>
38298 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
38301 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
38305 e) ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
38306 #include <sys/stat.h>
38308 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
38311 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
38315 e) 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>
38316 #include <sys/stat.h>
38318 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
38321 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
38339 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>
38340 #include <sys/stat.h>
38342 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
38345 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
38349 e) ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
38350 #include <sys/stat.h>
38352 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
38355 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
38359 e) 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>
38360 #include <sys/stat.h>
38362 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
38365 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
38378 GL_GENERATE_STDARG_H=false
38379 NEXT_STDARG_H='<stdarg.h>'
38380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
38381 printf %s "checking for va_copy... " >&6; }
38382 if test ${gl_cv_func_va_copy+y}
38384 printf %s "(cached) " >&6
38386 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38387 /* end confdefs.h. */
38388 #include <stdarg.h>
38394 void (*func) (va_list, va_list) = va_copy;
38401 if ac_fn_c_try_compile "$LINENO"
38403 gl_cv_func_va_copy=yes
38405 e) gl_cv_func_va_copy=no ;;
38408 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
38413 printf "%s\n" "$gl_cv_func_va_copy" >&6; }
38414 if test $gl_cv_func_va_copy = no; then
38415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38416 /* end confdefs.h. */
38417 #if defined _AIX && !defined __GNUC__
38422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38423 $EGREP_TRADITIONAL "vaccine" >/dev/null 2>&1
38432 if test $gl_aixcc = yes; then
38433 GL_GENERATE_STDARG_H=true
38442 if test $gl_cv_have_include_next = yes; then
38443 gl_cv_next_stdarg_h='<'stdarg.h'>'
38445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
38446 printf %s "checking absolute name of <stdarg.h>... " >&6; }
38447 if test ${gl_cv_next_stdarg_h+y}
38449 printf %s "(cached) " >&6
38454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38455 /* end confdefs.h. */
38456 #include <stdarg.h>
38459 aix*) gl_absname_cpp="$ac_cpp -C" ;;
38460 *) gl_absname_cpp="$ac_cpp" ;;
38465 gl_dirsep_regex='[/\\]'
38468 gl_dirsep_regex='\/'
38471 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
38472 gl_header_literal_regex=`echo 'stdarg.h' \
38473 | sed -e "$gl_make_literal_regex_sed"`
38474 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
38475 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
38481 gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
38482 sed -n "$gl_absolute_header_sed"`
38484 gl_header=$gl_cv_absolute_stdarg_h
38485 gl_cv_next_stdarg_h='"'$gl_header'"'
38490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
38491 printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
38493 NEXT_STDARG_H=$gl_cv_next_stdarg_h
38495 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
38496 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
38497 gl_next_as_first_directive='<'stdarg.h'>'
38499 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
38500 gl_next_as_first_directive=$gl_cv_next_stdarg_h
38502 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
38507 if test "$gl_cv_next_stdarg_h" = '""'; then
38508 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
38509 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
38514 exec 9>&6 6>/dev/null
38516 if test ${gl_cv_func___va_copy+y}
38518 printf %s "(cached) " >&6
38521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38522 /* end confdefs.h. */
38523 #include <stdarg.h>
38536 if ac_fn_c_try_compile "$LINENO"
38538 gl_cv_func___va_copy=yes
38540 e) gl_cv_func___va_copy=no ;;
38543 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38551 if test $gl_cv_func___va_copy = yes; then
38553 printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
38558 printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
38569 case "$GL_GENERATE_STDARG_H" in
38570 false) STDARG_H='' ;;
38572 if test -z "$STDARG_H"; then
38573 STDARG_H="${gl_source_base_prefix}stdarg.h"
38576 *) echo "*** GL_GENERATE_STDARG_H is not set correctly" 1>&2; exit 1 ;;
38580 if $GL_GENERATE_STDARG_H; then
38581 GL_GENERATE_STDARG_H_TRUE=
38582 GL_GENERATE_STDARG_H_FALSE='#'
38584 GL_GENERATE_STDARG_H_TRUE='#'
38585 GL_GENERATE_STDARG_H_FALSE=
38588 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
38589 GL_GENERATE_STDARG_H_TRUE='#'
38590 GL_GENERATE_STDARG_H_FALSE='#'
38599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bool, true, false" >&5
38600 printf %s "checking for bool, true, false... " >&6; }
38601 if test ${gl_cv_c_bool+y}
38603 printf %s "(cached) " >&6
38605 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38606 /* end confdefs.h. */
38609 #error "true == false"
38612 bool b = true == false;
38614 if ac_fn_c_try_compile "$LINENO"
38618 e) gl_cv_c_bool=no ;;
38621 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_bool" >&5
38625 printf "%s\n" "$gl_cv_c_bool" >&6; }
38626 if test "$gl_cv_c_bool" = yes; then
38628 printf "%s\n" "#define HAVE_C_BOOL 1" >>confdefs.h
38637 if test $ac_cv_header_stdckdint_h = yes; then
38638 GL_GENERATE_STDCKDINT_H=false
38640 GL_GENERATE_STDCKDINT_H=true
38646 case "$GL_GENERATE_STDCKDINT_H" in
38647 false) STDCKDINT_H='' ;;
38649 if test -z "$STDCKDINT_H"; then
38650 STDCKDINT_H="${gl_source_base_prefix}stdckdint.h"
38653 *) echo "*** GL_GENERATE_STDCKDINT_H is not set correctly" 1>&2; exit 1 ;;
38657 if $GL_GENERATE_STDCKDINT_H; then
38658 GL_GENERATE_STDCKDINT_H_TRUE=
38659 GL_GENERATE_STDCKDINT_H_FALSE='#'
38661 GL_GENERATE_STDCKDINT_H_TRUE='#'
38662 GL_GENERATE_STDCKDINT_H_FALSE=
38665 if test -z "${GL_GENERATE_STDCKDINT_H_TRUE}" && test -z "${GL_GENERATE_STDCKDINT_H_FALSE}"; then
38666 GL_GENERATE_STDCKDINT_H_TRUE='#'
38667 GL_GENERATE_STDCKDINT_H_FALSE='#'
38685 case "$GL_GENERATE_STDDEF_H" in
38686 false) STDDEF_H='' ;;
38688 if test -z "$STDDEF_H"; then
38689 STDDEF_H="${gl_source_base_prefix}stddef.h"
38692 *) echo "*** GL_GENERATE_STDDEF_H is not set correctly" 1>&2; exit 1 ;;
38696 if $GL_GENERATE_STDDEF_H; then
38697 GL_GENERATE_STDDEF_H_TRUE=
38698 GL_GENERATE_STDDEF_H_FALSE='#'
38700 GL_GENERATE_STDDEF_H_TRUE='#'
38701 GL_GENERATE_STDDEF_H_FALSE=
38704 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
38705 GL_GENERATE_STDDEF_H_TRUE='#'
38706 GL_GENERATE_STDDEF_H_FALSE='#'
38719 case "$GL_GENERATE_STDINT_H" in
38720 false) STDINT_H='' ;;
38722 if test -z "$STDINT_H"; then
38723 STDINT_H="${gl_source_base_prefix}stdint.h"
38726 *) echo "*** GL_GENERATE_STDINT_H is not set correctly" 1>&2; exit 1 ;;
38730 if $GL_GENERATE_STDINT_H; then
38731 GL_GENERATE_STDINT_H_TRUE=
38732 GL_GENERATE_STDINT_H_FALSE='#'
38734 GL_GENERATE_STDINT_H_TRUE='#'
38735 GL_GENERATE_STDINT_H_FALSE=
38738 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
38739 GL_GENERATE_STDINT_H_TRUE='#'
38740 GL_GENERATE_STDINT_H_FALSE='#'
38751 case "$GL_GENERATE_LIMITS_H" in
38752 false) LIMITS_H='' ;;
38754 if test -z "$LIMITS_H"; then
38755 LIMITS_H="${gl_source_base_prefix}limits.h"
38758 *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
38762 if $GL_GENERATE_LIMITS_H; then
38763 GL_GENERATE_LIMITS_H_TRUE=
38764 GL_GENERATE_LIMITS_H_FALSE='#'
38766 GL_GENERATE_LIMITS_H_TRUE='#'
38767 GL_GENERATE_LIMITS_H_FALSE=
38770 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
38771 GL_GENERATE_LIMITS_H_TRUE='#'
38772 GL_GENERATE_LIMITS_H_FALSE='#'
38788 if test $REPLACE_STDIO_READ_FUNCS = 1; then
38789 GL_COND_OBJ_STDIO_READ_TRUE=
38790 GL_COND_OBJ_STDIO_READ_FALSE='#'
38792 GL_COND_OBJ_STDIO_READ_TRUE='#'
38793 GL_COND_OBJ_STDIO_READ_FALSE=
38796 if test -z "${GL_COND_OBJ_STDIO_READ_TRUE}" && test -z "${GL_COND_OBJ_STDIO_READ_FALSE}"; then
38797 GL_COND_OBJ_STDIO_READ_TRUE='#'
38798 GL_COND_OBJ_STDIO_READ_FALSE='#'
38802 if test $REPLACE_STDIO_WRITE_FUNCS = 1; then
38803 GL_COND_OBJ_STDIO_WRITE_TRUE=
38804 GL_COND_OBJ_STDIO_WRITE_FALSE='#'
38806 GL_COND_OBJ_STDIO_WRITE_TRUE='#'
38807 GL_COND_OBJ_STDIO_WRITE_FALSE=
38810 if test -z "${GL_COND_OBJ_STDIO_WRITE_TRUE}" && test -z "${GL_COND_OBJ_STDIO_WRITE_FALSE}"; then
38811 GL_COND_OBJ_STDIO_WRITE_TRUE='#'
38812 GL_COND_OBJ_STDIO_WRITE_FALSE='#'
38830 printf "%s\n" "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
38836 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
38854 printf "%s\n" "#define GNULIB_TEST_SCANF 1" >>confdefs.h
38860 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
38878 printf "%s\n" "#define GNULIB_TEST_FGETC 1" >>confdefs.h
38897 printf "%s\n" "#define GNULIB_TEST_GETC 1" >>confdefs.h
38910 GL_GNULIB_GETCHAR=1
38916 printf "%s\n" "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
38935 printf "%s\n" "#define GNULIB_TEST_FGETS 1" >>confdefs.h
38954 printf "%s\n" "#define GNULIB_TEST_FREAD 1" >>confdefs.h
38967 GL_GNULIB_FPRINTF=1
38973 printf "%s\n" "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
38992 printf "%s\n" "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
39005 GL_GNULIB_VFPRINTF=1
39011 printf "%s\n" "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
39024 GL_GNULIB_VPRINTF=1
39030 printf "%s\n" "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
39049 printf "%s\n" "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
39068 printf "%s\n" "#define GNULIB_TEST_PUTC 1" >>confdefs.h
39081 GL_GNULIB_PUTCHAR=1
39087 printf "%s\n" "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
39106 printf "%s\n" "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
39125 printf "%s\n" "#define GNULIB_TEST_PUTS 1" >>confdefs.h
39144 printf "%s\n" "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
39163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stpcpy" >&5
39164 printf %s "checking for stpcpy... " >&6; }
39165 if test ${gl_cv_onwards_func_stpcpy+y}
39167 printf %s "(cached) " >&6
39170 exec 9>&6 6>/dev/null
39175 ac_fn_check_decl "$LINENO" "stpcpy" "ac_cv_have_decl_stpcpy" "#include <string.h>
39176 " "$ac_c_undeclared_builtin_options" "CFLAGS"
39177 if test "x$ac_cv_have_decl_stpcpy" = xyes
39181 if test $ac_cv_have_decl_stpcpy = yes; then
39182 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
39183 if test "x$ac_cv_func_stpcpy" = xyes
39188 if test $ac_cv_func_stpcpy = yes; then
39189 gl_cv_onwards_func_stpcpy=yes
39191 gl_cv_onwards_func_stpcpy='future OS version'
39194 gl_cv_onwards_func_stpcpy='future OS version'
39200 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
39201 if test "x$ac_cv_func_stpcpy" = xyes
39206 gl_cv_onwards_func_stpcpy=$ac_cv_func_stpcpy
39216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_stpcpy" >&5
39217 printf "%s\n" "$gl_cv_onwards_func_stpcpy" >&6; }
39219 case "$gl_cv_onwards_func_stpcpy" in
39220 future*) ac_cv_func_stpcpy=no ;;
39221 *) ac_cv_func_stpcpy=$gl_cv_onwards_func_stpcpy ;;
39223 if test $ac_cv_func_stpcpy = yes; then
39225 printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
39230 if test $ac_cv_func_stpcpy = no; then
39232 case "$gl_cv_onwards_func_stpcpy" in
39233 future*) REPLACE_STPCPY=1 ;;
39238 if test $HAVE_STPCPY = 0 || test $REPLACE_STPCPY = 1; then
39239 GL_COND_OBJ_STPCPY_TRUE=
39240 GL_COND_OBJ_STPCPY_FALSE='#'
39242 GL_COND_OBJ_STPCPY_TRUE='#'
39243 GL_COND_OBJ_STPCPY_FALSE=
39246 if test -z "${GL_COND_OBJ_STPCPY_TRUE}" && test -z "${GL_COND_OBJ_STPCPY_FALSE}"; then
39247 GL_COND_OBJ_STPCPY_TRUE='#'
39248 GL_COND_OBJ_STPCPY_FALSE='#'
39251 if test -z "$GL_COND_OBJ_STPCPY_TRUE"; then :
39278 printf "%s\n" "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
39285 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
39286 if test "x$ac_cv_func_strcasecmp" = xyes
39288 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
39292 if test $ac_cv_func_strcasecmp = no; then
39298 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
39299 if test "x$ac_cv_func_strncasecmp" = xyes
39301 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
39305 if test $ac_cv_func_strncasecmp = yes; then
39310 ac_fn_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
39311 if test "x$ac_cv_have_decl_strncasecmp" = xyes
39315 e) ac_have_decl=0 ;;
39318 printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h
39320 if test $ac_cv_have_decl_strncasecmp = no; then
39321 HAVE_DECL_STRNCASECMP=0
39326 if test $HAVE_STRCASECMP = 0; then
39327 GL_COND_OBJ_STRCASECMP_TRUE=
39328 GL_COND_OBJ_STRCASECMP_FALSE='#'
39330 GL_COND_OBJ_STRCASECMP_TRUE='#'
39331 GL_COND_OBJ_STRCASECMP_FALSE=
39334 if test -z "${GL_COND_OBJ_STRCASECMP_TRUE}" && test -z "${GL_COND_OBJ_STRCASECMP_FALSE}"; then
39335 GL_COND_OBJ_STRCASECMP_TRUE='#'
39336 GL_COND_OBJ_STRCASECMP_FALSE='#'
39339 if test -z "$GL_COND_OBJ_STRCASECMP_TRUE"; then :
39347 if test $HAVE_STRNCASECMP = 0; then
39348 GL_COND_OBJ_STRNCASECMP_TRUE=
39349 GL_COND_OBJ_STRNCASECMP_FALSE='#'
39351 GL_COND_OBJ_STRNCASECMP_TRUE='#'
39352 GL_COND_OBJ_STRNCASECMP_FALSE=
39355 if test -z "${GL_COND_OBJ_STRNCASECMP_TRUE}" && test -z "${GL_COND_OBJ_STRNCASECMP_FALSE}"; then
39356 GL_COND_OBJ_STRNCASECMP_TRUE='#'
39357 GL_COND_OBJ_STRNCASECMP_FALSE='#'
39360 if test -z "$GL_COND_OBJ_STRNCASECMP_TRUE"; then :
39374 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
39375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
39376 printf %s "checking for working strerror function... " >&6; }
39377 if test ${gl_cv_func_working_strerror+y}
39379 printf %s "(cached) " >&6
39381 e) if test "$cross_compiling" = yes
39384 # Guess yes on glibc systems.
39385 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
39386 # Guess yes on musl systems.
39387 *-musl* | midipix*) gl_cv_func_working_strerror="guessing yes" ;;
39388 # If we don't know, obey --enable-cross-guesses.
39389 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
39393 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39394 /* end confdefs.h. */
39395 #include <string.h>
39400 if (!*strerror (-2)) return 1;
39405 if ac_fn_c_try_run "$LINENO"
39407 gl_cv_func_working_strerror=yes
39409 e) gl_cv_func_working_strerror=no ;;
39412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39413 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
39420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
39421 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
39422 case "$gl_cv_func_working_strerror" in
39429 case "$gl_cv_func_strerror_r_works" in
39430 *no) REPLACE_STRERROR=1 ;;
39438 if test $REPLACE_STRERROR = 1; then
39439 GL_COND_OBJ_STRERROR_TRUE=
39440 GL_COND_OBJ_STRERROR_FALSE='#'
39442 GL_COND_OBJ_STRERROR_TRUE='#'
39443 GL_COND_OBJ_STRERROR_FALSE=
39446 if test -z "${GL_COND_OBJ_STRERROR_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_FALSE}"; then
39447 GL_COND_OBJ_STRERROR_TRUE='#'
39448 GL_COND_OBJ_STRERROR_FALSE='#'
39453 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
39470 GL_GNULIB_STRERROR=1
39476 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
39483 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
39484 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE=
39485 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#'
39487 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#'
39488 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE=
39491 if test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_FALSE}"; then
39492 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#'
39493 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#'
39496 if test -z "$GL_COND_OBJ_STRERROR_OVERRIDE_TRUE"; then :
39502 if test $ac_cv_header_sys_socket_h != yes; then
39503 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
39504 if test "x$ac_cv_header_winsock2_h" = xyes
39506 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
39511 if test "$ac_cv_header_winsock2_h" = yes; then
39513 UNISTD_H_HAVE_WINSOCK2_H=1
39514 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
39522 if test $gl_cond_libtool = false; then
39523 gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
39524 gl_libdeps="$gl_libdeps $LIBICONV"
39551 if test $ac_cv_have_decl_strnlen = no; then
39552 HAVE_DECL_STRNLEN=0
39555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
39556 printf %s "checking for working strnlen... " >&6; }
39557 if test ${ac_cv_func_strnlen_working+y}
39559 printf %s "(cached) " >&6
39561 e) if test "$cross_compiling" = yes
39563 # Guess no on AIX systems, yes otherwise.
39565 aix*) ac_cv_func_strnlen_working=no;;
39566 *) ac_cv_func_strnlen_working=yes;;
39569 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39570 /* end confdefs.h. */
39571 $ac_includes_default
39577 #define S_LEN (sizeof S - 1)
39579 /* At least one implementation is buggy: that of AIX 4.3 would
39580 give strnlen (S, 1) == 3. */
39583 for (i = 0; i < S_LEN + 1; ++i)
39585 int expected = i <= S_LEN ? i : S_LEN;
39586 if (strnlen (S, i) != expected)
39595 if ac_fn_c_try_run "$LINENO"
39597 ac_cv_func_strnlen_working=yes
39599 e) ac_cv_func_strnlen_working=no ;;
39602 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39603 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
39609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
39610 printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
39611 test $ac_cv_func_strnlen_working = no && :
39614 if test $ac_cv_func_strnlen_working = no; then
39620 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
39621 GL_COND_OBJ_STRNLEN_TRUE=
39622 GL_COND_OBJ_STRNLEN_FALSE='#'
39624 GL_COND_OBJ_STRNLEN_TRUE='#'
39625 GL_COND_OBJ_STRNLEN_FALSE=
39628 if test -z "${GL_COND_OBJ_STRNLEN_TRUE}" && test -z "${GL_COND_OBJ_STRNLEN_FALSE}"; then
39629 GL_COND_OBJ_STRNLEN_TRUE='#'
39630 GL_COND_OBJ_STRNLEN_FALSE='#'
39633 if test -z "$GL_COND_OBJ_STRNLEN_TRUE"; then :
39652 GL_GNULIB_STRNLEN=1
39658 printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
39666 if test $ac_cv_func_strptime != yes; then
39671 if test $HAVE_STRPTIME = 0; then
39672 GL_COND_OBJ_STRPTIME_TRUE=
39673 GL_COND_OBJ_STRPTIME_FALSE='#'
39675 GL_COND_OBJ_STRPTIME_TRUE='#'
39676 GL_COND_OBJ_STRPTIME_FALSE=
39679 if test -z "${GL_COND_OBJ_STRPTIME_TRUE}" && test -z "${GL_COND_OBJ_STRPTIME_FALSE}"; then
39680 GL_COND_OBJ_STRPTIME_TRUE='#'
39681 GL_COND_OBJ_STRPTIME_FALSE='#'
39684 if test -z "$GL_COND_OBJ_STRPTIME_TRUE"; then :
39701 GL_GNULIB_STRPTIME=1
39707 printf "%s\n" "#define GNULIB_TEST_STRPTIME 1" >>confdefs.h
39716 if test "$ac_cv_have_decl_strtoimax" != yes; then
39717 HAVE_DECL_STRTOIMAX=0
39720 if test "$ac_cv_func_strtoimax" = yes; then
39722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
39723 printf %s "checking whether strtoimax works... " >&6; }
39724 if test ${gl_cv_func_strtoimax+y}
39726 printf %s "(cached) " >&6
39728 e) if test "$cross_compiling" = yes
39731 # Guess no on AIX 5.
39732 aix5*) gl_cv_func_strtoimax="guessing no" ;;
39733 # Guess yes on native Windows.
39734 mingw*) gl_cv_func_strtoimax="guessing yes" ;;
39735 # Guess yes otherwise.
39736 *) gl_cv_func_strtoimax="guessing yes" ;;
39740 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39741 /* end confdefs.h. */
39744 #include <string.h>
39745 #include <inttypes.h>
39748 if (sizeof (intmax_t) > sizeof (int))
39750 const char *s = "4294967295";
39754 res = strtoimax (s, &p, 10);
39755 if (p != s + strlen (s))
39759 if (res != (intmax_t) 65535 * (intmax_t) 65537)
39764 const char *s = "2147483647";
39768 res = strtoimax (s, &p, 10);
39769 if (p != s + strlen (s))
39773 if (res != 2147483647)
39780 if ac_fn_c_try_run "$LINENO"
39782 gl_cv_func_strtoimax=yes
39784 e) gl_cv_func_strtoimax=no ;;
39787 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39788 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
39795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
39796 printf "%s\n" "$gl_cv_func_strtoimax" >&6; }
39797 case "$gl_cv_func_strtoimax" in
39798 *no) REPLACE_STRTOIMAX=1 ;;
39801 if test "$ac_cv_have_decl_strtoimax" = yes; then
39802 # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
39803 REPLACE_STRTOIMAX=1
39809 if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
39810 GL_COND_OBJ_STRTOIMAX_TRUE=
39811 GL_COND_OBJ_STRTOIMAX_FALSE='#'
39813 GL_COND_OBJ_STRTOIMAX_TRUE='#'
39814 GL_COND_OBJ_STRTOIMAX_FALSE=
39817 if test -z "${GL_COND_OBJ_STRTOIMAX_TRUE}" && test -z "${GL_COND_OBJ_STRTOIMAX_FALSE}"; then
39818 GL_COND_OBJ_STRTOIMAX_TRUE='#'
39819 GL_COND_OBJ_STRTOIMAX_FALSE='#'
39822 if test -z "$GL_COND_OBJ_STRTOIMAX_TRUE"; then :
39825 ac_fn_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
39826 if test "x$ac_cv_have_decl_strtoll" = xyes
39830 e) ac_have_decl=0 ;;
39833 printf "%s\n" "#define HAVE_DECL_STRTOLL $ac_have_decl" >>confdefs.h
39847 GL_GNULIB_STRTOIMAX=1
39855 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
39856 if test "x$ac_cv_func_strtoll" = xyes
39858 printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
39862 if test $ac_cv_func_strtoll = yes; then
39863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoll works" >&5
39864 printf %s "checking whether strtoll works... " >&6; }
39865 if test ${gl_cv_func_strtoll_works+y}
39867 printf %s "(cached) " >&6
39869 e) if test "$cross_compiling" = yes
39872 # Guess no on native Windows.
39873 mingw*) gl_cv_func_strtoll_works="guessing no" ;;
39874 # Guess no on glibc systems.
39875 *-gnu* | gnu*) gl_cv_func_strtoll_works="guessing no" ;;
39876 # Guess no on musl systems.
39877 *-musl* | midipix*) gl_cv_func_strtoll_works="guessing no" ;;
39878 *) gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
39882 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39883 /* end confdefs.h. */
39884 #include <stdlib.h>
39890 /* This test fails on Minix and native Windows. */
39892 const char input[] = "0x";
39893 (void) strtoll (input, &term, 16);
39894 if (term != input + 1)
39897 /* This test fails on pre-C23 platforms. */
39899 const char input[] = "0b1";
39900 (void) strtoll (input, &term, 2);
39901 if (term != input + 3)
39911 if ac_fn_c_try_run "$LINENO"
39913 gl_cv_func_strtoll_works=yes
39915 e) gl_cv_func_strtoll_works=no ;;
39918 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39919 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
39926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoll_works" >&5
39927 printf "%s\n" "$gl_cv_func_strtoll_works" >&6; }
39928 case "$gl_cv_func_strtoll_works" in
39930 *) REPLACE_STRTOLL=1 ;;
39937 if test $HAVE_STRTOLL = 0 || test $REPLACE_STRTOLL = 1; then
39938 GL_COND_OBJ_STRTOLL_TRUE=
39939 GL_COND_OBJ_STRTOLL_FALSE='#'
39941 GL_COND_OBJ_STRTOLL_TRUE='#'
39942 GL_COND_OBJ_STRTOLL_FALSE=
39945 if test -z "${GL_COND_OBJ_STRTOLL_TRUE}" && test -z "${GL_COND_OBJ_STRTOLL_FALSE}"; then
39946 GL_COND_OBJ_STRTOLL_TRUE='#'
39947 GL_COND_OBJ_STRTOLL_FALSE='#'
39950 if test -z "$GL_COND_OBJ_STRTOLL_TRUE"; then :
39966 GL_GNULIB_STRTOLL=1
39972 printf "%s\n" "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h
40019 printf "%s\n" "#define GNULIB_TEMPNAME 1" >>confdefs.h
40036 ac_fn_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
40037 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
40038 been included before. */
40039 #if defined __MINGW32__
40040 # include <unistd.h>
40044 " "$ac_c_undeclared_builtin_options" "CFLAGS"
40045 if test "x$ac_cv_have_decl_localtime_r" = xyes
40049 e) ac_have_decl=0 ;;
40052 printf "%s\n" "#define HAVE_DECL_LOCALTIME_R $ac_have_decl" >>confdefs.h
40054 if test $ac_cv_have_decl_localtime_r = no; then
40055 HAVE_DECL_LOCALTIME_R=0
40059 if test $ac_cv_func_localtime_r = yes; then
40061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
40062 printf %s "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
40063 if test ${gl_cv_time_r_posix+y}
40065 printf %s "(cached) " >&6
40067 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40068 /* end confdefs.h. */
40069 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
40070 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
40071 been included before. */
40072 #if defined __MINGW32__
40073 # include <unistd.h>
40080 /* We don't need to append 'restrict's to the argument types,
40081 even though the POSIX signature has the 'restrict's,
40082 since C99 says they can't affect type compatibility. */
40083 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
40085 /* Check the return type is a pointer.
40086 On HP-UX 10 it is 'int'. */
40087 *localtime_r (0, 0);
40093 if ac_fn_c_try_compile "$LINENO"
40095 gl_cv_time_r_posix=yes
40097 e) gl_cv_time_r_posix=no ;;
40100 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
40105 printf "%s\n" "$gl_cv_time_r_posix" >&6; }
40106 if test $gl_cv_time_r_posix = yes; then
40107 REPLACE_LOCALTIME_R=0
40109 REPLACE_LOCALTIME_R=1
40113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
40114 printf %s "checking whether localtime_r exists as an inline function... " >&6; }
40115 if test ${gl_cv_func_localtime_r_inline+y}
40117 printf %s "(cached) " >&6
40119 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40120 /* end confdefs.h. */
40121 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
40122 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
40123 been included before. */
40124 #if defined __MINGW32__
40125 # include <unistd.h>
40134 localtime_r (&a, &r);
40141 if ac_fn_c_try_link "$LINENO"
40143 gl_cv_func_localtime_r_inline=yes
40145 e) gl_cv_func_localtime_r_inline=no ;;
40148 rm -f core conftest.err conftest.$ac_objext conftest.beam \
40149 conftest$ac_exeext conftest.$ac_ext
40153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
40154 printf "%s\n" "$gl_cv_func_localtime_r_inline" >&6; }
40155 if test $gl_cv_func_localtime_r_inline = yes; then
40156 REPLACE_LOCALTIME_R=1
40161 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
40162 GL_COND_OBJ_TIME_R_TRUE=
40163 GL_COND_OBJ_TIME_R_FALSE='#'
40165 GL_COND_OBJ_TIME_R_TRUE='#'
40166 GL_COND_OBJ_TIME_R_FALSE=
40169 if test -z "${GL_COND_OBJ_TIME_R_TRUE}" && test -z "${GL_COND_OBJ_TIME_R_FALSE}"; then
40170 GL_COND_OBJ_TIME_R_TRUE='#'
40171 GL_COND_OBJ_TIME_R_FALSE='#'
40174 if test -z "$GL_COND_OBJ_TIME_R_TRUE"; then :
40196 printf "%s\n" "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
40205 # On Mac OS X 10.6, localtime loops forever with some time_t values.
40206 # See Bug#27706, Bug#27736, and
40207 # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
40208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime works even near extrema" >&5
40209 printf %s "checking whether localtime works even near extrema... " >&6; }
40210 if test ${gl_cv_func_localtime_works+y}
40212 printf %s "(cached) " >&6
40214 e) gl_cv_func_localtime_works=yes
40215 if test "$cross_compiling" = yes
40217 gl_cv_func_localtime_works="guessing yes"
40219 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40220 /* end confdefs.h. */
40221 #include <stdlib.h>
40222 #include <string.h>
40223 #include <unistd.h>
40230 time_t t = -67768038400666600;
40232 char *tz = getenv ("TZ");
40233 if (! (tz && strcmp (tz, "QQQ0") == 0))
40236 tm = localtime (&t);
40237 /* Use TM and *TM to suppress over-optimization. */
40238 return tm && tm->tm_isdst;
40244 if ac_fn_c_try_run "$LINENO"
40246 (TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
40247 gl_cv_func_localtime_works=no
40249 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40250 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_works" >&5
40257 printf "%s\n" "$gl_cv_func_localtime_works" >&6; }
40258 if test "$gl_cv_func_localtime_works" = no; then
40260 printf "%s\n" "#define HAVE_LOCALTIME_INFLOOP_BUG 1" >>confdefs.h
40264 ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include <time.h>
40266 if test "x$ac_cv_type_timezone_t" = xyes
40269 printf "%s\n" "#define HAVE_TIMEZONE_T 1" >>confdefs.h
40274 if test "$ac_cv_type_timezone_t" = yes; then
40279 if test $HAVE_TIMEZONE_T = 0; then
40280 GL_COND_OBJ_TIME_RZ_TRUE=
40281 GL_COND_OBJ_TIME_RZ_FALSE='#'
40283 GL_COND_OBJ_TIME_RZ_TRUE='#'
40284 GL_COND_OBJ_TIME_RZ_FALSE=
40287 if test -z "${GL_COND_OBJ_TIME_RZ_TRUE}" && test -z "${GL_COND_OBJ_TIME_RZ_FALSE}"; then
40288 GL_COND_OBJ_TIME_RZ_TRUE='#'
40289 GL_COND_OBJ_TIME_RZ_FALSE='#'
40301 GL_GNULIB_TIME_RZ=1
40307 printf "%s\n" "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
40317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timegm" >&5
40318 printf %s "checking for timegm... " >&6; }
40319 if test ${gl_cv_onwards_func_timegm+y}
40321 printf %s "(cached) " >&6
40324 exec 9>&6 6>/dev/null
40329 ac_fn_check_decl "$LINENO" "timegm" "ac_cv_have_decl_timegm" "#include <time.h>
40330 " "$ac_c_undeclared_builtin_options" "CFLAGS"
40331 if test "x$ac_cv_have_decl_timegm" = xyes
40335 if test $ac_cv_have_decl_timegm = yes; then
40336 ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
40337 if test "x$ac_cv_func_timegm" = xyes
40342 if test $ac_cv_func_timegm = yes; then
40343 gl_cv_onwards_func_timegm=yes
40345 gl_cv_onwards_func_timegm='future OS version'
40348 gl_cv_onwards_func_timegm='future OS version'
40354 ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
40355 if test "x$ac_cv_func_timegm" = xyes
40360 gl_cv_onwards_func_timegm=$ac_cv_func_timegm
40370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_timegm" >&5
40371 printf "%s\n" "$gl_cv_onwards_func_timegm" >&6; }
40373 case "$gl_cv_onwards_func_timegm" in
40374 future*) ac_cv_func_timegm=no ;;
40375 *) ac_cv_func_timegm=$gl_cv_onwards_func_timegm ;;
40377 if test $ac_cv_func_timegm = yes; then
40379 printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
40384 if test $ac_cv_func_timegm = yes; then
40385 if test "$gl_cv_func_working_mktime" != yes; then
40386 # Assume that timegm is buggy if mktime is.
40391 case "$gl_cv_onwards_func_timegm" in
40392 future*) REPLACE_TIMEGM=1 ;;
40397 if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
40398 GL_COND_OBJ_TIMEGM_TRUE=
40399 GL_COND_OBJ_TIMEGM_FALSE='#'
40401 GL_COND_OBJ_TIMEGM_TRUE='#'
40402 GL_COND_OBJ_TIMEGM_FALSE=
40405 if test -z "${GL_COND_OBJ_TIMEGM_TRUE}" && test -z "${GL_COND_OBJ_TIMEGM_FALSE}"; then
40406 GL_COND_OBJ_TIMEGM_TRUE='#'
40407 GL_COND_OBJ_TIMEGM_FALSE='#'
40410 if test -z "$GL_COND_OBJ_TIMEGM_TRUE"; then :
40432 printf "%s\n" "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h
40442 mingw*) REPLACE_TZSET=1 ;;
40446 if test $REPLACE_TZSET = 1; then
40447 GL_COND_OBJ_TZSET_TRUE=
40448 GL_COND_OBJ_TZSET_FALSE='#'
40450 GL_COND_OBJ_TZSET_TRUE='#'
40451 GL_COND_OBJ_TZSET_FALSE=
40454 if test -z "${GL_COND_OBJ_TZSET_TRUE}" && test -z "${GL_COND_OBJ_TZSET_FALSE}"; then
40455 GL_COND_OBJ_TZSET_TRUE='#'
40456 GL_COND_OBJ_TZSET_FALSE='#'
40474 printf "%s\n" "#define GNULIB_TEST_TZSET 1" >>confdefs.h
40487 if { test "$HAVE_LIBUNISTRING" != yes \
40492 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
40493 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
40494 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
40495 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
40496 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
40506 if test -z "$LIBUNISTRING_UNISTR_H"; then
40507 LIBUNISTRING_UNISTR_H="${gl_source_base_prefix}unistr.h"
40510 LIBUNISTRING_UNISTR_H=
40517 printf "%s\n" "#define GNULIB_UNISTR_U8_MBTOUCR 1" >>confdefs.h
40523 if { test "$HAVE_LIBUNISTRING" != yes \
40528 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
40529 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
40530 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
40531 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
40532 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
40542 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
40543 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
40545 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
40546 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
40549 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then
40550 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
40551 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
40557 printf "%s\n" "#define GNULIB_UNISTR_U8_UCTOMB 1" >>confdefs.h
40563 if { test "$HAVE_LIBUNISTRING" != yes \
40568 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
40569 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
40570 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
40571 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
40572 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
40582 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
40583 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
40585 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
40586 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
40589 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE}"; then
40590 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
40591 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
40597 if { test "$HAVE_LIBUNISTRING" != yes \
40602 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
40603 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
40604 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
40605 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
40606 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
40616 if test -z "$LIBUNISTRING_UNITYPES_H"; then
40617 LIBUNISTRING_UNITYPES_H="${gl_source_base_prefix}unitypes.h"
40620 LIBUNISTRING_UNITYPES_H=
40628 if { test "$HAVE_LIBUNISTRING" != yes \
40633 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
40634 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
40635 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
40636 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
40637 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
40647 if test -z "$LIBUNISTRING_UNIWIDTH_H"; then
40648 LIBUNISTRING_UNIWIDTH_H="${gl_source_base_prefix}uniwidth.h"
40651 LIBUNISTRING_UNIWIDTH_H=
40659 if { test "$HAVE_LIBUNISTRING" != yes \
40664 test $LIBUNISTRING_VERSION_MAJOR -lt 1 \
40665 || { test $LIBUNISTRING_VERSION_MAJOR -eq 1 \
40666 && { test $LIBUNISTRING_VERSION_MINOR -lt 1 \
40667 || { test $LIBUNISTRING_VERSION_MINOR -eq 1 \
40668 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
40678 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
40679 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
40681 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
40682 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
40685 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
40686 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
40687 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
40692 printf "%s\n" "#define GNULIB_STDIO_SINGLE_THREAD 1" >>confdefs.h
40695 printf "%s\n" "#define USE_UNLOCKED_IO GNULIB_STDIO_SINGLE_THREAD" >>confdefs.h
40717 if test $ac_cv_have_decl_unsetenv = no; then
40718 HAVE_DECL_UNSETENV=0
40720 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
40721 if test "x$ac_cv_func_unsetenv" = xyes
40723 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
40727 if test $ac_cv_func_unsetenv = no; then
40731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
40732 printf %s "checking for unsetenv() return type... " >&6; }
40733 if test ${gt_cv_func_unsetenv_ret+y}
40735 printf %s "(cached) " >&6
40737 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40738 /* end confdefs.h. */
40741 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
40742 #include <stdlib.h>
40747 int unsetenv (const char *name);
40757 if ac_fn_c_try_compile "$LINENO"
40759 gt_cv_func_unsetenv_ret='int'
40761 e) gt_cv_func_unsetenv_ret='void' ;;
40764 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
40768 printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
40769 if test $gt_cv_func_unsetenv_ret = 'void'; then
40771 printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
40776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
40777 printf %s "checking whether unsetenv obeys POSIX... " >&6; }
40778 if test ${gl_cv_func_unsetenv_works+y}
40780 printf %s "(cached) " >&6
40782 e) if test "$cross_compiling" = yes
40785 # Guess yes on glibc systems.
40786 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
40787 # If we don't know, obey --enable-cross-guesses.
40788 *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
40792 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40793 /* end confdefs.h. */
40795 #include <stdlib.h>
40797 extern char **environ;
40806 char entry1[] = "a=1";
40807 char entry2[] = "b=2";
40808 char *env[] = { entry1, entry2, NULL };
40809 if (putenv ((char *) "a=1")) return 1;
40810 if (putenv (entry2)) return 2;
40813 if (getenv ("a")) return 3;
40814 if (!unsetenv ("") || errno != EINVAL) return 4;
40817 if (!getenv ("a")) return 5;
40820 if (getenv ("a")) return 6;
40826 if ac_fn_c_try_run "$LINENO"
40828 gl_cv_func_unsetenv_works=yes
40830 e) gl_cv_func_unsetenv_works=no ;;
40833 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40834 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
40842 printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
40843 case "$gl_cv_func_unsetenv_works" in
40852 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
40853 GL_COND_OBJ_UNSETENV_TRUE=
40854 GL_COND_OBJ_UNSETENV_FALSE='#'
40856 GL_COND_OBJ_UNSETENV_TRUE='#'
40857 GL_COND_OBJ_UNSETENV_FALSE=
40860 if test -z "${GL_COND_OBJ_UNSETENV_TRUE}" && test -z "${GL_COND_OBJ_UNSETENV_FALSE}"; then
40861 GL_COND_OBJ_UNSETENV_TRUE='#'
40862 GL_COND_OBJ_UNSETENV_FALSE='#'
40865 if test -z "$GL_COND_OBJ_UNSETENV_TRUE"; then :
40882 GL_GNULIB_UNSETENV=1
40888 printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
40893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
40894 printf %s "checking for variable-length arrays... " >&6; }
40895 if test ${ac_cv_c_vararrays+y}
40897 printf %s "(cached) " >&6
40899 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40900 /* end confdefs.h. */
40901 #ifndef __STDC_NO_VLA__
40902 #error __STDC_NO_VLA__ not defined
40906 if ac_fn_c_try_compile "$LINENO"
40908 ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
40910 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40911 /* end confdefs.h. */
40912 /* Test for VLA support. This test is partly inspired
40913 from examples in the C standard. Use at least two VLA
40914 functions to detect the GCC 3.4.3 bug described in:
40915 https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html
40917 #ifdef __STDC_NO_VLA__
40922 int fvla (int m, int C[m][m]);
40925 simple (int count, int all[static count])
40927 return all[count - 1];
40931 fvla (int m, int C[m][m])
40933 typedef int VLA[m][m];
40936 static int (*q)[m] = &B;
40938 return C && &x[0][0] == &D[0] && &D[0] == s[0];
40950 if ac_fn_c_try_compile "$LINENO"
40952 ac_cv_c_vararrays=yes
40954 e) ac_cv_c_vararrays=no ;;
40957 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40960 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
40964 printf "%s\n" "$ac_cv_c_vararrays" >&6; }
40965 if test "$ac_cv_c_vararrays" = yes; then
40967 printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h
40969 elif test "$ac_cv_c_vararrays" = no; then
40971 printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h
40976 # Check whether --with-packager was given.
40977 if test ${with_packager+y}
40979 withval=$with_packager; case $withval in
40982 printf "%s\n" "#define PACKAGE_PACKAGER \"$withval\"" >>confdefs.h
40990 # Check whether --with-packager-version was given.
40991 if test ${with_packager_version+y}
40993 withval=$with_packager_version; case $withval in
40996 printf "%s\n" "#define PACKAGE_PACKAGER_VERSION \"$withval\"" >>confdefs.h
41004 # Check whether --with-packager-bug-reports was given.
41005 if test ${with_packager_bug_reports+y}
41007 withval=$with_packager_bug_reports; case $withval in
41010 printf "%s\n" "#define PACKAGE_PACKAGER_BUG_REPORTS \"$withval\"" >>confdefs.h
41017 if test "X$with_packager" = "X" && \
41018 test "X$with_packager_version$with_packager_bug_reports" != "X"
41020 as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
41042 if test $ac_cv_func_wcrtomb = no; then
41044 ac_fn_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
41047 " "$ac_c_undeclared_builtin_options" "CFLAGS"
41048 if test "x$ac_cv_have_decl_wcrtomb" = xyes
41052 e) ac_have_decl=0 ;;
41055 printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
41057 if test $ac_cv_have_decl_wcrtomb = yes; then
41061 if test $REPLACE_WCRTOMB = 0; then
41067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
41068 printf %s "checking whether wcrtomb works in the C locale... " >&6; }
41069 if test ${gl_cv_func_wcrtomb_works+y}
41071 printf %s "(cached) " >&6
41073 e) if test "$cross_compiling" = yes
41076 # Guess no on Android.
41077 linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
41078 # Guess yes otherwise.
41079 *) gl_cv_func_wcrtomb_works="guessing yes";;
41083 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41084 /* end confdefs.h. */
41086 #include <string.h>
41087 #include <stdlib.h>
41094 memset (&state, 0, sizeof (state));
41096 count = wcrtomb (out, L'a', &state);
41097 return !(count == 1 && out[0] == 'a');
41100 if ac_fn_c_try_run "$LINENO"
41102 gl_cv_func_wcrtomb_works=yes
41104 e) gl_cv_func_wcrtomb_works=no ;;
41107 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41108 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
41115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
41116 printf "%s\n" "$gl_cv_func_wcrtomb_works" >&6; }
41117 case "$gl_cv_func_wcrtomb_works" in
41120 printf "%s\n" "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
41122 REPLACE_WCRTOMB=1 ;;
41125 if test $REPLACE_WCRTOMB = 0; then
41126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
41127 printf %s "checking whether wcrtomb return value is correct... " >&6; }
41128 if test ${gl_cv_func_wcrtomb_retval+y}
41130 printf %s "(cached) " >&6
41134 # Guess no on AIX 4, OSF/1, Solaris, native Windows.
41135 aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
41136 # Guess yes otherwise.
41137 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
41139 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
41140 if test "$cross_compiling" = yes
41144 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41145 /* end confdefs.h. */
41147 #include <locale.h>
41148 #include <string.h>
41150 #include <stdlib.h>
41154 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
41156 if (wcrtomb (NULL, 0, NULL) != 1)
41159 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
41161 if (wcrtomb (NULL, 0, NULL) != 1)
41164 wchar_t wc = (wchar_t) 0xBADFACE;
41165 if (mbtowc (&wc, "\303\274", 2) == 2)
41166 if (wcrtomb (NULL, wc, NULL) != 1)
41170 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
41172 if (wcrtomb (NULL, 0, NULL) != 1)
41175 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
41177 if (wcrtomb (NULL, 0, NULL) != 1)
41183 if ac_fn_c_try_run "$LINENO"
41185 gl_cv_func_wcrtomb_retval=yes
41187 e) gl_cv_func_wcrtomb_retval=no ;;
41190 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41191 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
41199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
41200 printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
41201 case "$gl_cv_func_wcrtomb_retval" in
41204 printf "%s\n" "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
41206 REPLACE_WCRTOMB=1 ;;
41212 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
41213 GL_COND_OBJ_WCRTOMB_TRUE=
41214 GL_COND_OBJ_WCRTOMB_FALSE='#'
41216 GL_COND_OBJ_WCRTOMB_TRUE='#'
41217 GL_COND_OBJ_WCRTOMB_FALSE=
41220 if test -z "${GL_COND_OBJ_WCRTOMB_TRUE}" && test -z "${GL_COND_OBJ_WCRTOMB_FALSE}"; then
41221 GL_COND_OBJ_WCRTOMB_TRUE='#'
41222 GL_COND_OBJ_WCRTOMB_FALSE='#'
41225 if test -z "$GL_COND_OBJ_WCRTOMB_TRUE"; then :
41246 GL_GNULIB_WCRTOMB=1
41252 printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
41274 ac_fn_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
41277 " "$ac_c_undeclared_builtin_options" "CFLAGS"
41278 if test "x$ac_cv_have_decl_wcwidth" = xyes
41282 e) ac_have_decl=0 ;;
41285 printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
41287 if test $ac_cv_have_decl_wcwidth != yes; then
41288 HAVE_DECL_WCWIDTH=0
41291 if test $ac_cv_func_wcwidth != yes; then
41292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
41293 printf %s "checking whether wcwidth is a macro... " >&6; }
41294 if test ${gl_cv_func_wcwidth_macro+y}
41296 printf %s "(cached) " >&6
41298 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41299 /* end confdefs.h. */
41303 wchar_header_defines_wcwidth
41306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41307 $EGREP_TRADITIONAL "wchar_header_defines_wcwidth" >/dev/null 2>&1
41309 gl_cv_func_wcwidth_macro=yes
41311 e) gl_cv_func_wcwidth_macro=no ;;
41319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
41320 printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
41323 if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
41325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
41326 printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
41327 if test ${gl_cv_func_wcwidth_works+y}
41329 printf %s "(cached) " >&6
41332 if test "$cross_compiling" = yes
41336 # Guess yes on glibc systems.
41337 *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
41338 # Guess yes on musl systems.
41339 *-musl* | midipix*) gl_cv_func_wcwidth_works="guessing yes";;
41340 # Guess yes on AIX 7 systems.
41341 aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
41342 *) gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
41346 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41347 /* end confdefs.h. */
41349 #include <locale.h>
41351 #if !HAVE_DECL_WCWIDTH
41353 # ifdef __cplusplus
41361 if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
41363 if (wcwidth (0x0301) > 0)
41365 if (wcwidth (0x05B0) > 0)
41367 if (wcwidth (0x200B) > 0)
41369 if (wcwidth (0xFF1A) == 0)
41371 if (wcwidth (0x2202) > 1)
41377 if ac_fn_c_try_run "$LINENO"
41379 gl_cv_func_wcwidth_works=yes
41381 e) gl_cv_func_wcwidth_works=no ;;
41384 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41385 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
41392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
41393 printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
41394 case "$gl_cv_func_wcwidth_works" in
41396 *no) REPLACE_WCWIDTH=1 ;;
41403 if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
41404 GL_COND_OBJ_WCWIDTH_TRUE=
41405 GL_COND_OBJ_WCWIDTH_FALSE='#'
41407 GL_COND_OBJ_WCWIDTH_TRUE='#'
41408 GL_COND_OBJ_WCWIDTH_FALSE=
41411 if test -z "${GL_COND_OBJ_WCWIDTH_TRUE}" && test -z "${GL_COND_OBJ_WCWIDTH_FALSE}"; then
41412 GL_COND_OBJ_WCWIDTH_TRUE='#'
41413 GL_COND_OBJ_WCWIDTH_FALSE='#'
41416 if test -z "$GL_COND_OBJ_WCWIDTH_TRUE"; then :
41438 GL_GNULIB_WCWIDTH=1
41444 printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
41450 if case "$host_os" in mingw*) true;; *) false;; esac; then
41451 GL_COND_OBJ_WINDOWS_MUTEX_TRUE=
41452 GL_COND_OBJ_WINDOWS_MUTEX_FALSE='#'
41454 GL_COND_OBJ_WINDOWS_MUTEX_TRUE='#'
41455 GL_COND_OBJ_WINDOWS_MUTEX_FALSE=
41458 if test -z "${GL_COND_OBJ_WINDOWS_MUTEX_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_MUTEX_FALSE}"; then
41459 GL_COND_OBJ_WINDOWS_MUTEX_TRUE='#'
41460 GL_COND_OBJ_WINDOWS_MUTEX_FALSE='#'
41465 if case "$host_os" in mingw*) true;; *) false;; esac; then
41466 GL_COND_OBJ_WINDOWS_ONCE_TRUE=
41467 GL_COND_OBJ_WINDOWS_ONCE_FALSE='#'
41469 GL_COND_OBJ_WINDOWS_ONCE_TRUE='#'
41470 GL_COND_OBJ_WINDOWS_ONCE_FALSE=
41473 if test -z "${GL_COND_OBJ_WINDOWS_ONCE_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_ONCE_FALSE}"; then
41474 GL_COND_OBJ_WINDOWS_ONCE_TRUE='#'
41475 GL_COND_OBJ_WINDOWS_ONCE_FALSE='#'
41480 if case "$host_os" in mingw*) true;; *) false;; esac; then
41481 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE=
41482 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE='#'
41484 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE='#'
41485 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE=
41488 if test -z "${GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE}"; then
41489 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE='#'
41490 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE='#'
41495 if case "$host_os" in mingw*) true;; *) false;; esac; then
41496 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE=
41497 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE='#'
41499 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE='#'
41500 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE=
41503 if test -z "${GL_COND_OBJ_WINDOWS_RWLOCK_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_RWLOCK_FALSE}"; then
41504 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE='#'
41505 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE='#'
41510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
41511 printf %s "checking for wmemchr... " >&6; }
41512 if test ${gl_cv_func_wmemchr+y}
41514 printf %s "(cached) " >&6
41516 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41517 /* end confdefs.h. */
41523 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
41529 if ac_fn_c_try_link "$LINENO"
41531 gl_cv_func_wmemchr=yes
41533 e) gl_cv_func_wmemchr=no ;;
41536 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41537 conftest$ac_exeext conftest.$ac_ext
41541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
41542 printf "%s\n" "$gl_cv_func_wmemchr" >&6; }
41543 if test $gl_cv_func_wmemchr = no; then
41548 if test $HAVE_WMEMCHR = 0; then
41549 GL_COND_OBJ_WMEMCHR_TRUE=
41550 GL_COND_OBJ_WMEMCHR_FALSE='#'
41552 GL_COND_OBJ_WMEMCHR_TRUE='#'
41553 GL_COND_OBJ_WMEMCHR_FALSE=
41556 if test -z "${GL_COND_OBJ_WMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_WMEMCHR_FALSE}"; then
41557 GL_COND_OBJ_WMEMCHR_TRUE='#'
41558 GL_COND_OBJ_WMEMCHR_FALSE='#'
41575 GL_GNULIB_WMEMCHR=1
41581 printf "%s\n" "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
41594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wmempcpy" >&5
41595 printf %s "checking for wmempcpy... " >&6; }
41596 if test ${gl_cv_onwards_func_wmempcpy+y}
41598 printf %s "(cached) " >&6
41601 exec 9>&6 6>/dev/null
41606 ac_fn_check_decl "$LINENO" "wmempcpy" "ac_cv_have_decl_wmempcpy" "#include <wchar.h>
41607 " "$ac_c_undeclared_builtin_options" "CFLAGS"
41608 if test "x$ac_cv_have_decl_wmempcpy" = xyes
41612 if test $ac_cv_have_decl_wmempcpy = yes; then
41613 ac_fn_c_check_func "$LINENO" "wmempcpy" "ac_cv_func_wmempcpy"
41614 if test "x$ac_cv_func_wmempcpy" = xyes
41619 if test $ac_cv_func_wmempcpy = yes; then
41620 gl_cv_onwards_func_wmempcpy=yes
41622 gl_cv_onwards_func_wmempcpy='future OS version'
41625 gl_cv_onwards_func_wmempcpy='future OS version'
41631 ac_fn_c_check_func "$LINENO" "wmempcpy" "ac_cv_func_wmempcpy"
41632 if test "x$ac_cv_func_wmempcpy" = xyes
41637 gl_cv_onwards_func_wmempcpy=$ac_cv_func_wmempcpy
41647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_wmempcpy" >&5
41648 printf "%s\n" "$gl_cv_onwards_func_wmempcpy" >&6; }
41650 case "$gl_cv_onwards_func_wmempcpy" in
41651 future*) ac_cv_func_wmempcpy=no ;;
41652 *) ac_cv_func_wmempcpy=$gl_cv_onwards_func_wmempcpy ;;
41654 if test $ac_cv_func_wmempcpy = yes; then
41656 printf "%s\n" "#define HAVE_WMEMPCPY 1" >>confdefs.h
41661 if test $ac_cv_func_wmempcpy = no; then
41663 case "$gl_cv_onwards_func_wmempcpy" in
41664 future*) REPLACE_WMEMPCPY=1 ;;
41669 if test $HAVE_WMEMPCPY = 0 || test $REPLACE_WMEMPCPY = 1; then
41670 GL_COND_OBJ_WMEMPCPY_TRUE=
41671 GL_COND_OBJ_WMEMPCPY_FALSE='#'
41673 GL_COND_OBJ_WMEMPCPY_TRUE='#'
41674 GL_COND_OBJ_WMEMPCPY_FALSE=
41677 if test -z "${GL_COND_OBJ_WMEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_WMEMPCPY_FALSE}"; then
41678 GL_COND_OBJ_WMEMPCPY_TRUE='#'
41679 GL_COND_OBJ_WMEMPCPY_FALSE='#'
41696 GL_GNULIB_WMEMPCPY=1
41702 printf "%s\n" "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
41709 printf "%s\n" "#define GNULIB_XALLOC 1" >>confdefs.h
41714 printf "%s\n" "#define GNULIB_XALLOC_DIE 1" >>confdefs.h
41720 # End of code from modules
41748 gl_source_base='gnulib-tests'
41749 gl_source_base_prefix=
41750 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
41752 gl_module_indicator_condition=$gltests_WITNESS
41756 if test "$ac_cv_header_winsock2_h" = yes; then
41757 GL_COND_OBJ_ACCEPT_TRUE=
41758 GL_COND_OBJ_ACCEPT_FALSE='#'
41760 GL_COND_OBJ_ACCEPT_TRUE='#'
41761 GL_COND_OBJ_ACCEPT_FALSE=
41764 if test -z "${GL_COND_OBJ_ACCEPT_TRUE}" && test -z "${GL_COND_OBJ_ACCEPT_FALSE}"; then
41765 GL_COND_OBJ_ACCEPT_TRUE='#'
41766 GL_COND_OBJ_ACCEPT_FALSE='#'
41778 if test "$GL_GNULIB_ACCEPT" != 1; then
41779 if test "$GL_GNULIB_ACCEPT" = 0; then
41780 GL_GNULIB_ACCEPT=$gl_module_indicator_condition
41782 GL_GNULIB_ACCEPT="($GL_GNULIB_ACCEPT || $gl_module_indicator_condition)"
41790 printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
41803 ac_fn_c_check_func "$LINENO" "atoll" "ac_cv_func_atoll"
41804 if test "x$ac_cv_func_atoll" = xyes
41806 printf "%s\n" "#define HAVE_ATOLL 1" >>confdefs.h
41810 if test $ac_cv_func_atoll = no; then
41815 if test $HAVE_ATOLL = 0; then
41816 GL_COND_OBJ_ATOLL_TRUE=
41817 GL_COND_OBJ_ATOLL_FALSE='#'
41819 GL_COND_OBJ_ATOLL_TRUE='#'
41820 GL_COND_OBJ_ATOLL_FALSE=
41823 if test -z "${GL_COND_OBJ_ATOLL_TRUE}" && test -z "${GL_COND_OBJ_ATOLL_FALSE}"; then
41824 GL_COND_OBJ_ATOLL_TRUE='#'
41825 GL_COND_OBJ_ATOLL_FALSE='#'
41828 if test -z "$GL_COND_OBJ_ATOLL_TRUE"; then :
41844 if test "$GL_GNULIB_ATOLL" != 1; then
41845 if test "$GL_GNULIB_ATOLL" = 0; then
41846 GL_GNULIB_ATOLL=$gl_module_indicator_condition
41848 GL_GNULIB_ATOLL="($GL_GNULIB_ATOLL || $gl_module_indicator_condition)"
41856 printf "%s\n" "#define GNULIB_TEST_ATOLL 1" >>confdefs.h
41862 if test "$ac_cv_header_winsock2_h" = yes; then
41863 GL_COND_OBJ_BIND_TRUE=
41864 GL_COND_OBJ_BIND_FALSE='#'
41866 GL_COND_OBJ_BIND_TRUE='#'
41867 GL_COND_OBJ_BIND_FALSE=
41870 if test -z "${GL_COND_OBJ_BIND_TRUE}" && test -z "${GL_COND_OBJ_BIND_FALSE}"; then
41871 GL_COND_OBJ_BIND_TRUE='#'
41872 GL_COND_OBJ_BIND_FALSE='#'
41884 if test "$GL_GNULIB_BIND" != 1; then
41885 if test "$GL_GNULIB_BIND" = 0; then
41886 GL_GNULIB_BIND=$gl_module_indicator_condition
41888 GL_GNULIB_BIND="($GL_GNULIB_BIND || $gl_module_indicator_condition)"
41896 printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
41906 if test "$ac_cv_header_winsock2_h" = yes; then
41907 GL_COND_OBJ_CONNECT_TRUE=
41908 GL_COND_OBJ_CONNECT_FALSE='#'
41910 GL_COND_OBJ_CONNECT_TRUE='#'
41911 GL_COND_OBJ_CONNECT_FALSE=
41914 if test -z "${GL_COND_OBJ_CONNECT_TRUE}" && test -z "${GL_COND_OBJ_CONNECT_FALSE}"; then
41915 GL_COND_OBJ_CONNECT_TRUE='#'
41916 GL_COND_OBJ_CONNECT_FALSE='#'
41928 if test "$GL_GNULIB_CONNECT" != 1; then
41929 if test "$GL_GNULIB_CONNECT" = 0; then
41930 GL_GNULIB_CONNECT=$gl_module_indicator_condition
41932 GL_GNULIB_CONNECT="($GL_GNULIB_CONNECT || $gl_module_indicator_condition)"
41940 printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
41948 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
41952 if test $REPLACE_FDOPEN = 0; then
41953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
41954 printf %s "checking whether fdopen sets errno... " >&6; }
41955 if test ${gl_cv_func_fdopen_works+y}
41957 printf %s "(cached) " >&6
41960 if test "$cross_compiling" = yes
41963 mingw*) gl_cv_func_fdopen_works="guessing no" ;;
41964 *) gl_cv_func_fdopen_works="guessing yes" ;;
41968 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41969 /* end confdefs.h. */
41982 fp = fdopen (-1, "r");
41983 if (fp == NULL && errno == 0)
41988 if ac_fn_c_try_run "$LINENO"
41990 gl_cv_func_fdopen_works=yes
41992 e) gl_cv_func_fdopen_works=no ;;
41995 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41996 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
42003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
42004 printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
42005 case "$gl_cv_func_fdopen_works" in
42006 *no) REPLACE_FDOPEN=1 ;;
42011 if test $REPLACE_FDOPEN = 1; then
42012 GL_COND_OBJ_FDOPEN_TRUE=
42013 GL_COND_OBJ_FDOPEN_FALSE='#'
42015 GL_COND_OBJ_FDOPEN_TRUE='#'
42016 GL_COND_OBJ_FDOPEN_FALSE=
42019 if test -z "${GL_COND_OBJ_FDOPEN_TRUE}" && test -z "${GL_COND_OBJ_FDOPEN_FALSE}"; then
42020 GL_COND_OBJ_FDOPEN_TRUE='#'
42021 GL_COND_OBJ_FDOPEN_FALSE='#'
42024 if test -z "$GL_COND_OBJ_FDOPEN_TRUE"; then :
42038 if test "$GL_GNULIB_FDOPEN" != 1; then
42039 if test "$GL_GNULIB_FDOPEN" = 0; then
42040 GL_GNULIB_FDOPEN=$gl_module_indicator_condition
42042 GL_GNULIB_FDOPEN="($GL_GNULIB_FDOPEN || $gl_module_indicator_condition)"
42050 printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
42057 GL_GENERATE_FLOAT_H=false
42058 REPLACE_FLOAT_LDBL=0
42060 aix* | beos* | openbsd* | mirbsd* | irix*)
42061 GL_GENERATE_FLOAT_H=true
42063 freebsd* | dragonfly*)
42064 case "$host_cpu" in
42066 GL_GENERATE_FLOAT_H=true
42069 # On x86_64 systems, the C compiler may still be generating
42071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42072 /* end confdefs.h. */
42073 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
42080 if ac_fn_c_try_compile "$LINENO"
42084 e) GL_GENERATE_FLOAT_H=true ;;
42087 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42092 case "$host_cpu" in
42094 GL_GENERATE_FLOAT_H=true
42100 aix* | freebsd* | dragonfly* | linux*)
42101 if $GL_GENERATE_FLOAT_H; then
42102 REPLACE_FLOAT_LDBL=1
42108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
42109 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
42110 if test ${gl_cv_func_itold_works+y}
42112 printf %s "(cached) " >&6
42115 if test "$cross_compiling" = yes
42119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42120 /* end confdefs.h. */
42121 #if defined __LP64__ || defined __arch64__
42128 if ac_fn_c_try_compile "$LINENO"
42130 gl_cv_func_itold_works="guessing no"
42132 e) gl_cv_func_itold_works="guessing yes" ;;
42135 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42137 # Guess yes on native Windows.
42138 mingw*) gl_cv_func_itold_works="guessing yes" ;;
42139 *) gl_cv_func_itold_works="guessing yes" ;;
42143 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42144 /* end confdefs.h. */
42147 volatile long double ld;
42156 if ac_fn_c_try_run "$LINENO"
42158 gl_cv_func_itold_works=yes
42160 e) gl_cv_func_itold_works=no ;;
42163 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42164 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
42171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
42172 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
42173 case "$gl_cv_func_itold_works" in
42176 GL_GENERATE_FLOAT_H=true
42180 if $GL_GENERATE_FLOAT_H; then
42189 if test $gl_cv_have_include_next = yes; then
42190 gl_cv_next_float_h='<'float.h'>'
42192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
42193 printf %s "checking absolute name of <float.h>... " >&6; }
42194 if test ${gl_cv_next_float_h+y}
42196 printf %s "(cached) " >&6
42201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42202 /* end confdefs.h. */
42206 aix*) gl_absname_cpp="$ac_cpp -C" ;;
42207 *) gl_absname_cpp="$ac_cpp" ;;
42212 gl_dirsep_regex='[/\\]'
42215 gl_dirsep_regex='\/'
42218 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
42219 gl_header_literal_regex=`echo 'float.h' \
42220 | sed -e "$gl_make_literal_regex_sed"`
42221 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
42222 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
42228 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
42229 sed -n "$gl_absolute_header_sed"`
42231 gl_header=$gl_cv_absolute_float_h
42232 gl_cv_next_float_h='"'$gl_header'"'
42237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
42238 printf "%s\n" "$gl_cv_next_float_h" >&6; }
42240 NEXT_FLOAT_H=$gl_cv_next_float_h
42242 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
42243 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
42244 gl_next_as_first_directive='<'float.h'>'
42246 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
42247 gl_next_as_first_directive=$gl_cv_next_float_h
42249 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
42261 case "$GL_GENERATE_FLOAT_H" in
42262 false) FLOAT_H='' ;;
42264 if test -z "$FLOAT_H"; then
42265 FLOAT_H="${gl_source_base_prefix}float.h"
42268 *) echo "*** GL_GENERATE_FLOAT_H is not set correctly" 1>&2; exit 1 ;;
42272 if $GL_GENERATE_FLOAT_H; then
42273 GL_GENERATE_FLOAT_H_TRUE=
42274 GL_GENERATE_FLOAT_H_FALSE='#'
42276 GL_GENERATE_FLOAT_H_TRUE='#'
42277 GL_GENERATE_FLOAT_H_FALSE=
42280 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
42281 GL_GENERATE_FLOAT_H_TRUE='#'
42282 GL_GENERATE_FLOAT_H_FALSE='#'
42291 if test $REPLACE_FLOAT_LDBL = 1; then
42292 GL_COND_OBJ_FLOAT_TRUE=
42293 GL_COND_OBJ_FLOAT_FALSE='#'
42295 GL_COND_OBJ_FLOAT_TRUE='#'
42296 GL_COND_OBJ_FLOAT_FALSE=
42299 if test -z "${GL_COND_OBJ_FLOAT_TRUE}" && test -z "${GL_COND_OBJ_FLOAT_FALSE}"; then
42300 GL_COND_OBJ_FLOAT_TRUE='#'
42301 GL_COND_OBJ_FLOAT_FALSE='#'
42305 if test $REPLACE_ITOLD = 1; then
42306 GL_COND_OBJ_ITOLD_TRUE=
42307 GL_COND_OBJ_ITOLD_FALSE='#'
42309 GL_COND_OBJ_ITOLD_TRUE='#'
42310 GL_COND_OBJ_ITOLD_FALSE=
42313 if test -z "${GL_COND_OBJ_ITOLD_TRUE}" && test -z "${GL_COND_OBJ_ITOLD_FALSE}"; then
42314 GL_COND_OBJ_ITOLD_TRUE='#'
42315 GL_COND_OBJ_ITOLD_FALSE='#'
42322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftruncate" >&5
42323 printf %s "checking for ftruncate... " >&6; }
42324 if test ${gl_cv_onwards_func_ftruncate+y}
42326 printf %s "(cached) " >&6
42329 exec 9>&6 6>/dev/null
42334 ac_fn_check_decl "$LINENO" "ftruncate" "ac_cv_have_decl_ftruncate" "#include <unistd.h>
42335 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42336 if test "x$ac_cv_have_decl_ftruncate" = xyes
42340 if test $ac_cv_have_decl_ftruncate = yes; then
42341 ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
42342 if test "x$ac_cv_func_ftruncate" = xyes
42347 if test $ac_cv_func_ftruncate = yes; then
42348 gl_cv_onwards_func_ftruncate=yes
42350 gl_cv_onwards_func_ftruncate='future OS version'
42353 gl_cv_onwards_func_ftruncate='future OS version'
42359 ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
42360 if test "x$ac_cv_func_ftruncate" = xyes
42365 gl_cv_onwards_func_ftruncate=$ac_cv_func_ftruncate
42375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_ftruncate" >&5
42376 printf "%s\n" "$gl_cv_onwards_func_ftruncate" >&6; }
42378 case "$gl_cv_onwards_func_ftruncate" in
42379 future*) ac_cv_func_ftruncate=no ;;
42380 *) ac_cv_func_ftruncate=$gl_cv_onwards_func_ftruncate ;;
42382 if test $ac_cv_func_ftruncate = yes; then
42384 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
42389 if test $ac_cv_func_ftruncate = yes; then
42394 REPLACE_FTRUNCATE=1
42400 case "$gl_cv_onwards_func_ftruncate" in
42401 future*) REPLACE_FTRUNCATE=1 ;;
42406 if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
42407 GL_COND_OBJ_FTRUNCATE_TRUE=
42408 GL_COND_OBJ_FTRUNCATE_FALSE='#'
42410 GL_COND_OBJ_FTRUNCATE_TRUE='#'
42411 GL_COND_OBJ_FTRUNCATE_FALSE=
42414 if test -z "${GL_COND_OBJ_FTRUNCATE_TRUE}" && test -z "${GL_COND_OBJ_FTRUNCATE_FALSE}"; then
42415 GL_COND_OBJ_FTRUNCATE_TRUE='#'
42416 GL_COND_OBJ_FTRUNCATE_FALSE='#'
42419 if test -z "$GL_COND_OBJ_FTRUNCATE_TRUE"; then :
42422 ac_fn_c_check_func "$LINENO" "_chsize" "ac_cv_func__chsize"
42423 if test "x$ac_cv_func__chsize" = xyes
42425 printf "%s\n" "#define HAVE__CHSIZE 1" >>confdefs.h
42441 if test "$GL_GNULIB_FTRUNCATE" != 1; then
42442 if test "$GL_GNULIB_FTRUNCATE" = 0; then
42443 GL_GNULIB_FTRUNCATE=$gl_module_indicator_condition
42445 GL_GNULIB_FTRUNCATE="($GL_GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
42453 printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
42462 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
42470 if test $REPLACE_GETCWD = 1; then
42471 GL_COND_OBJ_GETCWD_LGPL_TRUE=
42472 GL_COND_OBJ_GETCWD_LGPL_FALSE='#'
42474 GL_COND_OBJ_GETCWD_LGPL_TRUE='#'
42475 GL_COND_OBJ_GETCWD_LGPL_FALSE=
42478 if test -z "${GL_COND_OBJ_GETCWD_LGPL_TRUE}" && test -z "${GL_COND_OBJ_GETCWD_LGPL_FALSE}"; then
42479 GL_COND_OBJ_GETCWD_LGPL_TRUE='#'
42480 GL_COND_OBJ_GETCWD_LGPL_FALSE='#'
42492 if test "$GL_GNULIB_GETCWD" != 1; then
42493 if test "$GL_GNULIB_GETCWD" = 0; then
42494 GL_GNULIB_GETCWD=$gl_module_indicator_condition
42496 GL_GNULIB_GETCWD="($GL_GNULIB_GETCWD || $gl_module_indicator_condition)"
42504 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
42511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for duplocale" >&5
42512 printf %s "checking for duplocale... " >&6; }
42513 if test ${gl_cv_onwards_func_duplocale+y}
42515 printf %s "(cached) " >&6
42518 exec 9>&6 6>/dev/null
42523 ac_fn_check_decl "$LINENO" "duplocale" "ac_cv_have_decl_duplocale" "#include <locale.h>
42524 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42525 if test "x$ac_cv_have_decl_duplocale" = xyes
42529 if test $ac_cv_have_decl_duplocale = yes; then
42530 ac_fn_c_check_func "$LINENO" "duplocale" "ac_cv_func_duplocale"
42531 if test "x$ac_cv_func_duplocale" = xyes
42536 if test $ac_cv_func_duplocale = yes; then
42537 gl_cv_onwards_func_duplocale=yes
42539 gl_cv_onwards_func_duplocale='future OS version'
42542 gl_cv_onwards_func_duplocale='future OS version'
42548 ac_fn_c_check_func "$LINENO" "duplocale" "ac_cv_func_duplocale"
42549 if test "x$ac_cv_func_duplocale" = xyes
42554 gl_cv_onwards_func_duplocale=$ac_cv_func_duplocale
42564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_duplocale" >&5
42565 printf "%s\n" "$gl_cv_onwards_func_duplocale" >&6; }
42567 case "$gl_cv_onwards_func_duplocale" in
42568 future*) ac_cv_func_duplocale=no ;;
42569 *) ac_cv_func_duplocale=$gl_cv_onwards_func_duplocale ;;
42571 if test $ac_cv_func_duplocale = yes; then
42573 printf "%s\n" "#define HAVE_DUPLOCALE 1" >>confdefs.h
42591 if test $ac_cv_header_sys_socket_h != yes; then
42592 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
42593 if test "x$ac_cv_header_winsock2_h" = xyes
42595 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
42600 if test "$ac_cv_header_winsock2_h" = yes; then
42602 UNISTD_H_HAVE_WINSOCK2_H=1
42603 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
42609 if test $HAVE_WINSOCK2_H = 1; then
42610 REPLACE_INET_PTON=1
42611 ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
42612 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42613 if test "x$ac_cv_have_decl_inet_pton" = xyes
42617 e) ac_have_decl=0 ;;
42620 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
42622 if test $ac_cv_have_decl_inet_pton = yes; then
42623 INET_PTON_LIB="-lws2_32"
42625 HAVE_DECL_INET_PTON=0
42629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
42630 printf %s "checking for library containing inet_pton... " >&6; }
42631 if test ${ac_cv_search_inet_pton+y}
42633 printf %s "(cached) " >&6
42635 e) ac_func_search_save_LIBS=$LIBS
42636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42637 /* end confdefs.h. */
42639 /* Override any GCC internal prototype to avoid an error.
42640 Use char because int might match the return type of a GCC
42641 builtin and then its argument prototype would still apply.
42642 The 'extern "C"' is for builds by C++ compilers;
42643 although this is not generally supported in C code supporting it here
42644 has little cost and some practical benefit (sr 110532). */
42648 char inet_pton (void);
42652 return inet_pton ();
42657 for ac_lib in '' nsl resolv network
42659 if test -z "$ac_lib"; then
42660 ac_res="none required"
42663 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
42665 if ac_fn_c_try_link "$LINENO"
42667 ac_cv_search_inet_pton=$ac_res
42669 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42671 if test ${ac_cv_search_inet_pton+y}
42676 if test ${ac_cv_search_inet_pton+y}
42680 e) ac_cv_search_inet_pton=no ;;
42683 rm conftest.$ac_ext
42684 LIBS=$ac_func_search_save_LIBS ;;
42687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
42688 printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
42689 ac_res=$ac_cv_search_inet_pton
42690 if test "$ac_res" != no
42692 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
42695 e) ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
42696 if test "x$ac_cv_func_inet_pton" = xyes
42698 printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
42702 if test $ac_cv_func_inet_pton = no; then
42711 if test "$ac_cv_search_inet_pton" != "no" \
42712 && test "$ac_cv_search_inet_pton" != "none required"; then
42713 INET_PTON_LIB="$ac_cv_search_inet_pton"
42717 ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
42719 # include <netdb.h>
42722 " "$ac_c_undeclared_builtin_options" "CFLAGS"
42723 if test "x$ac_cv_have_decl_inet_pton" = xyes
42727 e) ac_have_decl=0 ;;
42730 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
42732 if test $ac_cv_have_decl_inet_pton = no; then
42733 HAVE_DECL_INET_PTON=0
42739 if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1; then
42740 GL_COND_OBJ_INET_PTON_TRUE=
42741 GL_COND_OBJ_INET_PTON_FALSE='#'
42743 GL_COND_OBJ_INET_PTON_TRUE='#'
42744 GL_COND_OBJ_INET_PTON_FALSE=
42747 if test -z "${GL_COND_OBJ_INET_PTON_TRUE}" && test -z "${GL_COND_OBJ_INET_PTON_FALSE}"; then
42748 GL_COND_OBJ_INET_PTON_TRUE='#'
42749 GL_COND_OBJ_INET_PTON_FALSE='#'
42752 if test -z "$GL_COND_OBJ_INET_PTON_TRUE"; then :
42768 if test "$GL_GNULIB_INET_PTON" != 1; then
42769 if test "$GL_GNULIB_INET_PTON" = 0; then
42770 GL_GNULIB_INET_PTON=$gl_module_indicator_condition
42772 GL_GNULIB_INET_PTON="($GL_GNULIB_INET_PTON || $gl_module_indicator_condition)"
42779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42780 printf %s "checking whether byte ordering is bigendian... " >&6; }
42781 if test ${ac_cv_c_bigendian+y}
42783 printf %s "(cached) " >&6
42785 e) ac_cv_c_bigendian=unknown
42786 # See if we're dealing with a universal compiler.
42787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42788 /* end confdefs.h. */
42789 #ifndef __APPLE_CC__
42790 not a universal capable compiler
42795 if ac_fn_c_try_compile "$LINENO"
42798 # Check for potential -arch flags. It is not universal unless
42799 # there are at least two -arch flags with different values.
42802 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42803 if test -n "$ac_prev"; then
42805 i?86 | x86_64 | ppc | ppc64)
42806 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42809 ac_cv_c_bigendian=universal
42815 elif test "x$ac_word" = "x-arch"; then
42820 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42821 if test $ac_cv_c_bigendian = unknown; then
42822 # See if sys/param.h defines the BYTE_ORDER macro.
42823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42824 /* end confdefs.h. */
42825 #include <sys/types.h>
42826 #include <sys/param.h>
42831 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
42832 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
42834 bogus endian macros
42841 if ac_fn_c_try_compile "$LINENO"
42843 # It does; now see whether it defined to BIG_ENDIAN or not.
42844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42845 /* end confdefs.h. */
42846 #include <sys/types.h>
42847 #include <sys/param.h>
42852 #if BYTE_ORDER != BIG_ENDIAN
42860 if ac_fn_c_try_compile "$LINENO"
42862 ac_cv_c_bigendian=yes
42864 e) ac_cv_c_bigendian=no ;;
42867 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42869 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42871 if test $ac_cv_c_bigendian = unknown; then
42872 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42874 /* end confdefs.h. */
42875 #include <limits.h>
42880 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42881 bogus endian macros
42888 if ac_fn_c_try_compile "$LINENO"
42890 # It does; now see whether it defined to _BIG_ENDIAN or not.
42891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42892 /* end confdefs.h. */
42893 #include <limits.h>
42898 #ifndef _BIG_ENDIAN
42906 if ac_fn_c_try_compile "$LINENO"
42908 ac_cv_c_bigendian=yes
42910 e) ac_cv_c_bigendian=no ;;
42913 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42915 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42917 if test $ac_cv_c_bigendian = unknown; then
42918 # Compile a test program.
42919 if test "$cross_compiling" = yes
42921 # Try to guess by grepping values from an object file.
42922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42923 /* end confdefs.h. */
42924 unsigned short int ascii_mm[] =
42925 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42926 unsigned short int ascii_ii[] =
42927 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42928 int use_ascii (int i) {
42929 return ascii_mm[i] + ascii_ii[i];
42931 unsigned short int ebcdic_ii[] =
42932 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42933 unsigned short int ebcdic_mm[] =
42934 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42935 int use_ebcdic (int i) {
42936 return ebcdic_mm[i] + ebcdic_ii[i];
42939 main (int argc, char **argv)
42941 /* Intimidate the compiler so that it does not
42942 optimize the arrays away. */
42944 ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
42945 ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
42946 return use_ascii (argc) == use_ebcdic (*p);
42949 if ac_fn_c_try_link "$LINENO"
42951 if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
42952 ac_cv_c_bigendian=yes
42954 if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
42955 if test "$ac_cv_c_bigendian" = unknown; then
42956 ac_cv_c_bigendian=no
42958 # finding both strings is unlikely to happen, but who knows?
42959 ac_cv_c_bigendian=unknown
42963 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42964 conftest$ac_exeext conftest.$ac_ext
42966 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42967 /* end confdefs.h. */
42968 $ac_includes_default
42973 /* Are we little or big endian? From Harbison&Steele. */
42977 char c[sizeof (long int)];
42980 return u.c[sizeof (long int) - 1] == 1;
42986 if ac_fn_c_try_run "$LINENO"
42988 ac_cv_c_bigendian=no
42990 e) ac_cv_c_bigendian=yes ;;
42993 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42994 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
43001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
43002 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
43003 case $ac_cv_c_bigendian in #(
43005 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
43011 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
43015 as_fn_error $? "unknown endianness
43016 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
43023 if test "$ac_cv_header_winsock2_h" = yes; then
43026 ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
43027 if test "x$ac_cv_func_ioctl" = xyes
43029 printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
43033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
43034 printf %s "checking for ioctl with POSIX signature... " >&6; }
43035 if test ${gl_cv_func_ioctl_posix_signature+y}
43037 printf %s "(cached) " >&6
43039 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43040 /* end confdefs.h. */
43041 #include <sys/ioctl.h>
43042 /* On some platforms, ioctl() is declared in <unistd.h>. */
43043 #include <unistd.h>
43052 int ioctl (int, int, ...);
43059 if ac_fn_c_try_compile "$LINENO"
43061 gl_cv_func_ioctl_posix_signature=yes
43063 e) gl_cv_func_ioctl_posix_signature=no ;;
43066 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
43070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
43071 printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
43072 if test $gl_cv_func_ioctl_posix_signature != yes; then
43078 if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
43079 GL_COND_OBJ_IOCTL_TRUE=
43080 GL_COND_OBJ_IOCTL_FALSE='#'
43082 GL_COND_OBJ_IOCTL_TRUE='#'
43083 GL_COND_OBJ_IOCTL_FALSE=
43086 if test -z "${GL_COND_OBJ_IOCTL_TRUE}" && test -z "${GL_COND_OBJ_IOCTL_FALSE}"; then
43087 GL_COND_OBJ_IOCTL_TRUE='#'
43088 GL_COND_OBJ_IOCTL_FALSE='#'
43100 if test "$GL_GNULIB_IOCTL" != 1; then
43101 if test "$GL_GNULIB_IOCTL" = 0; then
43102 GL_GNULIB_IOCTL=$gl_module_indicator_condition
43104 GL_GNULIB_IOCTL="($GL_GNULIB_IOCTL || $gl_module_indicator_condition)"
43112 printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
43126 if test "$ac_cv_header_winsock2_h" = yes; then
43127 GL_COND_OBJ_LISTEN_TRUE=
43128 GL_COND_OBJ_LISTEN_FALSE='#'
43130 GL_COND_OBJ_LISTEN_TRUE='#'
43131 GL_COND_OBJ_LISTEN_FALSE=
43134 if test -z "${GL_COND_OBJ_LISTEN_TRUE}" && test -z "${GL_COND_OBJ_LISTEN_FALSE}"; then
43135 GL_COND_OBJ_LISTEN_TRUE='#'
43136 GL_COND_OBJ_LISTEN_FALSE='#'
43148 if test "$GL_GNULIB_LISTEN" != 1; then
43149 if test "$GL_GNULIB_LISTEN" = 0; then
43150 GL_GNULIB_LISTEN=$gl_module_indicator_condition
43152 GL_GNULIB_LISTEN="($GL_GNULIB_LISTEN || $gl_module_indicator_condition)"
43160 printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
43166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for newlocale" >&5
43167 printf %s "checking for newlocale... " >&6; }
43168 if test ${gl_cv_onwards_func_newlocale+y}
43170 printf %s "(cached) " >&6
43173 exec 9>&6 6>/dev/null
43178 ac_fn_check_decl "$LINENO" "newlocale" "ac_cv_have_decl_newlocale" "#include <locale.h>
43179 " "$ac_c_undeclared_builtin_options" "CFLAGS"
43180 if test "x$ac_cv_have_decl_newlocale" = xyes
43184 if test $ac_cv_have_decl_newlocale = yes; then
43185 ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
43186 if test "x$ac_cv_func_newlocale" = xyes
43191 if test $ac_cv_func_newlocale = yes; then
43192 gl_cv_onwards_func_newlocale=yes
43194 gl_cv_onwards_func_newlocale='future OS version'
43197 gl_cv_onwards_func_newlocale='future OS version'
43203 ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
43204 if test "x$ac_cv_func_newlocale" = xyes
43209 gl_cv_onwards_func_newlocale=$ac_cv_func_newlocale
43219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_newlocale" >&5
43220 printf "%s\n" "$gl_cv_onwards_func_newlocale" >&6; }
43222 case "$gl_cv_onwards_func_newlocale" in
43223 future*) ac_cv_func_newlocale=no ;;
43224 *) ac_cv_func_newlocale=$gl_cv_onwards_func_newlocale ;;
43226 if test $ac_cv_func_newlocale = yes; then
43228 printf "%s\n" "#define HAVE_NEWLOCALE 1" >>confdefs.h
43255 nanosleep_save_libs=$LIBS
43257 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
43258 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
43261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
43262 printf %s "checking for library containing nanosleep... " >&6; }
43263 if test ${ac_cv_search_nanosleep+y}
43265 printf %s "(cached) " >&6
43267 e) ac_func_search_save_LIBS=$LIBS
43268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43269 /* end confdefs.h. */
43271 /* Override any GCC internal prototype to avoid an error.
43272 Use char because int might match the return type of a GCC
43273 builtin and then its argument prototype would still apply.
43274 The 'extern "C"' is for builds by C++ compilers;
43275 although this is not generally supported in C code supporting it here
43276 has little cost and some practical benefit (sr 110532). */
43280 char nanosleep (void);
43284 return nanosleep ();
43289 for ac_lib in '' rt posix4
43291 if test -z "$ac_lib"; then
43292 ac_res="none required"
43295 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
43297 if ac_fn_c_try_link "$LINENO"
43299 ac_cv_search_nanosleep=$ac_res
43301 rm -f core conftest.err conftest.$ac_objext conftest.beam \
43303 if test ${ac_cv_search_nanosleep+y}
43308 if test ${ac_cv_search_nanosleep+y}
43312 e) ac_cv_search_nanosleep=no ;;
43315 rm conftest.$ac_ext
43316 LIBS=$ac_func_search_save_LIBS ;;
43319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
43320 printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
43321 ac_res=$ac_cv_search_nanosleep
43322 if test "$ac_res" != no
43324 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
43325 test "$ac_cv_search_nanosleep" = "none required" ||
43326 NANOSLEEP_LIB=$ac_cv_search_nanosleep
43329 if test "x$ac_cv_search_nanosleep" != xno; then
43332 if test $APPLE_UNIVERSAL_BUILD = 1; then
43333 # A universal build on Apple Mac OS X platforms.
43334 # The test result would be 'no (mishandles large arguments)' in 64-bit
43335 # mode but 'yes' in 32-bit mode. But we need a configuration result that
43336 # is valid in both modes.
43337 gl_cv_func_nanosleep='no (mishandles large arguments)'
43340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
43341 printf %s "checking for working nanosleep... " >&6; }
43342 if test ${gl_cv_func_nanosleep+y}
43344 printf %s "(cached) " >&6
43347 if test "$cross_compiling" = yes
43350 linux*) # Guess it halfway works when the kernel is Linux.
43351 gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
43352 mingw*) # Guess no on native Windows.
43353 gl_cv_func_nanosleep='guessing no' ;;
43354 *) # If we don't know, obey --enable-cross-guesses.
43355 gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
43359 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43360 /* end confdefs.h. */
43363 #include <limits.h>
43364 #include <signal.h>
43366 #include <unistd.h>
43367 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
43368 #define TYPE_MAXIMUM(t) \
43369 ((t) (! TYPE_SIGNED (t) \
43371 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
43373 #if HAVE_DECL_ALARM
43375 check_for_SIGALRM (int sig)
43377 if (sig != SIGALRM)
43385 static struct timespec ts_sleep;
43386 static struct timespec ts_remaining;
43387 /* Test for major problems first. */
43390 ts_sleep.tv_sec = 0;
43391 ts_sleep.tv_nsec = 1;
43392 #if HAVE_DECL_ALARM
43394 static struct sigaction act;
43395 act.sa_handler = check_for_SIGALRM;
43396 sigemptyset (&act.sa_mask);
43397 sigaction (SIGALRM, &act, NULL);
43399 if (nanosleep (&ts_sleep, NULL) != 0)
43401 /* Test for a minor problem: the handling of large arguments. */
43402 ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
43403 ts_sleep.tv_nsec = 999999999;
43405 if (nanosleep (&ts_sleep, &ts_remaining) != -1)
43407 if (errno != EINTR)
43409 if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
43412 #else /* A simpler test for native Windows. */
43413 if (nanosleep (&ts_sleep, &ts_remaining) < 0)
43415 /* Test for 32-bit mingw bug: negative nanosecond values do not
43417 ts_sleep.tv_sec = 1;
43418 ts_sleep.tv_nsec = -1;
43419 if (nanosleep (&ts_sleep, &ts_remaining) != -1)
43425 if ac_fn_c_try_run "$LINENO"
43427 gl_cv_func_nanosleep=yes
43430 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)' ;;
43431 7) gl_cv_func_nanosleep='no (mishandles negative tv_nsec)' ;;
43432 *) gl_cv_func_nanosleep=no ;;
43436 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43437 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
43444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
43445 printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
43446 case "$gl_cv_func_nanosleep" in
43448 REPLACE_NANOSLEEP=0
43451 REPLACE_NANOSLEEP=1
43452 case "$gl_cv_func_nanosleep" in
43453 *"mishandles large arguments"*)
43455 printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
43464 LIBS=$nanosleep_save_libs
43466 # For backward compatibility.
43467 LIB_NANOSLEEP="$NANOSLEEP_LIB"
43471 if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
43472 GL_COND_OBJ_NANOSLEEP_TRUE=
43473 GL_COND_OBJ_NANOSLEEP_FALSE='#'
43475 GL_COND_OBJ_NANOSLEEP_TRUE='#'
43476 GL_COND_OBJ_NANOSLEEP_FALSE=
43479 if test -z "${GL_COND_OBJ_NANOSLEEP_TRUE}" && test -z "${GL_COND_OBJ_NANOSLEEP_FALSE}"; then
43480 GL_COND_OBJ_NANOSLEEP_TRUE='#'
43481 GL_COND_OBJ_NANOSLEEP_FALSE='#'
43493 if test "$GL_GNULIB_NANOSLEEP" != 1; then
43494 if test "$GL_GNULIB_NANOSLEEP" = 0; then
43495 GL_GNULIB_NANOSLEEP=$gl_module_indicator_condition
43497 GL_GNULIB_NANOSLEEP="($GL_GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
43505 printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
43511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
43512 printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
43513 if test ${gl_cv_header_netinet_in_h_selfcontained+y}
43515 printf %s "(cached) " >&6
43518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43519 /* end confdefs.h. */
43520 #include <netinet/in.h>
43529 if ac_fn_c_try_compile "$LINENO"
43531 gl_cv_header_netinet_in_h_selfcontained=yes
43533 e) gl_cv_header_netinet_in_h_selfcontained=no ;;
43536 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
43540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
43541 printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
43542 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
43543 GL_GENERATE_NETINET_IN_H=false
43545 GL_GENERATE_NETINET_IN_H=true
43546 ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
43547 if test "x$ac_cv_header_netinet_in_h" = xyes
43549 printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
43562 if test $gl_cv_have_include_next = yes; then
43563 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
43565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
43566 printf %s "checking absolute name of <netinet/in.h>... " >&6; }
43567 if test ${gl_cv_next_netinet_in_h+y}
43569 printf %s "(cached) " >&6
43572 if test $ac_cv_header_netinet_in_h = yes; then
43577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43578 /* end confdefs.h. */
43579 #include <netinet/in.h>
43582 aix*) gl_absname_cpp="$ac_cpp -C" ;;
43583 *) gl_absname_cpp="$ac_cpp" ;;
43588 gl_dirsep_regex='[/\\]'
43591 gl_dirsep_regex='\/'
43594 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
43595 gl_header_literal_regex=`echo 'netinet/in.h' \
43596 | sed -e "$gl_make_literal_regex_sed"`
43597 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
43598 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
43604 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
43605 sed -n "$gl_absolute_header_sed"`
43607 gl_header=$gl_cv_absolute_netinet_in_h
43608 gl_cv_next_netinet_in_h='"'$gl_header'"'
43610 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
43616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
43617 printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; }
43619 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
43621 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
43622 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
43623 gl_next_as_first_directive='<'netinet/in.h'>'
43625 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
43626 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
43628 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
43633 if test $ac_cv_header_netinet_in_h = yes; then
43634 HAVE_NETINET_IN_H=1
43636 HAVE_NETINET_IN_H=0
43645 case "$GL_GENERATE_NETINET_IN_H" in
43646 false) NETINET_IN_H='' ;;
43648 if test -z "$NETINET_IN_H"; then
43649 NETINET_IN_H="${gl_source_base_prefix}netinet/in.h"
43652 *) echo "*** GL_GENERATE_NETINET_IN_H is not set correctly" 1>&2; exit 1 ;;
43656 if $GL_GENERATE_NETINET_IN_H; then
43657 GL_GENERATE_NETINET_IN_H_TRUE=
43658 GL_GENERATE_NETINET_IN_H_FALSE='#'
43660 GL_GENERATE_NETINET_IN_H_TRUE='#'
43661 GL_GENERATE_NETINET_IN_H_FALSE=
43664 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
43665 GL_GENERATE_NETINET_IN_H_TRUE='#'
43666 GL_GENERATE_NETINET_IN_H_FALSE='#'
43682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uselocale" >&5
43683 printf %s "checking for uselocale... " >&6; }
43684 if test ${gl_cv_onwards_func_uselocale+y}
43686 printf %s "(cached) " >&6
43689 exec 9>&6 6>/dev/null
43694 ac_fn_check_decl "$LINENO" "uselocale" "ac_cv_have_decl_uselocale" "#include <locale.h>
43695 " "$ac_c_undeclared_builtin_options" "CFLAGS"
43696 if test "x$ac_cv_have_decl_uselocale" = xyes
43700 if test $ac_cv_have_decl_uselocale = yes; then
43701 ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale"
43702 if test "x$ac_cv_func_uselocale" = xyes
43707 if test $ac_cv_func_uselocale = yes; then
43708 gl_cv_onwards_func_uselocale=yes
43710 gl_cv_onwards_func_uselocale='future OS version'
43713 gl_cv_onwards_func_uselocale='future OS version'
43719 ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale"
43720 if test "x$ac_cv_func_uselocale" = xyes
43725 gl_cv_onwards_func_uselocale=$ac_cv_func_uselocale
43735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_uselocale" >&5
43736 printf "%s\n" "$gl_cv_onwards_func_uselocale" >&6; }
43738 case "$gl_cv_onwards_func_uselocale" in
43739 future*) ac_cv_func_uselocale=no ;;
43740 *) ac_cv_func_uselocale=$gl_cv_onwards_func_uselocale ;;
43742 if test $ac_cv_func_uselocale = yes; then
43744 printf "%s\n" "#define HAVE_USELOCALE 1" >>confdefs.h
43750 if test $ac_cv_func_uselocale = yes; then
43752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5
43753 printf %s "checking whether uselocale works... " >&6; }
43754 if test ${gt_cv_func_uselocale_works+y}
43756 printf %s "(cached) " >&6
43758 e) if test "$cross_compiling" = yes
43760 # Guess no on AIX and z/OS, yes otherwise.
43762 aix* | openedition*) gt_cv_func_uselocale_works="guessing no" ;;
43763 *) gt_cv_func_uselocale_works="guessing yes" ;;
43767 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43768 /* end confdefs.h. */
43770 #include <locale.h>
43772 # include <xlocale.h>
43778 setlocale (LC_ALL, "en_US.UTF-8");
43782 if ac_fn_c_try_run "$LINENO"
43784 gt_cv_func_uselocale_works=yes
43786 e) gt_cv_func_uselocale_works=no ;;
43789 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43790 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
43797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5
43798 printf "%s\n" "$gt_cv_func_uselocale_works" >&6; }
43800 gt_cv_func_uselocale_works=no
43802 case "$gt_cv_func_uselocale_works" in
43804 gt_working_uselocale=yes
43806 printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h
43810 gt_working_uselocale=no
43820 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" != false:0; then
43823 case ${gl_cv_func_strerror_r_works-unset} in
43825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
43826 printf %s "checking whether perror matches strerror... " >&6; }
43827 if test ${gl_cv_func_perror_works+y}
43829 printf %s "(cached) " >&6
43831 e) if test "$cross_compiling" = yes
43834 # Guess yes on musl systems.
43835 *-musl* | midipix*) gl_cv_func_perror_works="guessing yes" ;;
43836 # Guess yes on native Windows.
43837 mingw*) gl_cv_func_perror_works="guessing yes" ;;
43838 # Otherwise obey --enable-cross-guesses.
43839 *) gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
43843 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43844 /* end confdefs.h. */
43847 #include <stdlib.h>
43848 #include <string.h>
43853 char *str = strerror (-1);
43854 if (!getenv("CONFTEST_OUTPUT")) return 0;
43855 if (!str) str = "";
43865 if ac_fn_c_try_run "$LINENO"
43867 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
43868 && cmp conftest.txt1 conftest.txt2 >/dev/null; then
43869 gl_cv_func_perror_works=yes
43871 gl_cv_func_perror_works=no
43873 rm -rf conftest.txt1 conftest.txt2
43875 e) gl_cv_func_perror_works=no ;;
43878 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43879 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
43886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
43887 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
43888 case "$gl_cv_func_perror_works" in
43890 *) REPLACE_PERROR=1 ;;
43898 # Yes on Android 11.
43899 linux*-android*) REPLACE_PERROR=1 ;;
43903 if test $REPLACE_PERROR = 1; then
43904 GL_COND_OBJ_PERROR_TRUE=
43905 GL_COND_OBJ_PERROR_FALSE='#'
43907 GL_COND_OBJ_PERROR_TRUE='#'
43908 GL_COND_OBJ_PERROR_FALSE=
43911 if test -z "${GL_COND_OBJ_PERROR_TRUE}" && test -z "${GL_COND_OBJ_PERROR_FALSE}"; then
43912 GL_COND_OBJ_PERROR_TRUE='#'
43913 GL_COND_OBJ_PERROR_FALSE='#'
43930 if test "$GL_GNULIB_PERROR" != 1; then
43931 if test "$GL_GNULIB_PERROR" = 0; then
43932 GL_GNULIB_PERROR=$gl_module_indicator_condition
43934 GL_GNULIB_PERROR="($GL_GNULIB_PERROR || $gl_module_indicator_condition)"
43942 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
43950 if test $ac_cv_func_pipe != yes; then
43955 if test $HAVE_PIPE = 0; then
43956 GL_COND_OBJ_PIPE_TRUE=
43957 GL_COND_OBJ_PIPE_FALSE='#'
43959 GL_COND_OBJ_PIPE_TRUE='#'
43960 GL_COND_OBJ_PIPE_FALSE=
43963 if test -z "${GL_COND_OBJ_PIPE_TRUE}" && test -z "${GL_COND_OBJ_PIPE_FALSE}"; then
43964 GL_COND_OBJ_PIPE_TRUE='#'
43965 GL_COND_OBJ_PIPE_FALSE='#'
43977 if test "$GL_GNULIB_PIPE" != 1; then
43978 if test "$GL_GNULIB_PIPE" = 0; then
43979 GL_GNULIB_PIPE=$gl_module_indicator_condition
43981 GL_GNULIB_PIPE="($GL_GNULIB_PIPE || $gl_module_indicator_condition)"
43989 printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
43998 if test $ac_cv_func_pselect = yes; then
43999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
44000 printf %s "checking whether signature of pselect conforms to POSIX... " >&6; }
44001 if test ${gl_cv_sig_pselect+y}
44003 printf %s "(cached) " >&6
44005 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44006 /* end confdefs.h. */
44007 #include <sys/select.h>
44012 int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
44013 struct timespec const *restrict,
44014 sigset_t const *restrict) = pselect;
44020 if ac_fn_c_try_link "$LINENO"
44022 gl_cv_sig_pselect=yes
44024 e) gl_cv_sig_pselect=no ;;
44027 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44028 conftest$ac_exeext conftest.$ac_ext ;;
44031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
44032 printf "%s\n" "$gl_cv_sig_pselect" >&6; }
44034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
44035 printf %s "checking whether pselect detects invalid fds... " >&6; }
44036 if test ${gl_cv_func_pselect_detects_ebadf+y}
44038 printf %s "(cached) " >&6
44041 if test "$cross_compiling" = yes
44045 # Guess yes on Linux systems.
44046 linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
44047 # Guess yes on systems that emulate the Linux system calls.
44048 midipix*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
44049 # Guess yes on glibc systems.
44050 *-gnu* | gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
44051 # If we don't know, obey --enable-cross-guesses.
44052 *) gl_cv_func_pselect_detects_ebadf="$gl_cross_guess_normal" ;;
44056 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44057 /* end confdefs.h. */
44059 #include <sys/types.h>
44060 #include <sys/time.h>
44061 #if HAVE_SYS_SELECT_H
44062 # include <sys/select.h>
44064 #include <unistd.h>
44079 struct timespec timeout;
44080 timeout.tv_sec = 0;
44081 timeout.tv_nsec = 5000;
44082 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
44088 if ac_fn_c_try_run "$LINENO"
44090 gl_cv_func_pselect_detects_ebadf=yes
44092 e) gl_cv_func_pselect_detects_ebadf=no ;;
44095 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44096 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
44104 printf "%s\n" "$gl_cv_func_pselect_detects_ebadf" >&6; }
44105 case $gl_cv_func_pselect_detects_ebadf in
44107 *) REPLACE_PSELECT=1 ;;
44111 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
44116 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
44117 GL_COND_OBJ_PSELECT_TRUE=
44118 GL_COND_OBJ_PSELECT_FALSE='#'
44120 GL_COND_OBJ_PSELECT_TRUE='#'
44121 GL_COND_OBJ_PSELECT_FALSE=
44124 if test -z "${GL_COND_OBJ_PSELECT_TRUE}" && test -z "${GL_COND_OBJ_PSELECT_FALSE}"; then
44125 GL_COND_OBJ_PSELECT_TRUE='#'
44126 GL_COND_OBJ_PSELECT_FALSE='#'
44138 if test "$GL_GNULIB_PSELECT" != 1; then
44139 if test "$GL_GNULIB_PSELECT" = 0; then
44140 GL_GNULIB_PSELECT=$gl_module_indicator_condition
44142 GL_GNULIB_PSELECT="($GL_GNULIB_PSELECT || $gl_module_indicator_condition)"
44150 printf "%s\n" "#define GNULIB_TEST_PSELECT 1" >>confdefs.h
44166 if { case "$host_os" in mingw*) true;; *) false;; esac; } \
44167 && test $gl_threads_api = windows; then
44168 REPLACE_PTHREAD_CREATE=1
44169 REPLACE_PTHREAD_ATTR_INIT=1
44170 REPLACE_PTHREAD_ATTR_GETDETACHSTATE=1
44171 REPLACE_PTHREAD_ATTR_SETDETACHSTATE=1
44172 REPLACE_PTHREAD_ATTR_DESTROY=1
44173 REPLACE_PTHREAD_SELF=1
44174 REPLACE_PTHREAD_EQUAL=1
44175 REPLACE_PTHREAD_DETACH=1
44176 REPLACE_PTHREAD_JOIN=1
44177 REPLACE_PTHREAD_EXIT=1
44179 if test $HAVE_PTHREAD_H = 0; then
44180 HAVE_PTHREAD_CREATE=0
44181 HAVE_PTHREAD_ATTR_INIT=0
44182 HAVE_PTHREAD_ATTR_GETDETACHSTATE=0
44183 HAVE_PTHREAD_ATTR_SETDETACHSTATE=0
44184 HAVE_PTHREAD_ATTR_DESTROY=0
44185 HAVE_PTHREAD_SELF=0
44186 HAVE_PTHREAD_EQUAL=0
44187 HAVE_PTHREAD_DETACH=0
44188 HAVE_PTHREAD_JOIN=0
44189 HAVE_PTHREAD_EXIT=0
44191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_create exists as a global function" >&5
44192 printf %s "checking whether pthread_create exists as a global function... " >&6; }
44193 if test ${gl_cv_func_pthread_create+y}
44195 printf %s "(cached) " >&6
44197 e) saved_LIBS="$LIBS"
44198 LIBS="$LIBS $LIBPMULTITHREAD"
44199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44200 /* end confdefs.h. */
44205 int pthread_create (void);
44208 return pthread_create ();
44212 if ac_fn_c_try_link "$LINENO"
44214 gl_cv_func_pthread_create=yes
44216 e) gl_cv_func_pthread_create=no ;;
44219 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44220 conftest$ac_exeext conftest.$ac_ext
44225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_create" >&5
44226 printf "%s\n" "$gl_cv_func_pthread_create" >&6; }
44227 if test $gl_cv_func_pthread_create = no; then
44228 REPLACE_PTHREAD_CREATE=1
44229 REPLACE_PTHREAD_ATTR_INIT=1
44231 printf "%s\n" "#define PTHREAD_CREATE_IS_INLINE 1" >>confdefs.h
44238 if test $HAVE_PTHREAD_CREATE = 0 || test $REPLACE_PTHREAD_CREATE = 1; then
44239 GL_COND_OBJ_PTHREAD_THREAD_TRUE=
44240 GL_COND_OBJ_PTHREAD_THREAD_FALSE='#'
44242 GL_COND_OBJ_PTHREAD_THREAD_TRUE='#'
44243 GL_COND_OBJ_PTHREAD_THREAD_FALSE=
44246 if test -z "${GL_COND_OBJ_PTHREAD_THREAD_TRUE}" && test -z "${GL_COND_OBJ_PTHREAD_THREAD_FALSE}"; then
44247 GL_COND_OBJ_PTHREAD_THREAD_TRUE='#'
44248 GL_COND_OBJ_PTHREAD_THREAD_FALSE='#'
44260 if test "$GL_GNULIB_PTHREAD_THREAD" != 1; then
44261 if test "$GL_GNULIB_PTHREAD_THREAD" = 0; then
44262 GL_GNULIB_PTHREAD_THREAD=$gl_module_indicator_condition
44264 GL_GNULIB_PTHREAD_THREAD="($GL_GNULIB_PTHREAD_THREAD || $gl_module_indicator_condition)"
44272 printf "%s\n" "#define GNULIB_TEST_PTHREAD_THREAD 1" >>confdefs.h
44281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is a macro" >&5
44282 printf %s "checking whether pthread_sigmask is a macro... " >&6; }
44283 if test ${gl_cv_func_pthread_sigmask_macro+y}
44285 printf %s "(cached) " >&6
44287 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44288 /* end confdefs.h. */
44290 #include <pthread.h>
44291 #include <signal.h>
44292 #ifdef pthread_sigmask
44293 headers_define_pthread_sigmask
44296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44297 $EGREP_TRADITIONAL "headers_define_pthread_sigmask" >/dev/null 2>&1
44299 gl_cv_func_pthread_sigmask_macro=yes
44301 e) gl_cv_func_pthread_sigmask_macro=no ;;
44309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_macro" >&5
44310 printf "%s\n" "$gl_cv_func_pthread_sigmask_macro" >&6; }
44312 PTHREAD_SIGMASK_LIB=
44314 if test $gl_cv_func_pthread_sigmask_macro = yes; then
44315 HAVE_PTHREAD_SIGMASK=0
44316 REPLACE_PTHREAD_SIGMASK=1
44321 if test "$gl_threads_api" = posix; then
44322 if test $ac_cv_func_pthread_sigmask = yes; then
44325 if test -n "$LIBMULTITHREAD"; then
44326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
44327 printf %s "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
44328 if test ${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+y}
44330 printf %s "(cached) " >&6
44332 e) gl_save_LIBS="$LIBS"
44333 LIBS="$LIBS $LIBMULTITHREAD"
44334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44335 /* end confdefs.h. */
44336 #include <pthread.h>
44337 #include <signal.h>
44342 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
44348 if ac_fn_c_try_link "$LINENO"
44350 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
44352 e) gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no ;;
44355 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44356 conftest$ac_exeext conftest.$ac_ext
44357 LIBS="$gl_save_LIBS"
44361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
44362 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
44363 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
44364 PTHREAD_SIGMASK_LIB="$LIBMULTITHREAD"
44366 HAVE_PTHREAD_SIGMASK=0
44369 HAVE_PTHREAD_SIGMASK=0
44373 if test $ac_cv_func_pthread_sigmask = yes; then
44374 REPLACE_PTHREAD_SIGMASK=1
44376 HAVE_PTHREAD_SIGMASK=0
44383 LIB_PTHREAD_SIGMASK="$PTHREAD_SIGMASK_LIB"
44386 if test $HAVE_PTHREAD_SIGMASK = 1; then
44389 if test -z "$PTHREAD_SIGMASK_LIB"; then
44392 *' -lpthread '*) ;;
44394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
44395 printf %s "checking whether pthread_sigmask works without -lpthread... " >&6; }
44396 if test ${gl_cv_func_pthread_sigmask_in_libc_works+y}
44398 printf %s "(cached) " >&6
44401 if test "$cross_compiling" = yes
44405 freebsd* | midnightbsd* | hpux* | solaris | solaris2.[2-9]*)
44406 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
44408 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
44412 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44413 /* end confdefs.h. */
44415 #include <pthread.h>
44416 #include <signal.h>
44417 #include <stddef.h>
44421 sigemptyset (&set);
44422 return pthread_sigmask (1729, &set, NULL) != 0;
44425 if ac_fn_c_try_run "$LINENO"
44427 gl_cv_func_pthread_sigmask_in_libc_works=no
44429 e) gl_cv_func_pthread_sigmask_in_libc_works=yes ;;
44432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44433 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
44441 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
44442 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
44444 REPLACE_PTHREAD_SIGMASK=1
44446 printf "%s\n" "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
44453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
44454 printf %s "checking whether pthread_sigmask returns error numbers... " >&6; }
44455 if test ${gl_cv_func_pthread_sigmask_return_works+y}
44457 printf %s "(cached) " >&6
44460 gl_save_LIBS="$LIBS"
44461 LIBS="$LIBS $PTHREAD_SIGMASK_LIB"
44462 if test "$cross_compiling" = yes
44466 gl_cv_func_pthread_sigmask_return_works="guessing no";;
44468 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
44472 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44473 /* end confdefs.h. */
44475 #include <pthread.h>
44476 #include <signal.h>
44477 #include <stddef.h>
44481 sigemptyset (&set);
44482 if (pthread_sigmask (1729, &set, NULL) == -1)
44487 if ac_fn_c_try_run "$LINENO"
44489 gl_cv_func_pthread_sigmask_return_works=yes
44491 e) gl_cv_func_pthread_sigmask_return_works=no ;;
44494 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44495 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44499 LIBS="$gl_save_LIBS"
44503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
44504 printf "%s\n" "$gl_cv_func_pthread_sigmask_return_works" >&6; }
44505 case "$gl_cv_func_pthread_sigmask_return_works" in
44507 REPLACE_PTHREAD_SIGMASK=1
44509 printf "%s\n" "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
44514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
44515 printf %s "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
44516 if test ${gl_cv_func_pthread_sigmask_unblock_works+y}
44518 printf %s "(cached) " >&6
44523 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
44525 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
44528 LIBS="$LIBS $LIBMULTITHREAD"
44529 if test "$cross_compiling" = yes
44533 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44534 /* end confdefs.h. */
44536 #include <limits.h>
44537 #include <pthread.h>
44538 #include <signal.h>
44540 #include <stdlib.h>
44541 #include <unistd.h>
44546 static volatile int sigint_occurred;
44548 sigint_handler (int sig)
44555 pid_t pid = getpid ();
44557 if (LONG_MAX < pid)
44559 signal (SIGINT, sigint_handler);
44560 sigemptyset (&set);
44561 sigaddset (&set, SIGINT);
44562 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
44564 sprintf (command, "sh -c 'sleep 1; kill -INT %ld' &", (long) pid);
44565 if (!(system (command) == 0))
44568 if (!(sigint_occurred == 0))
44570 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
44572 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
44577 if ac_fn_c_try_run "$LINENO"
44581 e) gl_cv_func_pthread_sigmask_unblock_works=no ;;
44584 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44585 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
44594 printf "%s\n" "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
44595 case "$gl_cv_func_pthread_sigmask_unblock_works" in
44597 REPLACE_PTHREAD_SIGMASK=1
44599 printf "%s\n" "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
44606 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
44607 GL_COND_OBJ_PTHREAD_SIGMASK_TRUE=
44608 GL_COND_OBJ_PTHREAD_SIGMASK_FALSE='#'
44610 GL_COND_OBJ_PTHREAD_SIGMASK_TRUE='#'
44611 GL_COND_OBJ_PTHREAD_SIGMASK_FALSE=
44614 if test -z "${GL_COND_OBJ_PTHREAD_SIGMASK_TRUE}" && test -z "${GL_COND_OBJ_PTHREAD_SIGMASK_FALSE}"; then
44615 GL_COND_OBJ_PTHREAD_SIGMASK_TRUE='#'
44616 GL_COND_OBJ_PTHREAD_SIGMASK_FALSE='#'
44619 if test -z "$GL_COND_OBJ_PTHREAD_SIGMASK_TRUE"; then :
44622 if test $HAVE_PTHREAD_SIGMASK = 1; then
44624 printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
44639 if test "$GL_GNULIB_PTHREAD_SIGMASK" != 1; then
44640 if test "$GL_GNULIB_PTHREAD_SIGMASK" = 0; then
44641 GL_GNULIB_PTHREAD_SIGMASK=$gl_module_indicator_condition
44643 GL_GNULIB_PTHREAD_SIGMASK="($GL_GNULIB_PTHREAD_SIGMASK || $gl_module_indicator_condition)"
44651 printf "%s\n" "#define GNULIB_TEST_PTHREAD_SIGMASK 1" >>confdefs.h
44657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
44658 printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
44659 if test ${gl_cv_func_svid_putenv+y}
44661 printf %s "(cached) " >&6
44663 e) if test "$cross_compiling" = yes
44666 # Guess yes on glibc systems.
44667 *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
44668 # Guess yes on musl systems.
44669 *-musl* | midipix*) gl_cv_func_svid_putenv="guessing yes" ;;
44670 # Guess no on native Windows.
44671 mingw*) gl_cv_func_svid_putenv="guessing no" ;;
44672 # If we don't know, obey --enable-cross-guesses.
44673 *) gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
44677 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44678 /* end confdefs.h. */
44679 $ac_includes_default
44688 /* Put it in env. */
44689 if (putenv ("CONFTEST_putenv=val"))
44692 /* Try to remove it. */
44693 if (putenv ("CONFTEST_putenv"))
44696 /* Make sure it was deleted. */
44697 if (getenv ("CONFTEST_putenv") != 0)
44706 if ac_fn_c_try_run "$LINENO"
44708 gl_cv_func_svid_putenv=yes
44710 e) gl_cv_func_svid_putenv=no ;;
44713 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44714 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
44722 printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
44723 case "$gl_cv_func_svid_putenv" in
44731 if test $REPLACE_PUTENV = 1; then
44732 GL_COND_OBJ_PUTENV_TRUE=
44733 GL_COND_OBJ_PUTENV_FALSE='#'
44735 GL_COND_OBJ_PUTENV_TRUE='#'
44736 GL_COND_OBJ_PUTENV_FALSE=
44739 if test -z "${GL_COND_OBJ_PUTENV_TRUE}" && test -z "${GL_COND_OBJ_PUTENV_FALSE}"; then
44740 GL_COND_OBJ_PUTENV_TRUE='#'
44741 GL_COND_OBJ_PUTENV_FALSE='#'
44744 if test -z "$GL_COND_OBJ_PUTENV_TRUE"; then :
44747 ac_fn_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
44748 if test "x$ac_cv_have_decl__putenv" = xyes
44752 e) ac_have_decl=0 ;;
44755 printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
44769 if test "$GL_GNULIB_PUTENV" != 1; then
44770 if test "$GL_GNULIB_PUTENV" = 0; then
44771 GL_GNULIB_PUTENV=$gl_module_indicator_condition
44773 GL_GNULIB_PUTENV="($GL_GNULIB_PUTENV || $gl_module_indicator_condition)"
44781 printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
44802 if test "$ac_cv_header_winsock2_h" = yes; then
44806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
44807 printf %s "checking whether select supports a 0 argument... " >&6; }
44808 if test ${gl_cv_func_select_supports0+y}
44810 printf %s "(cached) " >&6
44813 if test "$cross_compiling" = yes
44817 # Guess no on Interix.
44818 interix*) gl_cv_func_select_supports0="guessing no";;
44819 # Guess yes otherwise.
44820 *) gl_cv_func_select_supports0="guessing yes";;
44824 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44825 /* end confdefs.h. */
44827 #include <sys/types.h>
44828 #include <sys/time.h>
44829 #if HAVE_SYS_SELECT_H
44830 #include <sys/select.h>
44834 struct timeval timeout;
44835 timeout.tv_sec = 0;
44836 timeout.tv_usec = 5;
44837 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
44840 if ac_fn_c_try_run "$LINENO"
44842 gl_cv_func_select_supports0=yes
44844 e) gl_cv_func_select_supports0=no ;;
44847 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44848 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
44856 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
44857 case "$gl_cv_func_select_supports0" in
44859 *) REPLACE_SELECT=1 ;;
44862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
44863 printf %s "checking whether select detects invalid fds... " >&6; }
44864 if test ${gl_cv_func_select_detects_ebadf+y}
44866 printf %s "(cached) " >&6
44869 if test "$cross_compiling" = yes
44873 # Guess yes on Linux systems.
44874 linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
44875 # Guess yes on systems that emulate the Linux system calls.
44876 midipix*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
44877 # Guess yes on glibc systems.
44878 *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
44879 # If we don't know, obey --enable-cross-guesses.
44880 *) gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
44884 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44885 /* end confdefs.h. */
44887 #include <sys/types.h>
44888 #include <sys/time.h>
44889 #if HAVE_SYS_SELECT_H
44890 # include <sys/select.h>
44892 #include <unistd.h>
44907 struct timeval timeout;
44908 timeout.tv_sec = 0;
44909 timeout.tv_usec = 5;
44910 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
44916 if ac_fn_c_try_run "$LINENO"
44918 gl_cv_func_select_detects_ebadf=yes
44920 e) gl_cv_func_select_detects_ebadf=no ;;
44923 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44924 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
44932 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
44933 case $gl_cv_func_select_detects_ebadf in
44935 *) REPLACE_SELECT=1 ;;
44939 SELECT_LIB="$LIBSOCKET"
44940 if test $REPLACE_SELECT = 1; then
44943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44944 /* end confdefs.h. */
44946 #define WIN32_LEAN_AND_MEAN
44947 #include <windows.h>
44951 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
44955 if ac_fn_c_try_link "$LINENO"
44959 e) SELECT_LIB="$SELECT_LIB -luser32" ;;
44962 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44963 conftest$ac_exeext conftest.$ac_ext
44968 LIB_SELECT="$LIB_SELECT"
44972 if test $REPLACE_SELECT = 1; then
44973 GL_COND_OBJ_SELECT_TRUE=
44974 GL_COND_OBJ_SELECT_FALSE='#'
44976 GL_COND_OBJ_SELECT_TRUE='#'
44977 GL_COND_OBJ_SELECT_FALSE=
44980 if test -z "${GL_COND_OBJ_SELECT_TRUE}" && test -z "${GL_COND_OBJ_SELECT_FALSE}"; then
44981 GL_COND_OBJ_SELECT_TRUE='#'
44982 GL_COND_OBJ_SELECT_FALSE='#'
44994 if test "$GL_GNULIB_SELECT" != 1; then
44995 if test "$GL_GNULIB_SELECT" = 0; then
44996 GL_GNULIB_SELECT=$gl_module_indicator_condition
44998 GL_GNULIB_SELECT="($GL_GNULIB_SELECT || $gl_module_indicator_condition)"
45006 printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
45013 if test "$ac_cv_header_winsock2_h" = yes; then
45014 GL_COND_OBJ_SETSOCKOPT_TRUE=
45015 GL_COND_OBJ_SETSOCKOPT_FALSE='#'
45017 GL_COND_OBJ_SETSOCKOPT_TRUE='#'
45018 GL_COND_OBJ_SETSOCKOPT_FALSE=
45021 if test -z "${GL_COND_OBJ_SETSOCKOPT_TRUE}" && test -z "${GL_COND_OBJ_SETSOCKOPT_FALSE}"; then
45022 GL_COND_OBJ_SETSOCKOPT_TRUE='#'
45023 GL_COND_OBJ_SETSOCKOPT_FALSE='#'
45035 if test "$GL_GNULIB_SETSOCKOPT" != 1; then
45036 if test "$GL_GNULIB_SETSOCKOPT" = 0; then
45037 GL_GNULIB_SETSOCKOPT=$gl_module_indicator_condition
45039 GL_GNULIB_SETSOCKOPT="($GL_GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
45047 printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
45054 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
45055 if test "x$ac_cv_header_stdint_h" = xyes
45057 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
45061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
45062 printf %s "checking for SIZE_MAX... " >&6; }
45063 if test ${gl_cv_size_max+y}
45065 printf %s "(cached) " >&6
45069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45070 /* end confdefs.h. */
45072 #include <limits.h>
45074 #include <stdint.h>
45081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45082 $EGREP_TRADITIONAL "Found it" >/dev/null 2>&1
45088 if test $gl_cv_size_max != yes; then
45089 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
45090 #include <limits.h>"
45094 e) size_t_bits_minus_1= ;;
45098 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"
45102 e) fits_in_uint= ;;
45106 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
45107 if test $fits_in_uint = 1; then
45108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45109 /* end confdefs.h. */
45110 #include <stddef.h>
45112 extern unsigned long foo;
45122 if ac_fn_c_try_compile "$LINENO"
45126 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45128 if test $fits_in_uint = 1; then
45129 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
45131 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
45134 gl_cv_size_max='((size_t)~(size_t)0)'
45140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
45141 printf "%s\n" "$gl_cv_size_max" >&6; }
45142 if test "$gl_cv_size_max" != yes; then
45144 printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
45151 ac_fn_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
45152 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45153 if test "x$ac_cv_have_decl_sleep" = xyes
45157 e) ac_have_decl=0 ;;
45160 printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h
45163 if test $ac_cv_have_decl_sleep != yes; then
45166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
45167 printf %s "checking for working sleep... " >&6; }
45168 if test ${gl_cv_func_sleep_works+y}
45170 printf %s "(cached) " >&6
45172 e) if test "$cross_compiling" = yes
45175 # Guess yes on glibc systems.
45176 *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
45177 # Guess yes on musl systems.
45178 *-musl*) gl_cv_func_sleep_works="guessing yes" ;;
45179 # Guess yes on systems that emulate the Linux system calls.
45180 midipix*) gl_cv_func_sleep_works="guessing yes" ;;
45181 # Guess no on native Windows.
45182 mingw*) gl_cv_func_sleep_works="guessing no" ;;
45183 # If we don't know, obey --enable-cross-guesses.
45184 *) gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
45188 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45189 /* end confdefs.h. */
45192 #include <unistd.h>
45193 #include <signal.h>
45195 handle_alarm (int sig)
45197 if (sig != SIGALRM)
45205 /* Failure to compile this test due to missing alarm is okay,
45206 since all such platforms (mingw) also lack sleep. */
45207 unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
45208 unsigned int remaining;
45209 signal (SIGALRM, handle_alarm);
45211 remaining = sleep (pentecost);
45212 if (remaining > pentecost)
45214 if (remaining <= pentecost - 10)
45222 if ac_fn_c_try_run "$LINENO"
45224 gl_cv_func_sleep_works=yes
45226 e) gl_cv_func_sleep_works=no ;;
45229 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45230 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
45236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
45237 printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
45238 case "$gl_cv_func_sleep_works" in
45247 if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
45248 GL_COND_OBJ_SLEEP_TRUE=
45249 GL_COND_OBJ_SLEEP_FALSE='#'
45251 GL_COND_OBJ_SLEEP_TRUE='#'
45252 GL_COND_OBJ_SLEEP_FALSE=
45255 if test -z "${GL_COND_OBJ_SLEEP_TRUE}" && test -z "${GL_COND_OBJ_SLEEP_FALSE}"; then
45256 GL_COND_OBJ_SLEEP_TRUE='#'
45257 GL_COND_OBJ_SLEEP_FALSE='#'
45269 if test "$GL_GNULIB_SLEEP" != 1; then
45270 if test "$GL_GNULIB_SLEEP" = 0; then
45271 GL_GNULIB_SLEEP=$gl_module_indicator_condition
45273 GL_GNULIB_SLEEP="($GL_GNULIB_SLEEP || $gl_module_indicator_condition)"
45281 printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
45288 gl_cv_func_snprintf_usable=no
45289 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
45290 if test "x$ac_cv_func_snprintf" = xyes
45292 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
45296 if test $ac_cv_func_snprintf = yes; then
45300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
45301 printf %s "checking whether snprintf respects a size of 1... " >&6; }
45302 if test ${gl_cv_func_snprintf_size1+y}
45304 printf %s "(cached) " >&6
45307 if test "$cross_compiling" = yes
45310 # Guess yes on Android.
45311 linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
45312 # Guess yes on native Windows.
45313 mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
45314 *) gl_cv_func_snprintf_size1="guessing yes" ;;
45318 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45319 /* end confdefs.h. */
45323 # define my_snprintf snprintf
45325 # include <stdarg.h>
45326 static int my_snprintf (char *buf, int size, const char *format, ...)
45330 va_start (args, format);
45331 ret = vsnprintf (buf, size, format, args);
45338 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
45339 my_snprintf (buf, 1, "%d", 12345);
45340 return buf[1] != 'E';
45343 if ac_fn_c_try_run "$LINENO"
45345 gl_cv_func_snprintf_size1=yes
45347 e) gl_cv_func_snprintf_size1=no ;;
45350 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45351 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
45358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
45359 printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
45361 case "$gl_cv_func_snprintf_size1" in
45364 case "$gl_cv_func_snprintf_retval_c99" in
45367 case "$gl_cv_func_printf_positions" in
45369 gl_cv_func_snprintf_usable=yes
45377 if test $gl_cv_func_snprintf_usable = no; then
45388 gltests_LIBOBJS="$gltests_LIBOBJS snprintf.$ac_objext"
45390 if test $ac_cv_func_snprintf = yes; then
45394 if test $ac_cv_have_decl_snprintf = yes; then
45402 if test $ac_cv_have_decl_snprintf = no; then
45403 HAVE_DECL_SNPRINTF=0
45415 if test "$GL_GNULIB_SNPRINTF" != 1; then
45416 if test "$GL_GNULIB_SNPRINTF" = 0; then
45417 GL_GNULIB_SNPRINTF=$gl_module_indicator_condition
45419 GL_GNULIB_SNPRINTF="($GL_GNULIB_SNPRINTF || $gl_module_indicator_condition)"
45427 printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
45433 printf "%s\n" "#define GNULIB_SNPRINTF $gl_module_indicator_condition" >>confdefs.h
45438 if test "$ac_cv_header_winsock2_h" = yes; then
45439 GL_COND_OBJ_SOCKET_TRUE=
45440 GL_COND_OBJ_SOCKET_FALSE='#'
45442 GL_COND_OBJ_SOCKET_TRUE='#'
45443 GL_COND_OBJ_SOCKET_FALSE=
45446 if test -z "${GL_COND_OBJ_SOCKET_TRUE}" && test -z "${GL_COND_OBJ_SOCKET_FALSE}"; then
45447 GL_COND_OBJ_SOCKET_TRUE='#'
45448 GL_COND_OBJ_SOCKET_FALSE='#'
45451 # When this module is used, sockets may actually occur as file descriptors,
45452 # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
45464 if test "$ac_cv_header_winsock2_h" = yes; then
45465 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
45466 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
45477 if test "$GL_GNULIB_SOCKET" != 1; then
45478 if test "$GL_GNULIB_SOCKET" = 0; then
45479 GL_GNULIB_SOCKET=$gl_module_indicator_condition
45481 GL_GNULIB_SOCKET="($GL_GNULIB_SOCKET || $gl_module_indicator_condition)"
45489 printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
45495 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
45496 /* <sys/types.h> is not needed according to POSIX, but the
45497 <sys/socket.h> in i386-unknown-freebsd4.10 and
45498 powerpc-apple-darwin5.5 required it. */
45499 #include <sys/types.h>
45500 #if HAVE_SYS_SOCKET_H
45501 # include <sys/socket.h>
45502 #elif HAVE_WS2TCPIP_H
45503 # include <ws2tcpip.h>
45507 if test "x$ac_cv_type_socklen_t" = xyes
45511 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
45512 printf %s "checking for socklen_t equivalent... " >&6; }
45513 if test ${gl_cv_socklen_t_equiv+y}
45515 printf %s "(cached) " >&6
45517 e) # Systems have either "struct sockaddr *" or
45518 # "void *" as the second argument to getpeername
45519 gl_cv_socklen_t_equiv=
45520 for arg2 in "struct sockaddr" void; do
45521 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
45522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45523 /* end confdefs.h. */
45524 #include <sys/types.h>
45525 #include <sys/socket.h>
45527 int getpeername (int, $arg2 *, $t *);
45532 getpeername (0, 0, &len);
45537 if ac_fn_c_try_compile "$LINENO"
45539 gl_cv_socklen_t_equiv="$t"
45541 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45542 test "$gl_cv_socklen_t_equiv" != "" && break
45544 test "$gl_cv_socklen_t_equiv" != "" && break
45546 if test "$gl_cv_socklen_t_equiv" = ""; then
45547 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
45552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
45553 printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
45555 printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
45568 if test $ac_cv_have_decl_strerror_r = no; then
45569 HAVE_DECL_STRERROR_R=0
45572 if test $ac_cv_func_strerror_r = yes; then
45573 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
45574 if test $gl_cv_func_strerror_r_posix_signature = yes; then
45575 case "$gl_cv_func_strerror_r_works" in
45576 *no) REPLACE_STRERROR_R=1 ;;
45579 REPLACE_STRERROR_R=1
45582 REPLACE_STRERROR_R=1
45586 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1
45597 gltests_LIBOBJS="$gltests_LIBOBJS strerror_r.$ac_objext"
45604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for catgets" >&5
45605 printf %s "checking for catgets... " >&6; }
45606 if test ${gl_cv_onwards_func_catgets+y}
45608 printf %s "(cached) " >&6
45611 exec 9>&6 6>/dev/null
45616 ac_fn_check_decl "$LINENO" "catgets" "ac_cv_have_decl_catgets" "#include <nl_types.h>
45617 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45618 if test "x$ac_cv_have_decl_catgets" = xyes
45622 if test $ac_cv_have_decl_catgets = yes; then
45623 ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets"
45624 if test "x$ac_cv_func_catgets" = xyes
45629 if test $ac_cv_func_catgets = yes; then
45630 gl_cv_onwards_func_catgets=yes
45632 gl_cv_onwards_func_catgets='future OS version'
45635 gl_cv_onwards_func_catgets='future OS version'
45641 ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets"
45642 if test "x$ac_cv_func_catgets" = xyes
45647 gl_cv_onwards_func_catgets=$ac_cv_func_catgets
45657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_catgets" >&5
45658 printf "%s\n" "$gl_cv_onwards_func_catgets" >&6; }
45660 case "$gl_cv_onwards_func_catgets" in
45661 future*) ac_cv_func_catgets=no ;;
45662 *) ac_cv_func_catgets=$gl_cv_onwards_func_catgets ;;
45664 if test $ac_cv_func_catgets = yes; then
45666 printf "%s\n" "#define HAVE_CATGETS 1" >>confdefs.h
45689 if test "$GL_GNULIB_STRERROR_R" != 1; then
45690 if test "$GL_GNULIB_STRERROR_R" = 0; then
45691 GL_GNULIB_STRERROR_R=$gl_module_indicator_condition
45693 GL_GNULIB_STRERROR_R="($GL_GNULIB_STRERROR_R || $gl_module_indicator_condition)"
45701 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
45707 printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h
45716 if test $ac_cv_func_symlink = no; then
45719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
45720 printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
45721 if test ${gl_cv_func_symlink_works+y}
45723 printf %s "(cached) " >&6
45725 e) if test "$cross_compiling" = yes
45728 # Guess yes on Linux systems.
45729 linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
45730 # Guess yes on systems that emulate the Linux system calls.
45731 midipix*) gl_cv_func_symlink_works="guessing yes" ;;
45732 # Guess yes on glibc systems.
45733 *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
45734 # If we don't know, obey --enable-cross-guesses.
45735 *) gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
45739 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45740 /* end confdefs.h. */
45741 #include <unistd.h>
45747 if (!symlink ("a", "conftest.link/"))
45749 if (symlink ("conftest.f", "conftest.lnk2"))
45751 else if (!symlink ("a", "conftest.lnk2/"))
45759 if ac_fn_c_try_run "$LINENO"
45761 gl_cv_func_symlink_works=yes
45763 e) gl_cv_func_symlink_works=no ;;
45766 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45767 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
45771 rm -f conftest.f conftest.link conftest.lnk2 ;;
45774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
45775 printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
45776 case "$gl_cv_func_symlink_works" in
45785 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
45786 GL_COND_OBJ_SYMLINK_TRUE=
45787 GL_COND_OBJ_SYMLINK_FALSE='#'
45789 GL_COND_OBJ_SYMLINK_TRUE='#'
45790 GL_COND_OBJ_SYMLINK_FALSE=
45793 if test -z "${GL_COND_OBJ_SYMLINK_TRUE}" && test -z "${GL_COND_OBJ_SYMLINK_FALSE}"; then
45794 GL_COND_OBJ_SYMLINK_TRUE='#'
45795 GL_COND_OBJ_SYMLINK_FALSE='#'
45807 if test "$GL_GNULIB_SYMLINK" != 1; then
45808 if test "$GL_GNULIB_SYMLINK" = 0; then
45809 GL_GNULIB_SYMLINK=$gl_module_indicator_condition
45811 GL_GNULIB_SYMLINK="($GL_GNULIB_SYMLINK || $gl_module_indicator_condition)"
45819 printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
45855 if test $gl_threads_api = posix; then
45856 gl_save_LIBS="$LIBS"
45857 LIBS="$LIBS $LIBMULTITHREAD"
45860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_atfork" >&5
45861 printf %s "checking for pthread_atfork... " >&6; }
45862 if test ${gl_cv_onwards_func_pthread_atfork+y}
45864 printf %s "(cached) " >&6
45867 exec 9>&6 6>/dev/null
45872 ac_fn_check_decl "$LINENO" "pthread_atfork" "ac_cv_have_decl_pthread_atfork" "#include <pthread.h>
45873 " "$ac_c_undeclared_builtin_options" "CFLAGS"
45874 if test "x$ac_cv_have_decl_pthread_atfork" = xyes
45878 if test $ac_cv_have_decl_pthread_atfork = yes; then
45879 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
45880 if test "x$ac_cv_func_pthread_atfork" = xyes
45885 if test $ac_cv_func_pthread_atfork = yes; then
45886 gl_cv_onwards_func_pthread_atfork=yes
45888 gl_cv_onwards_func_pthread_atfork='future OS version'
45891 gl_cv_onwards_func_pthread_atfork='future OS version'
45897 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
45898 if test "x$ac_cv_func_pthread_atfork" = xyes
45903 gl_cv_onwards_func_pthread_atfork=$ac_cv_func_pthread_atfork
45913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_onwards_func_pthread_atfork" >&5
45914 printf "%s\n" "$gl_cv_onwards_func_pthread_atfork" >&6; }
45916 case "$gl_cv_onwards_func_pthread_atfork" in
45917 future*) ac_cv_func_pthread_atfork=no ;;
45918 *) ac_cv_func_pthread_atfork=$gl_cv_onwards_func_pthread_atfork ;;
45920 if test $ac_cv_func_pthread_atfork = yes; then
45922 printf "%s\n" "#define HAVE_PTHREAD_ATFORK 1" >>confdefs.h
45927 LIBS="$gl_save_LIBS"
45932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time() works" >&5
45933 printf %s "checking whether time() works... " >&6; }
45934 if test ${gl_cv_func_time_works+y}
45936 printf %s "(cached) " >&6
45938 e) case "$host_os" in
45940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45941 /* end confdefs.h. */
45943 #include <features.h>
45944 #ifdef __GNU_LIBRARY__
45951 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45952 $EGREP_TRADITIONAL "Unlucky" >/dev/null 2>&1
45954 gl_cv_func_time_works="guessing no"
45956 e) gl_cv_func_time_works="guessing yes" ;;
45962 aix*) gl_cv_func_time_works="guessing no";;
45963 mingw*) gl_cv_func_time_works="guessing no";;
45964 *) gl_cv_func_time_works="guessing yes";;
45969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_time_works" >&5
45970 printf "%s\n" "$gl_cv_func_time_works" >&6; }
45971 case "$gl_cv_func_time_works" in
45972 *no) REPLACE_TIME=1 ;;
45976 if test $REPLACE_TIME = 1; then
45977 GL_COND_OBJ_TIME_TRUE=
45978 GL_COND_OBJ_TIME_FALSE='#'
45980 GL_COND_OBJ_TIME_TRUE='#'
45981 GL_COND_OBJ_TIME_FALSE=
45984 if test -z "${GL_COND_OBJ_TIME_TRUE}" && test -z "${GL_COND_OBJ_TIME_FALSE}"; then
45985 GL_COND_OBJ_TIME_TRUE='#'
45986 GL_COND_OBJ_TIME_FALSE='#'
45989 if test -z "$GL_COND_OBJ_TIME_TRUE"; then :
46005 if test "$GL_GNULIB_TIME" != 1; then
46006 if test "$GL_GNULIB_TIME" = 0; then
46007 GL_GNULIB_TIME=$gl_module_indicator_condition
46009 GL_GNULIB_TIME="($GL_GNULIB_TIME || $gl_module_indicator_condition)"
46017 printf "%s\n" "#define GNULIB_TEST_TIME 1" >>confdefs.h
46021 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
46026 if test $ac_cv_func_vasnprintf = no; then
46037 gltests_LIBOBJS="$gltests_LIBOBJS vasnprintf.$ac_objext"
46047 gltests_LIBOBJS="$gltests_LIBOBJS printf-args.$ac_objext"
46057 gltests_LIBOBJS="$gltests_LIBOBJS printf-parse.$ac_objext"
46067 gltests_LIBOBJS="$gltests_LIBOBJS asnprintf.$ac_objext"
46069 if test $ac_cv_func_vasnprintf = yes; then
46071 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
46083 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
46084 if test "x$ac_cv_type_ptrdiff_t" = xyes
46089 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
46103 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
46113 if test $ac_cv_func_wctob = no; then
46121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
46122 printf %s "checking whether wctob works... " >&6; }
46123 if test ${gl_cv_func_wctob_works+y}
46125 printf %s "(cached) " >&6
46129 # Guess no on Solaris <= 9 and Cygwin.
46130 solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
46131 gl_cv_func_wctob_works="guessing no" ;;
46132 # Guess no on native Windows.
46134 gl_cv_func_wctob_works="guessing no" ;;
46135 # Guess yes otherwise.
46136 *) gl_cv_func_wctob_works="guessing yes" ;;
46140 if test "$cross_compiling" = yes
46144 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46145 /* end confdefs.h. */
46147 #include <locale.h>
46150 register long global __asm__ ("%ebx");
46154 setlocale (LC_ALL, "en_US.UTF-8");
46156 global = 0x12345678;
46157 if (wctob (0x00FC) != -1)
46159 if (global != 0x12345678)
46164 if ac_fn_c_try_run "$LINENO"
46168 e) gl_cv_func_wctob_works=no ;;
46171 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46172 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
46178 if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
46179 if test "$cross_compiling" = yes
46183 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46184 /* end confdefs.h. */
46186 #include <locale.h>
46187 #include <stdlib.h>
46191 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
46195 if (mbtowc (&wc, "\374", 1) == 1)
46196 if (wctob (wc) != (unsigned char) '\374')
46202 if ac_fn_c_try_run "$LINENO"
46204 gl_cv_func_wctob_works=yes
46206 e) gl_cv_func_wctob_works=no ;;
46209 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46210 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
46218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
46219 printf "%s\n" "$gl_cv_func_wctob_works" >&6; }
46220 case "$gl_cv_func_wctob_works" in
46222 *) REPLACE_WCTOB=1 ;;
46224 if test $REPLACE_WCTOB = 0; then
46226 ac_fn_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
46229 " "$ac_c_undeclared_builtin_options" "CFLAGS"
46230 if test "x$ac_cv_have_decl_wctob" = xyes
46234 e) ac_have_decl=0 ;;
46237 printf "%s\n" "#define HAVE_DECL_WCTOB $ac_have_decl" >>confdefs.h
46239 if test $ac_cv_have_decl_wctob != yes; then
46246 if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
46247 GL_COND_OBJ_WCTOB_TRUE=
46248 GL_COND_OBJ_WCTOB_FALSE='#'
46250 GL_COND_OBJ_WCTOB_TRUE='#'
46251 GL_COND_OBJ_WCTOB_FALSE=
46254 if test -z "${GL_COND_OBJ_WCTOB_TRUE}" && test -z "${GL_COND_OBJ_WCTOB_FALSE}"; then
46255 GL_COND_OBJ_WCTOB_TRUE='#'
46256 GL_COND_OBJ_WCTOB_FALSE='#'
46259 if test -z "$GL_COND_OBJ_WCTOB_TRUE"; then :
46280 if test "$GL_GNULIB_WCTOB" != 1; then
46281 if test "$GL_GNULIB_WCTOB" = 0; then
46282 GL_GNULIB_WCTOB=$gl_module_indicator_condition
46284 GL_GNULIB_WCTOB="($GL_GNULIB_WCTOB || $gl_module_indicator_condition)"
46292 printf "%s\n" "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
46304 if test $REPLACE_WCTOMB = 1; then
46305 GL_COND_OBJ_WCTOMB_TRUE=
46306 GL_COND_OBJ_WCTOMB_FALSE='#'
46308 GL_COND_OBJ_WCTOMB_TRUE='#'
46309 GL_COND_OBJ_WCTOMB_FALSE=
46312 if test -z "${GL_COND_OBJ_WCTOMB_TRUE}" && test -z "${GL_COND_OBJ_WCTOMB_FALSE}"; then
46313 GL_COND_OBJ_WCTOMB_TRUE='#'
46314 GL_COND_OBJ_WCTOMB_FALSE='#'
46317 if test -z "$GL_COND_OBJ_WCTOMB_TRUE"; then :
46333 if test "$GL_GNULIB_WCTOMB" != 1; then
46334 if test "$GL_GNULIB_WCTOMB" = 0; then
46335 GL_GNULIB_WCTOMB=$gl_module_indicator_condition
46337 GL_GNULIB_WCTOMB="($GL_GNULIB_WCTOMB || $gl_module_indicator_condition)"
46345 printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
46351 if case "$host_os" in mingw*) true;; *) false;; esac; then
46352 GL_COND_OBJ_WINDOWS_THREAD_TRUE=
46353 GL_COND_OBJ_WINDOWS_THREAD_FALSE='#'
46355 GL_COND_OBJ_WINDOWS_THREAD_TRUE='#'
46356 GL_COND_OBJ_WINDOWS_THREAD_FALSE=
46359 if test -z "${GL_COND_OBJ_WINDOWS_THREAD_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_THREAD_FALSE}"; then
46360 GL_COND_OBJ_WINDOWS_THREAD_TRUE='#'
46361 GL_COND_OBJ_WINDOWS_THREAD_FALSE='#'
46366 if case "$host_os" in mingw*) true;; *) false;; esac; then
46367 GL_COND_OBJ_WINDOWS_TLS_TRUE=
46368 GL_COND_OBJ_WINDOWS_TLS_FALSE='#'
46370 GL_COND_OBJ_WINDOWS_TLS_TRUE='#'
46371 GL_COND_OBJ_WINDOWS_TLS_FALSE=
46374 if test -z "${GL_COND_OBJ_WINDOWS_TLS_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_TLS_FALSE}"; then
46375 GL_COND_OBJ_WINDOWS_TLS_TRUE='#'
46376 GL_COND_OBJ_WINDOWS_TLS_FALSE='#'
46381 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
46382 if test "x$ac_cv_header_stdint_h" = xyes
46384 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
46402 LIBDIFFUTILS_LIBDEPS="$gl_libdeps"
46404 LIBDIFFUTILS_LTLIBDEPS="$gl_ltlibdeps"
46406 LIBTESTS_LIBDEPS="$gltests_libdeps"
46410 # Ensure VLAs are not used.
46411 # Note -Wvla is implicitly added by gl_MANYWARN_ALL_GCC
46413 printf "%s\n" "#define GNULIB_NO_VLA 1" >>confdefs.h
46416 # Check whether --enable-gcc-warnings was given.
46417 if test ${enable_gcc_warnings+y}
46419 enableval=$enable_gcc_warnings; case $enableval in
46421 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
46423 gl_gcc_warnings=$enableval
46425 e) if test -d "$srcdir"/.git; then
46426 gl_gcc_warnings=yes
46435 if test "$gl_gcc_warnings" = yes; then
46438 ac_cpp='$CPP $CPPFLAGS'
46439 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46440 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46441 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
46445 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
46446 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
46448 printf %s "(cached) " >&6
46451 gl_save_compiler_FLAGS="$CFLAGS"
46452 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
46453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46454 /* end confdefs.h. */
46464 if ac_fn_c_try_link "$LINENO"
46466 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
46468 e) gl_cv_warn_c__Werror__Wunknown_warning_option=no ;;
46471 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46472 conftest$ac_exeext conftest.$ac_ext
46473 CFLAGS="$gl_save_compiler_FLAGS"
46477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
46478 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
46479 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
46481 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
46483 e) gl_unknown_warnings_are_errors= ;;
46488 ac_cpp='$CPP $CPPFLAGS'
46489 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46490 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46491 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
46497 printf %s "checking whether C compiler handles -Werror... " >&6; }
46498 if test ${gl_cv_warn_c__Werror+y}
46500 printf %s "(cached) " >&6
46503 gl_save_compiler_FLAGS="$CFLAGS"
46504 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
46505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46506 /* end confdefs.h. */
46516 if ac_fn_c_try_link "$LINENO"
46518 gl_cv_warn_c__Werror=yes
46520 e) gl_cv_warn_c__Werror=no ;;
46523 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46524 conftest$ac_exeext conftest.$ac_ext
46525 CFLAGS="$gl_save_compiler_FLAGS"
46529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
46530 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
46531 if test "x$gl_cv_warn_c__Werror" = xyes
46533 as_fn_append WERROR_CFLAGS " -Werror"
46540 # This, $nw, is the list of warnings we disable.
46541 nw="$nw -Winline" # system.h's readdir_ignoring_dot_and_dotdot
46542 nw="$nw -Wstack-protector" # not worth working around
46546 ac_cpp='$CPP $CPPFLAGS'
46547 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46548 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46549 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
46557 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
46558 if test ${gl_cv_cc_nomfi_supported+y}
46560 printf %s "(cached) " >&6
46562 e) gl_save_CFLAGS="$CFLAGS"
46563 CFLAGS="$CFLAGS -Wextra -Werror -Wno-missing-field-initializers"
46564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46565 /* end confdefs.h. */
46575 if ac_fn_c_try_compile "$LINENO"
46577 gl_cv_cc_nomfi_supported=yes
46579 e) gl_cv_cc_nomfi_supported=no ;;
46582 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46583 CFLAGS="$gl_save_CFLAGS"
46587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
46588 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
46590 if test "$gl_cv_cc_nomfi_supported" = yes
46593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
46594 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
46595 if test ${gl_cv_cc_nomfi_needed+y}
46597 printf %s "(cached) " >&6
46599 e) gl_save_CFLAGS="$CFLAGS"
46600 CFLAGS="$CFLAGS -Wextra -Werror"
46601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46602 /* end confdefs.h. */
46605 typedef struct { int a; int b; } s_t;
46618 if ac_fn_c_try_compile "$LINENO"
46620 gl_cv_cc_nomfi_needed=no
46622 e) gl_cv_cc_nomfi_needed=yes ;;
46625 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46626 CFLAGS="$gl_save_CFLAGS"
46630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
46631 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
46635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
46636 printf %s "checking whether -Wuninitialized is supported... " >&6; }
46637 if test ${gl_cv_cc_uninitialized_supported+y}
46639 printf %s "(cached) " >&6
46641 e) gl_save_CFLAGS="$CFLAGS"
46642 CFLAGS="$CFLAGS -Werror -Wuninitialized"
46643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46644 /* end confdefs.h. */
46654 if ac_fn_c_try_compile "$LINENO"
46656 gl_cv_cc_uninitialized_supported=yes
46658 e) gl_cv_cc_uninitialized_supported=no ;;
46661 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46662 CFLAGS="$gl_save_CFLAGS"
46666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
46667 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
46671 # List all gcc warning categories.
46672 # To compare this list to your installed GCC's, run this Bash command:
46675 # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
46676 # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
46677 # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
46680 for gl_manywarn_item in -fanalyzer -fstrict-flex-arrays \
46682 -Warith-conversion \
46683 -Wbad-function-cast \
46684 -Wcast-align=strict \
46686 -Wdisabled-optimization \
46687 -Wdouble-promotion \
46688 -Wduplicated-branches \
46689 -Wduplicated-cond \
46691 -Wformat-signedness \
46696 -Wmissing-declarations \
46697 -Wmissing-include-dirs \
46698 -Wmissing-prototypes \
46700 -Wnull-dereference \
46701 -Wold-style-definition \
46703 -Woverlength-strings \
46707 -Wstack-protector \
46708 -Wstrict-flex-arrays \
46709 -Wstrict-overflow \
46710 -Wstrict-prototypes \
46711 -Wsuggest-attribute=cold \
46712 -Wsuggest-attribute=const \
46713 -Wsuggest-attribute=format \
46714 -Wsuggest-attribute=malloc \
46715 -Wsuggest-attribute=noreturn \
46716 -Wsuggest-attribute=pure \
46717 -Wsuggest-final-methods \
46718 -Wsuggest-final-types \
46723 -Wunknown-pragmas \
46724 -Wunsafe-loop-optimizations \
46726 -Wvariadic-macros \
46727 -Wvector-operation-performance \
46732 as_fn_append ws " $gl_manywarn_item"
46735 # gcc --help=warnings outputs an unusual form for these options; list
46736 # them here so that the above 'comm' command doesn't report a false match.
46737 as_fn_append ws ' -Warray-bounds=2'
46738 as_fn_append ws ' -Wattribute-alias=2'
46739 as_fn_append ws ' -Wbidi-chars=any,ucn'
46740 as_fn_append ws ' -Wformat-overflow=2'
46741 as_fn_append ws ' -Wformat=2'
46742 as_fn_append ws ' -Wformat-truncation=2'
46743 as_fn_append ws ' -Wimplicit-fallthrough=5'
46744 as_fn_append ws ' -Wshift-overflow=2'
46745 as_fn_append ws ' -Wuse-after-free=3'
46746 as_fn_append ws ' -Wunused-const-variable=2'
46747 as_fn_append ws ' -Wvla-larger-than=4031'
46749 # These are needed for older GCC versions.
46750 if test -n "$GCC" && gl_gcc_version=`($CC --version) 2>/dev/null`; then
46751 case $gl_gcc_version in
46752 'gcc (GCC) '[0-3].* | \
46753 'gcc (GCC) '4.[0-7].*)
46754 as_fn_append ws ' -fdiagnostics-show-option'
46755 as_fn_append ws ' -funit-at-a-time'
46758 case $gl_gcc_version in
46759 'gcc (GCC) '[0-9].*)
46760 as_fn_append ws ' -fno-common'
46765 # Disable specific options as needed.
46766 if test "$gl_cv_cc_nomfi_needed" = yes; then
46767 as_fn_append ws ' -Wno-missing-field-initializers'
46770 if test "$gl_cv_cc_uninitialized_supported" = no; then
46771 as_fn_append ws ' -Wno-uninitialized'
46774 # This warning have too many false alarms in GCC 11.2.1.
46775 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101713
46776 as_fn_append ws ' -Wno-analyzer-malloc-leak'
46779 ac_cpp='$CPP $CPPFLAGS'
46780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46791 *" $gl_warn_item "*)
46794 as_fn_append gl_warn_set " $gl_warn_item"
46803 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | sed "$as_sed_sh"`
46805 case $gl_positive in
46806 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
46808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
46809 printf %s "checking whether C compiler handles $w... " >&6; }
46810 if eval test \${$as_gl_Warn+y}
46812 printf %s "(cached) " >&6
46815 gl_save_compiler_FLAGS="$CFLAGS"
46816 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
46817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46818 /* end confdefs.h. */
46828 if ac_fn_c_try_link "$LINENO"
46830 eval "$as_gl_Warn=yes"
46832 e) eval "$as_gl_Warn=no" ;;
46835 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46836 conftest$ac_exeext conftest.$ac_ext
46837 CFLAGS="$gl_save_compiler_FLAGS"
46841 eval ac_res=\$$as_gl_Warn
46842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
46843 printf "%s\n" "$ac_res" >&6; }
46844 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
46846 as_fn_append WARN_CFLAGS " $w"
46853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
46854 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
46855 if test ${gl_cv_warn_c__Wno_sign_compare+y}
46857 printf %s "(cached) " >&6
46860 gl_save_compiler_FLAGS="$CFLAGS"
46861 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
46862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46863 /* end confdefs.h. */
46873 if ac_fn_c_try_link "$LINENO"
46875 gl_cv_warn_c__Wno_sign_compare=yes
46877 e) gl_cv_warn_c__Wno_sign_compare=no ;;
46880 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46881 conftest$ac_exeext conftest.$ac_ext
46882 CFLAGS="$gl_save_compiler_FLAGS"
46886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
46887 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
46888 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
46890 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
46893 # Too many warnings for now
46896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
46897 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
46898 if test ${gl_cv_warn_c__Wno_unused_parameter+y}
46900 printf %s "(cached) " >&6
46903 gl_save_compiler_FLAGS="$CFLAGS"
46904 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
46905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46906 /* end confdefs.h. */
46916 if ac_fn_c_try_link "$LINENO"
46918 gl_cv_warn_c__Wno_unused_parameter=yes
46920 e) gl_cv_warn_c__Wno_unused_parameter=no ;;
46923 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46924 conftest$ac_exeext conftest.$ac_ext
46925 CFLAGS="$gl_save_compiler_FLAGS"
46929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
46930 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
46931 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes
46933 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
46936 # Too many warnings for now
46939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
46940 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
46941 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
46943 printf %s "(cached) " >&6
46946 gl_save_compiler_FLAGS="$CFLAGS"
46947 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
46948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46949 /* end confdefs.h. */
46959 if ac_fn_c_try_link "$LINENO"
46961 gl_cv_warn_c__Wno_format_nonliteral=yes
46963 e) gl_cv_warn_c__Wno_format_nonliteral=no ;;
46966 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46967 conftest$ac_exeext conftest.$ac_ext
46968 CFLAGS="$gl_save_compiler_FLAGS"
46972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
46973 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
46974 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
46976 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
46983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
46984 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
46985 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
46987 printf %s "(cached) " >&6
46990 gl_save_compiler_FLAGS="$CFLAGS"
46991 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
46992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46993 /* end confdefs.h. */
47003 if ac_fn_c_try_link "$LINENO"
47005 gl_cv_warn_c__fdiagnostics_show_option=yes
47007 e) gl_cv_warn_c__fdiagnostics_show_option=no ;;
47010 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47011 conftest$ac_exeext conftest.$ac_ext
47012 CFLAGS="$gl_save_compiler_FLAGS"
47016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
47017 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
47018 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
47020 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
47026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
47027 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
47028 if test ${gl_cv_warn_c__funit_at_a_time+y}
47030 printf %s "(cached) " >&6
47033 gl_save_compiler_FLAGS="$CFLAGS"
47034 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
47035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47036 /* end confdefs.h. */
47046 if ac_fn_c_try_link "$LINENO"
47048 gl_cv_warn_c__funit_at_a_time=yes
47050 e) gl_cv_warn_c__funit_at_a_time=no ;;
47053 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47054 conftest$ac_exeext conftest.$ac_ext
47055 CFLAGS="$gl_save_compiler_FLAGS"
47059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
47060 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
47061 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
47063 as_fn_append WARN_CFLAGS " -funit-at-a-time"
47069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-common" >&5
47070 printf %s "checking whether C compiler handles -fno-common... " >&6; }
47071 if test ${gl_cv_warn_c__fno_common+y}
47073 printf %s "(cached) " >&6
47076 gl_save_compiler_FLAGS="$CFLAGS"
47077 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-common"
47078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47079 /* end confdefs.h. */
47089 if ac_fn_c_try_link "$LINENO"
47091 gl_cv_warn_c__fno_common=yes
47093 e) gl_cv_warn_c__fno_common=no ;;
47096 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47097 conftest$ac_exeext conftest.$ac_ext
47098 CFLAGS="$gl_save_compiler_FLAGS"
47102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_common" >&5
47103 printf "%s\n" "$gl_cv_warn_c__fno_common" >&6; }
47104 if test "x$gl_cv_warn_c__fno_common" = xyes
47106 as_fn_append WARN_CFLAGS " -fno-common"
47114 printf "%s\n" "#define GCC_LINT 1" >>confdefs.h
47117 printf "%s\n" "#define _FORTIFY_SOURCE 2" >>confdefs.h
47120 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
47123 # We use a slightly smaller set of warning options for lib/.
47124 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
47126 nw="$nw -Wunused-macros"
47127 nw="$nw -Wsuggest-attribute=pure"
47128 nw="$nw -Wduplicated-branches" # Too many false alarms
47132 set x $WARN_CFLAGS; shift
47136 *" $gl_warn_item "*)
47139 as_fn_append gl_warn_set " $gl_warn_item"
47143 GNULIB_WARN_CFLAGS=$gl_warn_set
47148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
47149 printf %s "checking for inline... " >&6; }
47150 if test ${ac_cv_c_inline+y}
47152 printf %s "(cached) " >&6
47154 e) ac_cv_c_inline=no
47155 for ac_kw in inline __inline__ __inline; do
47156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47157 /* end confdefs.h. */
47158 #ifndef __cplusplus
47160 static $ac_kw foo_t static_foo (void) {return 0; }
47161 $ac_kw foo_t foo (void) {return 0; }
47165 if ac_fn_c_try_compile "$LINENO"
47167 ac_cv_c_inline=$ac_kw
47169 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47170 test "$ac_cv_c_inline" != no && break
47175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
47176 printf "%s\n" "$ac_cv_c_inline" >&6; }
47178 case $ac_cv_c_inline in
47181 case $ac_cv_c_inline in
47183 *) ac_val=$ac_cv_c_inline;;
47185 cat >>confdefs.h <<_ACEOF
47186 #ifndef __cplusplus
47187 #define inline $ac_val
47195 printf "%s\n" "#define DEFAULT_EDITOR_PROGRAM \"ed\"" >>confdefs.h
47198 # Extract the first word of "pr", so it can be a program name with args.
47199 set dummy pr; ac_word=$2
47200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47201 printf %s "checking for $ac_word... " >&6; }
47202 if test ${ac_cv_path_PR_PROGRAM+y}
47204 printf %s "(cached) " >&6
47206 e) case $PR_PROGRAM in
47208 ac_cv_path_PR_PROGRAM="$PR_PROGRAM" # Let the user override the test with a path.
47211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47212 for as_dir in $PATH
47215 case $as_dir in #(((
47218 *) as_dir=$as_dir/ ;;
47220 for ac_exec_ext in '' $ac_executable_extensions; do
47221 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
47222 ac_cv_path_PR_PROGRAM="$as_dir$ac_word$ac_exec_ext"
47223 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
47230 test -z "$ac_cv_path_PR_PROGRAM" && ac_cv_path_PR_PROGRAM=""""
47235 PR_PROGRAM=$ac_cv_path_PR_PROGRAM
47236 if test -n "$PR_PROGRAM"; then
47237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PR_PROGRAM" >&5
47238 printf "%s\n" "$PR_PROGRAM" >&6; }
47240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47241 printf "%s\n" "no" >&6; }
47246 printf "%s\n" "#define PR_PROGRAM \"$PR_PROGRAM\"" >>confdefs.h
47249 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
47250 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes
47253 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLKSIZE 1" >>confdefs.h
47258 ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
47259 if test "x$ac_cv_member_struct_stat_st_rdev" = xyes
47262 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_RDEV 1" >>confdefs.h
47267 ac_header_dirent=no
47268 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
47269 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"`
47270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
47271 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
47272 if eval test \${$as_ac_Header+y}
47274 printf %s "(cached) " >&6
47276 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47277 /* end confdefs.h. */
47278 #include <sys/types.h>
47290 if ac_fn_c_try_compile "$LINENO"
47292 eval "$as_ac_Header=yes"
47294 e) eval "$as_ac_Header=no" ;;
47297 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
47300 eval ac_res=\$$as_ac_Header
47301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
47302 printf "%s\n" "$ac_res" >&6; }
47303 if eval test \"x\$"$as_ac_Header"\" = x"yes"
47305 cat >>confdefs.h <<_ACEOF
47306 #define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1
47309 ac_header_dirent=$ac_hdr; break
47313 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
47314 if test $ac_header_dirent = dirent.h; then
47315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
47316 printf %s "checking for library containing opendir... " >&6; }
47317 if test ${ac_cv_search_opendir+y}
47319 printf %s "(cached) " >&6
47321 e) ac_func_search_save_LIBS=$LIBS
47322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47323 /* end confdefs.h. */
47325 /* Override any GCC internal prototype to avoid an error.
47326 Use char because int might match the return type of a GCC
47327 builtin and then its argument prototype would still apply.
47328 The 'extern "C"' is for builds by C++ compilers;
47329 although this is not generally supported in C code supporting it here
47330 has little cost and some practical benefit (sr 110532). */
47334 char opendir (void);
47343 for ac_lib in '' dir
47345 if test -z "$ac_lib"; then
47346 ac_res="none required"
47349 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
47351 if ac_fn_c_try_link "$LINENO"
47353 ac_cv_search_opendir=$ac_res
47355 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47357 if test ${ac_cv_search_opendir+y}
47362 if test ${ac_cv_search_opendir+y}
47366 e) ac_cv_search_opendir=no ;;
47369 rm conftest.$ac_ext
47370 LIBS=$ac_func_search_save_LIBS ;;
47373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
47374 printf "%s\n" "$ac_cv_search_opendir" >&6; }
47375 ac_res=$ac_cv_search_opendir
47376 if test "$ac_res" != no
47378 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
47383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
47384 printf %s "checking for library containing opendir... " >&6; }
47385 if test ${ac_cv_search_opendir+y}
47387 printf %s "(cached) " >&6
47389 e) ac_func_search_save_LIBS=$LIBS
47390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47391 /* end confdefs.h. */
47393 /* Override any GCC internal prototype to avoid an error.
47394 Use char because int might match the return type of a GCC
47395 builtin and then its argument prototype would still apply.
47396 The 'extern "C"' is for builds by C++ compilers;
47397 although this is not generally supported in C code supporting it here
47398 has little cost and some practical benefit (sr 110532). */
47402 char opendir (void);
47413 if test -z "$ac_lib"; then
47414 ac_res="none required"
47417 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
47419 if ac_fn_c_try_link "$LINENO"
47421 ac_cv_search_opendir=$ac_res
47423 rm -f core conftest.err conftest.$ac_objext conftest.beam \
47425 if test ${ac_cv_search_opendir+y}
47430 if test ${ac_cv_search_opendir+y}
47434 e) ac_cv_search_opendir=no ;;
47437 rm conftest.$ac_ext
47438 LIBS=$ac_func_search_save_LIBS ;;
47441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
47442 printf "%s\n" "$ac_cv_search_opendir" >&6; }
47443 ac_res=$ac_cv_search_opendir
47444 if test "$ac_res" != no
47446 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
47452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
47453 printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
47454 if test ${ac_cv_header_sys_wait_h+y}
47456 printf %s "(cached) " >&6
47458 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47459 /* end confdefs.h. */
47460 #include <sys/types.h>
47461 #include <sys/wait.h>
47462 #ifndef WEXITSTATUS
47463 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
47466 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
47474 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
47479 if ac_fn_c_try_compile "$LINENO"
47481 ac_cv_header_sys_wait_h=yes
47483 e) ac_cv_header_sys_wait_h=no ;;
47486 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
47489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
47490 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
47491 if test $ac_cv_header_sys_wait_h = yes; then
47493 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
47498 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
47500 if test "x$ac_cv_type_pid_t" = xyes
47504 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47505 /* end confdefs.h. */
47507 #if defined _WIN64 && !defined __CYGWIN__
47520 if ac_fn_c_try_compile "$LINENO"
47524 e) ac_pid_type='__int64' ;;
47527 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47529 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
47542 if test $ac_cv_func_sigprocmask = no; then
47543 ac_fn_c_check_func "$LINENO" "sigblock" "ac_cv_func_sigblock"
47544 if test "x$ac_cv_func_sigblock" = xyes
47546 printf "%s\n" "#define HAVE_SIGBLOCK 1" >>confdefs.h
47551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
47552 printf %s "checking whether closedir returns void... " >&6; }
47553 if test ${ac_cv_func_closedir_void+y}
47555 printf %s "(cached) " >&6
47557 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47558 /* end confdefs.h. */
47560 #include <$ac_header_dirent>
47566 return closedir(0);
47572 if ac_fn_c_try_compile "$LINENO"
47574 ac_cv_func_closedir_void=no
47576 e) ac_cv_func_closedir_void=yes ;;
47579 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
47582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
47583 printf "%s\n" "$ac_cv_func_closedir_void" >&6; }
47584 if test $ac_cv_func_closedir_void = yes; then
47586 printf "%s\n" "#define CLOSEDIR_VOID 1" >>confdefs.h
47595 if test "x$ac_cv_func_fork" = xyes; then
47596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
47597 printf %s "checking for working fork... " >&6; }
47598 if test ${ac_cv_func_fork_works+y}
47600 printf %s "(cached) " >&6
47602 e) if test "$cross_compiling" = yes
47604 ac_cv_func_fork_works=cross
47606 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47607 /* end confdefs.h. */
47608 $ac_includes_default
47613 /* By R. Kuhlmann. */
47614 return fork () < 0;
47620 if ac_fn_c_try_run "$LINENO"
47622 ac_cv_func_fork_works=yes
47624 e) ac_cv_func_fork_works=no ;;
47627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47628 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
47634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
47635 printf "%s\n" "$ac_cv_func_fork_works" >&6; }
47638 ac_cv_func_fork_works=$ac_cv_func_fork
47640 if test "x$ac_cv_func_fork_works" = xcross; then
47642 *-*-amigaos* | *-*-msdosdjgpp*)
47643 # Override, as these systems have only a dummy fork() stub
47644 ac_cv_func_fork_works=no
47647 ac_cv_func_fork_works=yes
47650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
47651 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
47653 ac_cv_func_vfork_works=$ac_cv_func_vfork
47654 if test "x$ac_cv_func_vfork" = xyes; then
47655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
47656 printf %s "checking for working vfork... " >&6; }
47657 if test ${ac_cv_func_vfork_works+y}
47659 printf %s "(cached) " >&6
47661 e) if test "$cross_compiling" = yes
47663 ac_cv_func_vfork_works=cross
47665 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47666 /* end confdefs.h. */
47667 /* Thanks to Paul Eggert for this test. */
47668 $ac_includes_default
47669 #include <signal.h>
47670 #include <sys/wait.h>
47671 #ifdef HAVE_VFORK_H
47672 # include <vfork.h>
47676 do_nothing (int sig)
47681 /* On some sparc systems, changes by the child to local and incoming
47682 argument registers are propagated back to the parent. The compiler
47683 is told about this with #include <vfork.h>, but some compilers
47684 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
47685 static variable whose address is put into a register that is
47686 clobbered by the vfork. */
47688 sparc_address_test (int arg)
47690 static pid_t child;
47708 pid_t parent = getpid ();
47711 sparc_address_test (0);
47713 /* On Solaris 2.4, changes by the child to the signal handler
47714 also munge signal handlers in the parent. To detect this,
47715 start by putting the parent's handler in a known state. */
47716 signal (SIGTERM, SIG_DFL);
47721 /* Here is another test for sparc vfork register problems. This
47722 test uses lots of local variables, at least as many local
47723 variables as main has allocated so far including compiler
47724 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
47725 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
47726 reuse the register of parent for one of the local variables,
47727 since it will think that parent can't possibly be used any more
47728 in this routine. Assigning to the local variable will thus
47729 munge parent in the parent process. */
47731 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
47732 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
47733 /* Convince the compiler that p..p7 are live; otherwise, it might
47734 use the same hardware register for all 8 local variables. */
47735 if (p != p1 || p != p2 || p != p3 || p != p4
47736 || p != p5 || p != p6 || p != p7)
47739 /* Alter the child's signal handler. */
47740 if (signal (SIGTERM, do_nothing) != SIG_DFL)
47743 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
47744 from child file descriptors. If the child closes a descriptor
47745 before it execs or exits, this munges the parent's descriptor
47746 as well. Test for this by closing stdout in the child. */
47747 _exit(close(fileno(stdout)) != 0);
47752 while (wait(&status) != child)
47755 /* Was there some problem with vforking? */
47758 /* Did the child munge the parent's signal handler? */
47759 || signal (SIGTERM, SIG_DFL) != SIG_DFL
47761 /* Did the child fail? (This shouldn't happen.) */
47764 /* Did the vfork/compiler bug occur? */
47765 || parent != getpid()
47767 /* Did the file descriptor bug occur? */
47768 || fstat(fileno(stdout), &st) != 0
47773 if ac_fn_c_try_run "$LINENO"
47775 ac_cv_func_vfork_works=yes
47777 e) ac_cv_func_vfork_works=no ;;
47780 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47781 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
47787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
47788 printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
47791 if test "x$ac_cv_func_fork_works" = xcross; then
47792 ac_cv_func_vfork_works=$ac_cv_func_vfork
47793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
47794 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
47797 if test "x$ac_cv_func_vfork_works" = xyes; then
47799 printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
47803 printf "%s\n" "#define vfork fork" >>confdefs.h
47806 if test "x$ac_cv_func_fork_works" = xyes; then
47808 printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
47813 # When .tarball-version exists, we're building from a tarball
47814 # and must not make man/*.1 files depend on the generated src/version.c,
47815 # because that would induce a requirement to run the help2man perl script.
47816 # We are not yet prepared to make perl a build-from-tarball requirement.
47817 # Hence, here we detect .tarball-version existence. When not present,
47818 # we define a variable to be used in man/Makefile.am to induce the
47819 # proper dependency (so that man/*.1 will be rebuilt upon any version change),
47820 # but not when built from a tarball.
47822 test -f $srcdir/.tarball-version \
47823 && SRC_VERSION_C= \
47824 || SRC_VERSION_C=../src/version.c
47827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
47828 printf %s "checking whether NLS is requested... " >&6; }
47829 # Check whether --enable-nls was given.
47830 if test ${enable_nls+y}
47832 enableval=$enable_nls; USE_NLS=$enableval
47838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
47839 printf "%s\n" "$USE_NLS" >&6; }
47844 GETTEXT_MACRO_VERSION=0.19
47849 # Prepare PATH_SEPARATOR.
47850 # The user is always right.
47851 if test "${PATH_SEPARATOR+set}" != set; then
47852 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
47853 # contains only /bin. Note that ksh looks also at the FPATH variable,
47854 # so we have to set that as well for the test.
47856 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47857 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47858 || PATH_SEPARATOR=';'
47862 # Find out how to test for executable files. Don't use a zero-byte file,
47863 # as systems may use methods other than mode bits to determine executability.
47864 cat >conf$$.file <<_ASEOF
47868 chmod +x conf$$.file
47869 if test -x conf$$.file >/dev/null 2>&1; then
47870 ac_executable_p="test -x"
47872 ac_executable_p="test -f"
47876 # Extract the first word of "msgfmt", so it can be a program name with args.
47877 set dummy msgfmt; ac_word=$2
47878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47879 printf %s "checking for $ac_word... " >&6; }
47880 if test ${ac_cv_path_MSGFMT+y}
47882 printf %s "(cached) " >&6
47884 e) case "$MSGFMT" in
47886 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
47889 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
47890 for ac_dir in $PATH; do
47892 test -z "$ac_dir" && ac_dir=.
47893 for ac_exec_ext in '' $ac_executable_extensions; do
47894 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
47895 echo "$as_me: trying $ac_dir/$ac_word..." >&5
47896 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
47897 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
47898 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
47905 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
47910 MSGFMT="$ac_cv_path_MSGFMT"
47911 if test "$MSGFMT" != ":"; then
47912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
47913 printf "%s\n" "$MSGFMT" >&6; }
47915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47916 printf "%s\n" "no" >&6; }
47919 # Extract the first word of "gmsgfmt", so it can be a program name with args.
47920 set dummy gmsgfmt; ac_word=$2
47921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47922 printf %s "checking for $ac_word... " >&6; }
47923 if test ${ac_cv_path_GMSGFMT+y}
47925 printf %s "(cached) " >&6
47927 e) case $GMSGFMT in
47929 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
47932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47933 for as_dir in $PATH
47936 case $as_dir in #(((
47939 *) as_dir=$as_dir/ ;;
47941 for ac_exec_ext in '' $ac_executable_extensions; do
47942 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
47943 ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
47944 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
47951 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
47956 GMSGFMT=$ac_cv_path_GMSGFMT
47957 if test -n "$GMSGFMT"; then
47958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
47959 printf "%s\n" "$GMSGFMT" >&6; }
47961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47962 printf "%s\n" "no" >&6; }
47967 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
47968 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
47969 *) MSGFMT_015=$MSGFMT ;;
47972 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
47973 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
47974 *) GMSGFMT_015=$GMSGFMT ;;
47979 # Prepare PATH_SEPARATOR.
47980 # The user is always right.
47981 if test "${PATH_SEPARATOR+set}" != set; then
47982 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
47983 # contains only /bin. Note that ksh looks also at the FPATH variable,
47984 # so we have to set that as well for the test.
47986 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47987 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
47988 || PATH_SEPARATOR=';'
47992 # Find out how to test for executable files. Don't use a zero-byte file,
47993 # as systems may use methods other than mode bits to determine executability.
47994 cat >conf$$.file <<_ASEOF
47998 chmod +x conf$$.file
47999 if test -x conf$$.file >/dev/null 2>&1; then
48000 ac_executable_p="test -x"
48002 ac_executable_p="test -f"
48006 # Extract the first word of "xgettext", so it can be a program name with args.
48007 set dummy xgettext; ac_word=$2
48008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48009 printf %s "checking for $ac_word... " >&6; }
48010 if test ${ac_cv_path_XGETTEXT+y}
48012 printf %s "(cached) " >&6
48014 e) case "$XGETTEXT" in
48016 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
48019 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
48020 for ac_dir in $PATH; do
48022 test -z "$ac_dir" && ac_dir=.
48023 for ac_exec_ext in '' $ac_executable_extensions; do
48024 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
48025 echo "$as_me: trying $ac_dir/$ac_word..." >&5
48026 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
48027 (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
48028 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
48035 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
48040 XGETTEXT="$ac_cv_path_XGETTEXT"
48041 if test "$XGETTEXT" != ":"; then
48042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
48043 printf "%s\n" "$XGETTEXT" >&6; }
48045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48046 printf "%s\n" "no" >&6; }
48051 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
48052 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
48053 *) XGETTEXT_015=$XGETTEXT ;;
48058 # Prepare PATH_SEPARATOR.
48059 # The user is always right.
48060 if test "${PATH_SEPARATOR+set}" != set; then
48061 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
48062 # contains only /bin. Note that ksh looks also at the FPATH variable,
48063 # so we have to set that as well for the test.
48065 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
48066 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
48067 || PATH_SEPARATOR=';'
48071 # Find out how to test for executable files. Don't use a zero-byte file,
48072 # as systems may use methods other than mode bits to determine executability.
48073 cat >conf$$.file <<_ASEOF
48077 chmod +x conf$$.file
48078 if test -x conf$$.file >/dev/null 2>&1; then
48079 ac_executable_p="test -x"
48081 ac_executable_p="test -f"
48085 # Extract the first word of "msgmerge", so it can be a program name with args.
48086 set dummy msgmerge; ac_word=$2
48087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48088 printf %s "checking for $ac_word... " >&6; }
48089 if test ${ac_cv_path_MSGMERGE+y}
48091 printf %s "(cached) " >&6
48093 e) case "$MSGMERGE" in
48095 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
48098 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
48099 for ac_dir in $PATH; do
48101 test -z "$ac_dir" && ac_dir=.
48102 for ac_exec_ext in '' $ac_executable_extensions; do
48103 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
48104 echo "$as_me: trying $ac_dir/$ac_word..." >&5
48105 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
48106 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
48113 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
48118 MSGMERGE="$ac_cv_path_MSGMERGE"
48119 if test "$MSGMERGE" != ":"; then
48120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
48121 printf "%s\n" "$MSGMERGE" >&6; }
48123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48124 printf "%s\n" "no" >&6; }
48128 test -n "$localedir" || localedir='${datadir}/locale'
48131 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
48134 ac_config_commands="$ac_config_commands po-directories"
48161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
48162 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
48163 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
48165 printf %s "(cached) " >&6
48167 e) gt_save_LIBS="$LIBS"
48168 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
48169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48170 /* end confdefs.h. */
48171 #include <CoreFoundation/CFPreferences.h>
48175 CFPreferencesCopyAppValue(NULL, NULL)
48180 if ac_fn_c_try_link "$LINENO"
48182 gt_cv_func_CFPreferencesCopyAppValue=yes
48184 e) gt_cv_func_CFPreferencesCopyAppValue=no ;;
48187 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48188 conftest$ac_exeext conftest.$ac_ext
48189 LIBS="$gt_save_LIBS" ;;
48192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
48193 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
48194 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
48196 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
48199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
48200 printf %s "checking for CFLocaleCopyCurrent... " >&6; }
48201 if test ${gt_cv_func_CFLocaleCopyCurrent+y}
48203 printf %s "(cached) " >&6
48205 e) gt_save_LIBS="$LIBS"
48206 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
48207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48208 /* end confdefs.h. */
48209 #include <CoreFoundation/CFLocale.h>
48213 CFLocaleCopyCurrent();
48218 if ac_fn_c_try_link "$LINENO"
48220 gt_cv_func_CFLocaleCopyCurrent=yes
48222 e) gt_cv_func_CFLocaleCopyCurrent=no ;;
48225 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48226 conftest$ac_exeext conftest.$ac_ext
48227 LIBS="$gt_save_LIBS" ;;
48230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
48231 printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
48232 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
48234 printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
48238 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
48239 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
48251 case " $gt_needs " in
48252 *" need-formatstring-macros "*) gt_api_version=3 ;;
48253 *" need-ngettext "*) gt_api_version=2 ;;
48254 *) gt_api_version=1 ;;
48256 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
48257 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
48259 if test "$USE_NLS" = "yes"; then
48260 gt_use_preinstalled_gnugettext=no
48263 if test $gt_api_version -ge 3; then
48264 gt_revision_test_code='
48265 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
48266 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
48268 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
48271 gt_revision_test_code=
48273 if test $gt_api_version -ge 2; then
48274 gt_expression_test_code=' + * ngettext ("", "", 0)'
48276 gt_expression_test_code=
48279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
48280 printf %s "checking for GNU gettext in libc... " >&6; }
48281 if eval test \${$gt_func_gnugettext_libc+y}
48283 printf %s "(cached) " >&6
48285 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48286 /* end confdefs.h. */
48288 #include <libintl.h>
48289 $gt_revision_test_code
48290 extern int _nl_msg_cat_cntr;
48291 extern int *_nl_domain_bindings;
48297 bindtextdomain ("", "");
48298 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
48304 if ac_fn_c_try_link "$LINENO"
48306 eval "$gt_func_gnugettext_libc=yes"
48308 e) eval "$gt_func_gnugettext_libc=no" ;;
48311 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48312 conftest$ac_exeext conftest.$ac_ext ;;
48315 eval ac_res=\$$gt_func_gnugettext_libc
48316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
48317 printf "%s\n" "$ac_res" >&6; }
48319 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
48325 am_save_CPPFLAGS="$CPPFLAGS"
48327 for element in $INCICONV; do
48329 for x in $CPPFLAGS; do
48331 acl_save_prefix="$prefix"
48332 prefix="$acl_final_prefix"
48333 acl_save_exec_prefix="$exec_prefix"
48334 exec_prefix="$acl_final_exec_prefix"
48336 exec_prefix="$acl_save_exec_prefix"
48337 prefix="$acl_save_prefix"
48339 if test "X$x" = "X$element"; then
48344 if test -z "$haveit"; then
48345 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
48350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
48351 printf %s "checking for iconv... " >&6; }
48352 if test ${am_cv_func_iconv+y}
48354 printf %s "(cached) " >&6
48357 am_cv_func_iconv="no, consider installing GNU libiconv"
48359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48360 /* end confdefs.h. */
48362 #include <stdlib.h>
48368 iconv_t cd = iconv_open("","");
48369 iconv(cd,NULL,NULL,NULL,NULL);
48375 if ac_fn_c_try_link "$LINENO"
48377 am_cv_func_iconv=yes
48379 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48380 conftest$ac_exeext conftest.$ac_ext
48381 if test "$am_cv_func_iconv" != yes; then
48382 am_save_LIBS="$LIBS"
48383 LIBS="$LIBS $LIBICONV"
48384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48385 /* end confdefs.h. */
48387 #include <stdlib.h>
48393 iconv_t cd = iconv_open("","");
48394 iconv(cd,NULL,NULL,NULL,NULL);
48400 if ac_fn_c_try_link "$LINENO"
48402 am_cv_lib_iconv=yes
48403 am_cv_func_iconv=yes
48405 rm -f core conftest.err conftest.$ac_objext conftest.beam \
48406 conftest$ac_exeext conftest.$ac_ext
48407 LIBS="$am_save_LIBS"
48412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
48413 printf "%s\n" "$am_cv_func_iconv" >&6; }
48414 if test "$am_cv_func_iconv" = yes; then
48415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
48416 printf %s "checking for working iconv... " >&6; }
48417 if test ${am_cv_func_iconv_works+y}
48419 printf %s "(cached) " >&6
48422 am_save_LIBS="$LIBS"
48423 if test $am_cv_lib_iconv = yes; then
48424 LIBS="$LIBS $LIBICONV"
48426 am_cv_func_iconv_works=no
48427 for ac_iconv_const in '' 'const'; do
48428 if test "$cross_compiling" = yes
48431 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
48432 *) am_cv_func_iconv_works="guessing yes" ;;
48435 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48436 /* end confdefs.h. */
48439 #include <string.h>
48441 #ifndef ICONV_CONST
48442 # define ICONV_CONST $ac_iconv_const
48449 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
48450 successful returns. This is even documented in
48451 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
48453 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
48454 if (cd_utf8_to_88591 != (iconv_t)(-1))
48456 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
48458 ICONV_CONST char *inptr = input;
48459 size_t inbytesleft = strlen (input);
48460 char *outptr = buf;
48461 size_t outbytesleft = sizeof (buf);
48462 size_t res = iconv (cd_utf8_to_88591,
48463 &inptr, &inbytesleft,
48464 &outptr, &outbytesleft);
48467 iconv_close (cd_utf8_to_88591);
48470 /* Test against Solaris 10 bug: Failures are not distinguishable from
48471 successful returns. */
48473 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
48474 if (cd_ascii_to_88591 != (iconv_t)(-1))
48476 static ICONV_CONST char input[] = "\263";
48478 ICONV_CONST char *inptr = input;
48479 size_t inbytesleft = strlen (input);
48480 char *outptr = buf;
48481 size_t outbytesleft = sizeof (buf);
48482 size_t res = iconv (cd_ascii_to_88591,
48483 &inptr, &inbytesleft,
48484 &outptr, &outbytesleft);
48487 iconv_close (cd_ascii_to_88591);
48490 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
48492 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
48493 if (cd_88591_to_utf8 != (iconv_t)(-1))
48495 static ICONV_CONST char input[] = "\304";
48496 static char buf[2] = { (char)0xDE, (char)0xAD };
48497 ICONV_CONST char *inptr = input;
48498 size_t inbytesleft = 1;
48499 char *outptr = buf;
48500 size_t outbytesleft = 1;
48501 size_t res = iconv (cd_88591_to_utf8,
48502 &inptr, &inbytesleft,
48503 &outptr, &outbytesleft);
48504 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
48506 iconv_close (cd_88591_to_utf8);
48509 #if 0 /* This bug could be worked around by the caller. */
48510 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
48512 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
48513 if (cd_88591_to_utf8 != (iconv_t)(-1))
48515 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
48517 ICONV_CONST char *inptr = input;
48518 size_t inbytesleft = strlen (input);
48519 char *outptr = buf;
48520 size_t outbytesleft = sizeof (buf);
48521 size_t res = iconv (cd_88591_to_utf8,
48522 &inptr, &inbytesleft,
48523 &outptr, &outbytesleft);
48526 iconv_close (cd_88591_to_utf8);
48530 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
48533 /* Try standardized names. */
48534 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
48535 /* Try IRIX, OSF/1 names. */
48536 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
48537 /* Try AIX names. */
48538 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
48539 /* Try HP-UX names. */
48540 iconv_t cd4 = iconv_open ("utf8", "eucJP");
48541 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
48542 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
48544 if (cd1 != (iconv_t)(-1))
48546 if (cd2 != (iconv_t)(-1))
48548 if (cd3 != (iconv_t)(-1))
48550 if (cd4 != (iconv_t)(-1))
48559 if ac_fn_c_try_run "$LINENO"
48561 am_cv_func_iconv_works=yes
48563 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48564 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
48568 test "$am_cv_func_iconv_works" = no || break
48570 LIBS="$am_save_LIBS"
48574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
48575 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
48576 case "$am_cv_func_iconv_works" in
48577 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
48578 *) am_func_iconv=yes ;;
48581 am_func_iconv=no am_cv_lib_iconv=no
48583 if test "$am_func_iconv" = yes; then
48585 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
48588 if test "$am_cv_lib_iconv" = yes; then
48589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
48590 printf %s "checking how to link with libiconv... " >&6; }
48591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
48592 printf "%s\n" "$LIBICONV" >&6; }
48594 CPPFLAGS="$am_save_CPPFLAGS"
48610 acl_save_prefix="$prefix"
48611 prefix="$acl_final_prefix"
48612 acl_save_exec_prefix="$exec_prefix"
48613 exec_prefix="$acl_final_exec_prefix"
48615 eval additional_includedir=\"$includedir\"
48616 eval additional_libdir=\"$libdir\"
48617 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
48618 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
48620 exec_prefix="$acl_save_exec_prefix"
48621 prefix="$acl_save_prefix"
48624 # Check whether --with-libintl-prefix was given.
48625 if test ${with_libintl_prefix+y}
48627 withval=$with_libintl_prefix;
48628 if test "X$withval" = "Xno"; then
48631 if test "X$withval" = "X"; then
48633 acl_save_prefix="$prefix"
48634 prefix="$acl_final_prefix"
48635 acl_save_exec_prefix="$exec_prefix"
48636 exec_prefix="$acl_final_exec_prefix"
48638 eval additional_includedir=\"$includedir\"
48639 eval additional_libdir=\"$libdir\"
48640 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
48641 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
48643 exec_prefix="$acl_save_exec_prefix"
48644 prefix="$acl_save_prefix"
48647 additional_includedir="$withval/include"
48648 additional_libdir="$withval/$acl_libdirstem"
48649 additional_libdir2="$withval/$acl_libdirstem2"
48650 additional_libdir3="$withval/$acl_libdirstem3"
48656 if test "X$additional_libdir2" = "X$additional_libdir"; then
48657 additional_libdir2=
48659 if test "X$additional_libdir3" = "X$additional_libdir"; then
48660 additional_libdir3=
48669 names_already_handled=
48670 names_next_round='intl '
48671 while test -n "$names_next_round"; do
48672 names_this_round="$names_next_round"
48674 for name in $names_this_round; do
48676 for n in $names_already_handled; do
48677 if test "$n" = "$name"; then
48678 already_handled=yes
48682 if test -z "$already_handled"; then
48683 names_already_handled="$names_already_handled $name"
48684 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
48685 eval value=\"\$HAVE_LIB$uppername\"
48686 if test -n "$value"; then
48687 if test "$value" = yes; then
48688 eval value=\"\$LIB$uppername\"
48689 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
48690 eval value=\"\$LTLIB$uppername\"
48691 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
48700 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
48701 if test -n "$acl_shlibext"; then
48702 shrext=".$acl_shlibext" # typically: shrext=.so
48706 if test $use_additional = yes; then
48707 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
48708 if test "X$found_dir" = "X"; then
48709 eval dir=\$$additional_libdir_variable
48710 if test -n "$dir"; then
48711 if test -n "$acl_shlibext"; then
48712 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
48714 found_so="$dir/$libname$shrext"
48716 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
48717 ver=`(cd "$dir" && \
48718 for f in "$libname$shrext".*; do echo "$f"; done \
48719 | sed -e "s,^$libname$shrext\\\\.,," \
48720 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
48721 | sed 1q ) 2>/dev/null`
48722 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
48724 found_so="$dir/$libname$shrext.$ver"
48727 eval library_names=\"$acl_library_names_spec\"
48728 for f in $library_names; do
48729 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
48738 if test "X$found_dir" = "X"; then
48739 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
48741 found_a="$dir/$libname.$acl_libext"
48744 if test "X$found_dir" != "X"; then
48745 if test -f "$dir/$libname.la"; then
48746 found_la="$dir/$libname.la"
48753 if test "X$found_dir" = "X"; then
48754 for x in $LDFLAGS $LTLIBINTL; do
48756 acl_save_prefix="$prefix"
48757 prefix="$acl_final_prefix"
48758 acl_save_exec_prefix="$exec_prefix"
48759 exec_prefix="$acl_final_exec_prefix"
48761 exec_prefix="$acl_save_exec_prefix"
48762 prefix="$acl_save_prefix"
48766 dir=`echo "X$x" | sed -e 's/^X-L//'`
48767 if test -n "$acl_shlibext"; then
48768 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
48770 found_so="$dir/$libname$shrext"
48772 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
48773 ver=`(cd "$dir" && \
48774 for f in "$libname$shrext".*; do echo "$f"; done \
48775 | sed -e "s,^$libname$shrext\\\\.,," \
48776 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
48777 | sed 1q ) 2>/dev/null`
48778 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
48780 found_so="$dir/$libname$shrext.$ver"
48783 eval library_names=\"$acl_library_names_spec\"
48784 for f in $library_names; do
48785 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
48794 if test "X$found_dir" = "X"; then
48795 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
48797 found_a="$dir/$libname.$acl_libext"
48800 if test "X$found_dir" != "X"; then
48801 if test -f "$dir/$libname.la"; then
48802 found_la="$dir/$libname.la"
48807 if test "X$found_dir" != "X"; then
48812 if test "X$found_dir" != "X"; then
48813 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
48814 if test "X$found_so" != "X"; then
48815 if test "$enable_rpath" = no \
48816 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
48817 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
48818 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
48819 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
48822 for x in $ltrpathdirs; do
48823 if test "X$x" = "X$found_dir"; then
48828 if test -z "$haveit"; then
48829 ltrpathdirs="$ltrpathdirs $found_dir"
48831 if test "$acl_hardcode_direct" = yes; then
48832 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
48834 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
48835 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
48837 for x in $rpathdirs; do
48838 if test "X$x" = "X$found_dir"; then
48843 if test -z "$haveit"; then
48844 rpathdirs="$rpathdirs $found_dir"
48848 for x in $LDFLAGS $LIBINTL; do
48850 acl_save_prefix="$prefix"
48851 prefix="$acl_final_prefix"
48852 acl_save_exec_prefix="$exec_prefix"
48853 exec_prefix="$acl_final_exec_prefix"
48855 exec_prefix="$acl_save_exec_prefix"
48856 prefix="$acl_save_prefix"
48858 if test "X$x" = "X-L$found_dir"; then
48863 if test -z "$haveit"; then
48864 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
48866 if test "$acl_hardcode_minus_L" != no; then
48867 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
48869 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
48875 if test "X$found_a" != "X"; then
48876 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
48878 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
48881 additional_includedir=
48882 case "$found_dir" in
48883 */$acl_libdirstem | */$acl_libdirstem/)
48884 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
48885 if test "$name" = 'intl'; then
48886 LIBINTL_PREFIX="$basedir"
48888 additional_includedir="$basedir/include"
48890 */$acl_libdirstem2 | */$acl_libdirstem2/)
48891 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
48892 if test "$name" = 'intl'; then
48893 LIBINTL_PREFIX="$basedir"
48895 additional_includedir="$basedir/include"
48897 */$acl_libdirstem3 | */$acl_libdirstem3/)
48898 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
48899 if test "$name" = 'intl'; then
48900 LIBINTL_PREFIX="$basedir"
48902 additional_includedir="$basedir/include"
48905 if test "X$additional_includedir" != "X"; then
48906 if test "X$additional_includedir" != "X/usr/include"; then
48908 if test "X$additional_includedir" = "X/usr/local/include"; then
48909 if test -n "$GCC"; then
48911 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
48915 if test -z "$haveit"; then
48916 for x in $CPPFLAGS $INCINTL; do
48918 acl_save_prefix="$prefix"
48919 prefix="$acl_final_prefix"
48920 acl_save_exec_prefix="$exec_prefix"
48921 exec_prefix="$acl_final_exec_prefix"
48923 exec_prefix="$acl_save_exec_prefix"
48924 prefix="$acl_save_prefix"
48926 if test "X$x" = "X-I$additional_includedir"; then
48931 if test -z "$haveit"; then
48932 if test -d "$additional_includedir"; then
48933 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
48939 if test -n "$found_la"; then
48940 save_libdir="$libdir"
48941 case "$found_la" in
48942 */* | *\\*) . "$found_la" ;;
48943 *) . "./$found_la" ;;
48945 libdir="$save_libdir"
48946 for dep in $dependency_libs; do
48949 dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
48950 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
48951 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
48952 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
48954 if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
48955 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
48956 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
48957 if test -n "$GCC"; then
48959 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
48963 if test -z "$haveit"; then
48965 for x in $LDFLAGS $LIBINTL; do
48967 acl_save_prefix="$prefix"
48968 prefix="$acl_final_prefix"
48969 acl_save_exec_prefix="$exec_prefix"
48970 exec_prefix="$acl_final_exec_prefix"
48972 exec_prefix="$acl_save_exec_prefix"
48973 prefix="$acl_save_prefix"
48975 if test "X$x" = "X-L$dependency_libdir"; then
48980 if test -z "$haveit"; then
48981 if test -d "$dependency_libdir"; then
48982 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
48986 for x in $LDFLAGS $LTLIBINTL; do
48988 acl_save_prefix="$prefix"
48989 prefix="$acl_final_prefix"
48990 acl_save_exec_prefix="$exec_prefix"
48991 exec_prefix="$acl_final_exec_prefix"
48993 exec_prefix="$acl_save_exec_prefix"
48994 prefix="$acl_save_prefix"
48996 if test "X$x" = "X-L$dependency_libdir"; then
49001 if test -z "$haveit"; then
49002 if test -d "$dependency_libdir"; then
49003 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
49010 dir=`echo "X$dep" | sed -e 's/^X-R//'`
49011 if test "$enable_rpath" != no; then
49013 for x in $rpathdirs; do
49014 if test "X$x" = "X$dir"; then
49019 if test -z "$haveit"; then
49020 rpathdirs="$rpathdirs $dir"
49023 for x in $ltrpathdirs; do
49024 if test "X$x" = "X$dir"; then
49029 if test -z "$haveit"; then
49030 ltrpathdirs="$ltrpathdirs $dir"
49035 dep=`echo "X$dep" | sed -e 's/^X-l//'`
49036 if test "X$dep" != Xc \
49037 || case $host_os in
49038 linux* | gnu* | k*bsd*-gnu) false ;;
49041 names_next_round="$names_next_round $dep"
49045 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
49048 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
49049 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
49055 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
49056 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
49062 if test "X$rpathdirs" != "X"; then
49063 if test -n "$acl_hardcode_libdir_separator"; then
49065 for found_dir in $rpathdirs; do
49066 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
49068 acl_save_libdir="$libdir"
49070 eval flag=\"$acl_hardcode_libdir_flag_spec\"
49071 libdir="$acl_save_libdir"
49072 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
49074 for found_dir in $rpathdirs; do
49075 acl_save_libdir="$libdir"
49076 libdir="$found_dir"
49077 eval flag=\"$acl_hardcode_libdir_flag_spec\"
49078 libdir="$acl_save_libdir"
49079 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
49083 if test "X$ltrpathdirs" != "X"; then
49084 for found_dir in $ltrpathdirs; do
49085 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
49093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
49094 printf %s "checking for GNU gettext in libintl... " >&6; }
49095 if eval test \${$gt_func_gnugettext_libintl+y}
49097 printf %s "(cached) " >&6
49099 e) gt_save_CPPFLAGS="$CPPFLAGS"
49100 CPPFLAGS="$CPPFLAGS $INCINTL"
49101 gt_save_LIBS="$LIBS"
49102 LIBS="$LIBS $LIBINTL"
49103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49104 /* end confdefs.h. */
49106 #include <libintl.h>
49107 $gt_revision_test_code
49108 extern int _nl_msg_cat_cntr;
49113 const char *_nl_expand_alias (const char *);
49119 bindtextdomain ("", "");
49120 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
49126 if ac_fn_c_try_link "$LINENO"
49128 eval "$gt_func_gnugettext_libintl=yes"
49130 e) eval "$gt_func_gnugettext_libintl=no" ;;
49133 rm -f core conftest.err conftest.$ac_objext conftest.beam \
49134 conftest$ac_exeext conftest.$ac_ext
49135 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
49136 LIBS="$LIBS $LIBICONV"
49137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49138 /* end confdefs.h. */
49140 #include <libintl.h>
49141 $gt_revision_test_code
49142 extern int _nl_msg_cat_cntr;
49147 const char *_nl_expand_alias (const char *);
49153 bindtextdomain ("", "");
49154 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
49160 if ac_fn_c_try_link "$LINENO"
49162 LIBINTL="$LIBINTL $LIBICONV"
49163 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
49164 eval "$gt_func_gnugettext_libintl=yes"
49167 rm -f core conftest.err conftest.$ac_objext conftest.beam \
49168 conftest$ac_exeext conftest.$ac_ext
49170 CPPFLAGS="$gt_save_CPPFLAGS"
49171 LIBS="$gt_save_LIBS" ;;
49174 eval ac_res=\$$gt_func_gnugettext_libintl
49175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
49176 printf "%s\n" "$ac_res" >&6; }
49179 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
49180 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
49181 && test "$PACKAGE" != gettext-runtime \
49182 && test "$PACKAGE" != gettext-tools; }; then
49183 gt_use_preinstalled_gnugettext=yes
49192 if test -n "$INTL_MACOSX_LIBS"; then
49193 if test "$gt_use_preinstalled_gnugettext" = "yes" \
49194 || test "$nls_cv_use_gnu_gettext" = "yes"; then
49195 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
49196 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
49200 if test "$gt_use_preinstalled_gnugettext" = "yes" \
49201 || test "$nls_cv_use_gnu_gettext" = "yes"; then
49203 printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
49210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
49211 printf %s "checking whether to use NLS... " >&6; }
49212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
49213 printf "%s\n" "$USE_NLS" >&6; }
49214 if test "$USE_NLS" = "yes"; then
49215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
49216 printf %s "checking where the gettext function comes from... " >&6; }
49217 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
49218 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
49219 gt_source="external libintl"
49224 gt_source="included intl directory"
49226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
49227 printf "%s\n" "$gt_source" >&6; }
49230 if test "$USE_NLS" = "yes"; then
49232 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
49233 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
49234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
49235 printf %s "checking how to link with libintl... " >&6; }
49236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
49237 printf "%s\n" "$LIBINTL" >&6; }
49239 for element in $INCINTL; do
49241 for x in $CPPFLAGS; do
49243 acl_save_prefix="$prefix"
49244 prefix="$acl_final_prefix"
49245 acl_save_exec_prefix="$exec_prefix"
49246 exec_prefix="$acl_final_exec_prefix"
49248 exec_prefix="$acl_save_exec_prefix"
49249 prefix="$acl_save_prefix"
49251 if test "X$x" = "X$element"; then
49256 if test -z "$haveit"; then
49257 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
49264 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
49267 printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
49276 INTLLIBS="$LIBINTL"
49284 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
49286 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile gnulib-tests/Makefile man/Makefile po/Makefile.in"
49288 cat >confcache <<\_ACEOF
49289 # This file is a shell script that caches the results of configure
49290 # tests run on this system so they can be shared between configure
49291 # scripts and configure runs, see configure's option --config-cache.
49292 # It is not useful on other systems. If it contains results you don't
49293 # want to keep, you may remove or edit it.
49295 # config.status only pays attention to the cache file if you give it
49296 # the --recheck option to rerun configure.
49298 # 'ac_cv_env_foo' variables (set or unset) will be overridden when
49299 # loading this file, other *unset* 'ac_cv_foo' will be assigned the
49300 # following values.
49304 # The following way of writing the cache mishandles newlines in values,
49305 # but we know of no workaround that is simple, portable, and efficient.
49306 # So, we kill variables containing newlines.
49307 # Ultrix sh set writes to stderr and can't be redirected directly,
49308 # and sets the high bit in the cache file unless we assign to the vars.
49310 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
49311 eval ac_val=\$$ac_var
49315 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
49316 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
49319 _ | IFS | as_nl) ;; #(
49320 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
49321 *) { eval $ac_var=; unset $ac_var;} ;;
49327 case $as_nl`(ac_space=' '; set) 2>&1` in #(
49328 *${as_nl}ac_space=\ *)
49329 # 'set' does not quote correctly, so add quotes: double-quote
49330 # substitution turns \\\\ into \\, and sed turns \\ into \.
49333 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
49336 # 'set' quotes correctly as required by POSIX, so do not add quotes.
49337 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
49346 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
49348 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
49350 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
49351 if test -w "$cache_file"; then
49352 if test "x$cache_file" != "x/dev/null"; then
49353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
49354 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
49355 if test ! -f "$cache_file" || test -h "$cache_file"; then
49356 cat confcache >"$cache_file"
49358 case $cache_file in #(
49360 mv -f confcache "$cache_file"$$ &&
49361 mv -f "$cache_file"$$ "$cache_file" ;; #(
49363 mv -f confcache "$cache_file" ;;
49368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
49369 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
49374 test "x$prefix" = xNONE && prefix=$ac_default_prefix
49375 # Let make expand exec_prefix.
49376 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
49378 DEFS=-DHAVE_CONFIG_H
49383 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
49384 # 1. Remove the extension, and $U if already installed.
49385 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
49386 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
49387 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
49388 # will be set to the directory where LIBOBJS objects are built.
49389 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
49390 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
49392 LIBOBJS=$ac_libobjs
49394 LTLIBOBJS=$ac_ltlibobjs
49397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
49398 printf %s "checking that generated files are newer than configure... " >&6; }
49399 if test -n "$am_sleep_pid"; then
49400 # Hide warnings about reused PIDs.
49401 wait $am_sleep_pid 2>/dev/null
49403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
49404 printf "%s\n" "done" >&6; }
49405 case $enable_silent_rules in # (((
49406 yes) AM_DEFAULT_VERBOSITY=0;;
49407 no) AM_DEFAULT_VERBOSITY=1;;
49409 if test $am_cv_make_support_nested_variables = yes; then
49411 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
49413 AM_V=$AM_DEFAULT_VERBOSITY
49414 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
49417 if test -n "$EXEEXT"; then
49419 am__EXEEXT_FALSE='#'
49421 am__EXEEXT_TRUE='#'
49425 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
49426 as_fn_error $? "conditional \"AMDEP\" was never defined.
49427 Usually this means the macro was only invoked conditionally." "$LINENO" 5
49429 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
49430 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
49431 Usually this means the macro was only invoked conditionally." "$LINENO" 5
49433 # Check whether --enable-year2038 was given.
49434 if test ${enable_year2038+y}
49436 enableval=$enable_year2038;
49439 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
49440 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
49441 Usually this means the macro was only invoked conditionally." "$LINENO" 5
49443 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
49444 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
49445 as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
49446 Usually this means the macro was only invoked conditionally." "$LINENO" 5
49448 CONFIG_INCLUDE=lib/config.h
49454 if test -n "$gl_LIBOBJS"; then
49455 # Remove the extension.
49456 sed_drop_objext='s/\.o$//;s/\.obj$//'
49457 sed_dirname1='s,//*,/,g'
49458 sed_dirname2='s,\(.\)/$,\1,'
49459 sed_dirname3='s,^[^/]*$,.,'
49460 sed_dirname4='s,\(.\)/[^/]*$,\1,'
49461 sed_basename1='s,.*/,,'
49462 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
49463 gl_libobjs="$gl_libobjs $i.$ac_objext"
49464 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
49465 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
49466 i_base=`echo "$i" | sed -e "$sed_basename1"`
49467 gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
49470 gl_LIBOBJS=$gl_libobjs
49472 gl_LTLIBOBJS=$gl_ltlibobjs
49474 gl_LIBOBJDEPS=$gl_libobjdeps
49482 gltests_libobjdeps=
49483 if test -n "$gltests_LIBOBJS"; then
49484 # Remove the extension.
49485 sed_drop_objext='s/\.o$//;s/\.obj$//'
49486 sed_dirname1='s,//*,/,g'
49487 sed_dirname2='s,\(.\)/$,\1,'
49488 sed_dirname3='s,^[^/]*$,.,'
49489 sed_dirname4='s,\(.\)/[^/]*$,\1,'
49490 sed_basename1='s,.*/,,'
49491 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
49492 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
49493 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
49494 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
49495 i_base=`echo "$i" | sed -e "$sed_basename1"`
49496 gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
49499 gltests_LIBOBJS=$gltests_libobjs
49501 gltests_LTLIBOBJS=$gltests_ltlibobjs
49503 gltests_LIBOBJDEPS=$gltests_libobjdeps
49507 : "${CONFIG_STATUS=./config.status}"
49509 ac_clean_files_save=$ac_clean_files
49510 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
49511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
49512 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
49514 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
49516 # Generated by $as_me.
49517 # Run this file to recreate the current configuration.
49518 # Compiler output produced by configure, useful for debugging
49519 # configure, is in config.log if it exists.
49522 ac_cs_recheck=false
49525 SHELL=\${CONFIG_SHELL-$SHELL}
49528 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
49529 ## -------------------- ##
49530 ## M4sh Initialization. ##
49531 ## -------------------- ##
49533 # Be more Bourne compatible
49534 DUALCASE=1; export DUALCASE # for MKS sh
49535 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
49539 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
49540 # is contrary to our usage. Disable this feature.
49541 alias -g '${1+"$@"}'='"$@"'
49542 setopt NO_GLOB_SUBST
49544 e) case `(set -o) 2>/dev/null` in #(
49555 # Reset variables that may have inherited troublesome values from
49558 # IFS needs to be set, to space, tab, and newline, in precisely that order.
49559 # (If _AS_PATH_WALK were called with IFS unset, it would have the
49560 # side effect of setting IFS to empty, thus disabling word splitting.)
49561 # Quoting is to prevent editors from complaining about space-tab.
49571 # Ensure predictable behavior from utilities with locale-dependent output.
49577 # We cannot yet rely on "unset" to work, but we need these variables
49578 # to be unset--not just set to an empty or harmless value--now, to
49579 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
49580 # also avoids known problems related to "unset" and subshell syntax
49581 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
49582 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
49583 do eval test \${$as_var+y} \
49584 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
49587 # Ensure that fds 0, 1, and 2 are open.
49588 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
49589 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
49590 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
49592 # The user is always right.
49593 if ${PATH_SEPARATOR+false} :; then
49595 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49596 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49602 # Find who we are. Look in the path if we contain no directory separator.
49605 *[\\/]* ) as_myself=$0 ;;
49606 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49607 for as_dir in $PATH
49610 case $as_dir in #(((
49613 *) as_dir=$as_dir/ ;;
49615 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
49621 # We did not find ourselves, most probably we were run as 'sh COMMAND'
49622 # in which case we are not to be found in the path.
49623 if test "x$as_myself" = x; then
49626 if test ! -f "$as_myself"; then
49627 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
49633 # as_fn_error STATUS ERROR [LINENO LOG_FD]
49634 # ----------------------------------------
49635 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49636 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49637 # script with STATUS, using 1 if that was 0.
49640 as_status=$1; test $as_status -eq 0 && as_status=1
49642 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49643 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49645 printf "%s\n" "$as_me: error: $2" >&2
49646 as_fn_exit $as_status
49650 # as_fn_set_status STATUS
49651 # -----------------------
49652 # Set $? to STATUS, without forking.
49653 as_fn_set_status ()
49656 } # as_fn_set_status
49658 # as_fn_exit STATUS
49659 # -----------------
49660 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49664 as_fn_set_status $1
49670 # Portably unset VAR.
49673 { eval $1=; unset $1;}
49675 as_unset=as_fn_unset
49677 # as_fn_append VAR VALUE
49678 # ----------------------
49679 # Append the text in VALUE to the end of the definition contained in VAR. Take
49680 # advantage of any shell optimizations that allow amortized linear growth over
49681 # repeated appends, instead of the typical quadratic growth present in naive
49683 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
49685 eval 'as_fn_append ()
49697 # as_fn_arith ARG...
49698 # ------------------
49699 # Perform arithmetic evaluation on the ARGs, and store the result in the
49700 # global $as_val. Take advantage of shells that can avoid forks. The arguments
49701 # must be portable across $(()) and expr.
49702 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
49704 eval 'as_fn_arith ()
49711 as_val=`expr "$@" || test $? -eq 1`
49717 if expr a : '\(a\)' >/dev/null 2>&1 &&
49718 test "X`expr 00001 : '.*\(...\)'`" = X001; then
49724 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49725 as_basename=basename
49730 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49736 as_me=`$as_basename -- "$0" ||
49737 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49738 X"$0" : 'X\(//\)$' \| \
49739 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49740 printf "%s\n" X/"$0" |
49741 sed '/^.*\/\([^/][^/]*\)\/*$/{
49755 # Avoid depending upon Character Ranges.
49756 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49757 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49758 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49759 as_cr_digits='0123456789'
49760 as_cr_alnum=$as_cr_Letters$as_cr_digits
49763 # Determine whether it's possible to make 'echo' print without a newline.
49764 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
49765 # for compatibility with existing Makefiles.
49766 ECHO_C= ECHO_N= ECHO_T=
49767 case `echo -n x` in #(((((
49769 case `echo 'xy\c'` in
49770 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
49772 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
49779 # For backward compatibility with old third-party macros, we provide
49780 # the shell variables $as_echo and $as_echo_n. New code should use
49781 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
49782 as_echo='printf %s\n'
49783 as_echo_n='printf %s'
49785 rm -f conf$$ conf$$.exe conf$$.file
49786 if test -d conf$$.dir; then
49787 rm -f conf$$.dir/conf$$.file
49790 mkdir conf$$.dir 2>/dev/null
49792 if (echo >conf$$.file) 2>/dev/null; then
49793 if ln -s conf$$.file conf$$ 2>/dev/null; then
49795 # ... but there are two gotchas:
49796 # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
49797 # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
49798 # In both cases, we have to default to 'cp -pR'.
49799 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49801 elif ln conf$$.file conf$$ 2>/dev/null; then
49809 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49810 rmdir conf$$.dir 2>/dev/null
49815 # Create "$as_dir" as a directory, including parents if necessary.
49820 -*) as_dir=./$as_dir;;
49822 test -d "$as_dir" || eval $as_mkdir_p || {
49826 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49827 *) as_qdir=$as_dir;;
49829 as_dirs="'$as_qdir' $as_dirs"
49830 as_dir=`$as_dirname -- "$as_dir" ||
49831 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49832 X"$as_dir" : 'X\(//\)[^/]' \| \
49833 X"$as_dir" : 'X\(//\)$' \| \
49834 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49835 printf "%s\n" X"$as_dir" |
49836 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49840 /^X\(\/\/\)[^/].*/{
49853 test -d "$as_dir" && break
49855 test -z "$as_dirs" || eval "mkdir $as_dirs"
49856 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49860 if mkdir -p . 2>/dev/null; then
49861 as_mkdir_p='mkdir -p "$as_dir"'
49863 test -d ./-p && rmdir ./-p
49868 # as_fn_executable_p FILE
49869 # -----------------------
49870 # Test if FILE is an executable regular file.
49871 as_fn_executable_p ()
49873 test -f "$1" && test -x "$1"
49874 } # as_fn_executable_p
49875 as_test_x='test -x'
49876 as_executable_p=as_fn_executable_p
49878 # Sed expression to map a string onto a valid CPP name.
49879 as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
49880 as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
49882 # Sed expression to map a string onto a valid variable name.
49883 as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
49884 as_tr_sh="eval sed '$as_sed_sh'" # deprecated
49888 ## ----------------------------------- ##
49889 ## Main body of $CONFIG_STATUS script. ##
49890 ## ----------------------------------- ##
49892 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49894 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49895 # Save the log message, to keep $0 and so on meaningful, and to
49896 # report actual input values of CONFIG_FILES etc. instead of their
49897 # values after options handling.
49899 This file was extended by GNU diffutils $as_me 3.10, which was
49900 generated by GNU Autoconf 2.72c.20-9c018. Invocation command line was
49902 CONFIG_FILES = $CONFIG_FILES
49903 CONFIG_HEADERS = $CONFIG_HEADERS
49904 CONFIG_LINKS = $CONFIG_LINKS
49905 CONFIG_COMMANDS = $CONFIG_COMMANDS
49908 on `(hostname || uname -n) 2>/dev/null | sed 1q`
49913 case $ac_config_files in *"
49914 "*) set x $ac_config_files; shift; ac_config_files=$*;;
49917 case $ac_config_headers in *"
49918 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49922 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49923 # Files that config.status was made for.
49924 config_files="$ac_config_files"
49925 config_headers="$ac_config_headers"
49926 config_links="$ac_config_links"
49927 config_commands="$ac_config_commands"
49931 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49933 '$as_me' instantiates files and other configuration actions
49934 from templates according to the current configuration. Unless the files
49935 and actions are specified as TAGs, all are instantiated by default.
49937 Usage: $0 [OPTION]... [TAG]...
49939 -h, --help print this help, then exit
49940 -V, --version print version number and configuration settings, then exit
49941 --config print configuration, then exit
49942 -q, --quiet, --silent
49943 do not print progress messages
49944 -d, --debug don't remove temporary files
49945 --recheck update $as_me by reconfiguring in the same conditions
49946 --file=FILE[:TEMPLATE]
49947 instantiate the configuration file FILE
49948 --header=FILE[:TEMPLATE]
49949 instantiate the configuration header FILE
49951 Configuration files:
49954 Configuration headers:
49957 Configuration links:
49960 Configuration commands:
49963 Report bugs to <bug-diffutils@gnu.org>.
49964 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>.
49965 General help using GNU software: <https://www.gnu.org/gethelp/>."
49968 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
49969 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
49970 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49971 ac_cs_config='$ac_cs_config_escaped'
49973 GNU diffutils config.status 3.10
49974 configured by $0, generated by GNU Autoconf 2.72c.20-9c018,
49975 with options \\"\$ac_cs_config\\"
49977 Copyright (C) 2023 Free Software Foundation, Inc.
49978 This config.status script is free software; the Free Software Foundation
49979 gives unlimited permission to copy, distribute and modify it."
49986 test -n "\$AWK" || AWK=awk
49989 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49990 # The default lists apply if the user does not specify any file.
49996 ac_option=`expr "X$1" : 'X\([^=]*\)='`
49997 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
50001 ac_option=`expr "X$1" : 'X\([^=]*\)='`
50013 # Handling of the options.
50014 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
50016 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
50017 printf "%s\n" "$ac_cs_version"; exit ;;
50018 --config | --confi | --conf | --con | --co | --c )
50019 printf "%s\n" "$ac_cs_config"; exit ;;
50020 --debug | --debu | --deb | --de | --d | -d )
50022 --file | --fil | --fi | --f )
50025 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50026 '') as_fn_error $? "missing file argument" ;;
50028 as_fn_append CONFIG_FILES " '$ac_optarg'"
50029 ac_need_defaults=false;;
50030 --header | --heade | --head | --hea )
50033 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50035 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
50036 ac_need_defaults=false;;
50038 # Conflict between --help and --header
50039 as_fn_error $? "ambiguous option: '$1'
50040 Try '$0 --help' for more information.";;
50041 --help | --hel | -h )
50042 printf "%s\n" "$ac_cs_usage"; exit ;;
50043 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
50044 | -silent | --silent | --silen | --sile | --sil | --si | --s)
50047 # This is an error.
50048 -*) as_fn_error $? "unrecognized option: '$1'
50049 Try '$0 --help' for more information." ;;
50051 *) as_fn_append ac_config_targets " $1"
50052 ac_need_defaults=false ;;
50058 ac_configure_extra_args=
50060 if $ac_cs_silent; then
50062 ac_configure_extra_args="$ac_configure_extra_args --silent"
50066 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50067 if \$ac_cs_recheck; then
50068 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
50070 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
50071 CONFIG_SHELL='$SHELL'
50072 export CONFIG_SHELL
50077 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50081 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
50082 ## Running $as_me. ##
50084 printf "%s\n" "$ac_log"
50088 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50092 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
50093 GNUmakefile=$GNUmakefile
50094 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
50095 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
50096 # from automake < 1.5.
50097 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
50098 # Capture the value of LINGUAS because we need it to compute CATALOGS.
50099 LINGUAS="${LINGUAS-%UNSET%}"
50104 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50106 # Handling of arguments.
50107 for ac_config_target in $ac_config_targets
50109 case $ac_config_target in
50110 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
50111 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
50112 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
50113 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
50114 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
50115 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
50116 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
50117 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
50118 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
50119 "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;;
50120 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
50121 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
50123 *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
50128 # If the user did not use the arguments to specify the items to instantiate,
50129 # then the envvar interface is used. Set only those that are not.
50130 # We use the long form for the default assignment because of an extremely
50131 # bizarre bug on SunOS 4.1.3.
50132 if $ac_need_defaults; then
50133 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
50134 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
50135 test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
50136 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
50139 # Have a temporary directory for convenience. Make it in the build tree
50140 # simply because there is no reason against having it here, and in addition,
50141 # creating and moving files from /tmp can sometimes cause problems.
50142 # Hook for its removal unless debugging.
50143 # Note that there is a small window in which the directory will not be cleaned:
50144 # after its creation but before its name has been assigned to '$tmp'.
50148 trap 'exit_status=$?
50149 : "${ac_tmp:=$tmp}"
50150 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
50152 trap 'as_fn_exit 1' 1 2 13 15
50154 # Create a (secure) tmp directory for tmp files.
50157 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
50161 tmp=./conf$$-$RANDOM
50162 (umask 077 && mkdir "$tmp")
50163 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
50166 # Set up the scripts for CONFIG_FILES section.
50167 # No need to generate them if there are no CONFIG_FILES.
50168 # This happens for instance with './config.status config.h'.
50169 if test -n "$CONFIG_FILES"; then
50172 ac_cr=`echo X | tr X '\015'`
50173 # On cygwin, bash can eat \r inside `` if the user requested igncr.
50174 # But we know of no other shell where ac_cr would be empty at this
50175 # point, so we can use a bashism as a fallback.
50176 if test "x$ac_cr" = x; then
50177 eval ac_cr=\$\'\\r\'
50179 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
50180 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
50183 ac_cs_awk_cr=$ac_cr
50186 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
50191 echo "cat >conf$$subs.awk <<_ACEOF" &&
50192 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
50194 } >conf$$subs.sh ||
50195 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50196 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
50198 for ac_last_try in false false false false false :; do
50199 . ./conf$$subs.sh ||
50200 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50202 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
50203 if test $ac_delim_n = $ac_delim_num; then
50205 elif $ac_last_try; then
50206 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50208 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50211 rm -f conf$$subs.sh
50213 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50214 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
50218 s/^/S["/; s/!.*/"]=/
50228 s/\(.\{148\}\)..*/\1/
50230 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
50235 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50242 s/\(.\{148\}\)..*/\1/
50244 s/["\\]/\\&/g; s/^/"/; s/$/"/
50248 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50253 ' <conf$$subs.awk | sed '
50258 ' >>$CONFIG_STATUS || ac_write_fail=1
50259 rm -f conf$$subs.awk
50260 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50262 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
50263 for (key in S) S_is_set[key] = 1
50269 nfields = split(line, field, "@")
50271 len = length(field[1])
50272 for (i = 2; i < nfields; i++) {
50274 keylen = length(key)
50275 if (S_is_set[key]) {
50277 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
50278 len += length(value) + length(field[++i])
50289 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50290 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
50291 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
50294 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
50295 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
50298 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
50299 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
50300 # trailing colons and then remove the whole line if VPATH becomes empty
50301 # (actually we leave an empty line to preserve line numbers).
50302 if test "x$srcdir" = x.; then
50303 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
50321 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50322 fi # test -n "$CONFIG_FILES"
50324 # Set up the scripts for CONFIG_HEADERS section.
50325 # No need to generate them if there are no CONFIG_HEADERS.
50326 # This happens for instance with './config.status Makefile'.
50327 if test -n "$CONFIG_HEADERS"; then
50328 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
50332 # Transform confdefs.h into an awk script 'defines.awk', embedded as
50333 # here-document in config.status, that substitutes the proper values into
50334 # config.h.in to produce config.h.
50336 # Create a delimiter string that does not exist in confdefs.h, to ease
50337 # handling of long lines.
50339 for ac_last_try in false false :; do
50340 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
50341 if test -z "$ac_tt"; then
50343 elif $ac_last_try; then
50344 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
50346 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50350 # For the awk script, D is an array of macro values keyed by name,
50351 # likewise P contains macro parameters if any. Preserve backslash
50352 # newline sequences.
50354 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
50356 s/.\{148\}/&'"$ac_delim"'/g
50359 s/^[ ]*#[ ]*define[ ][ ]*/ /
50366 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
50368 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
50372 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
50373 D["\1"]=" \3\\\\\\n"\\/p
50375 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
50380 s/.\{148\}/&'"$ac_delim"'/g
50385 s/["\\]/\\&/g; s/^/"/; s/$/"/p
50388 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
50390 ' <confdefs.h | sed '
50391 s/'"$ac_delim"'/"\\\
50392 "/g' >>$CONFIG_STATUS || ac_write_fail=1
50394 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50395 for (key in D) D_is_set[key] = 1
50398 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
50400 split(line, arg, " ")
50401 if (arg[1] == "#") {
50405 defundef = substr(arg[1], 2)
50408 split(mac1, mac2, "(") #)
50410 prefix = substr(line, 1, index(line, defundef) - 1)
50411 if (D_is_set[macro]) {
50412 # Preserve the white space surrounding the "#".
50413 print prefix "define", macro P[macro] D[macro]
50416 # Replace #undef with comments. This is necessary, for example,
50417 # in the case of _POSIX_SOURCE, which is predefined and required
50418 # on some systems where configure will not decide to define it.
50419 if (defundef == "undef") {
50420 print "/*", prefix defundef, macro, "*/"
50428 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50429 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
50430 fi # test -n "$CONFIG_HEADERS"
50433 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
50438 :[FHLC]) ac_mode=$ac_tag; continue;;
50440 case $ac_mode$ac_tag in
50442 :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
50443 :[FH]-) ac_tag=-:-;;
50444 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
50461 -) ac_f="$ac_tmp/stdin";;
50462 *) # Look for the file first in the build tree, then in the source tree
50463 # (if the path is not absolute). The absolute path cannot be DOS-style,
50464 # because $ac_f cannot contain ':'.
50468 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
50470 as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
50472 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
50473 as_fn_append ac_file_inputs " '$ac_f'"
50476 # Let's still pretend it is 'configure' which instantiates (i.e., don't
50477 # use $as_me), people would be surprised to read:
50478 # /* config.h. Generated by config.status. */
50479 configure_input='Generated from '`
50480 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
50482 if test x"$ac_file" != x-; then
50483 configure_input="$ac_file. $configure_input"
50484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
50485 printf "%s\n" "$as_me: creating $ac_file" >&6;}
50487 # Neutralize special characters interpreted by sed in replacement strings.
50488 case $configure_input in #(
50489 *\&* | *\|* | *\\* )
50490 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
50491 sed 's/[\\\\&|]/\\\\&/g'`;; #(
50492 *) ac_sed_conf_input=$configure_input;;
50496 *:-:* | *:-) cat >"$ac_tmp/stdin" \
50497 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
50502 ac_dir=`$as_dirname -- "$ac_file" ||
50503 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50504 X"$ac_file" : 'X\(//\)[^/]' \| \
50505 X"$ac_file" : 'X\(//\)$' \| \
50506 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
50507 printf "%s\n" X"$ac_file" |
50508 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50512 /^X\(\/\/\)[^/].*/{
50525 as_dir="$ac_dir"; as_fn_mkdir_p
50529 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
50531 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
50532 # A ".." for each directory in $ac_dir_suffix.
50533 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
50534 case $ac_top_builddir_sub in
50535 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
50536 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
50539 ac_abs_top_builddir=$ac_pwd
50540 ac_abs_builddir=$ac_pwd$ac_dir_suffix
50541 # for backward compatibility:
50542 ac_top_builddir=$ac_top_build_prefix
50545 .) # We are building in place.
50547 ac_top_srcdir=$ac_top_builddir_sub
50548 ac_abs_top_srcdir=$ac_pwd ;;
50549 [\\/]* | ?:[\\/]* ) # Absolute name.
50550 ac_srcdir=$srcdir$ac_dir_suffix;
50551 ac_top_srcdir=$srcdir
50552 ac_abs_top_srcdir=$srcdir ;;
50553 *) # Relative name.
50554 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
50555 ac_top_srcdir=$ac_top_build_prefix$srcdir
50556 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
50558 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
50568 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
50569 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
50571 ac_MKDIR_P=$MKDIR_P
50573 [\\/$]* | ?:[\\/]* ) ;;
50574 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
50578 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50579 # If the template does not know about datarootdir, expand it.
50580 # FIXME: This hack should be removed a few years after 2.60.
50581 ac_datarootdir_hack=; ac_datarootdir_seen=
50592 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
50593 *datarootdir*) ac_datarootdir_seen=yes;;
50594 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
50595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
50596 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
50598 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50599 ac_datarootdir_hack='
50600 s&@datadir@&$datadir&g
50601 s&@docdir@&$docdir&g
50602 s&@infodir@&$infodir&g
50603 s&@localedir@&$localedir&g
50604 s&@mandir@&$mandir&g
50605 s&\\\${datarootdir}&$datarootdir&g' ;;
50609 # Neutralize VPATH when '$srcdir' = '.'.
50610 # Shell code in configure.ac might set extrasub.
50611 # FIXME: do we really want to maintain this feature?
50612 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50613 ac_sed_extra="$ac_vpsub
50616 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50618 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50619 s|@configure_input@|$ac_sed_conf_input|;t t
50620 s&@top_builddir@&$ac_top_builddir_sub&;t t
50621 s&@top_build_prefix@&$ac_top_build_prefix&;t t
50622 s&@srcdir@&$ac_srcdir&;t t
50623 s&@abs_srcdir@&$ac_abs_srcdir&;t t
50624 s&@top_srcdir@&$ac_top_srcdir&;t t
50625 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50626 s&@builddir@&$ac_builddir&;t t
50627 s&@abs_builddir@&$ac_abs_builddir&;t t
50628 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50629 s&@INSTALL@&$ac_INSTALL&;t t
50630 s&@MKDIR_P@&$ac_MKDIR_P&;t t
50631 $ac_datarootdir_hack
50633 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50634 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50636 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50637 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50638 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
50639 "$ac_tmp/out"`; test -z "$ac_out"; } &&
50640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir'
50641 which seems to be undefined. Please make sure it is defined" >&5
50642 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
50643 which seems to be undefined. Please make sure it is defined" >&2;}
50645 rm -f "$ac_tmp/stdin"
50647 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
50648 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
50650 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50656 if test x"$ac_file" != x-; then
50658 printf "%s\n" "/* $configure_input */" >&1 \
50659 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
50660 } >"$ac_tmp/config.h" \
50661 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50662 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
50663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
50664 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
50667 mv "$ac_tmp/config.h" "$ac_file" \
50668 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50671 printf "%s\n" "/* $configure_input */" >&1 \
50672 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
50673 || as_fn_error $? "could not create -" "$LINENO" 5
50675 # Compute "$ac_file"'s index in $config_headers.
50678 for _am_header in $config_headers :; do
50679 case $_am_header in
50680 $_am_arg | $_am_arg:* )
50683 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
50686 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
50687 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50688 X"$_am_arg" : 'X\(//\)[^/]' \| \
50689 X"$_am_arg" : 'X\(//\)$' \| \
50690 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
50691 printf "%s\n" X"$_am_arg" |
50692 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50696 /^X\(\/\/\)[^/].*/{
50708 s/.*/./; q'`/stamp-h$_am_stamp_count
50715 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
50718 # Prefer the file from the source tree if names are identical.
50719 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
50720 ac_source=$srcdir/$ac_source
50723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
50724 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
50726 if test ! -r "$ac_source"; then
50727 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
50731 # Try a relative symlink, then a hard link, then a copy.
50733 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
50734 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
50736 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
50737 ln "$ac_source" "$ac_file" 2>/dev/null ||
50738 cp -p "$ac_source" "$ac_file" ||
50739 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
50742 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
50743 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
50748 case $ac_file$ac_mode in
50749 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
50750 # Older Autoconf quotes --file arguments for eval, but not when files
50751 # are listed without --file. Let's play safe and only enable the eval
50752 # if we detect the quoting.
50753 # TODO: see whether this extra hack can be removed once we start
50754 # requiring Autoconf 2.70 or later.
50755 case $CONFIG_FILES in #(
50757 eval set x "$CONFIG_FILES" ;; #(
50759 set x $CONFIG_FILES ;; #(
50764 # Used to flag and report bootstrapping failures.
50768 # Strip MF so we end up with the name of the file.
50769 am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
50770 # Check whether this is an Automake generated Makefile which includes
50771 # dependency-tracking related rules and includes.
50772 # Grep'ing the whole file directly is not great: AIX grep has a line
50773 # limit of 2048, but all sed's we know have understand at least 4000.
50774 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
50776 am_dirpart=`$as_dirname -- "$am_mf" ||
50777 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50778 X"$am_mf" : 'X\(//\)[^/]' \| \
50779 X"$am_mf" : 'X\(//\)$' \| \
50780 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
50781 printf "%s\n" X"$am_mf" |
50782 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50786 /^X\(\/\/\)[^/].*/{
50799 am_filepart=`$as_basename -- "$am_mf" ||
50800 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
50801 X"$am_mf" : 'X\(//\)$' \| \
50802 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
50803 printf "%s\n" X/"$am_mf" |
50804 sed '/^.*\/\([^/][^/]*\)\/*$/{
50817 { echo "$as_me:$LINENO: cd "$am_dirpart" \
50818 && sed -e '/# am--include-marker/d' "$am_filepart" \
50819 | $MAKE -f - am--depfiles" >&5
50820 (cd "$am_dirpart" \
50821 && sed -e '/# am--include-marker/d' "$am_filepart" \
50822 | $MAKE -f - am--depfiles) >&5 2>&5
50824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
50825 (exit $ac_status); } || am_rc=$?
50827 if test $am_rc -ne 0; then
50828 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
50829 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
50830 as_fn_error $? "Something went wrong bootstrapping makefile fragments
50831 for automatic dependency tracking. If GNU make was not used, consider
50832 re-running the configure script with MAKE=\"gmake\" (or whatever is
50833 necessary). You can also try re-running configure with the
50834 '--disable-dependency-tracking' option to at least be able to build
50835 the package (albeit without support for automatic dependency tracking).
50836 See 'config.log' for more details" "$LINENO" 5; }
50838 { am_dirpart=; unset am_dirpart;}
50839 { am_filepart=; unset am_filepart;}
50840 { am_mf=; unset am_mf;}
50841 { am_rc=; unset am_rc;}
50842 rm -f conftest-deps.mk
50845 "po-directories":C)
50846 for ac_file in $CONFIG_FILES; do
50847 # Support "outfile[:infile[:infile...]]"
50849 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
50851 # PO directories have a Makefile.in generated from Makefile.in.in.
50852 case "$ac_file" in */Makefile.in)
50853 # Adjust a relative srcdir.
50854 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
50855 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
50856 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
50857 # In autoconf-2.13 it is called $ac_given_srcdir.
50858 # In autoconf-2.50 it is called $srcdir.
50859 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
50860 case "$ac_given_srcdir" in
50861 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
50862 /*) top_srcdir="$ac_given_srcdir" ;;
50863 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
50865 # Treat a directory as a PO directory if and only if it has a
50866 # POTFILES.in file. This allows packages to have multiple PO
50867 # directories under different names or in different locations.
50868 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
50869 rm -f "$ac_dir/POTFILES"
50870 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
50871 gt_tab=`printf '\t'`
50872 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"
50873 POMAKEFILEDEPS="POTFILES.in"
50874 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
50875 # on $ac_dir but don't depend on user-specified configuration
50877 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
50878 # The LINGUAS file contains the set of available languages.
50879 if test -n "$OBSOLETE_ALL_LINGUAS"; then
50880 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
50882 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
50883 # Hide the ALL_LINGUAS assignment from automake < 1.5.
50884 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
50885 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
50887 # The set of available languages was given in configure.in.
50888 # Hide the ALL_LINGUAS assignment from automake < 1.5.
50889 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
50892 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
50893 # Compute UPDATEPOFILES
50894 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
50895 # Compute DUMMYPOFILES
50896 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
50898 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
50899 case "$ac_given_srcdir" in
50901 *) srcdirpre='$(srcdir)/' ;;
50907 for lang in $ALL_LINGUAS; do
50908 POFILES="$POFILES $srcdirpre$lang.po"
50909 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
50910 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
50911 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
50913 # CATALOGS depends on both $ac_dir and the user's LINGUAS
50914 # environment variable.
50916 if test -n "$ALL_LINGUAS"; then
50917 for presentlang in $ALL_LINGUAS; do
50919 if test "%UNSET%" != "$LINGUAS"; then
50920 desiredlanguages="$LINGUAS"
50922 desiredlanguages="$ALL_LINGUAS"
50924 for desiredlang in $desiredlanguages; do
50925 # Use the presentlang catalog if desiredlang is
50926 # a. equal to presentlang, or
50927 # b. a variant of presentlang (because in this case,
50928 # presentlang can be used as a fallback for messages
50929 # which are not translated in the desiredlang catalog).
50930 case "$desiredlang" in
50931 "$presentlang"*) useit=yes;;
50934 if test $useit = yes; then
50935 INST_LINGUAS="$INST_LINGUAS $presentlang"
50940 if test -n "$INST_LINGUAS"; then
50941 for lang in $INST_LINGUAS; do
50942 CATALOGS="$CATALOGS $lang.gmo"
50945 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
50946 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"
50947 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
50948 if test -f "$f"; then
50950 *.orig | *.bak | *~) ;;
50951 *) cat "$f" >> "$ac_dir/Makefile" ;;
50966 ac_clean_files=$ac_clean_files_save
50968 test $ac_write_fail = 0 ||
50969 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50972 # configure is writing to config.log, and then calls config.status.
50973 # config.status does its own redirection, appending to config.log.
50974 # Unfortunately, on DOS this fails, as config.log is still kept open
50975 # by configure, so config.status won't be able to write to it; its
50976 # output is simply discarded. So we exec the FD to /dev/null,
50977 # effectively closing config.log, so it can be properly (re)opened and
50978 # appended to by config.status. When coming back to configure, we
50979 # need to make the FD available again.
50980 if test "$no_create" != yes; then
50982 ac_config_status_args=
50983 test "$silent" = yes &&
50984 ac_config_status_args="$ac_config_status_args --quiet"
50986 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50988 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50989 # would make configure fail if this is the last instruction.
50990 $ac_cs_success || as_fn_exit 1
50992 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50994 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}