Rebuilt win.amd64 against r3658 (new compiler, xp64/w2k3 not support any more; new...
[kbuild-mirror.git] / src / sed / configure
blob8db5e2bd8e09c6c5191b336dbd680ee740f495bd
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.72a.65-d081 for GNU sed 4.9.
5 # Report bugs to <bug-sed@gnu.org>.
8 # Copyright (C) 1992-1996, 1998-2017, 2020-2022 Free Software Foundation,
9 # Inc.
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
21 then :
22 emulate sh
23 NULLCMD=:
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+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28 else case e in #(
29 e) case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
34 esac ;;
35 esac
40 # Reset variables that may have inherited troublesome values from
41 # the environment.
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.
47 as_nl='
49 export as_nl
50 IFS=" "" $as_nl"
52 PS1='$ '
53 PS2='> '
54 PS4='+ '
56 # Ensure predictable behavior from utilities with locale-dependent output.
57 LC_ALL=C
58 export LC_ALL
59 LANGUAGE=C
60 export LANGUAGE
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 || :
70 done
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
79 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
87 # Find who we are. Look in the path if we contain no directory separator.
88 as_myself=
89 case $0 in #((
90 *[\\/]* ) as_myself=$0 ;;
91 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
92 for as_dir in $PATH
94 IFS=$as_save_IFS
95 case $as_dir in #(((
96 '') as_dir=./ ;;
97 */) ;;
98 *) as_dir=$as_dir/ ;;
99 esac
100 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
101 done
102 IFS=$as_save_IFS
105 esac
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
109 as_myself=$0
111 if test ! -f "$as_myself"; then
112 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
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.
125 BASH_ENV=/dev/null
126 ENV=/dev/null
127 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
128 case $- in # ((((
129 *v*x* | *x*v* ) as_opts=-vx ;;
130 *v* ) as_opts=-v ;;
131 *x* ) as_opts=-x ;;
132 * ) as_opts= ;;
133 esac
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
138 exit 255
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
144 then :
145 emulate sh
146 NULLCMD=:
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+\"\$@\"}'='\"\$@\"'
150 setopt NO_GLOB_SUBST
151 else case e in #(
152 e) case \`(set -o) 2>/dev/null\` in #(
153 *posix*) :
154 set -o posix ;; #(
155 *) :
157 esac ;;
158 esac
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; }
167 exitcode=0
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\" )
173 then :
175 else case e in #(
176 e) exitcode=1; echo positional parameters were not saved. ;;
177 esac
179 test x\$exitcode = x0 || exit 1
180 blah=\$(echo \$(echo blah))
181 test x\"\$blah\" = xblah || exit 1
182 test -x / || 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
189 then :
190 as_have_required=yes
191 else case e in #(
192 e) as_have_required=no ;;
193 esac
195 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
196 then :
198 else case e in #(
199 e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
200 as_found=false
201 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
203 IFS=$as_save_IFS
204 case $as_dir in #(((
205 '') as_dir=./ ;;
206 */) ;;
207 *) as_dir=$as_dir/ ;;
208 esac
209 as_found=:
210 case $as_dir in #(
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
217 then :
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
220 then :
221 break 2
224 done;;
225 esac
226 as_found=false
227 done
228 IFS=$as_save_IFS
229 if $as_found
230 then :
232 else case e in #(
233 e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
235 then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237 fi ;;
238 esac
242 if test "x$CONFIG_SHELL" != x
243 then :
244 export CONFIG_SHELL
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.
249 BASH_ENV=/dev/null
250 ENV=/dev/null
251 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
252 case $- in # ((((
253 *v*x* | *x*v* ) as_opts=-vx ;;
254 *v* ) as_opts=-v ;;
255 *x* ) as_opts=-x ;;
256 * ) as_opts= ;;
257 esac
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
262 exit 255
265 if test x$as_have_required = xno
266 then :
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."
272 else
273 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-sed@gnu.org
274 $0: about your system, including any error possibly output
275 $0: before this message. Then install a modern shell, or
276 $0: manually run the script under such a shell if you do
277 $0: have one."
279 exit 1
280 fi ;;
281 esac
284 SHELL=${CONFIG_SHELL-/bin/sh}
285 export SHELL
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 ## --------------------- ##
293 # as_fn_unset VAR
294 # ---------------
295 # Portably unset VAR.
296 as_fn_unset ()
298 { eval $1=; unset $1;}
300 as_unset=as_fn_unset
303 # as_fn_set_status STATUS
304 # -----------------------
305 # Set $? to STATUS, without forking.
306 as_fn_set_status ()
308 return $1
309 } # as_fn_set_status
311 # as_fn_exit STATUS
312 # -----------------
313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314 as_fn_exit ()
316 set +e
317 as_fn_set_status $1
318 exit $1
319 } # as_fn_exit
321 # as_fn_mkdir_p
322 # -------------
323 # Create "$as_dir" as a directory, including parents if necessary.
324 as_fn_mkdir_p ()
327 case $as_dir in #(
328 -*) as_dir=./$as_dir;;
329 esac
330 test -d "$as_dir" || eval $as_mkdir_p || {
331 as_dirs=
332 while :; do
333 case $as_dir in #(
334 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335 *) as_qdir=$as_dir;;
336 esac
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\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345 s//\1/
348 /^X\(\/\/\)[^/].*/{
349 s//\1/
352 /^X\(\/\/\)$/{
353 s//\1/
356 /^X\(\/\).*/{
357 s//\1/
360 s/.*/./; q'`
361 test -d "$as_dir" && break
362 done
363 test -z "$as_dirs" || eval "mkdir $as_dirs"
364 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
367 } # as_fn_mkdir_p
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
381 # implementations.
382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
383 then :
384 eval 'as_fn_append ()
386 eval $1+=\$2
388 else case e in #(
389 e) as_fn_append ()
391 eval $1=\$$1\$2
392 } ;;
393 esac
394 fi # as_fn_append
396 # as_fn_arith ARG...
397 # ------------------
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
402 then :
403 eval 'as_fn_arith ()
405 as_val=$(( $* ))
407 else case e in #(
408 e) as_fn_arith ()
410 as_val=`expr "$@" || test $? -eq 1`
411 } ;;
412 esac
413 fi # as_fn_arith
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.
421 as_fn_error ()
423 as_status=$1; test $as_status -eq 0 && as_status=1
424 if test "$4"; then
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
430 } # as_fn_error
432 if expr a : '\(a\)' >/dev/null 2>&1 &&
433 test "X`expr 00001 : '.*\(...\)'`" = X001; then
434 as_expr=expr
435 else
436 as_expr=false
439 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
440 as_basename=basename
441 else
442 as_basename=false
445 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
446 as_dirname=dirname
447 else
448 as_dirname=false
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 '/^.*\/\([^/][^/]*\)\/*$/{
457 s//\1/
460 /^X\/\(\/\/\)$/{
461 s//\1/
464 /^X\/\(\/\).*/{
465 s//\1/
468 s/.*/./; q'`
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. :-)
483 sed -n '
485 /[$]LINENO/=
486 ' <$as_myself |
487 sed '
488 t clear
489 :clear
490 s/[$]LINENO.*/&-/
491 t lineno
493 :lineno
495 :loop
496 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
497 t loop
498 s/-\n.*//
499 ' >$as_me.lineno &&
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).
510 . "./$as_me.lineno"
511 # Exit status is that of the last command.
512 exit
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 #(((((
521 -n*)
522 case `echo 'xy\c'` in
523 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
524 xy) ECHO_C='\c';;
525 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
526 ECHO_T=' ';;
527 esac;;
529 ECHO_N='-n';;
530 esac
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
541 else
542 rm -f conf$$.dir
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
547 as_ln_s='ln -s'
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 ||
553 as_ln_s='cp -pR'
554 elif ln conf$$.file conf$$ 2>/dev/null; then
555 as_ln_s=ln
556 else
557 as_ln_s='cp -pR'
559 else
560 as_ln_s='cp -pR'
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"'
567 else
568 test -d ./-p && rmdir ./-p
569 as_mkdir_p=false
572 as_test_x='test -x'
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
585 exec 6>&1
587 # Name of the host.
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`
593 # Initializations.
595 ac_default_prefix=/usr/local
596 ac_clean_files=
597 ac_config_libobj_dir=.
598 LIBOBJS=
599 cross_compiling=no
600 subdirs=
601 MFLAGS=
602 MAKEFLAGS=
604 # Identity of this package.
605 PACKAGE_NAME='GNU sed'
606 PACKAGE_TARNAME='sed'
607 PACKAGE_VERSION='4.9'
608 PACKAGE_STRING='GNU sed 4.9'
609 PACKAGE_BUGREPORT='bug-sed@gnu.org'
610 PACKAGE_URL='https://www.gnu.org/software/sed/'
612 ac_unique_file="sed/sed.c"
613 # Factoring default headers for most tests.
614 ac_includes_default="\
615 #include <stddef.h>
616 #ifdef HAVE_STDIO_H
617 # include <stdio.h>
618 #endif
619 #ifdef HAVE_STDLIB_H
620 # include <stdlib.h>
621 #endif
622 #ifdef HAVE_STRING_H
623 # include <string.h>
624 #endif
625 #ifdef HAVE_INTTYPES_H
626 # include <inttypes.h>
627 #endif
628 #ifdef HAVE_STDINT_H
629 # include <stdint.h>
630 #endif
631 #ifdef HAVE_STRINGS_H
632 # include <strings.h>
633 #endif
634 #ifdef HAVE_SYS_TYPES_H
635 # include <sys/types.h>
636 #endif
637 #ifdef HAVE_SYS_STAT_H
638 # include <sys/stat.h>
639 #endif
640 #ifdef HAVE_UNISTD_H
641 # include <unistd.h>
642 #endif"
644 ac_header_c_list=
645 gl_use_threads_default=
646 gl_use_winpthreads_default=
647 ac_config_libobj_dir=lib
648 ac_func_c_list=
649 gt_needs=
650 ac_subst_vars='gltests_LIBOBJDEPS
651 gltests_LTLIBOBJS
652 gltests_LIBOBJS
653 gl_LIBOBJDEPS
654 gl_LTLIBOBJS
655 gl_LIBOBJS
656 CONFIG_INCLUDE
657 am__EXEEXT_FALSE
658 am__EXEEXT_TRUE
659 LTLIBOBJS
660 LIBOBJS
661 CROSS_COMPILING_FALSE
662 CROSS_COMPILING_TRUE
663 BOLD_MAN_REFS_FALSE
664 BOLD_MAN_REFS_TRUE
665 GNULIB_TEST_WARN_CFLAGS
666 WARN_CFLAGS
667 WERROR_CFLAGS
668 XFAIL_TESTS
669 TEST_SYMLINKS_FALSE
670 TEST_SYMLINKS_TRUE
671 POSUB
672 INTLLIBS
673 LTLIBICONV
674 LIBICONV
675 XGETTEXT_EXTRA_OPTIONS
676 MSGMERGE
677 XGETTEXT_015
678 XGETTEXT
679 GMSGFMT_015
680 MSGFMT_015
681 GMSGFMT
682 MSGFMT
683 GETTEXT_MACRO_VERSION
684 USE_NLS
685 HAVE_PERL_FALSE
686 HAVE_PERL_TRUE
687 LIBTESTS_LIBDEPS
688 LIBSED_LTLIBDEPS
689 LIBSED_LIBDEPS
690 GL_CFLAG_GNULIB_WARNINGS
691 GL_COND_OBJ_WINDOWS_TLS_FALSE
692 GL_COND_OBJ_WINDOWS_TLS_TRUE
693 GL_COND_OBJ_WINDOWS_THREAD_FALSE
694 GL_COND_OBJ_WINDOWS_THREAD_TRUE
695 abs_aux_dir
696 GL_COND_OBJ_UNSETENV_FALSE
697 GL_COND_OBJ_UNSETENV_TRUE
698 HAVE_SYS_UIO_H
699 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
700 NEXT_SYS_UIO_H
701 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
702 NEXT_SYS_IOCTL_H
703 HAVE_SYS_IOCTL_H
704 GL_COND_OBJ_SYMLINK_FALSE
705 GL_COND_OBJ_SYMLINK_TRUE
706 GL_COND_OBJ_STRDUP_FALSE
707 GL_COND_OBJ_STRDUP_TRUE
708 GL_COND_OBJ_SOCKET_FALSE
709 GL_COND_OBJ_SOCKET_TRUE
710 GL_COND_OBJ_SLEEP_FALSE
711 GL_COND_OBJ_SLEEP_TRUE
712 GL_COND_OBJ_SIGPROCMASK_FALSE
713 GL_COND_OBJ_SIGPROCMASK_TRUE
714 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
715 NEXT_SIGNAL_H
716 GL_COND_OBJ_SETSOCKOPT_FALSE
717 GL_COND_OBJ_SETSOCKOPT_TRUE
718 GL_COND_OBJ_SETLOCALE_FALSE
719 GL_COND_OBJ_SETLOCALE_TRUE
720 LIB_SETLOCALE
721 GL_COND_OBJ_SETENV_FALSE
722 GL_COND_OBJ_SETENV_TRUE
723 GL_COND_OBJ_SELECT_FALSE
724 GL_COND_OBJ_SELECT_TRUE
725 LIB_SELECT
726 LIBSOCKET
727 GL_GNULIB_SCHED_YIELD
728 HAVE_SYS_CDEFS_H
729 HAVE_STRUCT_SCHED_PARAM
730 HAVE_SCHED_H
731 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
732 NEXT_SCHED_H
733 REPLACE_SCHED_YIELD
734 HAVE_SCHED_YIELD
735 GL_COND_OBJ_READDIR_FALSE
736 GL_COND_OBJ_READDIR_TRUE
737 GL_COND_OBJ_RAISE_FALSE
738 GL_COND_OBJ_RAISE_TRUE
739 GL_COND_OBJ_PUTENV_FALSE
740 GL_COND_OBJ_PUTENV_TRUE
741 GL_GNULIB_SIGACTION
742 GL_GNULIB_SIGPROCMASK
743 GL_GNULIB_SIGNAL_H_SIGPIPE
744 GL_GNULIB_RAISE
745 GL_GNULIB_PTHREAD_SIGMASK
746 GL_COND_OBJ_PTHREAD_SIGMASK_FALSE
747 GL_COND_OBJ_PTHREAD_SIGMASK_TRUE
748 LIB_PTHREAD_SIGMASK
749 REPLACE_RAISE
750 REPLACE_PTHREAD_SIGMASK
751 HAVE_SIGHANDLER_T
752 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
753 HAVE_STRUCT_SIGACTION_SA_SIGACTION
754 HAVE_SIGACTION
755 HAVE_SIGINFO_T
756 HAVE_SIGSET_T
757 HAVE_RAISE
758 HAVE_PTHREAD_SIGMASK
759 HAVE_POSIX_SIGNALBLOCKING
760 GL_COND_OBJ_PTHREAD_THREAD_FALSE
761 GL_COND_OBJ_PTHREAD_THREAD_TRUE
762 GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK
763 GL_GNULIB_PTHREAD_SPIN
764 GL_GNULIB_PTHREAD_TSS
765 GL_GNULIB_PTHREAD_COND
766 GL_GNULIB_PTHREAD_RWLOCK
767 GL_GNULIB_PTHREAD_MUTEX
768 GL_GNULIB_PTHREAD_ONCE
769 GL_GNULIB_PTHREAD_THREAD
770 LIB_PTHREAD
771 HAVE_PTHREAD_H
772 NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H
773 NEXT_PTHREAD_H
774 REPLACE_PTHREAD_SPIN_DESTROY
775 REPLACE_PTHREAD_SPIN_UNLOCK
776 REPLACE_PTHREAD_SPIN_TRYLOCK
777 REPLACE_PTHREAD_SPIN_LOCK
778 REPLACE_PTHREAD_SPIN_INIT
779 REPLACE_PTHREAD_KEY_DELETE
780 REPLACE_PTHREAD_GETSPECIFIC
781 REPLACE_PTHREAD_SETSPECIFIC
782 REPLACE_PTHREAD_KEY_CREATE
783 REPLACE_PTHREAD_COND_DESTROY
784 REPLACE_PTHREAD_COND_BROADCAST
785 REPLACE_PTHREAD_COND_SIGNAL
786 REPLACE_PTHREAD_COND_TIMEDWAIT
787 REPLACE_PTHREAD_COND_WAIT
788 REPLACE_PTHREAD_CONDATTR_DESTROY
789 REPLACE_PTHREAD_CONDATTR_INIT
790 REPLACE_PTHREAD_COND_INIT
791 REPLACE_PTHREAD_RWLOCK_DESTROY
792 REPLACE_PTHREAD_RWLOCK_UNLOCK
793 REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK
794 REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK
795 REPLACE_PTHREAD_RWLOCK_TRYWRLOCK
796 REPLACE_PTHREAD_RWLOCK_TRYRDLOCK
797 REPLACE_PTHREAD_RWLOCK_WRLOCK
798 REPLACE_PTHREAD_RWLOCK_RDLOCK
799 REPLACE_PTHREAD_RWLOCKATTR_DESTROY
800 REPLACE_PTHREAD_RWLOCKATTR_INIT
801 REPLACE_PTHREAD_RWLOCK_INIT
802 REPLACE_PTHREAD_MUTEX_DESTROY
803 REPLACE_PTHREAD_MUTEX_UNLOCK
804 REPLACE_PTHREAD_MUTEX_TIMEDLOCK
805 REPLACE_PTHREAD_MUTEX_TRYLOCK
806 REPLACE_PTHREAD_MUTEX_LOCK
807 REPLACE_PTHREAD_MUTEXATTR_DESTROY
808 REPLACE_PTHREAD_MUTEXATTR_SETROBUST
809 REPLACE_PTHREAD_MUTEXATTR_GETROBUST
810 REPLACE_PTHREAD_MUTEXATTR_SETTYPE
811 REPLACE_PTHREAD_MUTEXATTR_GETTYPE
812 REPLACE_PTHREAD_MUTEXATTR_INIT
813 REPLACE_PTHREAD_MUTEX_INIT
814 REPLACE_PTHREAD_ONCE
815 REPLACE_PTHREAD_EXIT
816 REPLACE_PTHREAD_JOIN
817 REPLACE_PTHREAD_DETACH
818 REPLACE_PTHREAD_EQUAL
819 REPLACE_PTHREAD_SELF
820 REPLACE_PTHREAD_ATTR_DESTROY
821 REPLACE_PTHREAD_ATTR_SETDETACHSTATE
822 REPLACE_PTHREAD_ATTR_GETDETACHSTATE
823 REPLACE_PTHREAD_ATTR_INIT
824 REPLACE_PTHREAD_CREATE
825 HAVE_PTHREAD_SPIN_DESTROY
826 HAVE_PTHREAD_SPIN_UNLOCK
827 HAVE_PTHREAD_SPIN_TRYLOCK
828 HAVE_PTHREAD_SPIN_LOCK
829 HAVE_PTHREAD_SPIN_INIT
830 HAVE_PTHREAD_KEY_DELETE
831 HAVE_PTHREAD_GETSPECIFIC
832 HAVE_PTHREAD_SETSPECIFIC
833 HAVE_PTHREAD_KEY_CREATE
834 HAVE_PTHREAD_COND_DESTROY
835 HAVE_PTHREAD_COND_BROADCAST
836 HAVE_PTHREAD_COND_SIGNAL
837 HAVE_PTHREAD_COND_TIMEDWAIT
838 HAVE_PTHREAD_COND_WAIT
839 HAVE_PTHREAD_CONDATTR_DESTROY
840 HAVE_PTHREAD_CONDATTR_INIT
841 HAVE_PTHREAD_COND_INIT
842 HAVE_PTHREAD_RWLOCK_DESTROY
843 HAVE_PTHREAD_RWLOCK_UNLOCK
844 HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
845 HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK
846 HAVE_PTHREAD_RWLOCK_TRYWRLOCK
847 HAVE_PTHREAD_RWLOCK_TRYRDLOCK
848 HAVE_PTHREAD_RWLOCK_WRLOCK
849 HAVE_PTHREAD_RWLOCK_RDLOCK
850 HAVE_PTHREAD_RWLOCKATTR_DESTROY
851 HAVE_PTHREAD_RWLOCKATTR_INIT
852 HAVE_PTHREAD_RWLOCK_INIT
853 HAVE_PTHREAD_MUTEX_DESTROY
854 HAVE_PTHREAD_MUTEX_UNLOCK
855 HAVE_PTHREAD_MUTEX_TIMEDLOCK
856 HAVE_PTHREAD_MUTEX_TRYLOCK
857 HAVE_PTHREAD_MUTEX_LOCK
858 HAVE_PTHREAD_MUTEXATTR_DESTROY
859 HAVE_PTHREAD_MUTEXATTR_SETROBUST
860 HAVE_PTHREAD_MUTEXATTR_GETROBUST
861 HAVE_PTHREAD_MUTEXATTR_SETTYPE
862 HAVE_PTHREAD_MUTEXATTR_GETTYPE
863 HAVE_PTHREAD_MUTEXATTR_INIT
864 HAVE_PTHREAD_MUTEX_INIT
865 HAVE_PTHREAD_ONCE
866 HAVE_PTHREAD_EXIT
867 HAVE_PTHREAD_JOIN
868 HAVE_PTHREAD_DETACH
869 HAVE_PTHREAD_EQUAL
870 HAVE_PTHREAD_SELF
871 HAVE_PTHREAD_ATTR_DESTROY
872 HAVE_PTHREAD_ATTR_SETDETACHSTATE
873 HAVE_PTHREAD_ATTR_GETDETACHSTATE
874 HAVE_PTHREAD_ATTR_INIT
875 HAVE_PTHREAD_CREATE
876 HAVE_PTHREAD_PROCESS_SHARED
877 HAVE_PTHREAD_MUTEX_ROBUST
878 HAVE_PTHREAD_MUTEX_RECURSIVE
879 HAVE_PTHREAD_CREATE_DETACHED
880 HAVE_PTHREAD_SPINLOCK_T
881 HAVE_PTHREAD_T
882 GL_GNULIB_SELECT
883 GL_GNULIB_PSELECT
884 GL_COND_OBJ_PSELECT_FALSE
885 GL_COND_OBJ_PSELECT_TRUE
886 HAVE_SYS_SELECT_H
887 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
888 NEXT_SYS_SELECT_H
889 REPLACE_SELECT
890 REPLACE_PSELECT
891 HAVE_PSELECT
892 GL_COND_OBJ_PIPE_FALSE
893 GL_COND_OBJ_PIPE_TRUE
894 GL_COND_OBJ_PERROR_FALSE
895 GL_COND_OBJ_PERROR_TRUE
896 GL_COND_OBJ_OPENDIR_FALSE
897 GL_COND_OBJ_OPENDIR_TRUE
898 GL_GENERATE_NETINET_IN_H_FALSE
899 GL_GENERATE_NETINET_IN_H_TRUE
900 NETINET_IN_H
901 HAVE_NETINET_IN_H
902 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
903 NEXT_NETINET_IN_H
904 GL_COND_OBJ_NANOSLEEP_FALSE
905 GL_COND_OBJ_NANOSLEEP_TRUE
906 LIB_NANOSLEEP
907 GL_COND_OBJ_LSEEK_FALSE
908 GL_COND_OBJ_LSEEK_TRUE
909 INTL_MACOSX_LIBS
910 GL_COND_OBJ_LISTEN_FALSE
911 GL_COND_OBJ_LISTEN_TRUE
912 GL_COND_OBJ_LINK_FALSE
913 GL_COND_OBJ_LINK_TRUE
914 GL_COND_OBJ_ISBLANK_FALSE
915 GL_COND_OBJ_ISBLANK_TRUE
916 GL_GNULIB_IOCTL
917 GL_COND_OBJ_IOCTL_FALSE
918 GL_COND_OBJ_IOCTL_TRUE
919 GL_COND_OBJ_INET_PTON_FALSE
920 GL_COND_OBJ_INET_PTON_TRUE
921 INET_PTON_LIB
922 GL_GNULIB_GETTIMEOFDAY
923 GL_COND_OBJ_GETTIMEOFDAY_FALSE
924 GL_COND_OBJ_GETTIMEOFDAY_TRUE
925 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
926 NEXT_SYS_TIME_H
927 REPLACE_STRUCT_TIMEVAL
928 REPLACE_GETTIMEOFDAY
929 HAVE_SYS_TIME_H
930 HAVE_STRUCT_TIMEVAL
931 HAVE_GETTIMEOFDAY
932 GL_COND_OBJ_GETPAGESIZE_FALSE
933 GL_COND_OBJ_GETPAGESIZE_TRUE
934 GL_COND_OBJ_GETCWD_LGPL_FALSE
935 GL_COND_OBJ_GETCWD_LGPL_TRUE
936 GL_COND_OBJ_FTRUNCATE_FALSE
937 GL_COND_OBJ_FTRUNCATE_TRUE
938 GL_COND_OBJ_FTELLO_FALSE
939 GL_COND_OBJ_FTELLO_TRUE
940 GL_COND_OBJ_FTELL_FALSE
941 GL_COND_OBJ_FTELL_TRUE
942 GL_COND_OBJ_FSEEKO_FALSE
943 GL_COND_OBJ_FSEEKO_TRUE
944 GL_COND_OBJ_FSEEK_FALSE
945 GL_COND_OBJ_FSEEK_TRUE
946 GL_COND_OBJ_FPURGE_FALSE
947 GL_COND_OBJ_FPURGE_TRUE
948 LIB_HAS_ACL
949 GL_COND_OBJ_FFLUSH_FALSE
950 GL_COND_OBJ_FFLUSH_TRUE
951 GL_COND_OBJ_FDOPEN_FALSE
952 GL_COND_OBJ_FDOPEN_TRUE
953 GL_COND_OBJ_EXPLICIT_BZERO_FALSE
954 GL_COND_OBJ_EXPLICIT_BZERO_TRUE
955 GL_COND_OBJ_DIRFD_FALSE
956 GL_COND_OBJ_DIRFD_TRUE
957 HAVE_DIRENT_H
958 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
959 NEXT_DIRENT_H
960 GL_COND_OBJ_CONNECT_FALSE
961 GL_COND_OBJ_CONNECT_TRUE
962 GL_GNULIB_ALPHASORT
963 GL_GNULIB_SCANDIR
964 GL_GNULIB_FDOPENDIR
965 GL_GNULIB_DIRFD
966 GL_GNULIB_CLOSEDIR
967 GL_GNULIB_REWINDDIR
968 GL_GNULIB_READDIR
969 GL_GNULIB_OPENDIR
970 GL_COND_OBJ_CLOSEDIR_FALSE
971 GL_COND_OBJ_CLOSEDIR_TRUE
972 REPLACE_FDOPENDIR
973 REPLACE_DIRFD
974 REPLACE_CLOSEDIR
975 REPLACE_OPENDIR
976 HAVE_ALPHASORT
977 HAVE_SCANDIR
978 HAVE_FDOPENDIR
979 HAVE_DECL_FDOPENDIR
980 HAVE_DECL_DIRFD
981 HAVE_CLOSEDIR
982 HAVE_REWINDDIR
983 HAVE_READDIR
984 HAVE_OPENDIR
985 LOCALE_TR_UTF8
986 GL_COND_OBJ_BIND_FALSE
987 GL_COND_OBJ_BIND_TRUE
988 GL_GNULIB_INET_PTON
989 GL_GNULIB_INET_NTOP
990 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
991 NEXT_ARPA_INET_H
992 HAVE_ARPA_INET_H
993 REPLACE_INET_PTON
994 REPLACE_INET_NTOP
995 HAVE_DECL_INET_PTON
996 HAVE_DECL_INET_NTOP
997 GL_GNULIB_ACCEPT4
998 GL_GNULIB_SHUTDOWN
999 GL_GNULIB_SETSOCKOPT
1000 GL_GNULIB_SENDTO
1001 GL_GNULIB_RECVFROM
1002 GL_GNULIB_SEND
1003 GL_GNULIB_RECV
1004 GL_GNULIB_LISTEN
1005 GL_GNULIB_GETSOCKOPT
1006 GL_GNULIB_GETSOCKNAME
1007 GL_GNULIB_GETPEERNAME
1008 GL_GNULIB_BIND
1009 GL_GNULIB_ACCEPT
1010 GL_GNULIB_CONNECT
1011 GL_GNULIB_SOCKET
1012 GL_COND_OBJ_ACCEPT_FALSE
1013 GL_COND_OBJ_ACCEPT_TRUE
1014 HAVE_WS2TCPIP_H
1015 HAVE_SYS_SOCKET_H
1016 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
1017 NEXT_SYS_SOCKET_H
1018 HAVE_ACCEPT4
1019 HAVE_SA_FAMILY_T
1020 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
1021 HAVE_STRUCT_SOCKADDR_STORAGE
1022 gltests_WITNESS
1023 GL_CXXFLAG_ALLOW_WARNINGS
1024 GL_CFLAG_ALLOW_WARNINGS
1025 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE
1026 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE
1027 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE
1028 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE
1029 GL_COND_OBJ_WINDOWS_ONCE_FALSE
1030 GL_COND_OBJ_WINDOWS_ONCE_TRUE
1031 GL_COND_OBJ_WINDOWS_MUTEX_FALSE
1032 GL_COND_OBJ_WINDOWS_MUTEX_TRUE
1033 GL_GNULIB_TOWCTRANS
1034 GL_GNULIB_WCTRANS
1035 GL_GNULIB_ISWCTYPE
1036 GL_GNULIB_WCTYPE
1037 GL_GNULIB_ISWXDIGIT
1038 GL_GNULIB_ISWDIGIT
1039 GL_GNULIB_ISWBLANK
1040 REPLACE_TOWLOWER
1041 REPLACE_ISWCNTRL
1042 HAVE_WCTYPE_H
1043 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
1044 NEXT_WCTYPE_H
1045 HAVE_ISWCNTRL
1046 REPLACE_ISWXDIGIT
1047 REPLACE_ISWDIGIT
1048 REPLACE_ISWBLANK
1049 HAVE_WCTRANS_T
1050 HAVE_WCTYPE_T
1051 HAVE_ISWBLANK
1052 GL_COND_OBJ_WCTOMB_FALSE
1053 GL_COND_OBJ_WCTOMB_TRUE
1054 GL_COND_OBJ_WCTOB_FALSE
1055 GL_COND_OBJ_WCTOB_TRUE
1056 GL_COND_OBJ_WCRTOMB_FALSE
1057 GL_COND_OBJ_WCRTOMB_TRUE
1058 HAVE_CRTDEFS_H
1059 HAVE_WINT_T
1060 HAVE_FEATURES_H
1061 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
1062 NEXT_WCHAR_H
1063 HAVE_UNISTD_H
1064 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
1065 NEXT_UNISTD_H
1066 GL_GNULIB_MDA_TZSET
1067 GL_GNULIB_TZSET
1068 GL_GNULIB_TIME_RZ
1069 GL_GNULIB_TIME_R
1070 GL_GNULIB_TIMESPEC_GETRES
1071 GL_GNULIB_TIMESPEC_GET
1072 GL_GNULIB_TIMEGM
1073 GL_GNULIB_STRPTIME
1074 GL_GNULIB_STRFTIME
1075 GL_GNULIB_NANOSLEEP
1076 GL_GNULIB_LOCALTIME
1077 GL_GNULIB_MKTIME
1078 GL_GNULIB_CTIME
1079 TIME_H_DEFINES_TIME_UTC
1080 UNISTD_H_DEFINES_STRUCT_TIMESPEC
1081 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
1082 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
1083 TIME_H_DEFINES_STRUCT_TIMESPEC
1084 NEXT_AS_FIRST_DIRECTIVE_TIME_H
1085 NEXT_TIME_H
1086 REPLACE_LOCALTIME
1087 REPLACE_GMTIME
1088 GNULIB_GETTIMEOFDAY
1089 REPLACE_TZSET
1090 REPLACE_TIMEGM
1091 REPLACE_STRFTIME
1092 REPLACE_NANOSLEEP
1093 REPLACE_MKTIME
1094 REPLACE_LOCALTIME_R
1095 REPLACE_CTIME
1096 HAVE_TIMEZONE_T
1097 HAVE_TIMESPEC_GETRES
1098 HAVE_TIMESPEC_GET
1099 HAVE_TIMEGM
1100 HAVE_STRPTIME
1101 HAVE_NANOSLEEP
1102 HAVE_DECL_LOCALTIME_R
1103 WINDOWS_STAT_INODES
1104 WINDOWS_64_BIT_OFF_T
1105 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1106 NEXT_SYS_TYPES_H
1107 HAVE_SYS_RANDOM_H
1108 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
1109 NEXT_SYS_RANDOM_H
1110 GL_COND_OBJ_STRVERSCMP_FALSE
1111 GL_COND_OBJ_STRVERSCMP_TRUE
1112 NEXT_AS_FIRST_DIRECTIVE_STRING_H
1113 NEXT_STRING_H
1114 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE
1115 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE
1116 GL_COND_OBJ_STRERROR_FALSE
1117 GL_COND_OBJ_STRERROR_TRUE
1118 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
1119 NEXT_STDLIB_H
1120 GL_COND_OBJ_STDIO_WRITE_FALSE
1121 GL_COND_OBJ_STDIO_WRITE_TRUE
1122 GL_COND_OBJ_STDIO_READ_FALSE
1123 GL_COND_OBJ_STDIO_READ_TRUE
1124 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
1125 NEXT_STDIO_H
1126 GL_GENERATE_STDINT_H_FALSE
1127 GL_GENERATE_STDINT_H_TRUE
1128 STDINT_H
1129 GL_GENERATE_STDDEF_H_FALSE
1130 GL_GENERATE_STDDEF_H_TRUE
1131 STDDEF_H
1132 GL_GENERATE_STDCKDINT_H_FALSE
1133 GL_GENERATE_STDCKDINT_H_TRUE
1134 STDCKDINT_H
1135 GL_GENERATE_STDARG_H_FALSE
1136 GL_GENERATE_STDARG_H_TRUE
1137 STDARG_H
1138 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
1139 NEXT_STDARG_H
1140 GL_GENERATE_STDALIGN_H_FALSE
1141 GL_GENERATE_STDALIGN_H_TRUE
1142 STDALIGN_H
1143 GL_COND_OBJ_STAT_FALSE
1144 GL_COND_OBJ_STAT_TRUE
1145 GL_COND_OBJ_SETLOCALE_LOCK_FALSE
1146 GL_COND_OBJ_SETLOCALE_LOCK_TRUE
1147 GL_COND_OBJ_GETFILECON_FALSE
1148 GL_COND_OBJ_GETFILECON_TRUE
1149 GL_GENERATE_SELINUX_LABEL_H_FALSE
1150 GL_GENERATE_SELINUX_LABEL_H_TRUE
1151 SELINUX_LABEL_H
1152 GL_GENERATE_SELINUX_CONTEXT_H_FALSE
1153 GL_GENERATE_SELINUX_CONTEXT_H_TRUE
1154 SELINUX_CONTEXT_H
1155 NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
1156 NEXT_SELINUX_SELINUX_H
1157 LIB_SELINUX
1158 GL_COND_OBJ_RMDIR_FALSE
1159 GL_COND_OBJ_RMDIR_TRUE
1160 GL_COND_OBJ_RENAME_FALSE
1161 GL_COND_OBJ_RENAME_TRUE
1162 GL_COND_OBJ_REGEX_FALSE
1163 GL_COND_OBJ_REGEX_TRUE
1164 GL_COND_OBJ_REALLOCARRAY_FALSE
1165 GL_COND_OBJ_REALLOCARRAY_TRUE
1166 GL_COND_OBJ_READLINK_FALSE
1167 GL_COND_OBJ_READLINK_TRUE
1168 GL_COND_OBJ_RAWMEMCHR_FALSE
1169 GL_COND_OBJ_RAWMEMCHR_TRUE
1170 PERL
1171 GL_COND_OBJ_OPEN_FALSE
1172 GL_COND_OBJ_OPEN_TRUE
1173 GL_COND_OBJ_OBSTACK_FALSE
1174 GL_COND_OBJ_OBSTACK_TRUE
1175 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE
1176 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE
1177 GL_COND_OBJ_NL_LANGINFO_FALSE
1178 GL_COND_OBJ_NL_LANGINFO_TRUE
1179 LIB_NL_LANGINFO
1180 GL_COND_OBJ_MSVC_NOTHROW_FALSE
1181 GL_COND_OBJ_MSVC_NOTHROW_TRUE
1182 GL_COND_OBJ_MSVC_INVAL_FALSE
1183 GL_COND_OBJ_MSVC_INVAL_TRUE
1184 GL_COND_OBJ_MKOSTEMP_FALSE
1185 GL_COND_OBJ_MKOSTEMP_TRUE
1186 GL_COND_OBJ_MKDIR_FALSE
1187 GL_COND_OBJ_MKDIR_TRUE
1188 GL_COND_OBJ_MEMRCHR_FALSE
1189 GL_COND_OBJ_MEMRCHR_TRUE
1190 GL_COND_OBJ_MEMPCPY_FALSE
1191 GL_COND_OBJ_MEMPCPY_TRUE
1192 GL_GNULIB_MDA_STRDUP
1193 GL_GNULIB_MDA_MEMCCPY
1194 GL_GNULIB_STRVERSCMP
1195 GL_GNULIB_STRSIGNAL
1196 GL_GNULIB_SIGDESCR_NP
1197 GL_GNULIB_SIGABBREV_NP
1198 GL_GNULIB_STRERRORNAME_NP
1199 GL_GNULIB_STRERROR_R
1200 GL_GNULIB_STRERROR
1201 GL_GNULIB_MBSTOK_R
1202 GL_GNULIB_MBSSEP
1203 GL_GNULIB_MBSSPN
1204 GL_GNULIB_MBSPBRK
1205 GL_GNULIB_MBSCSPN
1206 GL_GNULIB_MBSCASESTR
1207 GL_GNULIB_MBSPCASECMP
1208 GL_GNULIB_MBSNCASECMP
1209 GL_GNULIB_MBSCASECMP
1210 GL_GNULIB_MBSSTR
1211 GL_GNULIB_MBSRCHR
1212 GL_GNULIB_MBSCHR
1213 GL_GNULIB_MBSNLEN
1214 GL_GNULIB_MBSLEN
1215 GL_GNULIB_STRTOK_R
1216 GL_GNULIB_STRCASESTR
1217 GL_GNULIB_STRSTR
1218 GL_GNULIB_STRSEP
1219 GL_GNULIB_STRPBRK
1220 GL_GNULIB_STRNLEN
1221 GL_GNULIB_STRNDUP
1222 GL_GNULIB_STRNCAT
1223 GL_GNULIB_STRDUP
1224 GL_GNULIB_STRCHRNUL
1225 GL_GNULIB_STPNCPY
1226 GL_GNULIB_STPCPY
1227 GL_GNULIB_RAWMEMCHR
1228 GL_GNULIB_MEMRCHR
1229 GL_GNULIB_MEMPCPY
1230 GL_GNULIB_MEMMEM
1231 GL_GNULIB_MEMCHR
1232 GL_GNULIB_FFSLL
1233 GL_GNULIB_FFSL
1234 GL_GNULIB_EXPLICIT_BZERO
1235 GL_COND_OBJ_MEMCHR_FALSE
1236 GL_COND_OBJ_MEMCHR_TRUE
1237 UNDEFINE_STRTOK_R
1238 REPLACE_STRSIGNAL
1239 REPLACE_STRERRORNAME_NP
1240 REPLACE_STRERROR_R
1241 REPLACE_STRERROR
1242 REPLACE_STRTOK_R
1243 REPLACE_STRCASESTR
1244 REPLACE_STRSTR
1245 REPLACE_STRNLEN
1246 REPLACE_STRNDUP
1247 REPLACE_STRNCAT
1248 REPLACE_STRDUP
1249 REPLACE_STRCHRNUL
1250 REPLACE_STPNCPY
1251 REPLACE_MEMMEM
1252 REPLACE_MEMCHR
1253 REPLACE_FFSLL
1254 HAVE_STRVERSCMP
1255 HAVE_DECL_STRSIGNAL
1256 HAVE_SIGDESCR_NP
1257 HAVE_SIGABBREV_NP
1258 HAVE_STRERRORNAME_NP
1259 HAVE_DECL_STRERROR_R
1260 HAVE_DECL_STRTOK_R
1261 HAVE_STRCASESTR
1262 HAVE_STRSEP
1263 HAVE_STRPBRK
1264 HAVE_DECL_STRNLEN
1265 HAVE_DECL_STRNDUP
1266 HAVE_DECL_STRDUP
1267 HAVE_STRCHRNUL
1268 HAVE_STPNCPY
1269 HAVE_STPCPY
1270 HAVE_RAWMEMCHR
1271 HAVE_DECL_MEMRCHR
1272 HAVE_MEMPCPY
1273 HAVE_DECL_MEMMEM
1274 HAVE_FFSLL
1275 HAVE_FFSL
1276 HAVE_EXPLICIT_BZERO
1277 HAVE_MBSLEN
1278 GL_COND_OBJ_MBTOWC_FALSE
1279 GL_COND_OBJ_MBTOWC_TRUE
1280 GL_COND_OBJ_MBSINIT_FALSE
1281 GL_COND_OBJ_MBSINIT_TRUE
1282 HAVE_VISIBILITY
1283 CFLAG_VISIBILITY
1284 GL_COND_OBJ_MBRTOWC_FALSE
1285 GL_COND_OBJ_MBRTOWC_TRUE
1286 GL_COND_OBJ_MBRLEN_FALSE
1287 GL_COND_OBJ_MBRLEN_TRUE
1288 LIB_MBRTOWC
1289 LOCALE_ZH_CN
1290 LOCALE_FR_UTF8
1291 LOCALE_JA
1292 GREP
1294 GL_COND_OBJ_LSTAT_FALSE
1295 GL_COND_OBJ_LSTAT_TRUE
1296 LTLIBMULTITHREAD
1297 LIBMULTITHREAD
1298 LTLIBTHREAD
1299 LIBTHREAD
1300 LIBSTDTHREAD
1301 GL_COND_OBJ_LOCALECONV_FALSE
1302 GL_COND_OBJ_LOCALECONV_TRUE
1303 GL_GNULIB_LOCALENAME
1304 GL_GNULIB_DUPLOCALE
1305 GL_GNULIB_SETLOCALE_NULL
1306 GL_GNULIB_SETLOCALE
1307 GL_GNULIB_LOCALECONV
1308 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1309 NEXT_LOCALE_H
1310 HAVE_XLOCALE_H
1311 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1312 NEXT_STDDEF_H
1313 HAVE_WCHAR_T
1314 HAVE_MAX_ALIGN_T
1315 REPLACE_NULL
1316 LOCALENAME_ENHANCE_LOCALE_FUNCS
1317 REPLACE_STRUCT_LCONV
1318 REPLACE_FREELOCALE
1319 REPLACE_DUPLOCALE
1320 REPLACE_NEWLOCALE
1321 REPLACE_SETLOCALE
1322 REPLACE_LOCALECONV
1323 HAVE_FREELOCALE
1324 HAVE_DUPLOCALE
1325 HAVE_NEWLOCALE
1326 LOCALCHARSET_TESTS_ENVIRONMENT
1327 GL_GENERATE_LIMITS_H_FALSE
1328 GL_GENERATE_LIMITS_H_TRUE
1329 LIMITS_H
1330 GL_GNULIB_NL_LANGINFO
1331 HAVE_LANGINFO_YESEXPR
1332 HAVE_LANGINFO_ERA
1333 HAVE_LANGINFO_ALTMON
1334 HAVE_LANGINFO_T_FMT_AMPM
1335 HAVE_LANGINFO_CODESET
1336 HAVE_LANGINFO_H
1337 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1338 NEXT_LANGINFO_H
1339 REPLACE_NL_LANGINFO
1340 HAVE_NL_LANGINFO
1341 GL_GNULIB_STRTOUMAX
1342 GL_GNULIB_STRTOIMAX
1343 GL_GNULIB_IMAXDIV
1344 GL_GNULIB_IMAXABS
1345 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1346 NEXT_INTTYPES_H
1347 UINT64_MAX_EQ_ULONG_MAX
1348 UINT32_MAX_LT_UINTMAX_MAX
1349 PRIPTR_PREFIX
1350 INT64_MAX_EQ_LONG_MAX
1351 INT32_MAX_LT_INTMAX_MAX
1352 REPLACE_STRTOUMAX
1353 REPLACE_STRTOIMAX
1354 HAVE_IMAXDIV_T
1355 HAVE_DECL_STRTOUMAX
1356 HAVE_DECL_STRTOIMAX
1357 HAVE_DECL_IMAXDIV
1358 HAVE_DECL_IMAXABS
1359 HAVE_SYS_INTTYPES_H
1360 HAVE_SYS_BITYPES_H
1361 HAVE_C99_STDINT_H
1362 WINT_T_SUFFIX
1363 WCHAR_T_SUFFIX
1364 SIG_ATOMIC_T_SUFFIX
1365 SIZE_T_SUFFIX
1366 PTRDIFF_T_SUFFIX
1367 HAVE_SIGNED_WINT_T
1368 HAVE_SIGNED_WCHAR_T
1369 HAVE_SIGNED_SIG_ATOMIC_T
1370 BITSIZEOF_WINT_T
1371 BITSIZEOF_WCHAR_T
1372 BITSIZEOF_SIG_ATOMIC_T
1373 BITSIZEOF_SIZE_T
1374 BITSIZEOF_PTRDIFF_T
1375 APPLE_UNIVERSAL_BUILD
1376 HAVE_STDINT_H
1377 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1378 NEXT_STDINT_H
1379 HAVE_SYS_TYPES_H
1380 HAVE_INTTYPES_H
1381 HAVE_WCHAR_H
1382 GNULIBHEADERS_OVERRIDE_WINT_T
1383 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1384 NEXT_LIMITS_H
1385 LIB_HARD_LOCALE
1386 LIB_SETLOCALE_NULL
1387 LIB_SCHED_YIELD
1388 LIBPMULTITHREAD
1389 LIBPTHREAD
1390 LTLIBINTL
1391 LIBINTL
1392 GL_GNULIB_GETRANDOM
1393 GL_COND_OBJ_GETRANDOM_FALSE
1394 GL_COND_OBJ_GETRANDOM_TRUE
1395 LIB_GETRANDOM
1396 REPLACE_GETRANDOM
1397 HAVE_GETRANDOM
1398 GL_COND_OBJ_GETDTABLESIZE_FALSE
1399 GL_COND_OBJ_GETDTABLESIZE_TRUE
1400 GL_GNULIB_MDA_TEMPNAM
1401 GL_GNULIB_MDA_PUTW
1402 GL_GNULIB_MDA_GETW
1403 GL_GNULIB_MDA_FILENO
1404 GL_GNULIB_MDA_FDOPEN
1405 GL_GNULIB_MDA_FCLOSEALL
1406 GL_GNULIB_VSPRINTF_POSIX
1407 GL_GNULIB_VSNPRINTF
1408 GL_GNULIB_VPRINTF_POSIX
1409 GL_GNULIB_VPRINTF
1410 GL_GNULIB_VFPRINTF_POSIX
1411 GL_GNULIB_VFPRINTF
1412 GL_GNULIB_VDPRINTF
1413 GL_GNULIB_VSCANF
1414 GL_GNULIB_VFSCANF
1415 GL_GNULIB_VASPRINTF
1416 GL_GNULIB_TMPFILE
1417 GL_GNULIB_STDIO_H_SIGPIPE
1418 GL_GNULIB_STDIO_H_NONBLOCKING
1419 GL_GNULIB_SPRINTF_POSIX
1420 GL_GNULIB_SNPRINTF
1421 GL_GNULIB_SCANF
1422 GL_GNULIB_RENAMEAT
1423 GL_GNULIB_RENAME
1424 GL_GNULIB_REMOVE
1425 GL_GNULIB_PUTS
1426 GL_GNULIB_PUTCHAR
1427 GL_GNULIB_PUTC
1428 GL_GNULIB_PRINTF_POSIX
1429 GL_GNULIB_PRINTF
1430 GL_GNULIB_POPEN
1431 GL_GNULIB_PERROR
1432 GL_GNULIB_PCLOSE
1433 GL_GNULIB_OBSTACK_PRINTF_POSIX
1434 GL_GNULIB_OBSTACK_PRINTF
1435 GL_GNULIB_GETLINE
1436 GL_GNULIB_GETDELIM
1437 GL_GNULIB_GETCHAR
1438 GL_GNULIB_GETC
1439 GL_GNULIB_FWRITE
1440 GL_GNULIB_FTELLO
1441 GL_GNULIB_FTELL
1442 GL_GNULIB_FSEEKO
1443 GL_GNULIB_FSEEK
1444 GL_GNULIB_FSCANF
1445 GL_GNULIB_FREOPEN
1446 GL_GNULIB_FREAD
1447 GL_GNULIB_FPUTS
1448 GL_GNULIB_FPUTC
1449 GL_GNULIB_FPURGE
1450 GL_GNULIB_FPRINTF_POSIX
1451 GL_GNULIB_FPRINTF
1452 GL_GNULIB_FOPEN_GNU
1453 GL_GNULIB_FOPEN
1454 GL_GNULIB_FGETS
1455 GL_GNULIB_FGETC
1456 GL_GNULIB_FFLUSH
1457 GL_GNULIB_FDOPEN
1458 GL_GNULIB_FCLOSE
1459 GL_GNULIB_DPRINTF
1460 GL_COND_OBJ_GETDELIM_FALSE
1461 GL_COND_OBJ_GETDELIM_TRUE
1462 REPLACE_VSPRINTF
1463 REPLACE_VSNPRINTF
1464 REPLACE_VPRINTF
1465 REPLACE_VFPRINTF
1466 REPLACE_VDPRINTF
1467 REPLACE_VASPRINTF
1468 REPLACE_TMPFILE
1469 REPLACE_STDIO_WRITE_FUNCS
1470 REPLACE_STDIO_READ_FUNCS
1471 REPLACE_SPRINTF
1472 REPLACE_SNPRINTF
1473 REPLACE_RENAMEAT
1474 REPLACE_RENAME
1475 REPLACE_REMOVE
1476 REPLACE_PRINTF
1477 REPLACE_POPEN
1478 REPLACE_PERROR
1479 REPLACE_OBSTACK_PRINTF
1480 REPLACE_GETLINE
1481 REPLACE_GETDELIM
1482 REPLACE_FTELLO
1483 REPLACE_FTELL
1484 REPLACE_FSEEKO
1485 REPLACE_FSEEK
1486 REPLACE_FREOPEN
1487 REPLACE_FPURGE
1488 REPLACE_FPRINTF
1489 REPLACE_FOPEN_FOR_FOPEN_GNU
1490 REPLACE_FOPEN
1491 REPLACE_FFLUSH
1492 REPLACE_FDOPEN
1493 REPLACE_FCLOSE
1494 REPLACE_DPRINTF
1495 HAVE_VDPRINTF
1496 HAVE_VASPRINTF
1497 HAVE_RENAMEAT
1498 HAVE_POPEN
1499 HAVE_PCLOSE
1500 HAVE_FTELLO
1501 HAVE_FSEEKO
1502 HAVE_DPRINTF
1503 HAVE_DECL_VSNPRINTF
1504 HAVE_DECL_SNPRINTF
1505 HAVE_DECL_OBSTACK_PRINTF
1506 HAVE_DECL_GETLINE
1507 HAVE_DECL_GETDELIM
1508 HAVE_DECL_FTELLO
1509 HAVE_DECL_FSEEKO
1510 HAVE_DECL_FPURGE
1511 HAVE_DECL_FCLOSEALL
1512 GL_COND_OBJ_FWRITING_FALSE
1513 GL_COND_OBJ_FWRITING_TRUE
1514 GL_GNULIB_MDA_UMASK
1515 GL_GNULIB_MDA_MKDIR
1516 GL_GNULIB_MDA_CHMOD
1517 GL_GNULIB_OVERRIDES_STRUCT_STAT
1518 GL_GNULIB_UTIMENSAT
1519 GL_GNULIB_STAT
1520 GL_GNULIB_MKNODAT
1521 GL_GNULIB_MKNOD
1522 GL_GNULIB_MKFIFOAT
1523 GL_GNULIB_MKFIFO
1524 GL_GNULIB_MKDIRAT
1525 GL_GNULIB_MKDIR
1526 GL_GNULIB_LSTAT
1527 GL_GNULIB_LCHMOD
1528 GL_GNULIB_GETUMASK
1529 GL_GNULIB_FUTIMENS
1530 GL_GNULIB_FSTATAT
1531 GL_GNULIB_FSTAT
1532 GL_GNULIB_FCHMODAT
1533 GL_GNULIB_CHMOD
1534 WINDOWS_64_BIT_ST_SIZE
1535 WINDOWS_STAT_TIMESPEC
1536 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1537 NEXT_SYS_STAT_H
1538 GL_COND_OBJ_FSTAT_FALSE
1539 GL_COND_OBJ_FSTAT_TRUE
1540 REPLACE_UTIMENSAT
1541 REPLACE_STAT
1542 REPLACE_MKNODAT
1543 REPLACE_MKNOD
1544 REPLACE_MKFIFOAT
1545 REPLACE_MKFIFO
1546 REPLACE_MKDIR
1547 REPLACE_LSTAT
1548 REPLACE_FUTIMENS
1549 REPLACE_FSTATAT
1550 REPLACE_FSTAT
1551 REPLACE_FCHMODAT
1552 REPLACE_CHMOD
1553 HAVE_UTIMENSAT
1554 HAVE_MKNODAT
1555 HAVE_MKNOD
1556 HAVE_MKFIFOAT
1557 HAVE_MKFIFO
1558 HAVE_MKDIRAT
1559 HAVE_LSTAT
1560 HAVE_LCHMOD
1561 HAVE_GETUMASK
1562 HAVE_FUTIMENS
1563 HAVE_FSTATAT
1564 HAVE_FCHMODAT
1565 GL_COND_OBJ_FREE_FALSE
1566 GL_COND_OBJ_FREE_TRUE
1567 GL_COND_OBJ_FPENDING_FALSE
1568 GL_COND_OBJ_FPENDING_TRUE
1569 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1570 NEXT_FCNTL_H
1571 GL_GNULIB_MDA_OPEN
1572 GL_GNULIB_MDA_CREAT
1573 GL_GNULIB_OPENAT
1574 GL_GNULIB_OPEN
1575 GL_GNULIB_NONBLOCKING
1576 GL_GNULIB_FCNTL
1577 GL_GNULIB_CREAT
1578 GL_COND_OBJ_FCNTL_FALSE
1579 GL_COND_OBJ_FCNTL_TRUE
1580 REPLACE_OPENAT
1581 REPLACE_OPEN
1582 REPLACE_FCNTL
1583 REPLACE_CREAT
1584 HAVE_OPENAT
1585 HAVE_FCNTL
1586 GL_COND_OBJ_ERROR_FALSE
1587 GL_COND_OBJ_ERROR_TRUE
1588 GL_GENERATE_ERRNO_H_FALSE
1589 GL_GENERATE_ERRNO_H_TRUE
1590 ERRNO_H
1591 EOVERFLOW_VALUE
1592 EOVERFLOW_HIDDEN
1593 ENOLINK_VALUE
1594 ENOLINK_HIDDEN
1595 EMULTIHOP_VALUE
1596 EMULTIHOP_HIDDEN
1597 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1598 NEXT_ERRNO_H
1599 GL_COND_OBJ_DUP2_FALSE
1600 GL_COND_OBJ_DUP2_TRUE
1601 GL_GNULIB_ISBLANK
1602 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1603 NEXT_CTYPE_H
1604 HAVE_ISBLANK
1605 GL_COND_OBJ_CLOSE_FALSE
1606 GL_COND_OBJ_CLOSE_TRUE
1607 HAVE_WINSOCK2_H
1608 REPLACE_IOCTL
1609 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1610 SYS_IOCTL_H_HAVE_WINSOCK2_H
1611 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1612 LIB_CLOCK_GETTIME
1613 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1614 UNISTD_H_HAVE_WINSOCK2_H
1615 UNISTD_H_HAVE_SYS_RANDOM_H
1616 REPLACE_WRITE
1617 REPLACE_USLEEP
1618 REPLACE_UNLINKAT
1619 REPLACE_UNLINK
1620 REPLACE_TTYNAME_R
1621 REPLACE_TRUNCATE
1622 REPLACE_SYMLINKAT
1623 REPLACE_SYMLINK
1624 REPLACE_SLEEP
1625 REPLACE_RMDIR
1626 REPLACE_READLINKAT
1627 REPLACE_READLINK
1628 REPLACE_READ
1629 REPLACE_PWRITE
1630 REPLACE_PREAD
1631 REPLACE_LSEEK
1632 REPLACE_LINKAT
1633 REPLACE_LINK
1634 REPLACE_LCHOWN
1635 REPLACE_ISATTY
1636 REPLACE_GETPASS_FOR_GETPASS_GNU
1637 REPLACE_GETPASS
1638 REPLACE_GETPAGESIZE
1639 REPLACE_GETGROUPS
1640 REPLACE_GETLOGIN_R
1641 REPLACE_GETDTABLESIZE
1642 REPLACE_GETDOMAINNAME
1643 REPLACE_GETCWD
1644 REPLACE_FTRUNCATE
1645 REPLACE_FCHOWNAT
1646 REPLACE_FACCESSAT
1647 REPLACE_EXECVPE
1648 REPLACE_EXECVP
1649 REPLACE_EXECVE
1650 REPLACE_EXECV
1651 REPLACE_EXECLP
1652 REPLACE_EXECLE
1653 REPLACE_EXECL
1654 REPLACE_DUP2
1655 REPLACE_DUP
1656 REPLACE_COPY_FILE_RANGE
1657 REPLACE_CLOSE
1658 REPLACE_CHOWN
1659 REPLACE_ACCESS
1660 HAVE_SYS_PARAM_H
1661 HAVE_OS_H
1662 HAVE_DECL_TTYNAME_R
1663 HAVE_DECL_TRUNCATE
1664 HAVE_DECL_SETHOSTNAME
1665 HAVE_DECL_GETUSERSHELL
1666 HAVE_DECL_GETPAGESIZE
1667 HAVE_DECL_GETLOGIN_R
1668 HAVE_DECL_GETLOGIN
1669 HAVE_DECL_GETDOMAINNAME
1670 HAVE_DECL_FDATASYNC
1671 HAVE_DECL_FCHDIR
1672 HAVE_DECL_EXECVPE
1673 HAVE_DECL_ENVIRON
1674 HAVE_USLEEP
1675 HAVE_UNLINKAT
1676 HAVE_SYMLINKAT
1677 HAVE_SYMLINK
1678 HAVE_SLEEP
1679 HAVE_SETHOSTNAME
1680 HAVE_READLINKAT
1681 HAVE_READLINK
1682 HAVE_PWRITE
1683 HAVE_PREAD
1684 HAVE_PIPE2
1685 HAVE_PIPE
1686 HAVE_LINKAT
1687 HAVE_LINK
1688 HAVE_LCHOWN
1689 HAVE_GROUP_MEMBER
1690 HAVE_GETPASS
1691 HAVE_GETPAGESIZE
1692 HAVE_GETLOGIN
1693 HAVE_GETHOSTNAME
1694 HAVE_GETGROUPS
1695 HAVE_GETENTROPY
1696 HAVE_GETDTABLESIZE
1697 HAVE_FTRUNCATE
1698 HAVE_FSYNC
1699 HAVE_FDATASYNC
1700 HAVE_FCHOWNAT
1701 HAVE_FCHDIR
1702 HAVE_FACCESSAT
1703 HAVE_EXECVPE
1704 HAVE_EUIDACCESS
1705 HAVE_DUP3
1706 HAVE_COPY_FILE_RANGE
1707 HAVE_CHOWN
1708 GL_GNULIB_MDA_WRITE
1709 GL_GNULIB_MDA_UNLINK
1710 GL_GNULIB_MDA_SWAB
1711 GL_GNULIB_MDA_RMDIR
1712 GL_GNULIB_MDA_READ
1713 GL_GNULIB_MDA_LSEEK
1714 GL_GNULIB_MDA_ISATTY
1715 GL_GNULIB_MDA_GETPID
1716 GL_GNULIB_MDA_GETCWD
1717 GL_GNULIB_MDA_EXECVPE
1718 GL_GNULIB_MDA_EXECVP
1719 GL_GNULIB_MDA_EXECVE
1720 GL_GNULIB_MDA_EXECV
1721 GL_GNULIB_MDA_EXECLP
1722 GL_GNULIB_MDA_EXECLE
1723 GL_GNULIB_MDA_EXECL
1724 GL_GNULIB_MDA_DUP2
1725 GL_GNULIB_MDA_DUP
1726 GL_GNULIB_MDA_CLOSE
1727 GL_GNULIB_MDA_CHDIR
1728 GL_GNULIB_MDA_ACCESS
1729 GL_GNULIB_WRITE
1730 GL_GNULIB_USLEEP
1731 GL_GNULIB_UNLINKAT
1732 GL_GNULIB_UNLINK
1733 GL_GNULIB_UNISTD_H_SIGPIPE
1734 GL_GNULIB_UNISTD_H_NONBLOCKING
1735 GL_GNULIB_UNISTD_H_GETOPT
1736 GL_GNULIB_TTYNAME_R
1737 GL_GNULIB_TRUNCATE
1738 GL_GNULIB_SYMLINKAT
1739 GL_GNULIB_SYMLINK
1740 GL_GNULIB_SLEEP
1741 GL_GNULIB_SETHOSTNAME
1742 GL_GNULIB_RMDIR
1743 GL_GNULIB_READLINKAT
1744 GL_GNULIB_READLINK
1745 GL_GNULIB_READ
1746 GL_GNULIB_PWRITE
1747 GL_GNULIB_PREAD
1748 GL_GNULIB_PIPE2
1749 GL_GNULIB_PIPE
1750 GL_GNULIB_LSEEK
1751 GL_GNULIB_LINKAT
1752 GL_GNULIB_LINK
1753 GL_GNULIB_LCHOWN
1754 GL_GNULIB_ISATTY
1755 GL_GNULIB_GROUP_MEMBER
1756 GL_GNULIB_GETUSERSHELL
1757 GL_GNULIB_GETPASS_GNU
1758 GL_GNULIB_GETPASS
1759 GL_GNULIB_GETPAGESIZE
1760 GL_GNULIB_GETOPT_POSIX
1761 GL_GNULIB_GETLOGIN_R
1762 GL_GNULIB_GETLOGIN
1763 GL_GNULIB_GETHOSTNAME
1764 GL_GNULIB_GETGROUPS
1765 GL_GNULIB_GETENTROPY
1766 GL_GNULIB_GETDTABLESIZE
1767 GL_GNULIB_GETDOMAINNAME
1768 GL_GNULIB_GETCWD
1769 GL_GNULIB_FTRUNCATE
1770 GL_GNULIB_FSYNC
1771 GL_GNULIB_FDATASYNC
1772 GL_GNULIB_FCHOWNAT
1773 GL_GNULIB_FCHDIR
1774 GL_GNULIB_FACCESSAT
1775 GL_GNULIB_EXECVPE
1776 GL_GNULIB_EXECVP
1777 GL_GNULIB_EXECVE
1778 GL_GNULIB_EXECV
1779 GL_GNULIB_EXECLP
1780 GL_GNULIB_EXECLE
1781 GL_GNULIB_EXECL
1782 GL_GNULIB_EUIDACCESS
1783 GL_GNULIB_ENVIRON
1784 GL_GNULIB_DUP3
1785 GL_GNULIB_DUP2
1786 GL_GNULIB_DUP
1787 GL_GNULIB_COPY_FILE_RANGE
1788 GL_GNULIB_CLOSE
1789 GL_GNULIB_CHOWN
1790 GL_GNULIB_CHDIR
1791 GL_GNULIB_ACCESS
1792 GL_COND_OBJ_CANONICALIZE_LGPL_FALSE
1793 GL_COND_OBJ_CANONICALIZE_LGPL_TRUE
1794 REPLACE_WCTOMB
1795 REPLACE_UNSETENV
1796 REPLACE_STRTOULL
1797 REPLACE_STRTOUL
1798 REPLACE_STRTOLL
1799 REPLACE_STRTOLD
1800 REPLACE_STRTOL
1801 REPLACE_STRTOD
1802 REPLACE_SETSTATE
1803 REPLACE_SETENV
1804 REPLACE_REALPATH
1805 REPLACE_REALLOCARRAY
1806 REPLACE_REALLOC_FOR_REALLOC_POSIX
1807 REPLACE_REALLOC_FOR_REALLOC_GNU
1808 REPLACE_RANDOM_R
1809 REPLACE_RANDOM
1810 REPLACE_QSORT_R
1811 REPLACE_PUTENV
1812 REPLACE_PTSNAME_R
1813 REPLACE_PTSNAME
1814 REPLACE_POSIX_MEMALIGN
1815 REPLACE_MKSTEMP
1816 REPLACE_MBTOWC
1817 REPLACE_MALLOC_FOR_MALLOC_POSIX
1818 REPLACE_MALLOC_FOR_MALLOC_GNU
1819 REPLACE_INITSTATE
1820 REPLACE_FREE
1821 REPLACE_CANONICALIZE_FILE_NAME
1822 REPLACE_CALLOC_FOR_CALLOC_POSIX
1823 REPLACE_CALLOC_FOR_CALLOC_GNU
1824 REPLACE_ALIGNED_ALLOC
1825 HAVE_DECL_UNSETENV
1826 HAVE_UNLOCKPT
1827 HAVE_SYS_LOADAVG_H
1828 HAVE_STRUCT_RANDOM_DATA
1829 HAVE_STRTOULL
1830 HAVE_STRTOUL
1831 HAVE_STRTOLL
1832 HAVE_STRTOLD
1833 HAVE_STRTOL
1834 HAVE_STRTOD
1835 HAVE_DECL_SETSTATE
1836 HAVE_SETSTATE
1837 HAVE_DECL_SETENV
1838 HAVE_SETENV
1839 HAVE_SECURE_GETENV
1840 HAVE_RPMATCH
1841 HAVE_REALPATH
1842 HAVE_REALLOCARRAY
1843 HAVE_RANDOM_R
1844 HAVE_RANDOM_H
1845 HAVE_RANDOM
1846 HAVE_QSORT_R
1847 HAVE_PTSNAME_R
1848 HAVE_PTSNAME
1849 HAVE_POSIX_OPENPT
1850 HAVE_POSIX_MEMALIGN
1851 HAVE_MKSTEMPS
1852 HAVE_MKSTEMP
1853 HAVE_MKOSTEMPS
1854 HAVE_MKOSTEMP
1855 HAVE_MKDTEMP
1856 HAVE_MBTOWC
1857 HAVE_DECL_INITSTATE
1858 HAVE_INITSTATE
1859 HAVE_GRANTPT
1860 HAVE_GETSUBOPT
1861 HAVE_DECL_GETLOADAVG
1862 HAVE_DECL_GCVT
1863 HAVE_DECL_FCVT
1864 HAVE_DECL_ECVT
1865 HAVE_CANONICALIZE_FILE_NAME
1866 HAVE_ATOLL
1867 HAVE_ALIGNED_ALLOC
1868 HAVE__EXIT
1869 GL_GNULIB_MDA_PUTENV
1870 GL_GNULIB_MDA_MKTEMP
1871 GL_GNULIB_MDA_GCVT
1872 GL_GNULIB_MDA_FCVT
1873 GL_GNULIB_MDA_ECVT
1874 GL_GNULIB_WCTOMB
1875 GL_GNULIB_UNSETENV
1876 GL_GNULIB_UNLOCKPT
1877 GL_GNULIB_SYSTEM_POSIX
1878 GL_GNULIB_STRTOULL
1879 GL_GNULIB_STRTOUL
1880 GL_GNULIB_STRTOLL
1881 GL_GNULIB_STRTOLD
1882 GL_GNULIB_STRTOL
1883 GL_GNULIB_STRTOD
1884 GL_GNULIB_SETENV
1885 GL_GNULIB_SECURE_GETENV
1886 GL_GNULIB_RPMATCH
1887 GL_GNULIB_REALPATH
1888 GL_GNULIB_REALLOC_POSIX
1889 GL_GNULIB_REALLOC_GNU
1890 GL_GNULIB_REALLOCARRAY
1891 GL_GNULIB_RANDOM_R
1892 GL_GNULIB_RANDOM
1893 GL_GNULIB_QSORT_R
1894 GL_GNULIB_PUTENV
1895 GL_GNULIB_PTSNAME_R
1896 GL_GNULIB_PTSNAME
1897 GL_GNULIB_POSIX_OPENPT
1898 GL_GNULIB_POSIX_MEMALIGN
1899 GL_GNULIB_MKSTEMPS
1900 GL_GNULIB_MKSTEMP
1901 GL_GNULIB_MKOSTEMPS
1902 GL_GNULIB_MKOSTEMP
1903 GL_GNULIB_MKDTEMP
1904 GL_GNULIB_MBTOWC
1905 GL_GNULIB_MALLOC_POSIX
1906 GL_GNULIB_MALLOC_GNU
1907 GL_GNULIB_GRANTPT
1908 GL_GNULIB_GETSUBOPT
1909 GL_GNULIB_GETLOADAVG
1910 GL_GNULIB_FREE_POSIX
1911 GL_GNULIB_CANONICALIZE_FILE_NAME
1912 GL_GNULIB_CALLOC_POSIX
1913 GL_GNULIB_CALLOC_GNU
1914 GL_GNULIB_ATOLL
1915 GL_GNULIB_ALIGNED_ALLOC
1916 GL_GNULIB__EXIT
1917 GL_GNULIB_MDA_WCSDUP
1918 GL_GNULIB_WCSFTIME
1919 GL_GNULIB_WCSWIDTH
1920 GL_GNULIB_WCSTOK
1921 GL_GNULIB_WCSSTR
1922 GL_GNULIB_WCSPBRK
1923 GL_GNULIB_WCSSPN
1924 GL_GNULIB_WCSCSPN
1925 GL_GNULIB_WCSRCHR
1926 GL_GNULIB_WCSCHR
1927 GL_GNULIB_WCSDUP
1928 GL_GNULIB_WCSXFRM
1929 GL_GNULIB_WCSCOLL
1930 GL_GNULIB_WCSNCASECMP
1931 GL_GNULIB_WCSCASECMP
1932 GL_GNULIB_WCSNCMP
1933 GL_GNULIB_WCSCMP
1934 GL_GNULIB_WCSNCAT
1935 GL_GNULIB_WCSCAT
1936 GL_GNULIB_WCPNCPY
1937 GL_GNULIB_WCSNCPY
1938 GL_GNULIB_WCPCPY
1939 GL_GNULIB_WCSCPY
1940 GL_GNULIB_WCSNLEN
1941 GL_GNULIB_WCSLEN
1942 GL_GNULIB_WMEMSET
1943 GL_GNULIB_WMEMPCPY
1944 GL_GNULIB_WMEMMOVE
1945 GL_GNULIB_WMEMCPY
1946 GL_GNULIB_WMEMCMP
1947 GL_GNULIB_WMEMCHR
1948 GL_GNULIB_WCWIDTH
1949 GL_GNULIB_WCSNRTOMBS
1950 GL_GNULIB_WCSRTOMBS
1951 GL_GNULIB_WCRTOMB
1952 GL_GNULIB_MBSNRTOWCS
1953 GL_GNULIB_MBSRTOWCS
1954 GL_GNULIB_MBRLEN
1955 GL_GNULIB_MBRTOWC
1956 GL_GNULIB_MBSINIT
1957 GL_GNULIB_WCTOB
1958 GL_GNULIB_BTOWC
1959 GL_COND_OBJ_BTOWC_FALSE
1960 GL_COND_OBJ_BTOWC_TRUE
1961 LOCALE_FR
1962 REPLACE_WCSTOK
1963 REPLACE_WCSFTIME
1964 REPLACE_WCSWIDTH
1965 REPLACE_WCWIDTH
1966 REPLACE_WCSNRTOMBS
1967 REPLACE_WCSRTOMBS
1968 REPLACE_WCRTOMB
1969 REPLACE_MBSNRTOWCS
1970 REPLACE_MBSRTOWCS
1971 REPLACE_MBRLEN
1972 REPLACE_MBRTOWC
1973 REPLACE_MBSINIT
1974 REPLACE_WCTOB
1975 REPLACE_BTOWC
1976 REPLACE_MBSTATE_T
1977 HAVE_DECL_WCWIDTH
1978 HAVE_DECL_WCSDUP
1979 HAVE_DECL_WCTOB
1980 HAVE_WCSFTIME
1981 HAVE_WCSWIDTH
1982 HAVE_WCSTOK
1983 HAVE_WCSSTR
1984 HAVE_WCSPBRK
1985 HAVE_WCSSPN
1986 HAVE_WCSCSPN
1987 HAVE_WCSRCHR
1988 HAVE_WCSCHR
1989 HAVE_WCSDUP
1990 HAVE_WCSXFRM
1991 HAVE_WCSCOLL
1992 HAVE_WCSNCASECMP
1993 HAVE_WCSCASECMP
1994 HAVE_WCSNCMP
1995 HAVE_WCSCMP
1996 HAVE_WCSNCAT
1997 HAVE_WCSCAT
1998 HAVE_WCPNCPY
1999 HAVE_WCSNCPY
2000 HAVE_WCPCPY
2001 HAVE_WCSCPY
2002 HAVE_WCSNLEN
2003 HAVE_WCSLEN
2004 HAVE_WMEMSET
2005 HAVE_WMEMPCPY
2006 HAVE_WMEMMOVE
2007 HAVE_WMEMCPY
2008 HAVE_WMEMCMP
2009 HAVE_WMEMCHR
2010 HAVE_WCSNRTOMBS
2011 HAVE_WCSRTOMBS
2012 HAVE_WCRTOMB
2013 HAVE_MBSNRTOWCS
2014 HAVE_MBSRTOWCS
2015 HAVE_MBRLEN
2016 HAVE_MBRTOWC
2017 HAVE_MBSINIT
2018 HAVE_BTOWC
2019 GL_GENERATE_ASSERT_H_FALSE
2020 GL_GENERATE_ASSERT_H_TRUE
2021 ASSERT_H
2022 NEXT_AS_FIRST_DIRECTIVE_ASSERT_H
2023 NEXT_ASSERT_H
2024 PRAGMA_COLUMNS
2025 PRAGMA_SYSTEM_HEADER
2026 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
2027 INCLUDE_NEXT
2028 GL_GENERATE_ALLOCA_H_FALSE
2029 GL_GENERATE_ALLOCA_H_TRUE
2030 ALLOCA_H
2031 HAVE_ALLOCA_H
2032 ALLOCA
2033 USE_ACL
2034 LIB_ACL
2035 GL_COND_LIBTOOL_FALSE
2036 GL_COND_LIBTOOL_TRUE
2037 RANLIB
2038 ARFLAGS
2041 host_os
2042 host_vendor
2043 host_cpu
2044 host
2045 build_os
2046 build_vendor
2047 build_cpu
2048 build
2049 am__fastdepCC_FALSE
2050 am__fastdepCC_TRUE
2051 CCDEPMODE
2052 am__nodep
2053 AMDEPBACKSLASH
2054 AMDEP_FALSE
2055 AMDEP_TRUE
2056 am__include
2057 DEPDIR
2058 OBJEXT
2059 EXEEXT
2060 ac_ct_CC
2061 CPPFLAGS
2062 LDFLAGS
2063 CFLAGS
2065 am__xargs_n
2066 am__rm_f_notfound
2067 AM_BACKSLASH
2068 AM_DEFAULT_VERBOSITY
2069 AM_DEFAULT_V
2070 AM_V
2071 CSCOPE
2072 ETAGS
2073 CTAGS
2074 am__untar
2075 am__tar
2076 AMTAR
2077 am__leading_dot
2078 SET_MAKE
2080 mkdir_p
2081 MKDIR_P
2082 INSTALL_STRIP_PROGRAM
2083 STRIP
2084 install_sh
2085 MAKEINFO
2086 AUTOHEADER
2087 AUTOMAKE
2088 AUTOCONF
2089 ACLOCAL
2090 VERSION
2091 PACKAGE
2092 CYGPATH_W
2093 am__isrc
2094 INSTALL_DATA
2095 INSTALL_SCRIPT
2096 INSTALL_PROGRAM
2097 target_alias
2098 host_alias
2099 build_alias
2100 LIBS
2101 ECHO_T
2102 ECHO_N
2103 ECHO_C
2104 DEFS
2105 mandir
2106 localedir
2107 libdir
2108 psdir
2109 pdfdir
2110 dvidir
2111 htmldir
2112 infodir
2113 docdir
2114 oldincludedir
2115 includedir
2116 runstatedir
2117 localstatedir
2118 sharedstatedir
2119 sysconfdir
2120 datadir
2121 datarootdir
2122 libexecdir
2123 sbindir
2124 bindir
2125 program_transform_name
2126 prefix
2127 exec_prefix
2128 PACKAGE_URL
2129 PACKAGE_BUGREPORT
2130 PACKAGE_STRING
2131 PACKAGE_VERSION
2132 PACKAGE_TARNAME
2133 PACKAGE_NAME
2134 PATH_SEPARATOR
2135 SHELL
2136 am__quote'
2137 ac_subst_files=''
2138 ac_user_opts='
2139 enable_option_checking
2140 enable_silent_rules
2141 enable_dependency_tracking
2142 enable_largefile
2143 enable_year2038
2144 enable_threads
2145 enable_cross_guesses
2146 enable_acl
2147 enable_assert
2148 with_included_regex
2149 with_selinux
2150 with_packager
2151 with_packager_version
2152 with_packager_bug_reports
2153 enable_nls
2154 with_gnu_ld
2155 enable_rpath
2156 with_libiconv_prefix
2157 with_libintl_prefix
2158 enable_i18n
2159 enable_gcc_warnings
2160 enable_bold_man_page_references
2162 ac_precious_vars='build_alias
2163 host_alias
2164 target_alias
2166 CFLAGS
2167 LDFLAGS
2168 LIBS
2169 CPPFLAGS
2170 CPP'
2173 # Initialize some variables set by options.
2174 ac_init_help=
2175 ac_init_version=false
2176 ac_unrecognized_opts=
2177 ac_unrecognized_sep=
2178 # The variables have the same names as the options, with
2179 # dashes changed to underlines.
2180 cache_file=/dev/null
2181 exec_prefix=NONE
2182 no_create=
2183 no_recursion=
2184 prefix=NONE
2185 program_prefix=NONE
2186 program_suffix=NONE
2187 program_transform_name=s,x,x,
2188 silent=
2189 site=
2190 srcdir=
2191 verbose=
2192 x_includes=NONE
2193 x_libraries=NONE
2195 # Installation directory options.
2196 # These are left unexpanded so users can "make install exec_prefix=/foo"
2197 # and all the variables that are supposed to be based on exec_prefix
2198 # by default will actually change.
2199 # Use braces instead of parens because sh, perl, etc. also accept them.
2200 # (The list follows the same order as the GNU Coding Standards.)
2201 bindir='${exec_prefix}/bin'
2202 sbindir='${exec_prefix}/sbin'
2203 libexecdir='${exec_prefix}/libexec'
2204 datarootdir='${prefix}/share'
2205 datadir='${datarootdir}'
2206 sysconfdir='${prefix}/etc'
2207 sharedstatedir='${prefix}/com'
2208 localstatedir='${prefix}/var'
2209 runstatedir='${localstatedir}/run'
2210 includedir='${prefix}/include'
2211 oldincludedir='/usr/include'
2212 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2213 infodir='${datarootdir}/info'
2214 htmldir='${docdir}'
2215 dvidir='${docdir}'
2216 pdfdir='${docdir}'
2217 psdir='${docdir}'
2218 libdir='${exec_prefix}/lib'
2219 localedir='${datarootdir}/locale'
2220 mandir='${datarootdir}/man'
2222 ac_prev=
2223 ac_dashdash=
2224 for ac_option
2226 # If the previous option needs an argument, assign it.
2227 if test -n "$ac_prev"; then
2228 eval $ac_prev=\$ac_option
2229 ac_prev=
2230 continue
2233 case $ac_option in
2234 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2235 *=) ac_optarg= ;;
2236 *) ac_optarg=yes ;;
2237 esac
2239 case $ac_dashdash$ac_option in
2241 ac_dashdash=yes ;;
2243 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2244 ac_prev=bindir ;;
2245 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2246 bindir=$ac_optarg ;;
2248 -build | --build | --buil | --bui | --bu)
2249 ac_prev=build_alias ;;
2250 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2251 build_alias=$ac_optarg ;;
2253 -cache-file | --cache-file | --cache-fil | --cache-fi \
2254 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2255 ac_prev=cache_file ;;
2256 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2257 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2258 cache_file=$ac_optarg ;;
2260 --config-cache | -C)
2261 cache_file=config.cache ;;
2263 -datadir | --datadir | --datadi | --datad)
2264 ac_prev=datadir ;;
2265 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2266 datadir=$ac_optarg ;;
2268 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2269 | --dataroo | --dataro | --datar)
2270 ac_prev=datarootdir ;;
2271 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2272 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2273 datarootdir=$ac_optarg ;;
2275 -disable-* | --disable-*)
2276 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2277 # Reject names that are not valid shell variable names.
2278 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2279 as_fn_error $? "invalid feature name: '$ac_useropt'"
2280 ac_useropt_orig=$ac_useropt
2281 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2282 case $ac_user_opts in
2284 "enable_$ac_useropt"
2285 "*) ;;
2286 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2287 ac_unrecognized_sep=', ';;
2288 esac
2289 eval enable_$ac_useropt=no ;;
2291 -docdir | --docdir | --docdi | --doc | --do)
2292 ac_prev=docdir ;;
2293 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2294 docdir=$ac_optarg ;;
2296 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2297 ac_prev=dvidir ;;
2298 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2299 dvidir=$ac_optarg ;;
2301 -enable-* | --enable-*)
2302 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2303 # Reject names that are not valid shell variable names.
2304 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2305 as_fn_error $? "invalid feature name: '$ac_useropt'"
2306 ac_useropt_orig=$ac_useropt
2307 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2308 case $ac_user_opts in
2310 "enable_$ac_useropt"
2311 "*) ;;
2312 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2313 ac_unrecognized_sep=', ';;
2314 esac
2315 eval enable_$ac_useropt=\$ac_optarg ;;
2317 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2318 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2319 | --exec | --exe | --ex)
2320 ac_prev=exec_prefix ;;
2321 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2322 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2323 | --exec=* | --exe=* | --ex=*)
2324 exec_prefix=$ac_optarg ;;
2326 -gas | --gas | --ga | --g)
2327 # Obsolete; use --with-gas.
2328 with_gas=yes ;;
2330 -help | --help | --hel | --he | -h)
2331 ac_init_help=long ;;
2332 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2333 ac_init_help=recursive ;;
2334 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2335 ac_init_help=short ;;
2337 -host | --host | --hos | --ho)
2338 ac_prev=host_alias ;;
2339 -host=* | --host=* | --hos=* | --ho=*)
2340 host_alias=$ac_optarg ;;
2342 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2343 ac_prev=htmldir ;;
2344 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2345 | --ht=*)
2346 htmldir=$ac_optarg ;;
2348 -includedir | --includedir | --includedi | --included | --include \
2349 | --includ | --inclu | --incl | --inc)
2350 ac_prev=includedir ;;
2351 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2352 | --includ=* | --inclu=* | --incl=* | --inc=*)
2353 includedir=$ac_optarg ;;
2355 -infodir | --infodir | --infodi | --infod | --info | --inf)
2356 ac_prev=infodir ;;
2357 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2358 infodir=$ac_optarg ;;
2360 -libdir | --libdir | --libdi | --libd)
2361 ac_prev=libdir ;;
2362 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2363 libdir=$ac_optarg ;;
2365 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2366 | --libexe | --libex | --libe)
2367 ac_prev=libexecdir ;;
2368 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2369 | --libexe=* | --libex=* | --libe=*)
2370 libexecdir=$ac_optarg ;;
2372 -localedir | --localedir | --localedi | --localed | --locale)
2373 ac_prev=localedir ;;
2374 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2375 localedir=$ac_optarg ;;
2377 -localstatedir | --localstatedir | --localstatedi | --localstated \
2378 | --localstate | --localstat | --localsta | --localst | --locals)
2379 ac_prev=localstatedir ;;
2380 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2381 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2382 localstatedir=$ac_optarg ;;
2384 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2385 ac_prev=mandir ;;
2386 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2387 mandir=$ac_optarg ;;
2389 -nfp | --nfp | --nf)
2390 # Obsolete; use --without-fp.
2391 with_fp=no ;;
2393 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2394 | --no-cr | --no-c | -n)
2395 no_create=yes ;;
2397 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2398 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2399 no_recursion=yes ;;
2401 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2402 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2403 | --oldin | --oldi | --old | --ol | --o)
2404 ac_prev=oldincludedir ;;
2405 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2406 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2407 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2408 oldincludedir=$ac_optarg ;;
2410 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2411 ac_prev=prefix ;;
2412 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2413 prefix=$ac_optarg ;;
2415 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2416 | --program-pre | --program-pr | --program-p)
2417 ac_prev=program_prefix ;;
2418 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2419 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2420 program_prefix=$ac_optarg ;;
2422 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2423 | --program-suf | --program-su | --program-s)
2424 ac_prev=program_suffix ;;
2425 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2426 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2427 program_suffix=$ac_optarg ;;
2429 -program-transform-name | --program-transform-name \
2430 | --program-transform-nam | --program-transform-na \
2431 | --program-transform-n | --program-transform- \
2432 | --program-transform | --program-transfor \
2433 | --program-transfo | --program-transf \
2434 | --program-trans | --program-tran \
2435 | --progr-tra | --program-tr | --program-t)
2436 ac_prev=program_transform_name ;;
2437 -program-transform-name=* | --program-transform-name=* \
2438 | --program-transform-nam=* | --program-transform-na=* \
2439 | --program-transform-n=* | --program-transform-=* \
2440 | --program-transform=* | --program-transfor=* \
2441 | --program-transfo=* | --program-transf=* \
2442 | --program-trans=* | --program-tran=* \
2443 | --progr-tra=* | --program-tr=* | --program-t=*)
2444 program_transform_name=$ac_optarg ;;
2446 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2447 ac_prev=pdfdir ;;
2448 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2449 pdfdir=$ac_optarg ;;
2451 -psdir | --psdir | --psdi | --psd | --ps)
2452 ac_prev=psdir ;;
2453 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2454 psdir=$ac_optarg ;;
2456 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2457 | -silent | --silent | --silen | --sile | --sil)
2458 silent=yes ;;
2460 -runstatedir | --runstatedir | --runstatedi | --runstated \
2461 | --runstate | --runstat | --runsta | --runst | --runs \
2462 | --run | --ru | --r)
2463 ac_prev=runstatedir ;;
2464 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2465 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2466 | --run=* | --ru=* | --r=*)
2467 runstatedir=$ac_optarg ;;
2469 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2470 ac_prev=sbindir ;;
2471 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2472 | --sbi=* | --sb=*)
2473 sbindir=$ac_optarg ;;
2475 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2476 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2477 | --sharedst | --shareds | --shared | --share | --shar \
2478 | --sha | --sh)
2479 ac_prev=sharedstatedir ;;
2480 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2481 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2482 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2483 | --sha=* | --sh=*)
2484 sharedstatedir=$ac_optarg ;;
2486 -site | --site | --sit)
2487 ac_prev=site ;;
2488 -site=* | --site=* | --sit=*)
2489 site=$ac_optarg ;;
2491 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2492 ac_prev=srcdir ;;
2493 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2494 srcdir=$ac_optarg ;;
2496 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2497 | --syscon | --sysco | --sysc | --sys | --sy)
2498 ac_prev=sysconfdir ;;
2499 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2500 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2501 sysconfdir=$ac_optarg ;;
2503 -target | --target | --targe | --targ | --tar | --ta | --t)
2504 ac_prev=target_alias ;;
2505 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2506 target_alias=$ac_optarg ;;
2508 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2509 verbose=yes ;;
2511 -version | --version | --versio | --versi | --vers | -V)
2512 ac_init_version=: ;;
2514 -with-* | --with-*)
2515 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2516 # Reject names that are not valid shell variable names.
2517 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2518 as_fn_error $? "invalid package name: '$ac_useropt'"
2519 ac_useropt_orig=$ac_useropt
2520 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2521 case $ac_user_opts in
2523 "with_$ac_useropt"
2524 "*) ;;
2525 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2526 ac_unrecognized_sep=', ';;
2527 esac
2528 eval with_$ac_useropt=\$ac_optarg ;;
2530 -without-* | --without-*)
2531 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2532 # Reject names that are not valid shell variable names.
2533 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2534 as_fn_error $? "invalid package name: '$ac_useropt'"
2535 ac_useropt_orig=$ac_useropt
2536 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2537 case $ac_user_opts in
2539 "with_$ac_useropt"
2540 "*) ;;
2541 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2542 ac_unrecognized_sep=', ';;
2543 esac
2544 eval with_$ac_useropt=no ;;
2546 --x)
2547 # Obsolete; use --with-x.
2548 with_x=yes ;;
2550 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2551 | --x-incl | --x-inc | --x-in | --x-i)
2552 ac_prev=x_includes ;;
2553 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2554 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2555 x_includes=$ac_optarg ;;
2557 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2558 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2559 ac_prev=x_libraries ;;
2560 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2561 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2562 x_libraries=$ac_optarg ;;
2564 -*) as_fn_error $? "unrecognized option: '$ac_option'
2565 Try '$0 --help' for more information"
2568 *=*)
2569 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2570 # Reject names that are not valid shell variable names.
2571 case $ac_envvar in #(
2572 '' | [0-9]* | *[!_$as_cr_alnum]* )
2573 as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
2574 esac
2575 eval $ac_envvar=\$ac_optarg
2576 export $ac_envvar ;;
2579 # FIXME: should be removed in autoconf 3.0.
2580 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2581 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2582 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2583 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2586 esac
2587 done
2589 if test -n "$ac_prev"; then
2590 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2591 as_fn_error $? "missing argument to $ac_option"
2594 if test -n "$ac_unrecognized_opts"; then
2595 case $enable_option_checking in
2596 no) ;;
2597 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2598 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2599 esac
2602 # Check all directory arguments for consistency.
2603 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2604 datadir sysconfdir sharedstatedir localstatedir includedir \
2605 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2606 libdir localedir mandir runstatedir
2608 eval ac_val=\$$ac_var
2609 # Remove trailing slashes.
2610 case $ac_val in
2611 */ )
2612 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2613 eval $ac_var=\$ac_val;;
2614 esac
2615 # Be sure to have absolute directory names.
2616 case $ac_val in
2617 [\\/$]* | ?:[\\/]* ) continue;;
2618 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2619 esac
2620 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2621 done
2623 # There might be people who depend on the old broken behavior: '$host'
2624 # used to hold the argument of --host etc.
2625 # FIXME: To remove some day.
2626 build=$build_alias
2627 host=$host_alias
2628 target=$target_alias
2630 # FIXME: To remove some day.
2631 if test "x$host_alias" != x; then
2632 if test "x$build_alias" = x; then
2633 cross_compiling=maybe
2634 elif test "x$build_alias" != "x$host_alias"; then
2635 cross_compiling=yes
2639 ac_tool_prefix=
2640 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2642 test "$silent" = yes && exec 6>/dev/null
2645 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2646 ac_ls_di=`ls -di .` &&
2647 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2648 as_fn_error $? "working directory cannot be determined"
2649 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2650 as_fn_error $? "pwd does not report name of working directory"
2653 # Find the source files, if location was not specified.
2654 if test -z "$srcdir"; then
2655 ac_srcdir_defaulted=yes
2656 # Try the directory containing this script, then the parent directory.
2657 ac_confdir=`$as_dirname -- "$as_myself" ||
2658 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2659 X"$as_myself" : 'X\(//\)[^/]' \| \
2660 X"$as_myself" : 'X\(//\)$' \| \
2661 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2662 printf "%s\n" X"$as_myself" |
2663 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2664 s//\1/
2667 /^X\(\/\/\)[^/].*/{
2668 s//\1/
2671 /^X\(\/\/\)$/{
2672 s//\1/
2675 /^X\(\/\).*/{
2676 s//\1/
2679 s/.*/./; q'`
2680 srcdir=$ac_confdir
2681 if test ! -r "$srcdir/$ac_unique_file"; then
2682 srcdir=..
2684 else
2685 ac_srcdir_defaulted=no
2687 if test ! -r "$srcdir/$ac_unique_file"; then
2688 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2689 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2691 ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
2692 ac_abs_confdir=`(
2693 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2694 pwd)`
2695 # When building in place, set srcdir=.
2696 if test "$ac_abs_confdir" = "$ac_pwd"; then
2697 srcdir=.
2699 # Remove unnecessary trailing slashes from srcdir.
2700 # Double slashes in file names in object file debugging info
2701 # mess up M-x gdb in Emacs.
2702 case $srcdir in
2703 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2704 esac
2705 for ac_var in $ac_precious_vars; do
2706 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2707 eval ac_env_${ac_var}_value=\$${ac_var}
2708 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2709 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2710 done
2713 # Report the --help message.
2715 if test "$ac_init_help" = "long"; then
2716 # Omit some internal or obsolete options to make the list less imposing.
2717 # This message is too long to be a string in the A/UX 3.1 sh.
2718 cat <<_ACEOF
2719 'configure' configures GNU sed 4.9 to adapt to many kinds of systems.
2721 Usage: $0 [OPTION]... [VAR=VALUE]...
2723 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2724 VAR=VALUE. See below for descriptions of some of the useful variables.
2726 Defaults for the options are specified in brackets.
2728 Configuration:
2729 -h, --help display this help and exit
2730 --help=short display options specific to this package
2731 --help=recursive display the short help of all the included packages
2732 -V, --version display version information and exit
2733 -q, --quiet, --silent do not print 'checking ...' messages
2734 --cache-file=FILE cache test results in FILE [disabled]
2735 -C, --config-cache alias for '--cache-file=config.cache'
2736 -n, --no-create do not create output files
2737 --srcdir=DIR find the sources in DIR [configure dir or '..']
2739 Installation directories:
2740 --prefix=PREFIX install architecture-independent files in PREFIX
2741 [$ac_default_prefix]
2742 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2743 [PREFIX]
2745 By default, 'make install' will install all the files in
2746 '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify
2747 an installation prefix other than '$ac_default_prefix' using '--prefix',
2748 for instance '--prefix=\$HOME'.
2750 For better control, use the options below.
2752 Fine tuning of the installation directories:
2753 --bindir=DIR user executables [EPREFIX/bin]
2754 --sbindir=DIR system admin executables [EPREFIX/sbin]
2755 --libexecdir=DIR program executables [EPREFIX/libexec]
2756 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2757 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2758 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2759 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
2760 --libdir=DIR object code libraries [EPREFIX/lib]
2761 --includedir=DIR C header files [PREFIX/include]
2762 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2763 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2764 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2765 --infodir=DIR info documentation [DATAROOTDIR/info]
2766 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2767 --mandir=DIR man documentation [DATAROOTDIR/man]
2768 --docdir=DIR documentation root [DATAROOTDIR/doc/sed]
2769 --htmldir=DIR html documentation [DOCDIR]
2770 --dvidir=DIR dvi documentation [DOCDIR]
2771 --pdfdir=DIR pdf documentation [DOCDIR]
2772 --psdir=DIR ps documentation [DOCDIR]
2773 _ACEOF
2775 cat <<\_ACEOF
2777 Program names:
2778 --program-prefix=PREFIX prepend PREFIX to installed program names
2779 --program-suffix=SUFFIX append SUFFIX to installed program names
2780 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2782 System types:
2783 --build=BUILD configure for building on BUILD [guessed]
2784 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2785 _ACEOF
2788 if test -n "$ac_init_help"; then
2789 case $ac_init_help in
2790 short | recursive ) echo "Configuration of GNU sed 4.9:";;
2791 esac
2792 cat <<\_ACEOF
2794 Optional Features:
2795 --disable-option-checking ignore unrecognized --enable/--with options
2796 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2797 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2798 --enable-silent-rules less verbose build output (undo: "make V=1")
2799 --disable-silent-rules verbose build output (undo: "make V=0")
2800 --enable-dependency-tracking
2801 do not reject slow dependency extractors
2802 --disable-dependency-tracking
2803 speeds up one-time build
2804 --disable-largefile omit support for large files
2805 --disable-year2038 omit support for timestamps past the year 2038
2806 --enable-threads={isoc|posix|isoc+posix|windows}
2807 specify multithreading API
2808 --disable-threads build without multithread safety
2809 --enable-cross-guesses={conservative|risky}
2810 specify policy for cross-compilation guesses
2811 --disable-acl do not support ACLs
2812 --disable-assert turn off assertions
2813 --disable-nls do not use Native Language Support
2814 --disable-rpath do not hardcode runtime library paths
2815 --disable-i18n disable internationalization (default=enabled)
2816 --enable-gcc-warnings turn on many GCC warnings (for developers; best with
2817 GNU make)
2818 --disable-bold-man-page-references
2819 When generating man pages, do not apply bold style
2820 around any references like name(1) etc.
2822 Optional Packages:
2823 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2824 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2825 --without-included-regex
2826 don't compile regex; this is the default on systems
2827 with recent-enough versions of the GNU C Library
2828 (use with caution on other systems).
2829 --without-selinux do not use SELinux, even on systems with SELinux
2830 --with-packager String identifying the packager of this software
2831 --with-packager-version Packager-specific version information
2832 --with-packager-bug-reports
2833 Packager info for bug reports (URL/e-mail/...)
2834 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2835 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
2836 --without-libiconv-prefix don't search for libiconv in includedir and libdir
2837 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
2838 --without-libintl-prefix don't search for libintl in includedir and libdir
2840 Some influential environment variables:
2841 CC C compiler command
2842 CFLAGS C compiler flags
2843 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2844 nonstandard directory <lib dir>
2845 LIBS libraries to pass to the linker, e.g. -l<library>
2846 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2847 you have headers in a nonstandard directory <include dir>
2848 CPP C preprocessor
2850 Use these variables to override the choices made by 'configure' or to help
2851 it to find libraries and programs with nonstandard names/locations.
2853 Report bugs to <bug-sed@gnu.org>.
2854 GNU sed home page: <https://www.gnu.org/software/sed/>.
2855 General help using GNU software: <https://www.gnu.org/gethelp/>.
2856 _ACEOF
2857 ac_status=$?
2860 if test "$ac_init_help" = "recursive"; then
2861 # If there are subdirs, report their specific --help.
2862 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2863 test -d "$ac_dir" ||
2864 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2865 continue
2866 ac_builddir=.
2868 case "$ac_dir" in
2869 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2871 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2872 # A ".." for each directory in $ac_dir_suffix.
2873 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2874 case $ac_top_builddir_sub in
2875 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2876 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2877 esac ;;
2878 esac
2879 ac_abs_top_builddir=$ac_pwd
2880 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2881 # for backward compatibility:
2882 ac_top_builddir=$ac_top_build_prefix
2884 case $srcdir in
2885 .) # We are building in place.
2886 ac_srcdir=.
2887 ac_top_srcdir=$ac_top_builddir_sub
2888 ac_abs_top_srcdir=$ac_pwd ;;
2889 [\\/]* | ?:[\\/]* ) # Absolute name.
2890 ac_srcdir=$srcdir$ac_dir_suffix;
2891 ac_top_srcdir=$srcdir
2892 ac_abs_top_srcdir=$srcdir ;;
2893 *) # Relative name.
2894 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2895 ac_top_srcdir=$ac_top_build_prefix$srcdir
2896 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2897 esac
2898 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2900 cd "$ac_dir" || { ac_status=$?; continue; }
2901 # Check for configure.gnu first; this name is used for a wrapper for
2902 # Metaconfig's "Configure" on case-insensitive file systems.
2903 if test -f "$ac_srcdir/configure.gnu"; then
2904 echo &&
2905 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2906 elif test -f "$ac_srcdir/configure"; then
2907 echo &&
2908 $SHELL "$ac_srcdir/configure" --help=recursive
2909 else
2910 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2911 fi || ac_status=$?
2912 cd "$ac_pwd" || { ac_status=$?; break; }
2913 done
2916 test -n "$ac_init_help" && exit $ac_status
2917 if $ac_init_version; then
2918 cat <<\_ACEOF
2919 GNU sed configure 4.9
2920 generated by GNU Autoconf 2.72a.65-d081
2922 Copyright (C) 2022 Free Software Foundation, Inc.
2923 This configure script is free software; the Free Software Foundation
2924 gives unlimited permission to copy, distribute and modify it.
2925 _ACEOF
2926 exit
2929 ## ------------------------ ##
2930 ## Autoconf initialization. ##
2931 ## ------------------------ ##
2933 # ac_fn_c_try_compile LINENO
2934 # --------------------------
2935 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2936 ac_fn_c_try_compile ()
2938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2939 rm -f conftest.$ac_objext conftest.beam
2940 if { { ac_try="$ac_compile"
2941 case "(($ac_try" in
2942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2943 *) ac_try_echo=$ac_try;;
2944 esac
2945 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2946 printf "%s\n" "$ac_try_echo"; } >&5
2947 (eval "$ac_compile") 2>conftest.err
2948 ac_status=$?
2949 if test -s conftest.err; then
2950 grep -v '^ *+' conftest.err >conftest.er1
2951 cat conftest.er1 >&5
2952 mv -f conftest.er1 conftest.err
2954 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2955 test $ac_status = 0; } && {
2956 test -z "$ac_c_werror_flag" ||
2957 test ! -s conftest.err
2958 } && test -s conftest.$ac_objext
2959 then :
2960 ac_retval=0
2961 else case e in #(
2962 e) printf "%s\n" "$as_me: failed program was:" >&5
2963 sed 's/^/| /' conftest.$ac_ext >&5
2965 ac_retval=1 ;;
2966 esac
2968 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2969 as_fn_set_status $ac_retval
2971 } # ac_fn_c_try_compile
2973 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2974 # -------------------------------------------------------
2975 # Tests whether HEADER exists and can be compiled using the include files in
2976 # INCLUDES, setting the cache variable VAR accordingly.
2977 ac_fn_c_check_header_compile ()
2979 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2981 printf %s "checking for $2... " >&6; }
2982 if eval test \${$3+y}
2983 then :
2984 printf %s "(cached) " >&6
2985 else case e in #(
2986 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2987 /* end confdefs.h. */
2989 #include <$2>
2990 _ACEOF
2991 if ac_fn_c_try_compile "$LINENO"
2992 then :
2993 eval "$3=yes"
2994 else case e in #(
2995 e) eval "$3=no" ;;
2996 esac
2998 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2999 esac
3001 eval ac_res=\$$3
3002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3003 printf "%s\n" "$ac_res" >&6; }
3004 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3006 } # ac_fn_c_check_header_compile
3008 # ac_fn_c_try_cpp LINENO
3009 # ----------------------
3010 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
3011 ac_fn_c_try_cpp ()
3013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3014 if { { ac_try="$ac_cpp conftest.$ac_ext"
3015 case "(($ac_try" in
3016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3017 *) ac_try_echo=$ac_try;;
3018 esac
3019 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3020 printf "%s\n" "$ac_try_echo"; } >&5
3021 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
3022 ac_status=$?
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; } > conftest.i && {
3030 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3031 test ! -s conftest.err
3033 then :
3034 ac_retval=0
3035 else case e in #(
3036 e) printf "%s\n" "$as_me: failed program was:" >&5
3037 sed 's/^/| /' conftest.$ac_ext >&5
3039 ac_retval=1 ;;
3040 esac
3042 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3043 as_fn_set_status $ac_retval
3045 } # ac_fn_c_try_cpp
3047 # ac_fn_c_try_link LINENO
3048 # -----------------------
3049 # Try to link conftest.$ac_ext, and return whether this succeeded.
3050 ac_fn_c_try_link ()
3052 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3053 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
3054 if { { ac_try="$ac_link"
3055 case "(($ac_try" in
3056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3057 *) ac_try_echo=$ac_try;;
3058 esac
3059 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3060 printf "%s\n" "$ac_try_echo"; } >&5
3061 (eval "$ac_link") 2>conftest.err
3062 ac_status=$?
3063 if test -s conftest.err; then
3064 grep -v '^ *+' conftest.err >conftest.er1
3065 cat conftest.er1 >&5
3066 mv -f conftest.er1 conftest.err
3068 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3069 test $ac_status = 0; } && {
3070 test -z "$ac_c_werror_flag" ||
3071 test ! -s conftest.err
3072 } && test -s conftest$ac_exeext && {
3073 test "$cross_compiling" = yes ||
3074 test -x conftest$ac_exeext
3076 then :
3077 ac_retval=0
3078 else case e in #(
3079 e) printf "%s\n" "$as_me: failed program was:" >&5
3080 sed 's/^/| /' conftest.$ac_ext >&5
3082 ac_retval=1 ;;
3083 esac
3085 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3086 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3087 # interfere with the next link command; also delete a directory that is
3088 # left behind by Apple's compiler. We do this before executing the actions.
3089 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3090 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3091 as_fn_set_status $ac_retval
3093 } # ac_fn_c_try_link
3095 # ac_fn_c_check_func LINENO FUNC VAR
3096 # ----------------------------------
3097 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3098 ac_fn_c_check_func ()
3100 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3102 printf %s "checking for $2... " >&6; }
3103 if eval test \${$3+y}
3104 then :
3105 printf %s "(cached) " >&6
3106 else case e in #(
3107 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3108 /* end confdefs.h. */
3109 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3110 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3111 #define $2 innocuous_$2
3113 /* System header to define __stub macros and hopefully few prototypes,
3114 which can conflict with char $2 (void); below. */
3116 #include <limits.h>
3117 #undef $2
3119 /* Override any GCC internal prototype to avoid an error.
3120 Use char because int might match the return type of a GCC
3121 builtin and then its argument prototype would still apply. */
3122 #ifdef __cplusplus
3123 extern "C"
3124 #endif
3125 char $2 (void);
3126 /* The GNU C library defines this for functions which it implements
3127 to always fail with ENOSYS. Some functions are actually named
3128 something starting with __ and the normal name is an alias. */
3129 #if defined __stub_$2 || defined __stub___$2
3130 choke me
3131 #endif
3134 main (void)
3136 return $2 ();
3138 return 0;
3140 _ACEOF
3141 if ac_fn_c_try_link "$LINENO"
3142 then :
3143 eval "$3=yes"
3144 else case e in #(
3145 e) eval "$3=no" ;;
3146 esac
3148 rm -f core conftest.err conftest.$ac_objext conftest.beam \
3149 conftest$ac_exeext conftest.$ac_ext ;;
3150 esac
3152 eval ac_res=\$$3
3153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3154 printf "%s\n" "$ac_res" >&6; }
3155 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3157 } # ac_fn_c_check_func
3159 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3160 # -------------------------------------------
3161 # Tests whether TYPE exists after having included INCLUDES, setting cache
3162 # variable VAR accordingly.
3163 ac_fn_c_check_type ()
3165 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3167 printf %s "checking for $2... " >&6; }
3168 if eval test \${$3+y}
3169 then :
3170 printf %s "(cached) " >&6
3171 else case e in #(
3172 e) eval "$3=no"
3173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3174 /* end confdefs.h. */
3177 main (void)
3179 if (sizeof ($2))
3180 return 0;
3182 return 0;
3184 _ACEOF
3185 if ac_fn_c_try_compile "$LINENO"
3186 then :
3187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3188 /* end confdefs.h. */
3191 main (void)
3193 if (sizeof (($2)))
3194 return 0;
3196 return 0;
3198 _ACEOF
3199 if ac_fn_c_try_compile "$LINENO"
3200 then :
3202 else case e in #(
3203 e) eval "$3=yes" ;;
3204 esac
3206 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3208 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3209 esac
3211 eval ac_res=\$$3
3212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3213 printf "%s\n" "$ac_res" >&6; }
3214 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3216 } # ac_fn_c_check_type
3218 # ac_fn_c_try_run LINENO
3219 # ----------------------
3220 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
3221 # executables *can* be run.
3222 ac_fn_c_try_run ()
3224 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3225 if { { ac_try="$ac_link"
3226 case "(($ac_try" in
3227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3228 *) ac_try_echo=$ac_try;;
3229 esac
3230 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3231 printf "%s\n" "$ac_try_echo"; } >&5
3232 (eval "$ac_link") 2>&5
3233 ac_status=$?
3234 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3235 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
3236 { { case "(($ac_try" in
3237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3238 *) ac_try_echo=$ac_try;;
3239 esac
3240 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3241 printf "%s\n" "$ac_try_echo"; } >&5
3242 (eval "$ac_try") 2>&5
3243 ac_status=$?
3244 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3245 test $ac_status = 0; }; }
3246 then :
3247 ac_retval=0
3248 else case e in #(
3249 e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
3250 printf "%s\n" "$as_me: failed program was:" >&5
3251 sed 's/^/| /' conftest.$ac_ext >&5
3253 ac_retval=$ac_status ;;
3254 esac
3256 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3257 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3258 as_fn_set_status $ac_retval
3260 } # ac_fn_c_try_run
3262 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3263 # --------------------------------------------
3264 # Tries to find the compile-time value of EXPR in a program that includes
3265 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3266 # computed
3267 ac_fn_c_compute_int ()
3269 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3270 if test "$cross_compiling" = yes; then
3271 # Depending upon the size, compute the lo and hi bounds.
3272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3273 /* end confdefs.h. */
3276 main (void)
3278 static int test_array [1 - 2 * !(($2) >= 0)];
3279 test_array [0] = 0;
3280 return test_array [0];
3283 return 0;
3285 _ACEOF
3286 if ac_fn_c_try_compile "$LINENO"
3287 then :
3288 ac_lo=0 ac_mid=0
3289 while :; do
3290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3291 /* end confdefs.h. */
3294 main (void)
3296 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3297 test_array [0] = 0;
3298 return test_array [0];
3301 return 0;
3303 _ACEOF
3304 if ac_fn_c_try_compile "$LINENO"
3305 then :
3306 ac_hi=$ac_mid; break
3307 else case e in #(
3308 e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3309 if test $ac_lo -le $ac_mid; then
3310 ac_lo= ac_hi=
3311 break
3313 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;;
3314 esac
3316 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3317 done
3318 else case e in #(
3319 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3320 /* end confdefs.h. */
3323 main (void)
3325 static int test_array [1 - 2 * !(($2) < 0)];
3326 test_array [0] = 0;
3327 return test_array [0];
3330 return 0;
3332 _ACEOF
3333 if ac_fn_c_try_compile "$LINENO"
3334 then :
3335 ac_hi=-1 ac_mid=-1
3336 while :; do
3337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3338 /* end confdefs.h. */
3341 main (void)
3343 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3344 test_array [0] = 0;
3345 return test_array [0];
3348 return 0;
3350 _ACEOF
3351 if ac_fn_c_try_compile "$LINENO"
3352 then :
3353 ac_lo=$ac_mid; break
3354 else case e in #(
3355 e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3356 if test $ac_mid -le $ac_hi; then
3357 ac_lo= ac_hi=
3358 break
3360 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;;
3361 esac
3363 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3364 done
3365 else case e in #(
3366 e) ac_lo= ac_hi= ;;
3367 esac
3369 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3370 esac
3372 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3373 # Binary search between lo and hi bounds.
3374 while test "x$ac_lo" != "x$ac_hi"; do
3375 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3377 /* end confdefs.h. */
3380 main (void)
3382 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3383 test_array [0] = 0;
3384 return test_array [0];
3387 return 0;
3389 _ACEOF
3390 if ac_fn_c_try_compile "$LINENO"
3391 then :
3392 ac_hi=$ac_mid
3393 else case e in #(
3394 e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;;
3395 esac
3397 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3398 done
3399 case $ac_lo in #((
3400 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3401 '') ac_retval=1 ;;
3402 esac
3403 else
3404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3405 /* end confdefs.h. */
3407 static long int longval (void) { return $2; }
3408 static unsigned long int ulongval (void) { return $2; }
3409 #include <stdio.h>
3410 #include <stdlib.h>
3412 main (void)
3415 FILE *f = fopen ("conftest.val", "w");
3416 if (! f)
3417 return 1;
3418 if (($2) < 0)
3420 long int i = longval ();
3421 if (i != ($2))
3422 return 1;
3423 fprintf (f, "%ld", i);
3425 else
3427 unsigned long int i = ulongval ();
3428 if (i != ($2))
3429 return 1;
3430 fprintf (f, "%lu", i);
3432 /* Do not output a trailing newline, as this causes \r\n confusion
3433 on some platforms. */
3434 return ferror (f) || fclose (f) != 0;
3437 return 0;
3439 _ACEOF
3440 if ac_fn_c_try_run "$LINENO"
3441 then :
3442 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3443 else case e in #(
3444 e) ac_retval=1 ;;
3445 esac
3447 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3448 conftest.$ac_objext conftest.beam conftest.$ac_ext
3449 rm -f conftest.val
3452 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3453 as_fn_set_status $ac_retval
3455 } # ac_fn_c_compute_int
3457 # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
3458 # ------------------------------------------------------------------
3459 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3460 # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
3461 ac_fn_check_decl ()
3463 ac_save_ac_compile="$ac_compile"
3464 if test -n "$ac_compile_for_check_decl"; then
3465 ac_compile="$ac_compile_for_check_decl"
3467 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3468 as_decl_name=`echo $2|sed 's/ *(.*//'`
3469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3470 printf %s "checking whether $as_decl_name is declared... " >&6; }
3471 if eval test \${$3+y}
3472 then :
3473 printf %s "(cached) " >&6
3474 else case e in #(
3475 e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3476 eval ac_save_FLAGS=\$$6
3477 as_fn_append $6 " $5"
3478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3479 /* end confdefs.h. */
3482 main (void)
3484 #ifndef $as_decl_name
3485 #ifdef __cplusplus
3486 (void) $as_decl_use;
3487 #else
3488 (void) $as_decl_name;
3489 #endif
3490 #endif
3493 return 0;
3495 _ACEOF
3496 if ac_fn_c_try_compile "$LINENO"
3497 then :
3498 eval "$3=yes"
3499 else case e in #(
3500 e) eval "$3=no" ;;
3501 esac
3503 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3504 eval $6=\$ac_save_FLAGS
3506 esac
3508 eval ac_res=\$$3
3509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3510 printf "%s\n" "$ac_res" >&6; }
3511 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3512 ac_compile="$ac_save_ac_compile"
3514 } # ac_fn_check_decl
3516 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3517 # ----------------------------------------------------
3518 # Tries to find if the field MEMBER exists in type AGGR, after including
3519 # INCLUDES, setting cache variable VAR accordingly.
3520 ac_fn_c_check_member ()
3522 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3524 printf %s "checking for $2.$3... " >&6; }
3525 if eval test \${$4+y}
3526 then :
3527 printf %s "(cached) " >&6
3528 else case e in #(
3529 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3530 /* end confdefs.h. */
3533 main (void)
3535 static $2 ac_aggr;
3536 if (ac_aggr.$3)
3537 return 0;
3539 return 0;
3541 _ACEOF
3542 if ac_fn_c_try_compile "$LINENO"
3543 then :
3544 eval "$4=yes"
3545 else case e in #(
3546 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3547 /* end confdefs.h. */
3550 main (void)
3552 static $2 ac_aggr;
3553 if (sizeof ac_aggr.$3)
3554 return 0;
3556 return 0;
3558 _ACEOF
3559 if ac_fn_c_try_compile "$LINENO"
3560 then :
3561 eval "$4=yes"
3562 else case e in #(
3563 e) eval "$4=no" ;;
3564 esac
3566 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3567 esac
3569 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3570 esac
3572 eval ac_res=\$$4
3573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3574 printf "%s\n" "$ac_res" >&6; }
3575 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3577 } # ac_fn_c_check_member
3578 ac_configure_args_raw=
3579 for ac_arg
3581 case $ac_arg in
3582 *\'*)
3583 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3584 esac
3585 as_fn_append ac_configure_args_raw " '$ac_arg'"
3586 done
3588 case $ac_configure_args_raw in
3589 *$as_nl*)
3590 ac_safe_unquote= ;;
3592 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
3593 ac_unsafe_a="$ac_unsafe_z#~"
3594 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3595 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3596 esac
3598 cat >config.log <<_ACEOF
3599 This file contains any messages produced by compilers while
3600 running configure, to aid debugging if configure makes a mistake.
3602 It was created by GNU sed $as_me 4.9, which was
3603 generated by GNU Autoconf 2.72a.65-d081. Invocation command line was
3605 $ $0$ac_configure_args_raw
3607 _ACEOF
3608 exec 5>>config.log
3610 cat <<_ASUNAME
3611 ## --------- ##
3612 ## Platform. ##
3613 ## --------- ##
3615 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3616 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3617 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3618 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3619 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3621 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3622 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3624 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3625 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3626 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3627 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3628 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3629 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3630 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3632 _ASUNAME
3634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3635 for as_dir in $PATH
3637 IFS=$as_save_IFS
3638 case $as_dir in #(((
3639 '') as_dir=./ ;;
3640 */) ;;
3641 *) as_dir=$as_dir/ ;;
3642 esac
3643 printf "%s\n" "PATH: $as_dir"
3644 done
3645 IFS=$as_save_IFS
3647 } >&5
3649 cat >&5 <<_ACEOF
3652 ## ----------- ##
3653 ## Core tests. ##
3654 ## ----------- ##
3656 _ACEOF
3659 # Keep a trace of the command line.
3660 # Strip out --no-create and --no-recursion so they do not pile up.
3661 # Strip out --silent because we don't want to record it for future runs.
3662 # Also quote any args containing shell meta-characters.
3663 # Make two passes to allow for proper duplicate-argument suppression.
3664 ac_configure_args=
3665 ac_configure_args0=
3666 ac_configure_args1=
3667 ac_must_keep_next=false
3668 for ac_pass in 1 2
3670 for ac_arg
3672 case $ac_arg in
3673 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3674 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3675 | -silent | --silent | --silen | --sile | --sil)
3676 continue ;;
3677 *\'*)
3678 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3679 esac
3680 case $ac_pass in
3681 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3683 as_fn_append ac_configure_args1 " '$ac_arg'"
3684 if test $ac_must_keep_next = true; then
3685 ac_must_keep_next=false # Got value, back to normal.
3686 else
3687 case $ac_arg in
3688 *=* | --config-cache | -C | -disable-* | --disable-* \
3689 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3690 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3691 | -with-* | --with-* | -without-* | --without-* | --x)
3692 case "$ac_configure_args0 " in
3693 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3694 esac
3696 -* ) ac_must_keep_next=true ;;
3697 esac
3699 as_fn_append ac_configure_args " '$ac_arg'"
3701 esac
3702 done
3703 done
3704 { ac_configure_args0=; unset ac_configure_args0;}
3705 { ac_configure_args1=; unset ac_configure_args1;}
3707 # When interrupted or exit'd, cleanup temporary files, and complete
3708 # config.log. We remove comments because anyway the quotes in there
3709 # would cause problems or look ugly.
3710 # WARNING: Use '\'' to represent an apostrophe within the trap.
3711 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3712 trap 'exit_status=$?
3713 # Sanitize IFS.
3714 IFS=" "" $as_nl"
3715 # Save into config.log some information that might help in debugging.
3717 echo
3719 printf "%s\n" "## ---------------- ##
3720 ## Cache variables. ##
3721 ## ---------------- ##"
3722 echo
3723 # The following way of writing the cache mishandles newlines in values,
3725 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3726 eval ac_val=\$$ac_var
3727 case $ac_val in #(
3728 *${as_nl}*)
3729 case $ac_var in #(
3730 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3731 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3732 esac
3733 case $ac_var in #(
3734 _ | IFS | as_nl) ;; #(
3735 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3736 *) { eval $ac_var=; unset $ac_var;} ;;
3737 esac ;;
3738 esac
3739 done
3740 (set) 2>&1 |
3741 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3742 *${as_nl}ac_space=\ *)
3743 sed -n \
3744 "s/'\''/'\''\\\\'\'''\''/g;
3745 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3746 ;; #(
3748 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3750 esac |
3751 sort
3753 echo
3755 printf "%s\n" "## ----------------- ##
3756 ## Output variables. ##
3757 ## ----------------- ##"
3758 echo
3759 for ac_var in $ac_subst_vars
3761 eval ac_val=\$$ac_var
3762 case $ac_val in
3763 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3764 esac
3765 printf "%s\n" "$ac_var='\''$ac_val'\''"
3766 done | sort
3767 echo
3769 if test -n "$ac_subst_files"; then
3770 printf "%s\n" "## ------------------- ##
3771 ## File substitutions. ##
3772 ## ------------------- ##"
3773 echo
3774 for ac_var in $ac_subst_files
3776 eval ac_val=\$$ac_var
3777 case $ac_val in
3778 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3779 esac
3780 printf "%s\n" "$ac_var='\''$ac_val'\''"
3781 done | sort
3782 echo
3785 if test -s confdefs.h; then
3786 printf "%s\n" "## ----------- ##
3787 ## confdefs.h. ##
3788 ## ----------- ##"
3789 echo
3790 cat confdefs.h
3791 echo
3793 test "$ac_signal" != 0 &&
3794 printf "%s\n" "$as_me: caught signal $ac_signal"
3795 printf "%s\n" "$as_me: exit $exit_status"
3796 } >&5
3797 rm -f core *.core core.conftest.* &&
3798 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3799 exit $exit_status
3801 for ac_signal in 1 2 13 15; do
3802 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3803 done
3804 ac_signal=0
3806 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3807 rm -f -r conftest* confdefs.h
3809 printf "%s\n" "/* confdefs.h */" > confdefs.h
3811 # Predefined preprocessor variables.
3813 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3815 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3817 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3819 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3821 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3823 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3826 # Let the site file select an alternate cache file if it wants to.
3827 # Prefer an explicitly selected file to automatically selected ones.
3828 if test -n "$CONFIG_SITE"; then
3829 ac_site_files="$CONFIG_SITE"
3830 elif test "x$prefix" != xNONE; then
3831 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
3832 else
3833 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
3836 for ac_site_file in $ac_site_files
3838 case $ac_site_file in #(
3839 */*) :
3840 ;; #(
3841 *) :
3842 ac_site_file=./$ac_site_file ;;
3843 esac
3844 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
3845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3846 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3847 sed 's/^/| /' "$ac_site_file" >&5
3848 . "$ac_site_file" \
3849 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3850 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3851 as_fn_error $? "failed to load site script $ac_site_file
3852 See 'config.log' for more details" "$LINENO" 5; }
3854 done
3856 if test -r "$cache_file"; then
3857 # Some versions of bash will fail to source /dev/null (special files
3858 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3859 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3861 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3862 case $cache_file in
3863 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3864 *) . "./$cache_file";;
3865 esac
3867 else
3868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3869 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3870 >$cache_file
3873 # Test code for whether the C compiler supports C89 (global declarations)
3874 ac_c_conftest_c89_globals='
3875 /* Does the compiler advertise C89 conformance?
3876 Do not test the value of __STDC__, because some compilers set it to 0
3877 while being otherwise adequately conformant. */
3878 #if !defined __STDC__
3879 # error "Compiler does not advertise C89 conformance"
3880 #endif
3882 #include <stddef.h>
3883 #include <stdarg.h>
3884 struct stat;
3885 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
3886 struct buf { int x; };
3887 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
3888 static char *e (p, i)
3889 char **p;
3890 int i;
3892 return p[i];
3894 static char *f (char * (*g) (char **, int), char **p, ...)
3896 char *s;
3897 va_list v;
3898 va_start (v,p);
3899 s = g (p, va_arg (v,int));
3900 va_end (v);
3901 return s;
3904 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3905 function prototypes and stuff, but not \xHH hex character constants.
3906 These do not provoke an error unfortunately, instead are silently treated
3907 as an "x". The following induces an error, until -std is added to get
3908 proper ANSI mode. Curiously \x00 != x always comes out true, for an
3909 array size at least. It is necessary to write \x00 == 0 to get something
3910 that is true only with -std. */
3911 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
3913 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3914 inside strings and character constants. */
3915 #define FOO(x) '\''x'\''
3916 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
3918 int test (int i, double x);
3919 struct s1 {int (*f) (int a);};
3920 struct s2 {int (*f) (double a);};
3921 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
3922 int, int);'
3924 # Test code for whether the C compiler supports C89 (body of main).
3925 ac_c_conftest_c89_main='
3926 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
3929 # Test code for whether the C compiler supports C99 (global declarations)
3930 ac_c_conftest_c99_globals='
3931 // Does the compiler advertise C99 conformance?
3932 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
3933 # error "Compiler does not advertise C99 conformance"
3934 #endif
3936 #include <stdbool.h>
3937 extern int puts (const char *);
3938 extern int printf (const char *, ...);
3939 extern int dprintf (int, const char *, ...);
3940 extern void *malloc (size_t);
3942 // Check varargs macros. These examples are taken from C99 6.10.3.5.
3943 // dprintf is used instead of fprintf to avoid needing to declare
3944 // FILE and stderr.
3945 #define debug(...) dprintf (2, __VA_ARGS__)
3946 #define showlist(...) puts (#__VA_ARGS__)
3947 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3948 static void
3949 test_varargs_macros (void)
3951 int x = 1234;
3952 int y = 5678;
3953 debug ("Flag");
3954 debug ("X = %d\n", x);
3955 showlist (The first, second, and third items.);
3956 report (x>y, "x is %d but y is %d", x, y);
3959 // Check long long types.
3960 #define BIG64 18446744073709551615ull
3961 #define BIG32 4294967295ul
3962 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3963 #if !BIG_OK
3964 #error "your preprocessor is broken"
3965 #endif
3966 #if BIG_OK
3967 #else
3968 #error "your preprocessor is broken"
3969 #endif
3970 static long long int bignum = -9223372036854775807LL;
3971 static unsigned long long int ubignum = BIG64;
3973 struct incomplete_array
3975 int datasize;
3976 double data[];
3979 struct named_init {
3980 int number;
3981 const wchar_t *name;
3982 double average;
3985 typedef const char *ccp;
3987 static inline int
3988 test_restrict (ccp restrict text)
3990 // See if C++-style comments work.
3991 // Iterate through items via the restricted pointer.
3992 // Also check for declarations in for loops.
3993 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
3994 continue;
3995 return 0;
3998 // Check varargs and va_copy.
3999 static bool
4000 test_varargs (const char *format, ...)
4002 va_list args;
4003 va_start (args, format);
4004 va_list args_copy;
4005 va_copy (args_copy, args);
4007 const char *str = "";
4008 int number = 0;
4009 float fnumber = 0;
4011 while (*format)
4013 switch (*format++)
4015 case '\''s'\'': // string
4016 str = va_arg (args_copy, const char *);
4017 break;
4018 case '\''d'\'': // int
4019 number = va_arg (args_copy, int);
4020 break;
4021 case '\''f'\'': // float
4022 fnumber = va_arg (args_copy, double);
4023 break;
4024 default:
4025 break;
4028 va_end (args_copy);
4029 va_end (args);
4031 return *str && number && fnumber;
4035 # Test code for whether the C compiler supports C99 (body of main).
4036 ac_c_conftest_c99_main='
4037 // Check bool.
4038 _Bool success = false;
4039 success |= (argc != 0);
4041 // Check restrict.
4042 if (test_restrict ("String literal") == 0)
4043 success = true;
4044 char *restrict newvar = "Another string";
4046 // Check varargs.
4047 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
4048 test_varargs_macros ();
4050 // Check flexible array members.
4051 struct incomplete_array *ia =
4052 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4053 ia->datasize = 10;
4054 for (int i = 0; i < ia->datasize; ++i)
4055 ia->data[i] = i * 1.234;
4056 // Work around memory leak warnings.
4057 free (ia);
4059 // Check named initializers.
4060 struct named_init ni = {
4061 .number = 34,
4062 .name = L"Test wide string",
4063 .average = 543.34343,
4066 ni.number = 58;
4068 int dynamic_array[ni.number];
4069 dynamic_array[0] = argv[0][0];
4070 dynamic_array[ni.number - 1] = 543;
4072 // work around unused variable warnings
4073 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
4074 || dynamic_array[ni.number - 1] != 543);
4077 # Test code for whether the C compiler supports C11 (global declarations)
4078 ac_c_conftest_c11_globals='
4079 // Does the compiler advertise C11 conformance?
4080 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
4081 # error "Compiler does not advertise C11 conformance"
4082 #endif
4084 // Check _Alignas.
4085 char _Alignas (double) aligned_as_double;
4086 char _Alignas (0) no_special_alignment;
4087 extern char aligned_as_int;
4088 char _Alignas (0) _Alignas (int) aligned_as_int;
4090 // Check _Alignof.
4091 enum
4093 int_alignment = _Alignof (int),
4094 int_array_alignment = _Alignof (int[100]),
4095 char_alignment = _Alignof (char)
4097 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4099 // Check _Noreturn.
4100 int _Noreturn does_not_return (void) { for (;;) continue; }
4102 // Check _Static_assert.
4103 struct test_static_assert
4105 int x;
4106 _Static_assert (sizeof (int) <= sizeof (long int),
4107 "_Static_assert does not work in struct");
4108 long int y;
4111 // Check UTF-8 literals.
4112 #define u8 syntax error!
4113 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4115 // Check duplicate typedefs.
4116 typedef long *long_ptr;
4117 typedef long int *long_ptr;
4118 typedef long_ptr long_ptr;
4120 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4121 struct anonymous
4123 union {
4124 struct { int i; int j; };
4125 struct { int k; long int l; } w;
4127 int m;
4128 } v1;
4131 # Test code for whether the C compiler supports C11 (body of main).
4132 ac_c_conftest_c11_main='
4133 _Static_assert ((offsetof (struct anonymous, i)
4134 == offsetof (struct anonymous, w.k)),
4135 "Anonymous union alignment botch");
4136 v1.i = 2;
4137 v1.w.k = 5;
4138 ok |= v1.i != 5;
4141 # Test code for whether the C compiler supports C11 (complete).
4142 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
4143 ${ac_c_conftest_c99_globals}
4144 ${ac_c_conftest_c11_globals}
4147 main (int argc, char **argv)
4149 int ok = 0;
4150 ${ac_c_conftest_c89_main}
4151 ${ac_c_conftest_c99_main}
4152 ${ac_c_conftest_c11_main}
4153 return ok;
4157 # Test code for whether the C compiler supports C99 (complete).
4158 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
4159 ${ac_c_conftest_c99_globals}
4162 main (int argc, char **argv)
4164 int ok = 0;
4165 ${ac_c_conftest_c89_main}
4166 ${ac_c_conftest_c99_main}
4167 return ok;
4171 # Test code for whether the C compiler supports C89 (complete).
4172 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
4175 main (int argc, char **argv)
4177 int ok = 0;
4178 ${ac_c_conftest_c89_main}
4179 return ok;
4183 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
4184 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
4185 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
4186 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
4187 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
4188 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
4189 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
4190 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
4191 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
4192 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
4193 as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
4194 as_fn_append ac_func_c_list " fchmod HAVE_FCHMOD"
4195 as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
4196 as_fn_append ac_func_c_list " canonicalize_file_name HAVE_CANONICALIZE_FILE_NAME"
4197 as_fn_append ac_func_c_list " faccessat HAVE_FACCESSAT"
4198 as_fn_append ac_func_c_list " realpath HAVE_REALPATH"
4199 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
4200 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
4201 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
4202 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
4203 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
4204 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
4205 as_fn_append ac_header_c_list " stdio_ext.h stdio_ext_h HAVE_STDIO_EXT_H"
4206 as_fn_append ac_func_c_list " __fwriting HAVE___FWRITING"
4207 as_fn_append ac_func_c_list " getdelim HAVE_GETDELIM"
4208 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
4209 as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
4210 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
4211 as_fn_append ac_func_c_list " getrandom HAVE_GETRANDOM"
4212 as_fn_append ac_header_c_list " threads.h threads_h HAVE_THREADS_H"
4213 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
4214 as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
4215 as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
4216 as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
4217 as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
4218 as_fn_append ac_func_c_list " mbrlen HAVE_MBRLEN"
4219 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
4220 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
4221 as_fn_append ac_func_c_list " mkostemp HAVE_MKOSTEMP"
4222 as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
4223 as_fn_append ac_func_c_list " readlink HAVE_READLINK"
4224 as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
4225 as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
4226 as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
4227 as_fn_append ac_func_c_list " link HAVE_LINK"
4228 as_fn_append ac_header_c_list " selinux/selinux.h selinux_selinux_h HAVE_SELINUX_SELINUX_H"
4229 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
4230 as_fn_append ac_header_c_list " stdalign.h stdalign_h HAVE_STDALIGN_H"
4231 as_fn_append ac_header_c_list " stdbool.h stdbool_h HAVE_STDBOOL_H"
4232 as_fn_append ac_header_c_list " stdckdint.h stdckdint_h HAVE_STDCKDINT_H"
4233 as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
4234 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
4235 as_fn_append ac_header_c_list " sys/random.h sys_random_h HAVE_SYS_RANDOM_H"
4236 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
4237 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
4238 as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
4239 as_fn_append ac_func_c_list " wctob HAVE_WCTOB"
4240 as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
4241 as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
4242 as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
4243 as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H"
4244 as_fn_append ac_func_c_list " explicit_bzero HAVE_EXPLICIT_BZERO"
4245 as_fn_append ac_func_c_list " memset_s HAVE_MEMSET_S"
4246 as_fn_append ac_func_c_list " fpurge HAVE_FPURGE"
4247 as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE"
4248 as_fn_append ac_func_c_list " __freading HAVE___FREADING"
4249 as_fn_append ac_func_c_list " ftruncate HAVE_FTRUNCATE"
4250 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
4251 as_fn_append ac_func_c_list " duplocale HAVE_DUPLOCALE"
4252 as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
4253 as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
4254 as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE"
4255 as_fn_append ac_func_c_list " uselocale HAVE_USELOCALE"
4256 as_fn_append ac_func_c_list " freelocale HAVE_FREELOCALE"
4257 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
4258 as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
4259 as_fn_append ac_func_c_list " pselect HAVE_PSELECT"
4260 as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
4261 as_fn_append ac_header_c_list " pthread.h pthread_h HAVE_PTHREAD_H"
4262 as_fn_append ac_func_c_list " pthread_sigmask HAVE_PTHREAD_SIGMASK"
4263 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
4264 as_fn_append ac_func_c_list " setenv HAVE_SETENV"
4265 as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
4266 as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
4267 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
4268 as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
4269 as_fn_append ac_func_c_list " shutdown HAVE_SHUTDOWN"
4270 as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
4271 as_fn_append ac_func_c_list " mquery HAVE_MQUERY"
4272 as_fn_append ac_func_c_list " pstat_getprocvm HAVE_PSTAT_GETPROCVM"
4273 gl_use_threads_default=no
4274 as_fn_append ac_header_c_list " locale.h locale_h HAVE_LOCALE_H"
4275 as_fn_append ac_header_c_list " errno.h errno_h HAVE_ERRNO_H"
4276 as_fn_append ac_header_c_list " mcheck.h mcheck_h HAVE_MCHECK_H"
4277 gt_needs="$gt_needs "
4278 as_fn_append ac_func_c_list " isatty HAVE_ISATTY"
4279 as_fn_append ac_func_c_list " isascii HAVE_ISASCII"
4280 as_fn_append ac_func_c_list " memcpy HAVE_MEMCPY"
4281 as_fn_append ac_func_c_list " strchr HAVE_STRCHR"
4282 as_fn_append ac_func_c_list " strtoul HAVE_STRTOUL"
4283 as_fn_append ac_func_c_list " popen HAVE_POPEN"
4284 as_fn_append ac_func_c_list " pathconf HAVE_PATHCONF"
4285 as_fn_append ac_func_c_list " fchown HAVE_FCHOWN"
4286 as_fn_append ac_func_c_list " setlocale HAVE_SETLOCALE"
4288 # Auxiliary files required by this configure script.
4289 ac_aux_files="config.rpath config.guess config.sub compile missing install-sh"
4291 # Locations in which to look for auxiliary files.
4292 ac_aux_dir_candidates="${srcdir}/build-aux"
4294 # Search for a directory containing all of the required auxiliary files,
4295 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
4296 # If we don't find one directory that contains all the files we need,
4297 # we report the set of missing files from the *first* directory in
4298 # $ac_aux_dir_candidates and give up.
4299 ac_missing_aux_files=""
4300 ac_first_candidate=:
4301 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
4302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4303 as_found=false
4304 for as_dir in $ac_aux_dir_candidates
4306 IFS=$as_save_IFS
4307 case $as_dir in #(((
4308 '') as_dir=./ ;;
4309 */) ;;
4310 *) as_dir=$as_dir/ ;;
4311 esac
4312 as_found=:
4314 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
4315 ac_aux_dir_found=yes
4316 ac_install_sh=
4317 for ac_aux in $ac_aux_files
4319 # As a special case, if "install-sh" is required, that requirement
4320 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
4321 # and $ac_install_sh is set appropriately for whichever one is found.
4322 if test x"$ac_aux" = x"install-sh"
4323 then
4324 if test -f "${as_dir}install-sh"; then
4325 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
4326 ac_install_sh="${as_dir}install-sh -c"
4327 elif test -f "${as_dir}install.sh"; then
4328 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
4329 ac_install_sh="${as_dir}install.sh -c"
4330 elif test -f "${as_dir}shtool"; then
4331 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
4332 ac_install_sh="${as_dir}shtool install -c"
4333 else
4334 ac_aux_dir_found=no
4335 if $ac_first_candidate; then
4336 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
4337 else
4338 break
4341 else
4342 if test -f "${as_dir}${ac_aux}"; then
4343 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
4344 else
4345 ac_aux_dir_found=no
4346 if $ac_first_candidate; then
4347 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
4348 else
4349 break
4353 done
4354 if test "$ac_aux_dir_found" = yes; then
4355 ac_aux_dir="$as_dir"
4356 break
4358 ac_first_candidate=false
4360 as_found=false
4361 done
4362 IFS=$as_save_IFS
4363 if $as_found
4364 then :
4366 else case e in #(
4367 e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;;
4368 esac
4372 # These three variables are undocumented and unsupported,
4373 # and are intended to be withdrawn in a future Autoconf release.
4374 # They can cause serious problems if a builder's source tree is in a directory
4375 # whose full name contains unusual characters.
4376 if test -f "${ac_aux_dir}config.guess"; then
4377 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
4379 if test -f "${ac_aux_dir}config.sub"; then
4380 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
4382 if test -f "$ac_aux_dir/configure"; then
4383 ac_configure="$SHELL ${ac_aux_dir}configure"
4386 # Check that the precious variables saved in the cache have kept the same
4387 # value.
4388 ac_cache_corrupted=false
4389 for ac_var in $ac_precious_vars; do
4390 eval ac_old_set=\$ac_cv_env_${ac_var}_set
4391 eval ac_new_set=\$ac_env_${ac_var}_set
4392 eval ac_old_val=\$ac_cv_env_${ac_var}_value
4393 eval ac_new_val=\$ac_env_${ac_var}_value
4394 case $ac_old_set,$ac_new_set in
4395 set,)
4396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
4397 printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
4398 ac_cache_corrupted=: ;;
4399 ,set)
4400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
4401 printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
4402 ac_cache_corrupted=: ;;
4403 ,);;
4405 if test "x$ac_old_val" != "x$ac_new_val"; then
4406 # differences in whitespace do not lead to failure.
4407 ac_old_val_w=`echo x $ac_old_val`
4408 ac_new_val_w=`echo x $ac_new_val`
4409 if test "$ac_old_val_w" != "$ac_new_val_w"; then
4410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
4411 printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
4412 ac_cache_corrupted=:
4413 else
4414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
4415 printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
4416 eval $ac_var=\$ac_old_val
4418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5
4419 printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;}
4420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5
4421 printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;}
4422 fi;;
4423 esac
4424 # Pass precious variables to config.status.
4425 if test "$ac_new_set" = set; then
4426 case $ac_new_val in
4427 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
4428 *) ac_arg=$ac_var=$ac_new_val ;;
4429 esac
4430 case " $ac_configure_args " in
4431 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
4432 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
4433 esac
4435 done
4436 if $ac_cache_corrupted; then
4437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4438 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
4439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
4440 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
4441 as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
4442 and start over" "$LINENO" 5
4444 ## -------------------- ##
4445 ## Main body of script. ##
4446 ## -------------------- ##
4448 ac_ext=c
4449 ac_cpp='$CPP $CPPFLAGS'
4450 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4451 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4452 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4457 ac_config_headers="$ac_config_headers config.h:config_h.in"
4460 am__api_version='1.16'
4464 # Find a good install program. We prefer a C program (faster),
4465 # so one script is as good as another. But avoid the broken or
4466 # incompatible versions:
4467 # SysV /etc/install, /usr/sbin/install
4468 # SunOS /usr/etc/install
4469 # IRIX /sbin/install
4470 # AIX /bin/install
4471 # AmigaOS /C/install, which installs bootblocks on floppy discs
4472 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4473 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4474 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4475 # OS/2's system install, which has a completely different semantic
4476 # ./install, which can be erroneously created by make from ./install.sh.
4477 # Reject install programs that cannot install multiple files.
4478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4479 printf %s "checking for a BSD-compatible install... " >&6; }
4480 if test -z "$INSTALL"; then
4481 if test ${ac_cv_path_install+y}
4482 then :
4483 printf %s "(cached) " >&6
4484 else case e in #(
4485 e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4486 for as_dir in $PATH
4488 IFS=$as_save_IFS
4489 case $as_dir in #(((
4490 '') as_dir=./ ;;
4491 */) ;;
4492 *) as_dir=$as_dir/ ;;
4493 esac
4494 # Account for fact that we put trailing slashes in our PATH walk.
4495 case $as_dir in #((
4496 ./ | /[cC]/* | \
4497 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4498 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4499 /usr/ucb/* ) ;;
4501 # OSF1 and SCO ODT 3.0 have their own names for install.
4502 # Don't use installbsd from OSF since it installs stuff as root
4503 # by default.
4504 for ac_prog in ginstall scoinst install; do
4505 for ac_exec_ext in '' $ac_executable_extensions; do
4506 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
4507 if test $ac_prog = install &&
4508 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4509 # AIX install. It has an incompatible calling convention.
4511 elif test $ac_prog = install &&
4512 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4513 # program-specific install script used by HP pwplus--don't use.
4515 else
4516 rm -rf conftest.one conftest.two conftest.dir
4517 echo one > conftest.one
4518 echo two > conftest.two
4519 mkdir conftest.dir
4520 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
4521 test -s conftest.one && test -s conftest.two &&
4522 test -s conftest.dir/conftest.one &&
4523 test -s conftest.dir/conftest.two
4524 then
4525 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
4526 break 3
4530 done
4531 done
4533 esac
4535 done
4536 IFS=$as_save_IFS
4538 rm -rf conftest.one conftest.two conftest.dir
4540 esac
4542 if test ${ac_cv_path_install+y}; then
4543 INSTALL=$ac_cv_path_install
4544 else
4545 # As a last resort, use the slow shell script. Don't cache a
4546 # value for INSTALL within a source directory, because that will
4547 # break other packages using the cache if that directory is
4548 # removed, or if the value is a relative name.
4549 INSTALL=$ac_install_sh
4552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4553 printf "%s\n" "$INSTALL" >&6; }
4555 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4556 # It thinks the first close brace ends the variable substitution.
4557 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4559 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4561 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sleep supports fractional seconds" >&5
4564 printf %s "checking whether sleep supports fractional seconds... " >&6; }
4565 if test ${am_cv_sleep_fractional_seconds+y}
4566 then :
4567 printf %s "(cached) " >&6
4568 else case e in #(
4569 e) if sleep 0.001 2>/dev/null
4570 then :
4571 am_cv_sleep_fractional_seconds=true
4572 else case e in #(
4573 e) am_cv_sleep_fractional_seconds=false ;;
4574 esac
4577 esac
4579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_sleep_fractional_seconds" >&5
4580 printf "%s\n" "$am_cv_sleep_fractional_seconds" >&6; }
4582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the filesystem timestamp resolution" >&5
4583 printf %s "checking the filesystem timestamp resolution... " >&6; }
4584 if test ${am_cv_filesystem_timestamp_resolution+y}
4585 then :
4586 printf %s "(cached) " >&6
4587 else case e in #(
4588 e) # Use names that lexically sort older-first when the timestamps are equal.
4589 rm -f conftest.file.a conftest.file.b
4590 : > conftest.file.a
4591 if $am_cv_sleep_fractional_seconds
4592 then :
4593 am_try_sleep=0.1 am_try_loops=20
4595 else case e in #(
4596 e) am_try_sleep=1 am_try_loops=2
4598 esac
4600 am_try=0
4601 while :; do
4602 as_fn_arith $am_try + 1 && am_try=$as_val
4603 echo "timestamp $am_try" > conftest.file.b
4604 set X `ls -t conftest.file.a conftest.file.b`
4605 if test "$2" = conftest.file.b || test $am_try -eq $am_try_loops; then
4606 break
4608 sleep $am_try_sleep
4609 done
4610 rm -f conftest.file.a conftest.file.b
4611 am_cv_filesystem_timestamp_resolution=$am_try
4612 if $am_cv_sleep_fractional_seconds
4613 then :
4614 as_fn_arith $am_try / 10 && am_cv_filesystem_timestamp_resolution=$as_val
4615 as_fn_arith $am_try % 10 && am_fraction=$as_val
4616 as_fn_append am_cv_filesystem_timestamp_resolution .$am_fraction
4620 esac
4622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_filesystem_timestamp_resolution" >&5
4623 printf "%s\n" "$am_cv_filesystem_timestamp_resolution" >&6; }
4625 rm -f conftest.file
4626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
4627 printf %s "checking whether build environment is sane... " >&6; }
4628 if test ${am_cv_build_env_is_sane+y}
4629 then :
4630 printf %s "(cached) " >&6
4631 else case e in #(
4632 e) # Reject unsafe characters in $srcdir or the absolute working directory
4633 # name. Accept space and tab only in the latter.
4634 am_lf='
4636 case `pwd` in
4637 *[\\\"\#\$\&\'\`$am_lf]*)
4638 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4639 esac
4640 case $srcdir in
4641 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
4642 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4643 esac
4645 # Do 'set' in a subshell so we don't clobber the current shell's
4646 # arguments. Must try -L first in case configure is actually a
4647 # symlink; some systems play weird games with the mod time of symlinks
4648 # (eg FreeBSD returns the mod time of the symlink's containing
4649 # directory).
4650 if (
4651 am_has_slept=no
4652 for am_try in 1 2; do
4653 echo "timestamp, slept: $am_has_slept" > conftest.file
4654 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4655 if test "$*" = "X"; then
4656 # -L didn't work.
4657 set X `ls -t "$srcdir/configure" conftest.file`
4659 if test "$*" != "X $srcdir/configure conftest.file" \
4660 && test "$*" != "X conftest.file $srcdir/configure"; then
4662 # If neither matched, then we have a broken ls. This can happen
4663 # if, for instance, CONFIG_SHELL is bash and it inherits a
4664 # broken ls alias from the environment. This has actually
4665 # happened. Such a system could not be considered "sane".
4666 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
4667 alias in your environment" "$LINENO" 5
4669 if test "$2" = conftest.file || test $am_try -eq 2; then
4670 break
4672 # Just in case.
4673 sleep $am_cv_filesystem_timestamp_resolution
4674 am_has_slept=yes
4675 done
4676 test "$2" = conftest.file
4678 then
4679 am_cv_build_env_is_sane=yes
4680 else
4681 as_fn_error $? "newly created file is older than distributed files!
4682 Check your system clock" "$LINENO" 5
4685 esac
4687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_build_env_is_sane" >&5
4688 printf "%s\n" "$am_cv_build_env_is_sane" >&6; }
4689 # If we didn't sleep, we still need to ensure time stamps of config.status and
4690 # generated files are strictly newer.
4691 am_sleep_pid=
4692 if ! test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1; then
4693 ( sleep $am_cv_filesystem_timestamp_resolution ) &
4694 am_sleep_pid=$!
4697 rm -f conftest.file
4699 test "$program_prefix" != NONE &&
4700 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4701 # Use a double $ so make ignores it.
4702 test "$program_suffix" != NONE &&
4703 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4704 # Double any \ or $.
4705 # By default was 's,x,x', remove it if useless.
4706 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4707 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
4710 # Expand $ac_aux_dir to an absolute path.
4711 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4714 if test x"${MISSING+set}" != xset; then
4715 MISSING="\${SHELL} '$am_aux_dir/missing'"
4717 # Use eval to expand $SHELL
4718 if eval "$MISSING --is-lightweight"; then
4719 am_missing_run="$MISSING "
4720 else
4721 am_missing_run=
4722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4723 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4726 if test x"${install_sh+set}" != xset; then
4727 case $am_aux_dir in
4728 *\ * | *\ *)
4729 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4731 install_sh="\${SHELL} $am_aux_dir/install-sh"
4732 esac
4735 # Installed binaries are usually stripped using 'strip' when the user
4736 # run "make install-strip". However 'strip' might not be the right
4737 # tool to use in cross-compilation environments, therefore Automake
4738 # will honor the 'STRIP' environment variable to overrule this program.
4739 if test "$cross_compiling" != no; then
4740 if test -n "$ac_tool_prefix"; then
4741 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4742 set dummy ${ac_tool_prefix}strip; ac_word=$2
4743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4744 printf %s "checking for $ac_word... " >&6; }
4745 if test ${ac_cv_prog_STRIP+y}
4746 then :
4747 printf %s "(cached) " >&6
4748 else case e in #(
4749 e) if test -n "$STRIP"; then
4750 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4751 else
4752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4753 for as_dir in $PATH
4755 IFS=$as_save_IFS
4756 case $as_dir in #(((
4757 '') as_dir=./ ;;
4758 */) ;;
4759 *) as_dir=$as_dir/ ;;
4760 esac
4761 for ac_exec_ext in '' $ac_executable_extensions; do
4762 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4763 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4764 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4765 break 2
4767 done
4768 done
4769 IFS=$as_save_IFS
4771 fi ;;
4772 esac
4774 STRIP=$ac_cv_prog_STRIP
4775 if test -n "$STRIP"; then
4776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4777 printf "%s\n" "$STRIP" >&6; }
4778 else
4779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4780 printf "%s\n" "no" >&6; }
4785 if test -z "$ac_cv_prog_STRIP"; then
4786 ac_ct_STRIP=$STRIP
4787 # Extract the first word of "strip", so it can be a program name with args.
4788 set dummy strip; ac_word=$2
4789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4790 printf %s "checking for $ac_word... " >&6; }
4791 if test ${ac_cv_prog_ac_ct_STRIP+y}
4792 then :
4793 printf %s "(cached) " >&6
4794 else case e in #(
4795 e) if test -n "$ac_ct_STRIP"; then
4796 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4797 else
4798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4799 for as_dir in $PATH
4801 IFS=$as_save_IFS
4802 case $as_dir in #(((
4803 '') as_dir=./ ;;
4804 */) ;;
4805 *) as_dir=$as_dir/ ;;
4806 esac
4807 for ac_exec_ext in '' $ac_executable_extensions; do
4808 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4809 ac_cv_prog_ac_ct_STRIP="strip"
4810 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4811 break 2
4813 done
4814 done
4815 IFS=$as_save_IFS
4817 fi ;;
4818 esac
4820 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4821 if test -n "$ac_ct_STRIP"; then
4822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4823 printf "%s\n" "$ac_ct_STRIP" >&6; }
4824 else
4825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4826 printf "%s\n" "no" >&6; }
4829 if test "x$ac_ct_STRIP" = x; then
4830 STRIP=":"
4831 else
4832 case $cross_compiling:$ac_tool_warned in
4833 yes:)
4834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4835 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4836 ac_tool_warned=yes ;;
4837 esac
4838 STRIP=$ac_ct_STRIP
4840 else
4841 STRIP="$ac_cv_prog_STRIP"
4845 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
4849 printf %s "checking for a race-free mkdir -p... " >&6; }
4850 if test -z "$MKDIR_P"; then
4851 if test ${ac_cv_path_mkdir+y}
4852 then :
4853 printf %s "(cached) " >&6
4854 else case e in #(
4855 e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4856 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4858 IFS=$as_save_IFS
4859 case $as_dir in #(((
4860 '') as_dir=./ ;;
4861 */) ;;
4862 *) as_dir=$as_dir/ ;;
4863 esac
4864 for ac_prog in mkdir gmkdir; do
4865 for ac_exec_ext in '' $ac_executable_extensions; do
4866 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
4867 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
4868 'mkdir ('*'coreutils) '* | \
4869 'BusyBox '* | \
4870 'mkdir (fileutils) '4.1*)
4871 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
4872 break 3;;
4873 esac
4874 done
4875 done
4876 done
4877 IFS=$as_save_IFS
4879 esac
4882 test -d ./--version && rmdir ./--version
4883 if test ${ac_cv_path_mkdir+y}; then
4884 MKDIR_P="$ac_cv_path_mkdir -p"
4885 else
4886 # As a last resort, use plain mkdir -p,
4887 # in the hope it doesn't have the bugs of ancient mkdir.
4888 MKDIR_P='mkdir -p'
4891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4892 printf "%s\n" "$MKDIR_P" >&6; }
4894 for ac_prog in gawk mawk nawk awk
4896 # Extract the first word of "$ac_prog", so it can be a program name with args.
4897 set dummy $ac_prog; ac_word=$2
4898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4899 printf %s "checking for $ac_word... " >&6; }
4900 if test ${ac_cv_prog_AWK+y}
4901 then :
4902 printf %s "(cached) " >&6
4903 else case e in #(
4904 e) if test -n "$AWK"; then
4905 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4906 else
4907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4908 for as_dir in $PATH
4910 IFS=$as_save_IFS
4911 case $as_dir in #(((
4912 '') as_dir=./ ;;
4913 */) ;;
4914 *) as_dir=$as_dir/ ;;
4915 esac
4916 for ac_exec_ext in '' $ac_executable_extensions; do
4917 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4918 ac_cv_prog_AWK="$ac_prog"
4919 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4920 break 2
4922 done
4923 done
4924 IFS=$as_save_IFS
4926 fi ;;
4927 esac
4929 AWK=$ac_cv_prog_AWK
4930 if test -n "$AWK"; then
4931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4932 printf "%s\n" "$AWK" >&6; }
4933 else
4934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4935 printf "%s\n" "no" >&6; }
4939 test -n "$AWK" && break
4940 done
4942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4943 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4944 set x ${MAKE-make}
4945 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4946 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
4947 then :
4948 printf %s "(cached) " >&6
4949 else case e in #(
4950 e) cat >conftest.make <<\_ACEOF
4951 SHELL = /bin/sh
4952 all:
4953 @echo '@@@%%%=$(MAKE)=@@@%%%'
4954 _ACEOF
4955 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4956 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4957 *@@@%%%=?*=@@@%%%*)
4958 eval ac_cv_prog_make_${ac_make}_set=yes;;
4960 eval ac_cv_prog_make_${ac_make}_set=no;;
4961 esac
4962 rm -f conftest.make ;;
4963 esac
4965 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4967 printf "%s\n" "yes" >&6; }
4968 SET_MAKE=
4969 else
4970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971 printf "%s\n" "no" >&6; }
4972 SET_MAKE="MAKE=${MAKE-make}"
4975 rm -rf .tst 2>/dev/null
4976 mkdir .tst 2>/dev/null
4977 if test -d .tst; then
4978 am__leading_dot=.
4979 else
4980 am__leading_dot=_
4982 rmdir .tst 2>/dev/null
4984 AM_DEFAULT_VERBOSITY=1
4985 # Check whether --enable-silent-rules was given.
4986 if test ${enable_silent_rules+y}
4987 then :
4988 enableval=$enable_silent_rules;
4991 am_make=${MAKE-make}
4992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4993 printf %s "checking whether $am_make supports nested variables... " >&6; }
4994 if test ${am_cv_make_support_nested_variables+y}
4995 then :
4996 printf %s "(cached) " >&6
4997 else case e in #(
4998 e) if printf "%s\n" 'TRUE=$(BAR$(V))
4999 BAR0=false
5000 BAR1=true
5002 am__doit:
5003 @$(TRUE)
5004 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
5005 am_cv_make_support_nested_variables=yes
5006 else
5007 am_cv_make_support_nested_variables=no
5008 fi ;;
5009 esac
5011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
5012 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
5013 AM_BACKSLASH='\'
5015 am__rm_f_notfound=
5016 if (rm -f && rm -fr && rm -rf) 2>/dev/null
5017 then :
5019 else case e in #(
5020 e) am__rm_f_notfound='""' ;;
5021 esac
5025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xargs -n works" >&5
5026 printf %s "checking xargs -n works... " >&6; }
5027 if test ${am_cv_xargs_n_works+y}
5028 then :
5029 printf %s "(cached) " >&6
5030 else case e in #(
5031 e) if test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
5033 then :
5034 am_cv_xargs_n_works=yes
5035 else case e in #(
5036 e) am_cv_xargs_n_works=no ;;
5037 esac
5038 fi ;;
5039 esac
5041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_xargs_n_works" >&5
5042 printf "%s\n" "$am_cv_xargs_n_works" >&6; }
5043 if test "$am_cv_xargs_n_works" = yes
5044 then :
5045 am__xargs_n='xargs -n'
5046 else case e in #(
5047 e) am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "" "$am__xargs_n_arg"; done; }'
5049 esac
5052 if test "`cd $srcdir && pwd`" != "`pwd`"; then
5053 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
5054 # is not polluted with repeated "-I."
5055 am__isrc=' -I$(srcdir)'
5056 # test to see if srcdir already configured
5057 if test -f $srcdir/config.status; then
5058 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
5062 # test whether we have cygpath
5063 if test -z "$CYGPATH_W"; then
5064 if (cygpath --version) >/dev/null 2>/dev/null; then
5065 CYGPATH_W='cygpath -w'
5066 else
5067 CYGPATH_W=echo
5072 # Define the identity of the package.
5073 PACKAGE='sed'
5074 VERSION='4.9'
5077 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
5080 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
5082 # Some tools Automake needs.
5084 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
5087 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
5090 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
5093 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
5096 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
5098 # For better backward compatibility. To be removed once Automake 1.9.x
5099 # dies out for good. For more background, see:
5100 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
5101 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
5102 mkdir_p='$(MKDIR_P)'
5104 # We need awk for the "check" target (and possibly the TAP driver). The
5105 # system "awk" is bad on some platforms.
5106 # Always define AMTAR for backward compatibility. Yes, it's still used
5107 # in the wild :-( We should find a proper way to deprecate it ...
5108 AMTAR='$${TAR-tar}'
5111 # We'll loop over all known methods to create a tar archive until one works.
5112 _am_tools='gnutar pax cpio none'
5114 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
5120 # Variables for tags utilities; see am/tags.am
5121 if test -z "$CTAGS"; then
5122 CTAGS=ctags
5125 if test -z "$ETAGS"; then
5126 ETAGS=etags
5129 if test -z "$CSCOPE"; then
5130 CSCOPE=cscope
5140 AM_DEFAULT_VERBOSITY=0 # make --enable-silent-rules the default.
5152 ac_ext=c
5153 ac_cpp='$CPP $CPPFLAGS'
5154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5157 if test -n "$ac_tool_prefix"; then
5158 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5159 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5161 printf %s "checking for $ac_word... " >&6; }
5162 if test ${ac_cv_prog_CC+y}
5163 then :
5164 printf %s "(cached) " >&6
5165 else case e in #(
5166 e) if test -n "$CC"; then
5167 ac_cv_prog_CC="$CC" # Let the user override the test.
5168 else
5169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5170 for as_dir in $PATH
5172 IFS=$as_save_IFS
5173 case $as_dir in #(((
5174 '') as_dir=./ ;;
5175 */) ;;
5176 *) as_dir=$as_dir/ ;;
5177 esac
5178 for ac_exec_ext in '' $ac_executable_extensions; do
5179 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5180 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5181 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5182 break 2
5184 done
5185 done
5186 IFS=$as_save_IFS
5188 fi ;;
5189 esac
5191 CC=$ac_cv_prog_CC
5192 if test -n "$CC"; then
5193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5194 printf "%s\n" "$CC" >&6; }
5195 else
5196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5197 printf "%s\n" "no" >&6; }
5202 if test -z "$ac_cv_prog_CC"; then
5203 ac_ct_CC=$CC
5204 # Extract the first word of "gcc", so it can be a program name with args.
5205 set dummy gcc; ac_word=$2
5206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5207 printf %s "checking for $ac_word... " >&6; }
5208 if test ${ac_cv_prog_ac_ct_CC+y}
5209 then :
5210 printf %s "(cached) " >&6
5211 else case e in #(
5212 e) if test -n "$ac_ct_CC"; then
5213 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5214 else
5215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5216 for as_dir in $PATH
5218 IFS=$as_save_IFS
5219 case $as_dir in #(((
5220 '') as_dir=./ ;;
5221 */) ;;
5222 *) as_dir=$as_dir/ ;;
5223 esac
5224 for ac_exec_ext in '' $ac_executable_extensions; do
5225 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5226 ac_cv_prog_ac_ct_CC="gcc"
5227 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5228 break 2
5230 done
5231 done
5232 IFS=$as_save_IFS
5234 fi ;;
5235 esac
5237 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5238 if test -n "$ac_ct_CC"; then
5239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5240 printf "%s\n" "$ac_ct_CC" >&6; }
5241 else
5242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5243 printf "%s\n" "no" >&6; }
5246 if test "x$ac_ct_CC" = x; then
5247 CC=""
5248 else
5249 case $cross_compiling:$ac_tool_warned in
5250 yes:)
5251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5252 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5253 ac_tool_warned=yes ;;
5254 esac
5255 CC=$ac_ct_CC
5257 else
5258 CC="$ac_cv_prog_CC"
5261 if test -z "$CC"; then
5262 if test -n "$ac_tool_prefix"; then
5263 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5264 set dummy ${ac_tool_prefix}cc; ac_word=$2
5265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5266 printf %s "checking for $ac_word... " >&6; }
5267 if test ${ac_cv_prog_CC+y}
5268 then :
5269 printf %s "(cached) " >&6
5270 else case e in #(
5271 e) if test -n "$CC"; then
5272 ac_cv_prog_CC="$CC" # Let the user override the test.
5273 else
5274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5275 for as_dir in $PATH
5277 IFS=$as_save_IFS
5278 case $as_dir in #(((
5279 '') as_dir=./ ;;
5280 */) ;;
5281 *) as_dir=$as_dir/ ;;
5282 esac
5283 for ac_exec_ext in '' $ac_executable_extensions; do
5284 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5285 ac_cv_prog_CC="${ac_tool_prefix}cc"
5286 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5287 break 2
5289 done
5290 done
5291 IFS=$as_save_IFS
5293 fi ;;
5294 esac
5296 CC=$ac_cv_prog_CC
5297 if test -n "$CC"; then
5298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5299 printf "%s\n" "$CC" >&6; }
5300 else
5301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5302 printf "%s\n" "no" >&6; }
5308 if test -z "$CC"; then
5309 # Extract the first word of "cc", so it can be a program name with args.
5310 set dummy cc; ac_word=$2
5311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5312 printf %s "checking for $ac_word... " >&6; }
5313 if test ${ac_cv_prog_CC+y}
5314 then :
5315 printf %s "(cached) " >&6
5316 else case e in #(
5317 e) if test -n "$CC"; then
5318 ac_cv_prog_CC="$CC" # Let the user override the test.
5319 else
5320 ac_prog_rejected=no
5321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322 for as_dir in $PATH
5324 IFS=$as_save_IFS
5325 case $as_dir in #(((
5326 '') as_dir=./ ;;
5327 */) ;;
5328 *) as_dir=$as_dir/ ;;
5329 esac
5330 for ac_exec_ext in '' $ac_executable_extensions; do
5331 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5332 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5333 ac_prog_rejected=yes
5334 continue
5336 ac_cv_prog_CC="cc"
5337 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5338 break 2
5340 done
5341 done
5342 IFS=$as_save_IFS
5344 if test $ac_prog_rejected = yes; then
5345 # We found a bogon in the path, so make sure we never use it.
5346 set dummy $ac_cv_prog_CC
5347 shift
5348 if test $# != 0; then
5349 # We chose a different compiler from the bogus one.
5350 # However, it has the same basename, so the bogon will be chosen
5351 # first if we set CC to just the basename; use the full file name.
5352 shift
5353 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5356 fi ;;
5357 esac
5359 CC=$ac_cv_prog_CC
5360 if test -n "$CC"; then
5361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5362 printf "%s\n" "$CC" >&6; }
5363 else
5364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5365 printf "%s\n" "no" >&6; }
5370 if test -z "$CC"; then
5371 if test -n "$ac_tool_prefix"; then
5372 for ac_prog in cl.exe
5374 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5375 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5377 printf %s "checking for $ac_word... " >&6; }
5378 if test ${ac_cv_prog_CC+y}
5379 then :
5380 printf %s "(cached) " >&6
5381 else case e in #(
5382 e) if test -n "$CC"; then
5383 ac_cv_prog_CC="$CC" # Let the user override the test.
5384 else
5385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5386 for as_dir in $PATH
5388 IFS=$as_save_IFS
5389 case $as_dir in #(((
5390 '') as_dir=./ ;;
5391 */) ;;
5392 *) as_dir=$as_dir/ ;;
5393 esac
5394 for ac_exec_ext in '' $ac_executable_extensions; do
5395 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5396 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5397 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5398 break 2
5400 done
5401 done
5402 IFS=$as_save_IFS
5404 fi ;;
5405 esac
5407 CC=$ac_cv_prog_CC
5408 if test -n "$CC"; then
5409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5410 printf "%s\n" "$CC" >&6; }
5411 else
5412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5413 printf "%s\n" "no" >&6; }
5417 test -n "$CC" && break
5418 done
5420 if test -z "$CC"; then
5421 ac_ct_CC=$CC
5422 for ac_prog in cl.exe
5424 # Extract the first word of "$ac_prog", so it can be a program name with args.
5425 set dummy $ac_prog; ac_word=$2
5426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5427 printf %s "checking for $ac_word... " >&6; }
5428 if test ${ac_cv_prog_ac_ct_CC+y}
5429 then :
5430 printf %s "(cached) " >&6
5431 else case e in #(
5432 e) if test -n "$ac_ct_CC"; then
5433 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5434 else
5435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5436 for as_dir in $PATH
5438 IFS=$as_save_IFS
5439 case $as_dir in #(((
5440 '') as_dir=./ ;;
5441 */) ;;
5442 *) as_dir=$as_dir/ ;;
5443 esac
5444 for ac_exec_ext in '' $ac_executable_extensions; do
5445 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5446 ac_cv_prog_ac_ct_CC="$ac_prog"
5447 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5448 break 2
5450 done
5451 done
5452 IFS=$as_save_IFS
5454 fi ;;
5455 esac
5457 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5458 if test -n "$ac_ct_CC"; then
5459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5460 printf "%s\n" "$ac_ct_CC" >&6; }
5461 else
5462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5463 printf "%s\n" "no" >&6; }
5467 test -n "$ac_ct_CC" && break
5468 done
5470 if test "x$ac_ct_CC" = x; then
5471 CC=""
5472 else
5473 case $cross_compiling:$ac_tool_warned in
5474 yes:)
5475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5476 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5477 ac_tool_warned=yes ;;
5478 esac
5479 CC=$ac_ct_CC
5484 if test -z "$CC"; then
5485 if test -n "$ac_tool_prefix"; then
5486 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5487 set dummy ${ac_tool_prefix}clang; ac_word=$2
5488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5489 printf %s "checking for $ac_word... " >&6; }
5490 if test ${ac_cv_prog_CC+y}
5491 then :
5492 printf %s "(cached) " >&6
5493 else case e in #(
5494 e) if test -n "$CC"; then
5495 ac_cv_prog_CC="$CC" # Let the user override the test.
5496 else
5497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5498 for as_dir in $PATH
5500 IFS=$as_save_IFS
5501 case $as_dir in #(((
5502 '') as_dir=./ ;;
5503 */) ;;
5504 *) as_dir=$as_dir/ ;;
5505 esac
5506 for ac_exec_ext in '' $ac_executable_extensions; do
5507 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5508 ac_cv_prog_CC="${ac_tool_prefix}clang"
5509 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5510 break 2
5512 done
5513 done
5514 IFS=$as_save_IFS
5516 fi ;;
5517 esac
5519 CC=$ac_cv_prog_CC
5520 if test -n "$CC"; then
5521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5522 printf "%s\n" "$CC" >&6; }
5523 else
5524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5525 printf "%s\n" "no" >&6; }
5530 if test -z "$ac_cv_prog_CC"; then
5531 ac_ct_CC=$CC
5532 # Extract the first word of "clang", so it can be a program name with args.
5533 set dummy clang; ac_word=$2
5534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5535 printf %s "checking for $ac_word... " >&6; }
5536 if test ${ac_cv_prog_ac_ct_CC+y}
5537 then :
5538 printf %s "(cached) " >&6
5539 else case e in #(
5540 e) if test -n "$ac_ct_CC"; then
5541 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5542 else
5543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5544 for as_dir in $PATH
5546 IFS=$as_save_IFS
5547 case $as_dir in #(((
5548 '') as_dir=./ ;;
5549 */) ;;
5550 *) as_dir=$as_dir/ ;;
5551 esac
5552 for ac_exec_ext in '' $ac_executable_extensions; do
5553 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5554 ac_cv_prog_ac_ct_CC="clang"
5555 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5556 break 2
5558 done
5559 done
5560 IFS=$as_save_IFS
5562 fi ;;
5563 esac
5565 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5566 if test -n "$ac_ct_CC"; then
5567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5568 printf "%s\n" "$ac_ct_CC" >&6; }
5569 else
5570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5571 printf "%s\n" "no" >&6; }
5574 if test "x$ac_ct_CC" = x; then
5575 CC=""
5576 else
5577 case $cross_compiling:$ac_tool_warned in
5578 yes:)
5579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5580 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5581 ac_tool_warned=yes ;;
5582 esac
5583 CC=$ac_ct_CC
5585 else
5586 CC="$ac_cv_prog_CC"
5592 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5593 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5594 as_fn_error $? "no acceptable C compiler found in \$PATH
5595 See 'config.log' for more details" "$LINENO" 5; }
5597 # Provide some information about the compiler.
5598 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5599 set X $ac_compile
5600 ac_compiler=$2
5601 for ac_option in --version -v -V -qversion -version; do
5602 { { ac_try="$ac_compiler $ac_option >&5"
5603 case "(($ac_try" in
5604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5605 *) ac_try_echo=$ac_try;;
5606 esac
5607 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5608 printf "%s\n" "$ac_try_echo"; } >&5
5609 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5610 ac_status=$?
5611 if test -s conftest.err; then
5612 sed '10a\
5613 ... rest of stderr output deleted ...
5614 10q' conftest.err >conftest.er1
5615 cat conftest.er1 >&5
5617 rm -f conftest.er1 conftest.err
5618 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5619 test $ac_status = 0; }
5620 done
5622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5623 /* end confdefs.h. */
5626 main (void)
5630 return 0;
5632 _ACEOF
5633 ac_clean_files_save=$ac_clean_files
5634 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5635 # Try to create an executable without -o first, disregard a.out.
5636 # It will help us diagnose broken compilers, and finding out an intuition
5637 # of exeext.
5638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5639 printf %s "checking whether the C compiler works... " >&6; }
5640 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5642 # The possible output files:
5643 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5645 ac_rmfiles=
5646 for ac_file in $ac_files
5648 case $ac_file in
5649 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5650 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5651 esac
5652 done
5653 rm -f $ac_rmfiles
5655 if { { ac_try="$ac_link_default"
5656 case "(($ac_try" in
5657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5658 *) ac_try_echo=$ac_try;;
5659 esac
5660 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5661 printf "%s\n" "$ac_try_echo"; } >&5
5662 (eval "$ac_link_default") 2>&5
5663 ac_status=$?
5664 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5665 test $ac_status = 0; }
5666 then :
5667 # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
5668 # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
5669 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5670 # so that the user can short-circuit this test for compilers unknown to
5671 # Autoconf.
5672 for ac_file in $ac_files ''
5674 test -f "$ac_file" || continue
5675 case $ac_file in
5676 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5678 [ab].out )
5679 # We found the default executable, but exeext='' is most
5680 # certainly right.
5681 break;;
5682 *.* )
5683 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
5684 then :; else
5685 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5687 # We set ac_cv_exeext here because the later test for it is not
5688 # safe: cross compilers may not add the suffix if given an '-o'
5689 # argument, so we may need to know it at that point already.
5690 # Even if this section looks crufty: it has the advantage of
5691 # actually working.
5692 break;;
5694 break;;
5695 esac
5696 done
5697 test "$ac_cv_exeext" = no && ac_cv_exeext=
5699 else case e in #(
5700 e) ac_file='' ;;
5701 esac
5703 if test -z "$ac_file"
5704 then :
5705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706 printf "%s\n" "no" >&6; }
5707 printf "%s\n" "$as_me: failed program was:" >&5
5708 sed 's/^/| /' conftest.$ac_ext >&5
5710 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5711 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5712 as_fn_error 77 "C compiler cannot create executables
5713 See 'config.log' for more details" "$LINENO" 5; }
5714 else case e in #(
5715 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5716 printf "%s\n" "yes" >&6; } ;;
5717 esac
5719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5720 printf %s "checking for C compiler default output file name... " >&6; }
5721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5722 printf "%s\n" "$ac_file" >&6; }
5723 ac_exeext=$ac_cv_exeext
5725 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5726 ac_clean_files=$ac_clean_files_save
5727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5728 printf %s "checking for suffix of executables... " >&6; }
5729 if { { ac_try="$ac_link"
5730 case "(($ac_try" in
5731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5732 *) ac_try_echo=$ac_try;;
5733 esac
5734 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5735 printf "%s\n" "$ac_try_echo"; } >&5
5736 (eval "$ac_link") 2>&5
5737 ac_status=$?
5738 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5739 test $ac_status = 0; }
5740 then :
5741 # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
5742 # catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will
5743 # work properly (i.e., refer to 'conftest.exe'), while it won't with
5744 # 'rm'.
5745 for ac_file in conftest.exe conftest conftest.*; do
5746 test -f "$ac_file" || continue
5747 case $ac_file in
5748 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5749 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5750 break;;
5751 * ) break;;
5752 esac
5753 done
5754 else case e in #(
5755 e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5756 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5757 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5758 See 'config.log' for more details" "$LINENO" 5; } ;;
5759 esac
5761 rm -f conftest conftest$ac_cv_exeext
5762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5763 printf "%s\n" "$ac_cv_exeext" >&6; }
5765 rm -f conftest.$ac_ext
5766 EXEEXT=$ac_cv_exeext
5767 ac_exeext=$EXEEXT
5768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5769 /* end confdefs.h. */
5770 #include <stdio.h>
5772 main (void)
5774 FILE *f = fopen ("conftest.out", "w");
5775 return ferror (f) || fclose (f) != 0;
5778 return 0;
5780 _ACEOF
5781 ac_clean_files="$ac_clean_files conftest.out"
5782 # Check that the compiler produces executables we can run. If not, either
5783 # the compiler is broken, or we cross compile.
5784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5785 printf %s "checking whether we are cross compiling... " >&6; }
5786 if test "$cross_compiling" != yes; then
5787 { { ac_try="$ac_link"
5788 case "(($ac_try" in
5789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5790 *) ac_try_echo=$ac_try;;
5791 esac
5792 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5793 printf "%s\n" "$ac_try_echo"; } >&5
5794 (eval "$ac_link") 2>&5
5795 ac_status=$?
5796 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5797 test $ac_status = 0; }
5798 if { ac_try='./conftest$ac_cv_exeext'
5799 { { case "(($ac_try" in
5800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5801 *) ac_try_echo=$ac_try;;
5802 esac
5803 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5804 printf "%s\n" "$ac_try_echo"; } >&5
5805 (eval "$ac_try") 2>&5
5806 ac_status=$?
5807 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5808 test $ac_status = 0; }; }; then
5809 cross_compiling=no
5810 else
5811 if test "$cross_compiling" = maybe; then
5812 cross_compiling=yes
5813 else
5814 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5815 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5816 as_fn_error 77 "cannot run C compiled programs.
5817 If you meant to cross compile, use '--host'.
5818 See 'config.log' for more details" "$LINENO" 5; }
5822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5823 printf "%s\n" "$cross_compiling" >&6; }
5825 rm -f conftest.$ac_ext conftest$ac_cv_exeext \
5826 conftest.o conftest.obj conftest.out
5827 ac_clean_files=$ac_clean_files_save
5828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5829 printf %s "checking for suffix of object files... " >&6; }
5830 if test ${ac_cv_objext+y}
5831 then :
5832 printf %s "(cached) " >&6
5833 else case e in #(
5834 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5835 /* end confdefs.h. */
5838 main (void)
5842 return 0;
5844 _ACEOF
5845 rm -f conftest.o conftest.obj
5846 if { { ac_try="$ac_compile"
5847 case "(($ac_try" in
5848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5849 *) ac_try_echo=$ac_try;;
5850 esac
5851 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5852 printf "%s\n" "$ac_try_echo"; } >&5
5853 (eval "$ac_compile") 2>&5
5854 ac_status=$?
5855 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5856 test $ac_status = 0; }
5857 then :
5858 for ac_file in conftest.o conftest.obj conftest.*; do
5859 test -f "$ac_file" || continue;
5860 case $ac_file in
5861 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5862 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5863 break;;
5864 esac
5865 done
5866 else case e in #(
5867 e) printf "%s\n" "$as_me: failed program was:" >&5
5868 sed 's/^/| /' conftest.$ac_ext >&5
5870 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5871 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5872 as_fn_error $? "cannot compute suffix of object files: cannot compile
5873 See 'config.log' for more details" "$LINENO" 5; } ;;
5874 esac
5876 rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
5877 esac
5879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5880 printf "%s\n" "$ac_cv_objext" >&6; }
5881 OBJEXT=$ac_cv_objext
5882 ac_objext=$OBJEXT
5883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5884 printf %s "checking whether the compiler supports GNU C... " >&6; }
5885 if test ${ac_cv_c_compiler_gnu+y}
5886 then :
5887 printf %s "(cached) " >&6
5888 else case e in #(
5889 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5890 /* end confdefs.h. */
5893 main (void)
5895 #ifndef __GNUC__
5896 choke me
5897 #endif
5900 return 0;
5902 _ACEOF
5903 if ac_fn_c_try_compile "$LINENO"
5904 then :
5905 ac_compiler_gnu=yes
5906 else case e in #(
5907 e) ac_compiler_gnu=no ;;
5908 esac
5910 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5911 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5913 esac
5915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5916 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5917 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5919 if test $ac_compiler_gnu = yes; then
5920 GCC=yes
5921 else
5922 GCC=
5924 ac_test_CFLAGS=${CFLAGS+y}
5925 ac_save_CFLAGS=$CFLAGS
5926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5927 printf %s "checking whether $CC accepts -g... " >&6; }
5928 if test ${ac_cv_prog_cc_g+y}
5929 then :
5930 printf %s "(cached) " >&6
5931 else case e in #(
5932 e) ac_save_c_werror_flag=$ac_c_werror_flag
5933 ac_c_werror_flag=yes
5934 ac_cv_prog_cc_g=no
5935 CFLAGS="-g"
5936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5937 /* end confdefs.h. */
5940 main (void)
5944 return 0;
5946 _ACEOF
5947 if ac_fn_c_try_compile "$LINENO"
5948 then :
5949 ac_cv_prog_cc_g=yes
5950 else case e in #(
5951 e) CFLAGS=""
5952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5953 /* end confdefs.h. */
5956 main (void)
5960 return 0;
5962 _ACEOF
5963 if ac_fn_c_try_compile "$LINENO"
5964 then :
5966 else case e in #(
5967 e) ac_c_werror_flag=$ac_save_c_werror_flag
5968 CFLAGS="-g"
5969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5970 /* end confdefs.h. */
5973 main (void)
5977 return 0;
5979 _ACEOF
5980 if ac_fn_c_try_compile "$LINENO"
5981 then :
5982 ac_cv_prog_cc_g=yes
5984 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
5985 esac
5987 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
5988 esac
5990 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5991 ac_c_werror_flag=$ac_save_c_werror_flag ;;
5992 esac
5994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5995 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5996 if test $ac_test_CFLAGS; then
5997 CFLAGS=$ac_save_CFLAGS
5998 elif test $ac_cv_prog_cc_g = yes; then
5999 if test "$GCC" = yes; then
6000 CFLAGS="-g -O2"
6001 else
6002 CFLAGS="-g"
6004 else
6005 if test "$GCC" = yes; then
6006 CFLAGS="-O2"
6007 else
6008 CFLAGS=
6011 ac_prog_cc_stdc=no
6012 if test x$ac_prog_cc_stdc = xno
6013 then :
6014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
6015 printf %s "checking for $CC option to enable C11 features... " >&6; }
6016 if test ${ac_cv_prog_cc_c11+y}
6017 then :
6018 printf %s "(cached) " >&6
6019 else case e in #(
6020 e) ac_cv_prog_cc_c11=no
6021 ac_save_CC=$CC
6022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6023 /* end confdefs.h. */
6024 $ac_c_conftest_c11_program
6025 _ACEOF
6026 for ac_arg in '' -std=gnu11
6028 CC="$ac_save_CC $ac_arg"
6029 if ac_fn_c_try_compile "$LINENO"
6030 then :
6031 ac_cv_prog_cc_c11=$ac_arg
6033 rm -f core conftest.err conftest.$ac_objext conftest.beam
6034 test "x$ac_cv_prog_cc_c11" != "xno" && break
6035 done
6036 rm -f conftest.$ac_ext
6037 CC=$ac_save_CC ;;
6038 esac
6041 if test "x$ac_cv_prog_cc_c11" = xno
6042 then :
6043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6044 printf "%s\n" "unsupported" >&6; }
6045 else case e in #(
6046 e) if test "x$ac_cv_prog_cc_c11" = x
6047 then :
6048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6049 printf "%s\n" "none needed" >&6; }
6050 else case e in #(
6051 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
6052 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
6053 CC="$CC $ac_cv_prog_cc_c11" ;;
6054 esac
6056 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
6057 ac_prog_cc_stdc=c11 ;;
6058 esac
6061 if test x$ac_prog_cc_stdc = xno
6062 then :
6063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
6064 printf %s "checking for $CC option to enable C99 features... " >&6; }
6065 if test ${ac_cv_prog_cc_c99+y}
6066 then :
6067 printf %s "(cached) " >&6
6068 else case e in #(
6069 e) ac_cv_prog_cc_c99=no
6070 ac_save_CC=$CC
6071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6072 /* end confdefs.h. */
6073 $ac_c_conftest_c99_program
6074 _ACEOF
6075 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
6077 CC="$ac_save_CC $ac_arg"
6078 if ac_fn_c_try_compile "$LINENO"
6079 then :
6080 ac_cv_prog_cc_c99=$ac_arg
6082 rm -f core conftest.err conftest.$ac_objext conftest.beam
6083 test "x$ac_cv_prog_cc_c99" != "xno" && break
6084 done
6085 rm -f conftest.$ac_ext
6086 CC=$ac_save_CC ;;
6087 esac
6090 if test "x$ac_cv_prog_cc_c99" = xno
6091 then :
6092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6093 printf "%s\n" "unsupported" >&6; }
6094 else case e in #(
6095 e) if test "x$ac_cv_prog_cc_c99" = x
6096 then :
6097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6098 printf "%s\n" "none needed" >&6; }
6099 else case e in #(
6100 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6101 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
6102 CC="$CC $ac_cv_prog_cc_c99" ;;
6103 esac
6105 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6106 ac_prog_cc_stdc=c99 ;;
6107 esac
6110 if test x$ac_prog_cc_stdc = xno
6111 then :
6112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
6113 printf %s "checking for $CC option to enable C89 features... " >&6; }
6114 if test ${ac_cv_prog_cc_c89+y}
6115 then :
6116 printf %s "(cached) " >&6
6117 else case e in #(
6118 e) ac_cv_prog_cc_c89=no
6119 ac_save_CC=$CC
6120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6121 /* end confdefs.h. */
6122 $ac_c_conftest_c89_program
6123 _ACEOF
6124 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6126 CC="$ac_save_CC $ac_arg"
6127 if ac_fn_c_try_compile "$LINENO"
6128 then :
6129 ac_cv_prog_cc_c89=$ac_arg
6131 rm -f core conftest.err conftest.$ac_objext conftest.beam
6132 test "x$ac_cv_prog_cc_c89" != "xno" && break
6133 done
6134 rm -f conftest.$ac_ext
6135 CC=$ac_save_CC ;;
6136 esac
6139 if test "x$ac_cv_prog_cc_c89" = xno
6140 then :
6141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6142 printf "%s\n" "unsupported" >&6; }
6143 else case e in #(
6144 e) if test "x$ac_cv_prog_cc_c89" = x
6145 then :
6146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6147 printf "%s\n" "none needed" >&6; }
6148 else case e in #(
6149 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6150 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
6151 CC="$CC $ac_cv_prog_cc_c89" ;;
6152 esac
6154 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6155 ac_prog_cc_stdc=c89 ;;
6156 esac
6160 ac_ext=c
6161 ac_cpp='$CPP $CPPFLAGS'
6162 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6163 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6164 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6167 ac_ext=c
6168 ac_cpp='$CPP $CPPFLAGS'
6169 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6170 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6171 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6173 printf %s "checking whether $CC understands -c and -o together... " >&6; }
6174 if test ${am_cv_prog_cc_c_o+y}
6175 then :
6176 printf %s "(cached) " >&6
6177 else case e in #(
6178 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6179 /* end confdefs.h. */
6182 main (void)
6186 return 0;
6188 _ACEOF
6189 # Make sure it works both with $CC and with simple cc.
6190 # Following AC_PROG_CC_C_O, we do the test twice because some
6191 # compilers refuse to overwrite an existing .o file with -o,
6192 # though they will create one.
6193 am_cv_prog_cc_c_o=yes
6194 for am_i in 1 2; do
6195 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6196 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6197 ac_status=$?
6198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6199 (exit $ac_status); } \
6200 && test -f conftest2.$ac_objext; then
6201 : OK
6202 else
6203 am_cv_prog_cc_c_o=no
6204 break
6206 done
6207 rm -f core conftest*
6208 unset am_i ;;
6209 esac
6211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6212 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
6213 if test "$am_cv_prog_cc_c_o" != yes; then
6214 # Losing compiler, so override with the script.
6215 # FIXME: It is wrong to rewrite CC.
6216 # But if we don't then we get into trouble of one sort or another.
6217 # A longer-term fix would be to have automake use am__CC in this case,
6218 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6219 CC="$am_aux_dir/compile $CC"
6221 ac_ext=c
6222 ac_cpp='$CPP $CPPFLAGS'
6223 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6224 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6225 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
6230 printf %s "checking whether the compiler is clang... " >&6; }
6231 if test ${gl_cv_compiler_clang+y}
6232 then :
6233 printf %s "(cached) " >&6
6234 else case e in #(
6235 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6236 /* end confdefs.h. */
6238 #ifdef __clang__
6239 barfbarf
6240 #endif
6243 main (void)
6247 return 0;
6250 _ACEOF
6251 if ac_fn_c_try_compile "$LINENO"
6252 then :
6253 gl_cv_compiler_clang=no
6254 else case e in #(
6255 e) gl_cv_compiler_clang=yes ;;
6256 esac
6258 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6260 esac
6262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
6263 printf "%s\n" "$gl_cv_compiler_clang" >&6; }
6266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
6267 printf %s "checking for compiler option needed when checking for declarations... " >&6; }
6268 if test ${gl_cv_compiler_check_decl_option+y}
6269 then :
6270 printf %s "(cached) " >&6
6271 else case e in #(
6272 e) if test $gl_cv_compiler_clang = yes; then
6273 save_ac_compile="$ac_compile"
6274 ac_compile="$ac_compile -Werror=implicit-function-declaration"
6275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6276 /* end confdefs.h. */
6279 main (void)
6283 return 0;
6285 _ACEOF
6286 if ac_fn_c_try_compile "$LINENO"
6287 then :
6288 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
6289 else case e in #(
6290 e) gl_cv_compiler_check_decl_option=none ;;
6291 esac
6293 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6294 ac_compile="$save_ac_compile"
6295 else
6296 gl_cv_compiler_check_decl_option=none
6299 esac
6301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
6302 printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
6303 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
6304 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
6305 else
6306 ac_compile_for_check_decl="$ac_compile"
6309 DEPDIR="${am__leading_dot}deps"
6311 ac_config_commands="$ac_config_commands depfiles"
6313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
6314 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
6315 cat > confinc.mk << 'END'
6316 am__doit:
6317 @echo this is the am__doit target >confinc.out
6318 .PHONY: am__doit
6320 am__include="#"
6321 am__quote=
6322 # BSD make does it like this.
6323 echo '.include "confinc.mk" # ignored' > confmf.BSD
6324 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
6325 echo 'include confinc.mk # ignored' > confmf.GNU
6326 _am_result=no
6327 for s in GNU BSD; do
6328 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
6329 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
6330 ac_status=$?
6331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6332 (exit $ac_status); }
6333 case $?:`cat confinc.out 2>/dev/null` in #(
6334 '0:this is the am__doit target') :
6335 case $s in #(
6336 BSD) :
6337 am__include='.include' am__quote='"' ;; #(
6338 *) :
6339 am__include='include' am__quote='' ;;
6340 esac ;; #(
6341 *) :
6343 esac
6344 if test "$am__include" != "#"; then
6345 _am_result="yes ($s style)"
6346 break
6348 done
6349 rm -f confinc.* confmf.*
6350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
6351 printf "%s\n" "${_am_result}" >&6; }
6353 # Check whether --enable-dependency-tracking was given.
6354 if test ${enable_dependency_tracking+y}
6355 then :
6356 enableval=$enable_dependency_tracking;
6359 if test "x$enable_dependency_tracking" != xno; then
6360 am_depcomp="$ac_aux_dir/depcomp"
6361 AMDEPBACKSLASH='\'
6362 am__nodep='_no'
6364 if test "x$enable_dependency_tracking" != xno; then
6365 AMDEP_TRUE=
6366 AMDEP_FALSE='#'
6367 else
6368 AMDEP_TRUE='#'
6369 AMDEP_FALSE=
6374 depcc="$CC" am_compiler_list=
6376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6377 printf %s "checking dependency style of $depcc... " >&6; }
6378 if test ${am_cv_CC_dependencies_compiler_type+y}
6379 then :
6380 printf %s "(cached) " >&6
6381 else case e in #(
6382 e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6383 # We make a subdir and do the tests there. Otherwise we can end up
6384 # making bogus files that we don't know about and never remove. For
6385 # instance it was reported that on HP-UX the gcc test will end up
6386 # making a dummy file named 'D' -- because '-MD' means "put the output
6387 # in D".
6388 rm -rf conftest.dir
6389 mkdir conftest.dir
6390 # Copy depcomp to subdir because otherwise we won't find it if we're
6391 # using a relative directory.
6392 cp "$am_depcomp" conftest.dir
6393 cd conftest.dir
6394 # We will build objects and dependencies in a subdirectory because
6395 # it helps to detect inapplicable dependency modes. For instance
6396 # both Tru64's cc and ICC support -MD to output dependencies as a
6397 # side effect of compilation, but ICC will put the dependencies in
6398 # the current directory while Tru64 will put them in the object
6399 # directory.
6400 mkdir sub
6402 am_cv_CC_dependencies_compiler_type=none
6403 if test "$am_compiler_list" = ""; then
6404 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6406 am__universal=false
6407 case " $depcc " in #(
6408 *\ -arch\ *\ -arch\ *) am__universal=true ;;
6409 esac
6411 for depmode in $am_compiler_list; do
6412 # Setup a source with many dependencies, because some compilers
6413 # like to wrap large dependency lists on column 80 (with \), and
6414 # we should not choose a depcomp mode which is confused by this.
6416 # We need to recreate these files for each test, as the compiler may
6417 # overwrite some of them when testing with obscure command lines.
6418 # This happens at least with the AIX C compiler.
6419 : > sub/conftest.c
6420 for i in 1 2 3 4 5 6; do
6421 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6422 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6423 # Solaris 10 /bin/sh.
6424 echo '/* dummy */' > sub/conftst$i.h
6425 done
6426 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6428 # We check with '-c' and '-o' for the sake of the "dashmstdout"
6429 # mode. It turns out that the SunPro C++ compiler does not properly
6430 # handle '-M -o', and we need to detect this. Also, some Intel
6431 # versions had trouble with output in subdirs.
6432 am__obj=sub/conftest.${OBJEXT-o}
6433 am__minus_obj="-o $am__obj"
6434 case $depmode in
6435 gcc)
6436 # This depmode causes a compiler race in universal mode.
6437 test "$am__universal" = false || continue
6439 nosideeffect)
6440 # After this tag, mechanisms are not by side-effect, so they'll
6441 # only be used when explicitly requested.
6442 if test "x$enable_dependency_tracking" = xyes; then
6443 continue
6444 else
6445 break
6448 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6449 # This compiler won't grok '-c -o', but also, the minuso test has
6450 # not run yet. These depmodes are late enough in the game, and
6451 # so weak that their functioning should not be impacted.
6452 am__obj=conftest.${OBJEXT-o}
6453 am__minus_obj=
6455 none) break ;;
6456 esac
6457 if depmode=$depmode \
6458 source=sub/conftest.c object=$am__obj \
6459 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6460 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6461 >/dev/null 2>conftest.err &&
6462 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6463 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6464 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6465 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6466 # icc doesn't choke on unknown options, it will just issue warnings
6467 # or remarks (even with -Werror). So we grep stderr for any message
6468 # that says an option was ignored or not supported.
6469 # When given -MP, icc 7.0 and 7.1 complain thusly:
6470 # icc: Command line warning: ignoring option '-M'; no argument required
6471 # The diagnosis changed in icc 8.0:
6472 # icc: Command line remark: option '-MP' not supported
6473 if (grep 'ignoring option' conftest.err ||
6474 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6475 am_cv_CC_dependencies_compiler_type=$depmode
6476 break
6479 done
6481 cd ..
6482 rm -rf conftest.dir
6483 else
6484 am_cv_CC_dependencies_compiler_type=none
6487 esac
6489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6490 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
6491 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6494 test "x$enable_dependency_tracking" != xno \
6495 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6496 am__fastdepCC_TRUE=
6497 am__fastdepCC_FALSE='#'
6498 else
6499 am__fastdepCC_TRUE='#'
6500 am__fastdepCC_FALSE=
6506 ac_header= ac_cache=
6507 for ac_item in $ac_header_c_list
6509 if test $ac_cache; then
6510 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6511 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6512 printf "%s\n" "#define $ac_item 1" >> confdefs.h
6514 ac_header= ac_cache=
6515 elif test $ac_header; then
6516 ac_cache=$ac_item
6517 else
6518 ac_header=$ac_item
6520 done
6529 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
6530 then :
6532 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6542 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6543 if test ${ac_cv_safe_to_define___extensions__+y}
6544 then :
6545 printf %s "(cached) " >&6
6546 else case e in #(
6547 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6548 /* end confdefs.h. */
6550 # define __EXTENSIONS__ 1
6551 $ac_includes_default
6553 main (void)
6557 return 0;
6559 _ACEOF
6560 if ac_fn_c_try_compile "$LINENO"
6561 then :
6562 ac_cv_safe_to_define___extensions__=yes
6563 else case e in #(
6564 e) ac_cv_safe_to_define___extensions__=no ;;
6565 esac
6567 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
6568 esac
6570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6571 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6574 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6575 if test ${ac_cv_should_define__xopen_source+y}
6576 then :
6577 printf %s "(cached) " >&6
6578 else case e in #(
6579 e) ac_cv_should_define__xopen_source=no
6580 if test $ac_cv_header_wchar_h = yes
6581 then :
6582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6583 /* end confdefs.h. */
6585 #include <wchar.h>
6586 mbstate_t x;
6588 main (void)
6592 return 0;
6594 _ACEOF
6595 if ac_fn_c_try_compile "$LINENO"
6596 then :
6598 else case e in #(
6599 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6600 /* end confdefs.h. */
6602 #define _XOPEN_SOURCE 500
6603 #include <wchar.h>
6604 mbstate_t x;
6606 main (void)
6610 return 0;
6612 _ACEOF
6613 if ac_fn_c_try_compile "$LINENO"
6614 then :
6615 ac_cv_should_define__xopen_source=yes
6617 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
6618 esac
6620 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6621 fi ;;
6622 esac
6624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6625 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6627 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6629 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6631 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6633 printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6635 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6637 printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6639 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6641 printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6643 printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6645 printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6647 printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6649 printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6651 printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6653 printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6655 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6657 if test $ac_cv_header_minix_config_h = yes
6658 then :
6659 MINIX=yes
6660 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6662 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6664 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6666 else case e in #(
6667 e) MINIX= ;;
6668 esac
6670 if test $ac_cv_safe_to_define___extensions__ = yes
6671 then :
6672 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6675 if test $ac_cv_should_define__xopen_source = yes
6676 then :
6677 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6683 # Make sure we can run config.sub.
6684 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
6685 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
6687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6688 printf %s "checking build system type... " >&6; }
6689 if test ${ac_cv_build+y}
6690 then :
6691 printf %s "(cached) " >&6
6692 else case e in #(
6693 e) ac_build_alias=$build_alias
6694 test "x$ac_build_alias" = x &&
6695 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
6696 test "x$ac_build_alias" = x &&
6697 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6698 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
6699 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
6701 esac
6703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6704 printf "%s\n" "$ac_cv_build" >&6; }
6705 case $ac_cv_build in
6706 *-*-*) ;;
6707 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6708 esac
6709 build=$ac_cv_build
6710 ac_save_IFS=$IFS; IFS='-'
6711 set x $ac_cv_build
6712 shift
6713 build_cpu=$1
6714 build_vendor=$2
6715 shift; shift
6716 # Remember, the first character of IFS is used to create $*,
6717 # except with old shells:
6718 build_os=$*
6719 IFS=$ac_save_IFS
6720 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6724 printf %s "checking host system type... " >&6; }
6725 if test ${ac_cv_host+y}
6726 then :
6727 printf %s "(cached) " >&6
6728 else case e in #(
6729 e) if test "x$host_alias" = x; then
6730 ac_cv_host=$ac_cv_build
6731 else
6732 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
6733 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
6736 esac
6738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6739 printf "%s\n" "$ac_cv_host" >&6; }
6740 case $ac_cv_host in
6741 *-*-*) ;;
6742 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6743 esac
6744 host=$ac_cv_host
6745 ac_save_IFS=$IFS; IFS='-'
6746 set x $ac_cv_host
6747 shift
6748 host_cpu=$1
6749 host_vendor=$2
6750 shift; shift
6751 # Remember, the first character of IFS is used to create $*,
6752 # except with old shells:
6753 host_os=$*
6754 IFS=$ac_save_IFS
6755 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6762 case "$host_os" in
6763 openbsd*)
6765 printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h
6768 esac
6770 ac_ext=c
6771 ac_cpp='$CPP $CPPFLAGS'
6772 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6773 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6776 printf %s "checking how to run the C preprocessor... " >&6; }
6777 # On Suns, sometimes $CPP names a directory.
6778 if test -n "$CPP" && test -d "$CPP"; then
6779 CPP=
6781 if test -z "$CPP"; then
6782 if test ${ac_cv_prog_CPP+y}
6783 then :
6784 printf %s "(cached) " >&6
6785 else case e in #(
6786 e) # Double quotes because $CC needs to be expanded
6787 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
6789 ac_preproc_ok=false
6790 for ac_c_preproc_warn_flag in '' yes
6792 # Use a header file that comes with gcc, so configuring glibc
6793 # with a fresh cross-compiler works.
6794 # On the NeXT, cc -E runs the code through the compiler's parser,
6795 # not just through cpp. "Syntax error" is here to catch this case.
6796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6797 /* end confdefs.h. */
6798 #include <limits.h>
6799 Syntax error
6800 _ACEOF
6801 if ac_fn_c_try_cpp "$LINENO"
6802 then :
6804 else case e in #(
6805 e) # Broken: fails on valid input.
6806 continue ;;
6807 esac
6809 rm -f conftest.err conftest.i conftest.$ac_ext
6811 # OK, works on sane cases. Now check whether nonexistent headers
6812 # can be detected and how.
6813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6814 /* end confdefs.h. */
6815 #include <ac_nonexistent.h>
6816 _ACEOF
6817 if ac_fn_c_try_cpp "$LINENO"
6818 then :
6819 # Broken: success on invalid input.
6820 continue
6821 else case e in #(
6822 e) # Passes both tests.
6823 ac_preproc_ok=:
6824 break ;;
6825 esac
6827 rm -f conftest.err conftest.i conftest.$ac_ext
6829 done
6830 # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6831 rm -f conftest.i conftest.err conftest.$ac_ext
6832 if $ac_preproc_ok
6833 then :
6834 break
6837 done
6838 ac_cv_prog_CPP=$CPP
6840 esac
6842 CPP=$ac_cv_prog_CPP
6843 else
6844 ac_cv_prog_CPP=$CPP
6846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6847 printf "%s\n" "$CPP" >&6; }
6848 ac_preproc_ok=false
6849 for ac_c_preproc_warn_flag in '' yes
6851 # Use a header file that comes with gcc, so configuring glibc
6852 # with a fresh cross-compiler works.
6853 # On the NeXT, cc -E runs the code through the compiler's parser,
6854 # not just through cpp. "Syntax error" is here to catch this case.
6855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6856 /* end confdefs.h. */
6857 #include <limits.h>
6858 Syntax error
6859 _ACEOF
6860 if ac_fn_c_try_cpp "$LINENO"
6861 then :
6863 else case e in #(
6864 e) # Broken: fails on valid input.
6865 continue ;;
6866 esac
6868 rm -f conftest.err conftest.i conftest.$ac_ext
6870 # OK, works on sane cases. Now check whether nonexistent headers
6871 # can be detected and how.
6872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6873 /* end confdefs.h. */
6874 #include <ac_nonexistent.h>
6875 _ACEOF
6876 if ac_fn_c_try_cpp "$LINENO"
6877 then :
6878 # Broken: success on invalid input.
6879 continue
6880 else case e in #(
6881 e) # Passes both tests.
6882 ac_preproc_ok=:
6883 break ;;
6884 esac
6886 rm -f conftest.err conftest.i conftest.$ac_ext
6888 done
6889 # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6890 rm -f conftest.i conftest.err conftest.$ac_ext
6891 if $ac_preproc_ok
6892 then :
6894 else case e in #(
6895 e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
6896 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
6897 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6898 See 'config.log' for more details" "$LINENO" 5; } ;;
6899 esac
6902 ac_ext=c
6903 ac_cpp='$CPP $CPPFLAGS'
6904 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6905 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6906 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
6910 printf %s "checking for egrep -e... " >&6; }
6911 if test ${ac_cv_path_EGREP_TRADITIONAL+y}
6912 then :
6913 printf %s "(cached) " >&6
6914 else case e in #(
6915 e) if test -z "$EGREP_TRADITIONAL"; then
6916 ac_path_EGREP_TRADITIONAL_found=false
6917 # Loop through the user's path and test for each of PROGNAME-LIST
6918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6919 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6921 IFS=$as_save_IFS
6922 case $as_dir in #(((
6923 '') as_dir=./ ;;
6924 */) ;;
6925 *) as_dir=$as_dir/ ;;
6926 esac
6927 for ac_prog in grep ggrep
6929 for ac_exec_ext in '' $ac_executable_extensions; do
6930 ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
6931 as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
6932 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
6933 # Check for GNU $ac_path_EGREP_TRADITIONAL
6934 case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in
6935 *GNU*)
6936 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
6938 ac_count=0
6939 printf %s 0123456789 >"conftest.in"
6940 while :
6942 cat "conftest.in" "conftest.in" >"conftest.tmp"
6943 mv "conftest.tmp" "conftest.in"
6944 cp "conftest.in" "conftest.nl"
6945 printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
6946 "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6947 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6948 as_fn_arith $ac_count + 1 && ac_count=$as_val
6949 if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
6950 # Best one so far, save it but keep looking for a better one
6951 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
6952 ac_path_EGREP_TRADITIONAL_max=$ac_count
6954 # 10*(2^10) chars as input seems more than enough
6955 test $ac_count -gt 10 && break
6956 done
6957 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6958 esac
6960 $ac_path_EGREP_TRADITIONAL_found && break 3
6961 done
6962 done
6963 done
6964 IFS=$as_save_IFS
6965 if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
6968 else
6969 ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
6972 if test "$ac_cv_path_EGREP_TRADITIONAL"
6973 then :
6974 ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
6975 else case e in #(
6976 e) if test -z "$EGREP_TRADITIONAL"; then
6977 ac_path_EGREP_TRADITIONAL_found=false
6978 # Loop through the user's path and test for each of PROGNAME-LIST
6979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6980 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6982 IFS=$as_save_IFS
6983 case $as_dir in #(((
6984 '') as_dir=./ ;;
6985 */) ;;
6986 *) as_dir=$as_dir/ ;;
6987 esac
6988 for ac_prog in egrep
6990 for ac_exec_ext in '' $ac_executable_extensions; do
6991 ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
6992 as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
6993 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
6994 # Check for GNU $ac_path_EGREP_TRADITIONAL
6995 case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in
6996 *GNU*)
6997 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
6999 ac_count=0
7000 printf %s 0123456789 >"conftest.in"
7001 while :
7003 cat "conftest.in" "conftest.in" >"conftest.tmp"
7004 mv "conftest.tmp" "conftest.in"
7005 cp "conftest.in" "conftest.nl"
7006 printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
7007 "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7008 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7009 as_fn_arith $ac_count + 1 && ac_count=$as_val
7010 if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
7011 # Best one so far, save it but keep looking for a better one
7012 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
7013 ac_path_EGREP_TRADITIONAL_max=$ac_count
7015 # 10*(2^10) chars as input seems more than enough
7016 test $ac_count -gt 10 && break
7017 done
7018 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7019 esac
7021 $ac_path_EGREP_TRADITIONAL_found && break 3
7022 done
7023 done
7024 done
7025 IFS=$as_save_IFS
7026 if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
7027 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7029 else
7030 ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
7033 esac
7034 fi ;;
7035 esac
7037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
7038 printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
7039 EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL
7044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
7045 printf %s "checking for Minix Amsterdam compiler... " >&6; }
7046 if test ${gl_cv_c_amsterdam_compiler+y}
7047 then :
7048 printf %s "(cached) " >&6
7049 else case e in #(
7051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7052 /* end confdefs.h. */
7054 #ifdef __ACK__
7055 Amsterdam
7056 #endif
7058 _ACEOF
7059 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7060 $EGREP_TRADITIONAL "Amsterdam" >/dev/null 2>&1
7061 then :
7062 gl_cv_c_amsterdam_compiler=yes
7063 else case e in #(
7064 e) gl_cv_c_amsterdam_compiler=no ;;
7065 esac
7067 rm -rf conftest*
7070 esac
7072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
7073 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
7075 if test $gl_cv_c_amsterdam_compiler = yes; then
7076 if test -z "$AR"; then
7077 AR='cc -c.a'
7079 if test -z "$ARFLAGS"; then
7080 ARFLAGS='-o'
7082 else
7086 if test -n "$ac_tool_prefix"; then
7087 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7088 set dummy ${ac_tool_prefix}ar; ac_word=$2
7089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7090 printf %s "checking for $ac_word... " >&6; }
7091 if test ${ac_cv_prog_AR+y}
7092 then :
7093 printf %s "(cached) " >&6
7094 else case e in #(
7095 e) if test -n "$AR"; then
7096 ac_cv_prog_AR="$AR" # Let the user override the test.
7097 else
7098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7099 for as_dir in $PATH
7101 IFS=$as_save_IFS
7102 case $as_dir in #(((
7103 '') as_dir=./ ;;
7104 */) ;;
7105 *) as_dir=$as_dir/ ;;
7106 esac
7107 for ac_exec_ext in '' $ac_executable_extensions; do
7108 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7109 ac_cv_prog_AR="${ac_tool_prefix}ar"
7110 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7111 break 2
7113 done
7114 done
7115 IFS=$as_save_IFS
7117 fi ;;
7118 esac
7120 AR=$ac_cv_prog_AR
7121 if test -n "$AR"; then
7122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7123 printf "%s\n" "$AR" >&6; }
7124 else
7125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7126 printf "%s\n" "no" >&6; }
7131 if test -z "$ac_cv_prog_AR"; then
7132 ac_ct_AR=$AR
7133 # Extract the first word of "ar", so it can be a program name with args.
7134 set dummy ar; ac_word=$2
7135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7136 printf %s "checking for $ac_word... " >&6; }
7137 if test ${ac_cv_prog_ac_ct_AR+y}
7138 then :
7139 printf %s "(cached) " >&6
7140 else case e in #(
7141 e) if test -n "$ac_ct_AR"; then
7142 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7143 else
7144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7145 for as_dir in $PATH
7147 IFS=$as_save_IFS
7148 case $as_dir in #(((
7149 '') as_dir=./ ;;
7150 */) ;;
7151 *) as_dir=$as_dir/ ;;
7152 esac
7153 for ac_exec_ext in '' $ac_executable_extensions; do
7154 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7155 ac_cv_prog_ac_ct_AR="ar"
7156 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7157 break 2
7159 done
7160 done
7161 IFS=$as_save_IFS
7163 fi ;;
7164 esac
7166 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7167 if test -n "$ac_ct_AR"; then
7168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7169 printf "%s\n" "$ac_ct_AR" >&6; }
7170 else
7171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7172 printf "%s\n" "no" >&6; }
7175 if test "x$ac_ct_AR" = x; then
7176 AR="ar"
7177 else
7178 case $cross_compiling:$ac_tool_warned in
7179 yes:)
7180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7181 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7182 ac_tool_warned=yes ;;
7183 esac
7184 AR=$ac_ct_AR
7186 else
7187 AR="$ac_cv_prog_AR"
7190 if test -z "$ARFLAGS"; then
7191 ARFLAGS='cr'
7196 if test -z "$RANLIB"; then
7197 if test $gl_cv_c_amsterdam_compiler = yes; then
7198 RANLIB=':'
7199 else
7200 if test -n "$ac_tool_prefix"; then
7201 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7202 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7204 printf %s "checking for $ac_word... " >&6; }
7205 if test ${ac_cv_prog_RANLIB+y}
7206 then :
7207 printf %s "(cached) " >&6
7208 else case e in #(
7209 e) if test -n "$RANLIB"; then
7210 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7211 else
7212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7213 for as_dir in $PATH
7215 IFS=$as_save_IFS
7216 case $as_dir in #(((
7217 '') as_dir=./ ;;
7218 */) ;;
7219 *) as_dir=$as_dir/ ;;
7220 esac
7221 for ac_exec_ext in '' $ac_executable_extensions; do
7222 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7223 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7224 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7225 break 2
7227 done
7228 done
7229 IFS=$as_save_IFS
7231 fi ;;
7232 esac
7234 RANLIB=$ac_cv_prog_RANLIB
7235 if test -n "$RANLIB"; then
7236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7237 printf "%s\n" "$RANLIB" >&6; }
7238 else
7239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240 printf "%s\n" "no" >&6; }
7245 if test -z "$ac_cv_prog_RANLIB"; then
7246 ac_ct_RANLIB=$RANLIB
7247 # Extract the first word of "ranlib", so it can be a program name with args.
7248 set dummy ranlib; ac_word=$2
7249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7250 printf %s "checking for $ac_word... " >&6; }
7251 if test ${ac_cv_prog_ac_ct_RANLIB+y}
7252 then :
7253 printf %s "(cached) " >&6
7254 else case e in #(
7255 e) if test -n "$ac_ct_RANLIB"; then
7256 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7257 else
7258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7259 for as_dir in $PATH
7261 IFS=$as_save_IFS
7262 case $as_dir in #(((
7263 '') as_dir=./ ;;
7264 */) ;;
7265 *) as_dir=$as_dir/ ;;
7266 esac
7267 for ac_exec_ext in '' $ac_executable_extensions; do
7268 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7269 ac_cv_prog_ac_ct_RANLIB="ranlib"
7270 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7271 break 2
7273 done
7274 done
7275 IFS=$as_save_IFS
7277 fi ;;
7278 esac
7280 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7281 if test -n "$ac_ct_RANLIB"; then
7282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7283 printf "%s\n" "$ac_ct_RANLIB" >&6; }
7284 else
7285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7286 printf "%s\n" "no" >&6; }
7289 if test "x$ac_ct_RANLIB" = x; then
7290 RANLIB=":"
7291 else
7292 case $cross_compiling:$ac_tool_warned in
7293 yes:)
7294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7295 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7296 ac_tool_warned=yes ;;
7297 esac
7298 RANLIB=$ac_ct_RANLIB
7300 else
7301 RANLIB="$ac_cv_prog_RANLIB"
7312 # Check whether --enable-largefile was given.
7313 if test ${enable_largefile+y}
7314 then :
7315 enableval=$enable_largefile;
7318 if test "$enable_largefile" != no
7319 then :
7320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7321 printf %s "checking for special C compiler options needed for large files... " >&6; }
7322 if test ${ac_cv_sys_largefile_CC+y}
7323 then :
7324 printf %s "(cached) " >&6
7325 else case e in #(
7326 e) ac_cv_sys_largefile_CC=no
7327 if test "$GCC" != yes; then
7328 ac_save_CC=$CC
7329 while :; do
7330 # IRIX 6.2 and later do not support large files by default,
7331 # so use the C compiler's -n32 option if that helps.
7332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7333 /* end confdefs.h. */
7334 #include <sys/types.h>
7335 /* Check that off_t can represent 2**63 - 1 correctly.
7336 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7337 since some C++ compilers masquerading as C compilers
7338 incorrectly reject 9223372036854775807. */
7339 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7340 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7341 && LARGE_OFF_T % 2147483647 == 1)
7342 ? 1 : -1];
7344 main (void)
7348 return 0;
7350 _ACEOF
7351 if ac_fn_c_try_compile "$LINENO"
7352 then :
7353 break
7355 rm -f core conftest.err conftest.$ac_objext conftest.beam
7356 CC="$CC -n32"
7357 if ac_fn_c_try_compile "$LINENO"
7358 then :
7359 ac_cv_sys_largefile_CC=' -n32'; break
7361 rm -f core conftest.err conftest.$ac_objext conftest.beam
7362 break
7363 done
7364 CC=$ac_save_CC
7365 rm -f conftest.$ac_ext
7366 fi ;;
7367 esac
7369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7370 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
7371 if test "$ac_cv_sys_largefile_CC" != no; then
7372 CC=$CC$ac_cv_sys_largefile_CC
7375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7376 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7377 if test ${ac_cv_sys_file_offset_bits+y}
7378 then :
7379 printf %s "(cached) " >&6
7380 else case e in #(
7381 e) while :; do
7382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7383 /* end confdefs.h. */
7384 #include <sys/types.h>
7385 /* Check that off_t can represent 2**63 - 1 correctly.
7386 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7387 since some C++ compilers masquerading as C compilers
7388 incorrectly reject 9223372036854775807. */
7389 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7390 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7391 && LARGE_OFF_T % 2147483647 == 1)
7392 ? 1 : -1];
7394 main (void)
7398 return 0;
7400 _ACEOF
7401 if ac_fn_c_try_compile "$LINENO"
7402 then :
7403 ac_cv_sys_file_offset_bits=no; break
7405 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7407 /* end confdefs.h. */
7408 #undef _FILE_OFFSET_BITS
7409 #define _FILE_OFFSET_BITS 64
7410 #include <sys/types.h>
7411 /* Check that off_t can represent 2**63 - 1 correctly.
7412 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7413 since some C++ compilers masquerading as C compilers
7414 incorrectly reject 9223372036854775807. */
7415 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7416 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7417 && LARGE_OFF_T % 2147483647 == 1)
7418 ? 1 : -1];
7420 main (void)
7424 return 0;
7426 _ACEOF
7427 if ac_fn_c_try_compile "$LINENO"
7428 then :
7429 ac_cv_sys_file_offset_bits=64; break
7431 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7432 ac_cv_sys_file_offset_bits=unknown
7433 break
7434 done ;;
7435 esac
7437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7438 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
7439 case $ac_cv_sys_file_offset_bits in #(
7440 no | unknown) ;;
7442 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
7444 esac
7445 rm -rf conftest*
7446 case $ac_cv_sys_file_offset_bits in #(
7447 unknown) :
7448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7449 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
7450 if test ${ac_cv_sys_large_files+y}
7451 then :
7452 printf %s "(cached) " >&6
7453 else case e in #(
7454 e) while :; do
7455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7456 /* end confdefs.h. */
7457 #include <sys/types.h>
7458 /* Check that off_t can represent 2**63 - 1 correctly.
7459 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7460 since some C++ compilers masquerading as C compilers
7461 incorrectly reject 9223372036854775807. */
7462 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7463 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7464 && LARGE_OFF_T % 2147483647 == 1)
7465 ? 1 : -1];
7467 main (void)
7471 return 0;
7473 _ACEOF
7474 if ac_fn_c_try_compile "$LINENO"
7475 then :
7476 ac_cv_sys_large_files=no; break
7478 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7480 /* end confdefs.h. */
7481 #undef _LARGE_FILES
7482 #define _LARGE_FILES 1
7483 #include <sys/types.h>
7484 /* Check that off_t can represent 2**63 - 1 correctly.
7485 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7486 since some C++ compilers masquerading as C compilers
7487 incorrectly reject 9223372036854775807. */
7488 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
7489 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7490 && LARGE_OFF_T % 2147483647 == 1)
7491 ? 1 : -1];
7493 main (void)
7497 return 0;
7499 _ACEOF
7500 if ac_fn_c_try_compile "$LINENO"
7501 then :
7502 ac_cv_sys_large_files=1; break
7504 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7505 ac_cv_sys_large_files=unknown
7506 break
7507 done ;;
7508 esac
7510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7511 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
7512 case $ac_cv_sys_large_files in #(
7513 no | unknown) ;;
7515 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
7517 esac
7518 rm -rf conftest* ;; #(
7519 64) :
7521 # Check whether --enable-year2038 was given.
7522 if test ${enable_year2038+y}
7523 then :
7524 enableval=$enable_year2038;
7527 if test "$enable_year2038" != no
7528 then :
7530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for time_t past the year 2038" >&5
7531 printf %s "checking for time_t past the year 2038... " >&6; }
7532 if test ${ac_cv_type_time_t_y2038+y}
7533 then :
7534 printf %s "(cached) " >&6
7535 else case e in #(
7536 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7537 /* end confdefs.h. */
7539 #include <time.h>
7540 /* Check that time_t can represent 2**32 - 1 correctly. */
7541 #define LARGE_TIME_T \\
7542 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
7543 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
7544 && LARGE_TIME_T % 65537 == 0)
7545 ? 1 : -1];
7547 _ACEOF
7548 if ac_fn_c_try_compile "$LINENO"
7549 then :
7550 ac_cv_type_time_t_y2038=yes
7551 else case e in #(
7552 e) ac_cv_type_time_t_y2038=no ;;
7553 esac
7555 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7557 esac
7559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_time_t_y2038" >&5
7560 printf "%s\n" "$ac_cv_type_time_t_y2038" >&6; }
7561 if test "$ac_cv_type_time_t_y2038" = no; then
7562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t with _TIME_BITS=64" >&5
7563 printf %s "checking for 64-bit time_t with _TIME_BITS=64... " >&6; }
7564 if test ${ac_cv_type_time_t_bits_macro+y}
7565 then :
7566 printf %s "(cached) " >&6
7567 else case e in #(
7568 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7569 /* end confdefs.h. */
7570 #define _TIME_BITS 64
7571 #define _FILE_OFFSET_BITS 64
7573 #include <time.h>
7574 /* Check that time_t can represent 2**32 - 1 correctly. */
7575 #define LARGE_TIME_T \\
7576 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
7577 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
7578 && LARGE_TIME_T % 65537 == 0)
7579 ? 1 : -1];
7581 _ACEOF
7582 if ac_fn_c_try_compile "$LINENO"
7583 then :
7584 ac_cv_type_time_t_bits_macro=yes
7585 else case e in #(
7586 e) ac_cv_type_time_t_bits_macro=no ;;
7587 esac
7589 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7591 esac
7593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_time_t_bits_macro" >&5
7594 printf "%s\n" "$ac_cv_type_time_t_bits_macro" >&6; }
7595 if test "$ac_cv_type_time_t_bits_macro" = yes; then
7597 printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
7600 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
7602 ac_cv_type_time_t_y2038=yes
7605 if test $ac_cv_type_time_t_y2038 = no; then
7606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7607 /* end confdefs.h. */
7608 #ifdef _USE_32BIT_TIME_T
7609 int ok;
7610 #else
7611 error fail
7612 #endif
7614 _ACEOF
7615 if ac_fn_c_try_compile "$LINENO"
7616 then :
7617 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
7618 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
7619 as_fn_error $? "The 'time_t' type stops working after January 2038.
7620 Remove _USE_32BIT_TIME_T from the compiler flags.
7621 See 'config.log' for more details" "$LINENO" 5; }
7622 else case e in #(
7623 e) # If not cross-compiling and says we should check,
7624 # and 'touch' works with a large timestamp, then evidently wider time_t
7625 # is desired and supported, so fail and ask the builder to fix the
7626 # problem. Otherwise, just warn the builder.
7628 if test "$ac_warned_about_y2038" != yes; then
7629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The 'time_t' type stops working after January 2038,
7630 and this package needs a wider 'time_t' type
7631 if there is any way to access timestamps after that.
7632 Configure with 'CC=\"${CC} -m64\"' perhaps?" >&5
7633 printf "%s\n" "$as_me: WARNING: The 'time_t' type stops working after January 2038,
7634 and this package needs a wider 'time_t' type
7635 if there is any way to access timestamps after that.
7636 Configure with 'CC=\"${CC} -m64\"' perhaps?" >&2;}
7637 ac_warned_about_y2038=yes
7640 esac
7642 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7645 ;; #(
7646 *) :
7648 esac
7659 # Check whether --enable-threads was given.
7660 if test ${enable_threads+y}
7661 then :
7662 enableval=$enable_threads; gl_use_threads=$enableval
7663 else case e in #(
7664 e) if test -n "$gl_use_threads_default"; then
7665 gl_use_threads="$gl_use_threads_default"
7666 else
7667 case "$host_os" in
7668 osf*) gl_use_threads=no ;;
7669 cygwin*)
7670 case `uname -r` in
7671 1.[0-5].*) gl_use_threads=no ;;
7672 *) gl_use_threads=yes ;;
7673 esac
7675 mingw*)
7676 case "$gl_use_winpthreads_default" in
7677 yes) gl_use_threads=posix ;;
7678 no) gl_use_threads=windows ;;
7679 *) gl_use_threads=yes ;;
7680 esac
7682 *) gl_use_threads=yes ;;
7683 esac
7686 esac
7689 if test "$gl_use_threads" = yes \
7690 || test "$gl_use_threads" = isoc \
7691 || test "$gl_use_threads" = posix \
7692 || test "$gl_use_threads" = isoc+posix; then
7693 # For using <threads.h> or <pthread.h>:
7696 if test -z "$gl_anythreadlib_early_done"; then
7697 case "$host_os" in
7698 osf*)
7699 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7700 # groks <pthread.h>. cc also understands the flag -pthread, but
7701 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7702 # 2. putting a flag into CPPFLAGS that has an effect on the linker
7703 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7704 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7705 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7707 esac
7708 # Some systems optimize for single-threaded programs by default, and
7709 # need special flags to disable these optimizations. For example, the
7710 # definition of 'errno' in <errno.h>.
7711 case "$host_os" in
7712 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7713 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7714 esac
7715 gl_anythreadlib_early_done=done
7722 # Pre-early section.
7726 # Code from module absolute-header:
7727 # Code from module accept:
7728 # Code from module accept-tests:
7729 # Code from module acl:
7730 # Code from module acl-permissions:
7731 # Code from module acl-tests:
7732 # Code from module alignof:
7733 # Code from module alignof-tests:
7734 # Code from module alloca:
7735 # Code from module alloca-opt:
7736 # Code from module alloca-opt-tests:
7737 # Code from module announce-gen:
7738 # Code from module arpa_inet:
7739 # Code from module arpa_inet-tests:
7740 # Code from module assert:
7741 # Code from module assert-h:
7742 # Code from module assert-h-tests:
7743 # Code from module attribute:
7744 # Code from module basename-lgpl:
7745 # Code from module binary-io:
7746 # Code from module binary-io-tests:
7747 # Code from module bind:
7748 # Code from module bind-tests:
7749 # Code from module btowc:
7750 # Code from module btowc-tests:
7751 # Code from module builtin-expect:
7752 # Code from module c-ctype:
7753 # Code from module c-ctype-tests:
7754 # Code from module c-strcase:
7755 # Code from module c-strcase-tests:
7756 # Code from module c-strcaseeq:
7757 # Code from module c99:
7758 # Code from module calloc-gnu:
7759 # Code from module calloc-gnu-tests:
7760 # Code from module calloc-posix:
7761 # Code from module canonicalize-lgpl:
7762 # Code from module canonicalize-lgpl-tests:
7763 # Code from module chdir:
7764 # Code from module chdir-tests:
7765 # Code from module clock-time:
7766 # Code from module cloexec:
7767 # Code from module cloexec-tests:
7768 # Code from module close:
7769 # Code from module close-stream:
7770 # Code from module close-tests:
7771 # Code from module closedir:
7772 # Code from module closeout:
7773 # Code from module connect:
7774 # Code from module connect-tests:
7775 # Code from module ctype:
7776 # Code from module ctype-tests:
7777 # Code from module dfa:
7778 # Code from module dfa-tests:
7779 # Code from module dirent:
7780 # Code from module dirent-tests:
7781 # Code from module dirfd:
7782 # Code from module dirname-lgpl:
7783 # Code from module do-release-commit-and-tag:
7784 # Code from module double-slash-root:
7785 # Code from module dup2:
7786 # Code from module dup2-tests:
7787 # Code from module eloop-threshold:
7788 # Code from module environ:
7789 # Code from module environ-tests:
7790 # Code from module errno:
7791 # Code from module errno-tests:
7792 # Code from module error:
7793 # Code from module exitfail:
7794 # Code from module explicit_bzero:
7795 # Code from module explicit_bzero-tests:
7796 # Code from module extensions:
7797 # Code from module extern-inline:
7798 # Code from module fcntl:
7799 # Code from module fcntl-h:
7800 # Code from module fcntl-h-tests:
7801 # Code from module fcntl-tests:
7802 # Code from module fd-hook:
7803 # Code from module fdopen:
7804 # Code from module fdopen-tests:
7805 # Code from module fflush:
7807 # Code from module fflush-tests:
7808 # Code from module fgetc-tests:
7809 # Code from module file-has-acl:
7810 # Code from module file-has-acl-tests:
7811 # Code from module filename:
7812 # Code from module flexmember:
7813 # Code from module fopen:
7814 # Code from module fopen-gnu:
7815 # Code from module fopen-gnu-tests:
7816 # Code from module fopen-tests:
7817 # Code from module fpending:
7818 # Code from module fpending-tests:
7819 # Code from module fpurge:
7820 # Code from module fpurge-tests:
7821 # Code from module fputc-tests:
7822 # Code from module fread-tests:
7823 # Code from module freading:
7824 # Code from module freading-tests:
7825 # Code from module free-posix:
7826 # Code from module free-posix-tests:
7827 # Code from module fseek:
7828 # Code from module fseek-tests:
7829 # Code from module fseeko:
7831 # Code from module fseeko-tests:
7832 # Code from module fstat:
7833 # Code from module fstat-tests:
7834 # Code from module ftell:
7835 # Code from module ftell-tests:
7836 # Code from module ftello:
7838 # Code from module ftello-tests:
7839 # Code from module ftruncate:
7840 # Code from module ftruncate-tests:
7841 # Code from module fwrite-tests:
7842 # Code from module fwriting:
7843 # Code from module fwriting-tests:
7844 # Code from module gen-header:
7845 # Code from module gendocs:
7846 # Code from module getcwd-lgpl:
7847 # Code from module getcwd-lgpl-tests:
7848 # Code from module getdelim:
7849 # Code from module getdelim-tests:
7850 # Code from module getdtablesize:
7851 # Code from module getdtablesize-tests:
7852 # Code from module getpagesize:
7853 # Code from module getprogname:
7854 # Code from module getprogname-tests:
7855 # Code from module getrandom:
7856 # Code from module getrandom-tests:
7857 # Code from module gettext-h:
7858 # Code from module gettimeofday:
7859 # Code from module gettimeofday-tests:
7860 # Code from module git-version-gen:
7861 # Code from module gitlog-to-changelog:
7862 # Code from module glibc-internal/dynarray:
7863 # Code from module glibc-internal/dynarray-tests:
7864 # Code from module glibc-internal/scratch_buffer:
7865 # Code from module glibc-internal/scratch_buffer-tests:
7866 # Code from module gnu-web-doc-update:
7867 # Code from module gnumakefile:
7868 # Code from module gnupload:
7869 # Code from module hard-locale:
7870 # Code from module hard-locale-tests:
7871 # Code from module ialloc:
7872 # Code from module idx:
7873 # Code from module ignore-value:
7874 # Code from module ignore-value-tests:
7875 # Code from module include_next:
7876 # Code from module inet_pton:
7877 # Code from module inet_pton-tests:
7878 # Code from module intprops:
7879 # Code from module intprops-tests:
7880 # Code from module inttypes:
7881 # Code from module inttypes-incomplete:
7882 # Code from module inttypes-tests:
7883 # Code from module ioctl:
7884 # Code from module ioctl-tests:
7885 # Code from module isblank:
7886 # Code from module isblank-tests:
7887 # Code from module langinfo:
7888 # Code from module langinfo-tests:
7889 # Code from module largefile:
7892 # Code from module libc-config:
7893 # Code from module limits-h:
7894 # Code from module limits-h-tests:
7895 # Code from module link:
7896 # Code from module link-tests:
7897 # Code from module listen:
7898 # Code from module listen-tests:
7899 # Code from module localcharset:
7900 # Code from module localcharset-tests:
7901 # Code from module locale:
7902 # Code from module locale-tests:
7903 # Code from module localeconv:
7904 # Code from module localeconv-tests:
7905 # Code from module localename:
7906 # Code from module localename-tests:
7907 # Code from module lock:
7908 # Code from module lseek:
7909 # Code from module lseek-tests:
7910 # Code from module lstat:
7911 # Code from module lstat-tests:
7912 # Code from module maintainer-makefile:
7913 # Code from module malloc-gnu:
7914 # Code from module malloc-gnu-tests:
7915 # Code from module malloc-posix:
7916 # Code from module malloca:
7917 # Code from module malloca-tests:
7918 # Code from module manywarnings:
7919 # Code from module mbrlen:
7920 # Code from module mbrtowc:
7921 # Code from module mbrtowc-tests:
7922 # Code from module mbsinit:
7923 # Code from module mbsinit-tests:
7924 # Code from module mbtowc:
7925 # Code from module memchr:
7926 # Code from module memchr-tests:
7927 # Code from module mempcpy:
7928 # Code from module memrchr:
7929 # Code from module memrchr-tests:
7930 # Code from module minmax:
7931 # Code from module mkdir:
7932 # Code from module mkdir-tests:
7933 # Code from module mkostemp:
7934 # Code from module msvc-inval:
7935 # Code from module msvc-nothrow:
7936 # Code from module multiarch:
7937 # Code from module nanosleep:
7938 # Code from module nanosleep-tests:
7939 # Code from module netinet_in:
7940 # Code from module netinet_in-tests:
7941 # Code from module nl_langinfo:
7942 # Code from module nl_langinfo-tests:
7943 # Code from module nocrash:
7944 # Code from module obstack:
7945 # Code from module open:
7946 # Code from module open-tests:
7947 # Code from module opendir:
7948 # Code from module pathmax:
7949 # Code from module pathmax-tests:
7950 # Code from module perl:
7951 # Code from module perror:
7952 # Code from module perror-tests:
7953 # Code from module pipe-posix:
7954 # Code from module pipe-posix-tests:
7955 # Code from module progname:
7956 # Code from module pselect:
7957 # Code from module pselect-tests:
7958 # Code from module pthread-h:
7961 if test -z "$gl_anythreadlib_early_done"; then
7962 case "$host_os" in
7963 osf*)
7964 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7965 # groks <pthread.h>. cc also understands the flag -pthread, but
7966 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7967 # 2. putting a flag into CPPFLAGS that has an effect on the linker
7968 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7969 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7970 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7972 esac
7973 # Some systems optimize for single-threaded programs by default, and
7974 # need special flags to disable these optimizations. For example, the
7975 # definition of 'errno' in <errno.h>.
7976 case "$host_os" in
7977 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7978 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7979 esac
7980 gl_anythreadlib_early_done=done
7983 # Code from module pthread-h-tests:
7984 # Code from module pthread-thread:
7985 # Code from module pthread-thread-tests:
7986 # Code from module pthread_sigmask:
7987 # Code from module pthread_sigmask-tests:
7988 # Code from module putenv:
7989 # Code from module qcopy-acl:
7990 # Code from module qset-acl:
7991 # Code from module quote:
7992 # Code from module quotearg:
7993 # Code from module quotearg-simple:
7994 # Code from module quotearg-simple-tests:
7995 # Code from module raise:
7996 # Code from module raise-tests:
7997 # Code from module rawmemchr:
7998 # Code from module rawmemchr-tests:
7999 # Code from module read-file:
8000 # Code from module read-file-tests:
8001 # Code from module readdir:
8002 # Code from module readlink:
8003 # Code from module readlink-tests:
8004 # Code from module readme-release:
8005 # Code from module realloc-gnu:
8006 # Code from module realloc-gnu-tests:
8007 # Code from module realloc-posix:
8008 # Code from module reallocarray:
8009 # Code from module reallocarray-tests:
8010 # Code from module regex:
8011 # Code from module regex-tests:
8012 # Code from module rename:
8013 # Code from module rename-tests:
8014 # Code from module rmdir:
8015 # Code from module rmdir-tests:
8016 # Code from module same-inode:
8017 # Code from module sched:
8018 # Code from module sched-tests:
8019 # Code from module select:
8020 # Code from module select-tests:
8021 # Code from module selinux-h:
8022 # Code from module setenv:
8023 # Code from module setenv-tests:
8024 # Code from module setlocale:
8025 # Code from module setlocale-null:
8026 # Code from module setlocale-null-tests:
8027 # Code from module setlocale-tests:
8028 # Code from module setsockopt:
8029 # Code from module setsockopt-tests:
8030 # Code from module signal-h:
8031 # Code from module signal-h-tests:
8032 # Code from module sigprocmask:
8033 # Code from module sigprocmask-tests:
8034 # Code from module sleep:
8035 # Code from module sleep-tests:
8036 # Code from module snippet/_Noreturn:
8037 # Code from module snippet/arg-nonnull:
8038 # Code from module snippet/c++defs:
8039 # Code from module snippet/warn-on-use:
8040 # Code from module socket:
8041 # Code from module socketlib:
8042 # Code from module sockets:
8043 # Code from module sockets-tests:
8044 # Code from module socklen:
8045 # Code from module ssize_t:
8046 # Code from module stat:
8047 # Code from module stat-macros:
8048 # Code from module stat-tests:
8049 # Code from module stat-time:
8050 # Code from module stat-time-tests:
8051 # Code from module std-gnu11:
8052 # Code from module stdalign:
8053 # Code from module stdalign-tests:
8054 # Code from module stdarg:
8058 # Code from module stdarg-tests:
8059 # Code from module stdbool:
8060 # Code from module stdbool-tests:
8061 # Code from module stdckdint:
8062 # Code from module stdckdint-tests:
8063 # Code from module stddef:
8064 # Code from module stddef-tests:
8065 # Code from module stdint:
8066 # Code from module stdint-tests:
8067 # Code from module stdio:
8068 # Code from module stdio-tests:
8069 # Code from module stdlib:
8070 # Code from module stdlib-tests:
8071 # Code from module strdup-posix:
8072 # Code from module streq:
8073 # Code from module strerror:
8074 # Code from module strerror-override:
8075 # Code from module strerror-tests:
8076 # Code from module strerror_r-posix:
8077 # Code from module strerror_r-posix-tests:
8078 # Code from module string:
8079 # Code from module string-tests:
8080 # Code from module strverscmp:
8081 # Code from module strverscmp-tests:
8082 # Code from module symlink:
8083 # Code from module symlink-tests:
8084 # Code from module sys_ioctl:
8085 # Code from module sys_ioctl-tests:
8086 # Code from module sys_random:
8087 # Code from module sys_random-tests:
8088 # Code from module sys_select:
8089 # Code from module sys_select-tests:
8090 # Code from module sys_socket:
8091 # Code from module sys_socket-tests:
8092 # Code from module sys_stat:
8093 # Code from module sys_stat-tests:
8094 # Code from module sys_time:
8095 # Code from module sys_time-tests:
8096 # Code from module sys_types:
8097 # Code from module sys_types-tests:
8098 # Code from module sys_uio:
8099 # Code from module sys_uio-tests:
8100 # Code from module tempname:
8101 # Code from module test-framework-sh:
8102 # Code from module test-framework-sh-tests:
8103 # Code from module thread:
8104 # Code from module thread-optim:
8105 # Code from module thread-tests:
8106 # Code from module threadlib:
8110 # Code from module time:
8111 # Code from module time-tests:
8112 # Code from module unistd:
8113 # Code from module unistd-tests:
8114 # Code from module unlocked-io:
8115 # Code from module unlocked-io-internal:
8116 # Code from module unsetenv:
8117 # Code from module unsetenv-tests:
8118 # Code from module update-copyright:
8119 # Code from module update-copyright-tests:
8120 # Code from module useless-if-before-free:
8121 # Code from module vararrays:
8122 # Code from module vc-list-files:
8123 # Code from module vc-list-files-tests:
8124 # Code from module verify:
8125 # Code from module verify-tests:
8126 # Code from module version-etc:
8127 # Code from module version-etc-fsf:
8128 # Code from module version-etc-tests:
8129 # Code from module vma-iter:
8130 # Code from module warnings:
8131 # Code from module wchar:
8132 # Code from module wchar-tests:
8133 # Code from module wcrtomb:
8134 # Code from module wcrtomb-tests:
8135 # Code from module wctob:
8136 # Code from module wctomb:
8137 # Code from module wctype-h:
8138 # Code from module wctype-h-tests:
8139 # Code from module windows-mutex:
8140 # Code from module windows-once:
8141 # Code from module windows-recmutex:
8142 # Code from module windows-rwlock:
8143 # Code from module windows-thread:
8144 # Code from module windows-tls:
8145 # Code from module xalloc:
8146 # Code from module xalloc-die:
8147 # Code from module xalloc-die-tests:
8148 # Code from module xalloc-oversized:
8159 # Check whether --enable-cross-guesses was given.
8160 if test ${enable_cross_guesses+y}
8161 then :
8162 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
8163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
8164 printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
8165 enableval=conservative
8167 gl_cross_guesses="$enableval"
8168 else case e in #(
8169 e) gl_cross_guesses=conservative ;;
8170 esac
8173 if test $gl_cross_guesses = risky; then
8174 gl_cross_guess_normal="guessing yes"
8175 gl_cross_guess_inverted="guessing no"
8176 else
8177 gl_cross_guess_normal="guessing no"
8178 gl_cross_guess_inverted="guessing yes"
8180 LIBC_FATAL_STDERR_=1
8181 export LIBC_FATAL_STDERR_
8185 gl_need_lib_has_acl=
8186 # Check whether --enable-acl was given.
8187 if test ${enable_acl+y}
8188 then :
8189 enableval=$enable_acl;
8190 else case e in #(
8191 e) enable_acl=auto ;;
8192 esac
8196 ac_func=
8197 for ac_item in $ac_func_c_list
8199 if test $ac_func; then
8200 ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
8201 if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
8202 echo "#define $ac_item 1" >> confdefs.h
8204 ac_func=
8205 else
8206 ac_func=$ac_item
8208 done
8209 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8210 if test "x$ac_cv_type_size_t" = xyes
8211 then :
8213 else case e in #(
8215 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
8217 esac
8220 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8221 # for constant arguments. Useless!
8222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8223 printf %s "checking for working alloca.h... " >&6; }
8224 if test ${ac_cv_working_alloca_h+y}
8225 then :
8226 printf %s "(cached) " >&6
8227 else case e in #(
8228 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8229 /* end confdefs.h. */
8230 #include <alloca.h>
8232 main (void)
8234 char *p = (char *) alloca (2 * sizeof (int));
8235 if (p) return 0;
8237 return 0;
8239 _ACEOF
8240 if ac_fn_c_try_link "$LINENO"
8241 then :
8242 ac_cv_working_alloca_h=yes
8243 else case e in #(
8244 e) ac_cv_working_alloca_h=no ;;
8245 esac
8247 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8248 conftest$ac_exeext conftest.$ac_ext ;;
8249 esac
8251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8252 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
8253 if test $ac_cv_working_alloca_h = yes; then
8255 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
8259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8260 printf %s "checking for alloca... " >&6; }
8261 if test ${ac_cv_func_alloca_works+y}
8262 then :
8263 printf %s "(cached) " >&6
8264 else case e in #(
8265 e) ac_cv_func_alloca_works=$ac_cv_working_alloca_h
8266 if test "$ac_cv_func_alloca_works" != yes
8267 then :
8268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8269 /* end confdefs.h. */
8270 #include <stdlib.h>
8271 #include <stddef.h>
8272 #ifndef alloca
8273 # ifdef __GNUC__
8274 # define alloca __builtin_alloca
8275 # elif defined _MSC_VER
8276 # include <malloc.h>
8277 # define alloca _alloca
8278 # else
8279 # ifdef __cplusplus
8280 extern "C"
8281 # endif
8282 void *alloca (size_t);
8283 # endif
8284 #endif
8287 main (void)
8289 char *p = (char *) alloca (1);
8290 if (p) return 0;
8292 return 0;
8294 _ACEOF
8295 if ac_fn_c_try_link "$LINENO"
8296 then :
8297 ac_cv_func_alloca_works=yes
8299 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8300 conftest$ac_exeext conftest.$ac_ext
8301 fi ;;
8302 esac
8304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8305 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
8307 if test $ac_cv_func_alloca_works = yes; then
8309 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
8311 else
8312 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8313 # that cause trouble. Some versions do not even contain alloca or
8314 # contain a buggy version. If you still want to use their alloca,
8315 # use ar to extract alloca.o from them instead of compiling alloca.c.
8321 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8323 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
8326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8327 printf %s "checking stack direction for C alloca... " >&6; }
8328 if test ${ac_cv_c_stack_direction+y}
8329 then :
8330 printf %s "(cached) " >&6
8331 else case e in #(
8332 e) if test "$cross_compiling" = yes
8333 then :
8334 ac_cv_c_stack_direction=0
8335 else case e in #(
8336 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8337 /* end confdefs.h. */
8338 $ac_includes_default
8340 find_stack_direction (int *addr, int depth)
8342 int dir, dummy = 0;
8343 if (! addr)
8344 addr = &dummy;
8345 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8346 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8347 return dir + dummy;
8351 main (int argc, char **argv)
8353 return find_stack_direction (0, argc + !argv + 20) < 0;
8355 _ACEOF
8356 if ac_fn_c_try_run "$LINENO"
8357 then :
8358 ac_cv_c_stack_direction=1
8359 else case e in #(
8360 e) ac_cv_c_stack_direction=-1 ;;
8361 esac
8363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8364 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
8365 esac
8368 esac
8370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8371 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
8372 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
8379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
8380 printf %s "checking whether the preprocessor supports include_next... " >&6; }
8381 if test ${gl_cv_have_include_next+y}
8382 then :
8383 printf %s "(cached) " >&6
8384 else case e in #(
8385 e) rm -rf conftestd1a conftestd1b conftestd2
8386 mkdir conftestd1a conftestd1b conftestd2
8387 cat <<EOF > conftestd1a/conftest.h
8388 #define DEFINED_IN_CONFTESTD1
8389 #include_next <conftest.h>
8390 #ifdef DEFINED_IN_CONFTESTD2
8391 int foo;
8392 #else
8393 #error "include_next doesn't work"
8394 #endif
8396 cat <<EOF > conftestd1b/conftest.h
8397 #define DEFINED_IN_CONFTESTD1
8398 #include <stdio.h>
8399 #include_next <conftest.h>
8400 #ifdef DEFINED_IN_CONFTESTD2
8401 int foo;
8402 #else
8403 #error "include_next doesn't work"
8404 #endif
8406 cat <<EOF > conftestd2/conftest.h
8407 #ifndef DEFINED_IN_CONFTESTD1
8408 #error "include_next test doesn't work"
8409 #endif
8410 #define DEFINED_IN_CONFTESTD2
8412 gl_save_CPPFLAGS="$CPPFLAGS"
8413 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
8414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8415 /* end confdefs.h. */
8416 #include <conftest.h>
8417 _ACEOF
8418 if ac_fn_c_try_compile "$LINENO"
8419 then :
8420 gl_cv_have_include_next=yes
8421 else case e in #(
8422 e) CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
8423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8424 /* end confdefs.h. */
8425 #include <conftest.h>
8426 _ACEOF
8427 if ac_fn_c_try_compile "$LINENO"
8428 then :
8429 gl_cv_have_include_next=buggy
8430 else case e in #(
8431 e) gl_cv_have_include_next=no ;;
8432 esac
8434 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8436 esac
8438 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8439 CPPFLAGS="$gl_save_CPPFLAGS"
8440 rm -rf conftestd1a conftestd1b conftestd2
8442 esac
8444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
8445 printf "%s\n" "$gl_cv_have_include_next" >&6; }
8446 PRAGMA_SYSTEM_HEADER=
8447 if test $gl_cv_have_include_next = yes; then
8448 INCLUDE_NEXT=include_next
8449 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8450 if test -n "$GCC"; then
8451 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
8453 else
8454 if test $gl_cv_have_include_next = buggy; then
8455 INCLUDE_NEXT=include
8456 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8457 else
8458 INCLUDE_NEXT=include
8459 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
8466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
8467 printf %s "checking whether source code line length is unlimited... " >&6; }
8468 if test ${gl_cv_source_line_length_unlimited+y}
8469 then :
8470 printf %s "(cached) " >&6
8471 else case e in #(
8472 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8473 /* end confdefs.h. */
8475 #ifdef __TANDEM
8476 choke me
8477 #endif
8479 _ACEOF
8480 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8481 $EGREP_TRADITIONAL "choke me" >/dev/null 2>&1
8482 then :
8483 gl_cv_source_line_length_unlimited=no
8484 else case e in #(
8485 e) gl_cv_source_line_length_unlimited=yes ;;
8486 esac
8488 rm -rf conftest*
8491 esac
8493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
8494 printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
8495 if test $gl_cv_source_line_length_unlimited = no; then
8496 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
8497 else
8498 PRAGMA_COLUMNS=
8503 HAVE_BTOWC=1;
8504 HAVE_MBSINIT=1;
8505 HAVE_MBRTOWC=1;
8506 HAVE_MBRLEN=1;
8507 HAVE_MBSRTOWCS=1;
8508 HAVE_MBSNRTOWCS=1;
8509 HAVE_WCRTOMB=1;
8510 HAVE_WCSRTOMBS=1;
8511 HAVE_WCSNRTOMBS=1;
8512 HAVE_WMEMCHR=1;
8513 HAVE_WMEMCMP=1;
8514 HAVE_WMEMCPY=1;
8515 HAVE_WMEMMOVE=1;
8516 HAVE_WMEMPCPY=1;
8517 HAVE_WMEMSET=1;
8518 HAVE_WCSLEN=1;
8519 HAVE_WCSNLEN=1;
8520 HAVE_WCSCPY=1;
8521 HAVE_WCPCPY=1;
8522 HAVE_WCSNCPY=1;
8523 HAVE_WCPNCPY=1;
8524 HAVE_WCSCAT=1;
8525 HAVE_WCSNCAT=1;
8526 HAVE_WCSCMP=1;
8527 HAVE_WCSNCMP=1;
8528 HAVE_WCSCASECMP=1;
8529 HAVE_WCSNCASECMP=1;
8530 HAVE_WCSCOLL=1;
8531 HAVE_WCSXFRM=1;
8532 HAVE_WCSDUP=1;
8533 HAVE_WCSCHR=1;
8534 HAVE_WCSRCHR=1;
8535 HAVE_WCSCSPN=1;
8536 HAVE_WCSSPN=1;
8537 HAVE_WCSPBRK=1;
8538 HAVE_WCSSTR=1;
8539 HAVE_WCSTOK=1;
8540 HAVE_WCSWIDTH=1;
8541 HAVE_WCSFTIME=1;
8542 HAVE_DECL_WCTOB=1;
8543 HAVE_DECL_WCSDUP=1;
8544 HAVE_DECL_WCWIDTH=1;
8545 REPLACE_MBSTATE_T=0;
8546 REPLACE_BTOWC=0;
8547 REPLACE_WCTOB=0;
8548 REPLACE_MBSINIT=0;
8549 REPLACE_MBRTOWC=0;
8550 REPLACE_MBRLEN=0;
8551 REPLACE_MBSRTOWCS=0;
8552 REPLACE_MBSNRTOWCS=0;
8553 REPLACE_WCRTOMB=0;
8554 REPLACE_WCSRTOMBS=0;
8555 REPLACE_WCSNRTOMBS=0;
8556 REPLACE_WCWIDTH=0;
8557 REPLACE_WCSWIDTH=0;
8558 REPLACE_WCSFTIME=0;
8559 REPLACE_WCSTOK=0;
8563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8564 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8565 if test ${gl_cv_header_wchar_h_correct_inline+y}
8566 then :
8567 printf %s "(cached) " >&6
8568 else case e in #(
8569 e) gl_cv_header_wchar_h_correct_inline=yes
8570 case "$host_os" in
8571 *-gnu* | gnu*)
8572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8573 /* end confdefs.h. */
8576 #define wcstod renamed_wcstod
8577 #include <wchar.h>
8578 extern int zero (void);
8579 int main () { return zero(); }
8581 _ACEOF
8582 save_ac_compile="$ac_compile"
8583 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
8584 if echo '#include "conftest.c"' >conftest1.c \
8585 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8586 (eval $ac_compile) 2>&5
8587 ac_status=$?
8588 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8589 test $ac_status = 0; }; then
8590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8591 /* end confdefs.h. */
8594 #define wcstod renamed_wcstod
8595 #include <wchar.h>
8596 int zero (void) { return 0; }
8598 _ACEOF
8599 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
8600 if echo '#include "conftest.c"' >conftest2.c \
8601 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8602 (eval $ac_compile) 2>&5
8603 ac_status=$?
8604 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8605 test $ac_status = 0; }; then
8606 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8608 else
8609 gl_cv_header_wchar_h_correct_inline=no
8613 ac_compile="$save_ac_compile"
8614 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
8616 esac
8618 esac
8620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8621 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
8622 if test $gl_cv_header_wchar_h_correct_inline = no; then
8623 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8624 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8625 C99 mode. You have four options:
8626 - Add the flag -fgnu89-inline to CC and reconfigure, or
8627 - Fix your include files, using parts of
8628 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8629 - Use a gcc version older than 4.3, or
8630 - Don't use the flags -std=c99 or -std=gnu99.
8631 Configuration aborted." "$LINENO" 5
8636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8637 printf %s "checking for nl_langinfo and CODESET... " >&6; }
8638 if test ${am_cv_langinfo_codeset+y}
8639 then :
8640 printf %s "(cached) " >&6
8641 else case e in #(
8642 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8643 /* end confdefs.h. */
8644 #include <langinfo.h>
8646 main (void)
8648 char* cs = nl_langinfo(CODESET); return !cs;
8650 return 0;
8652 _ACEOF
8653 if ac_fn_c_try_link "$LINENO"
8654 then :
8655 am_cv_langinfo_codeset=yes
8656 else case e in #(
8657 e) am_cv_langinfo_codeset=no ;;
8658 esac
8660 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8661 conftest$ac_exeext conftest.$ac_ext
8663 esac
8665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8666 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
8667 if test $am_cv_langinfo_codeset = yes; then
8669 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8677 printf %s "checking for a traditional french locale... " >&6; }
8678 if test ${gt_cv_locale_fr+y}
8679 then :
8680 printf %s "(cached) " >&6
8681 else case e in #(
8683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8684 /* end confdefs.h. */
8686 #include <locale.h>
8687 #include <time.h>
8688 #if HAVE_LANGINFO_CODESET
8689 # include <langinfo.h>
8690 #endif
8691 #include <stdlib.h>
8692 #include <string.h>
8693 struct tm t;
8694 char buf[16];
8695 int main () {
8696 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
8697 imitates locale dependent behaviour by looking at the environment
8698 variables, and all locales use the UTF-8 encoding. */
8699 #if defined __BEOS__ || defined __HAIKU__
8700 return 1;
8701 #else
8702 /* Check whether the given locale name is recognized by the system. */
8703 # if defined _WIN32 && !defined __CYGWIN__
8704 /* On native Windows, setlocale(category, "") looks at the system settings,
8705 not at the environment variables. Also, when an encoding suffix such
8706 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8707 category of the locale to "C". */
8708 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8709 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8710 return 1;
8711 # else
8712 if (setlocale (LC_ALL, "") == NULL) return 1;
8713 # endif
8714 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8715 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8716 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8717 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8718 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8719 some unit tests fail.
8720 On MirBSD 10, when an unsupported locale is specified, setlocale()
8721 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
8722 # if HAVE_LANGINFO_CODESET
8724 const char *cs = nl_langinfo (CODESET);
8725 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8726 || strcmp (cs, "UTF-8") == 0)
8727 return 1;
8729 # endif
8730 # ifdef __CYGWIN__
8731 /* On Cygwin, avoid locale names without encoding suffix, because the
8732 locale_charset() function relies on the encoding suffix. Note that
8733 LC_ALL is set on the command line. */
8734 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8735 # endif
8736 /* Check whether in the abbreviation of the second month, the second
8737 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8738 one byte long. This excludes the UTF-8 encoding. */
8739 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8740 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8741 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8742 /* Check whether the decimal separator is a comma.
8743 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8744 are nl_langinfo(RADIXCHAR) are both ".". */
8745 if (localeconv () ->decimal_point[0] != ',') return 1;
8746 # endif
8747 return 0;
8748 #endif
8751 _ACEOF
8752 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8753 (eval $ac_link) 2>&5
8754 ac_status=$?
8755 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8756 test $ac_status = 0; } && test -s conftest$ac_exeext; then
8757 case "$host_os" in
8758 # Handle native Windows specially, because there setlocale() interprets
8759 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8760 # "fr" or "fra" as "French" or "French_France.1252",
8761 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8762 # "ja" as "Japanese" or "Japanese_Japan.932",
8763 # and similar.
8764 mingw*)
8765 # Test for the native Windows locale name.
8766 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8767 gt_cv_locale_fr=French_France.1252
8768 else
8769 # None found.
8770 gt_cv_locale_fr=none
8774 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8775 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8776 # configure script would override the LC_ALL setting. Likewise for
8777 # LC_CTYPE, which is also set at the beginning of the configure script.
8778 # Test for the usual locale name.
8779 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8780 gt_cv_locale_fr=fr_FR
8781 else
8782 # Test for the locale name with explicit encoding suffix.
8783 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8784 gt_cv_locale_fr=fr_FR.ISO-8859-1
8785 else
8786 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8787 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8788 gt_cv_locale_fr=fr_FR.ISO8859-1
8789 else
8790 # Test for the HP-UX locale name.
8791 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8792 gt_cv_locale_fr=fr_FR.iso88591
8793 else
8794 # Test for the Solaris 7 locale name.
8795 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8796 gt_cv_locale_fr=fr
8797 else
8798 # None found.
8799 gt_cv_locale_fr=none
8806 esac
8808 rm -fr conftest*
8810 esac
8812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8813 printf "%s\n" "$gt_cv_locale_fr" >&6; }
8814 LOCALE_FR=$gt_cv_locale_fr
8819 GL_GNULIB_BTOWC=0
8823 GL_GNULIB_WCTOB=0
8827 GL_GNULIB_MBSINIT=0
8831 GL_GNULIB_MBRTOWC=0
8835 GL_GNULIB_MBRLEN=0
8839 GL_GNULIB_MBSRTOWCS=0
8843 GL_GNULIB_MBSNRTOWCS=0
8847 GL_GNULIB_WCRTOMB=0
8851 GL_GNULIB_WCSRTOMBS=0
8855 GL_GNULIB_WCSNRTOMBS=0
8859 GL_GNULIB_WCWIDTH=0
8863 GL_GNULIB_WMEMCHR=0
8867 GL_GNULIB_WMEMCMP=0
8871 GL_GNULIB_WMEMCPY=0
8875 GL_GNULIB_WMEMMOVE=0
8879 GL_GNULIB_WMEMPCPY=0
8883 GL_GNULIB_WMEMSET=0
8887 GL_GNULIB_WCSLEN=0
8891 GL_GNULIB_WCSNLEN=0
8895 GL_GNULIB_WCSCPY=0
8899 GL_GNULIB_WCPCPY=0
8903 GL_GNULIB_WCSNCPY=0
8907 GL_GNULIB_WCPNCPY=0
8911 GL_GNULIB_WCSCAT=0
8915 GL_GNULIB_WCSNCAT=0
8919 GL_GNULIB_WCSCMP=0
8923 GL_GNULIB_WCSNCMP=0
8927 GL_GNULIB_WCSCASECMP=0
8931 GL_GNULIB_WCSNCASECMP=0
8935 GL_GNULIB_WCSCOLL=0
8939 GL_GNULIB_WCSXFRM=0
8943 GL_GNULIB_WCSDUP=0
8947 GL_GNULIB_WCSCHR=0
8951 GL_GNULIB_WCSRCHR=0
8955 GL_GNULIB_WCSCSPN=0
8959 GL_GNULIB_WCSSPN=0
8963 GL_GNULIB_WCSPBRK=0
8967 GL_GNULIB_WCSSTR=0
8971 GL_GNULIB_WCSTOK=0
8975 GL_GNULIB_WCSWIDTH=0
8979 GL_GNULIB_WCSFTIME=0
8983 GL_GNULIB_MDA_WCSDUP=1
8989 GL_GNULIB__EXIT=0
8993 GL_GNULIB_ALIGNED_ALLOC=0
8997 GL_GNULIB_ATOLL=0
9001 GL_GNULIB_CALLOC_GNU=0
9005 GL_GNULIB_CALLOC_POSIX=0
9009 GL_GNULIB_CANONICALIZE_FILE_NAME=0
9013 GL_GNULIB_FREE_POSIX=0
9017 GL_GNULIB_GETLOADAVG=0
9021 GL_GNULIB_GETSUBOPT=0
9025 GL_GNULIB_GRANTPT=0
9029 GL_GNULIB_MALLOC_GNU=0
9033 GL_GNULIB_MALLOC_POSIX=0
9037 GL_GNULIB_MBTOWC=0
9041 GL_GNULIB_MKDTEMP=0
9045 GL_GNULIB_MKOSTEMP=0
9049 GL_GNULIB_MKOSTEMPS=0
9053 GL_GNULIB_MKSTEMP=0
9057 GL_GNULIB_MKSTEMPS=0
9061 GL_GNULIB_POSIX_MEMALIGN=0
9065 GL_GNULIB_POSIX_OPENPT=0
9069 GL_GNULIB_PTSNAME=0
9073 GL_GNULIB_PTSNAME_R=0
9077 GL_GNULIB_PUTENV=0
9081 GL_GNULIB_QSORT_R=0
9085 GL_GNULIB_RANDOM=0
9089 GL_GNULIB_RANDOM_R=0
9093 GL_GNULIB_REALLOCARRAY=0
9097 GL_GNULIB_REALLOC_GNU=0
9101 GL_GNULIB_REALLOC_POSIX=0
9105 GL_GNULIB_REALPATH=0
9109 GL_GNULIB_RPMATCH=0
9113 GL_GNULIB_SECURE_GETENV=0
9117 GL_GNULIB_SETENV=0
9121 GL_GNULIB_STRTOD=0
9125 GL_GNULIB_STRTOL=0
9129 GL_GNULIB_STRTOLD=0
9133 GL_GNULIB_STRTOLL=0
9137 GL_GNULIB_STRTOUL=0
9141 GL_GNULIB_STRTOULL=0
9145 GL_GNULIB_SYSTEM_POSIX=0
9149 GL_GNULIB_UNLOCKPT=0
9153 GL_GNULIB_UNSETENV=0
9157 GL_GNULIB_WCTOMB=0
9161 GL_GNULIB_MDA_ECVT=1
9165 GL_GNULIB_MDA_FCVT=1
9169 GL_GNULIB_MDA_GCVT=1
9173 GL_GNULIB_MDA_MKTEMP=1
9177 GL_GNULIB_MDA_PUTENV=1
9182 HAVE__EXIT=1;
9183 HAVE_ALIGNED_ALLOC=1;
9184 HAVE_ATOLL=1;
9185 HAVE_CANONICALIZE_FILE_NAME=1;
9186 HAVE_DECL_ECVT=1;
9187 HAVE_DECL_FCVT=1;
9188 HAVE_DECL_GCVT=1;
9189 HAVE_DECL_GETLOADAVG=1;
9190 HAVE_GETSUBOPT=1;
9191 HAVE_GRANTPT=1;
9192 HAVE_INITSTATE=1;
9193 HAVE_DECL_INITSTATE=1;
9194 HAVE_MBTOWC=1;
9195 HAVE_MKDTEMP=1;
9196 HAVE_MKOSTEMP=1;
9197 HAVE_MKOSTEMPS=1;
9198 HAVE_MKSTEMP=1;
9199 HAVE_MKSTEMPS=1;
9200 HAVE_POSIX_MEMALIGN=1;
9201 HAVE_POSIX_OPENPT=1;
9202 HAVE_PTSNAME=1;
9203 HAVE_PTSNAME_R=1;
9204 HAVE_QSORT_R=1;
9205 HAVE_RANDOM=1;
9206 HAVE_RANDOM_H=1;
9207 HAVE_RANDOM_R=1;
9208 HAVE_REALLOCARRAY=1;
9209 HAVE_REALPATH=1;
9210 HAVE_RPMATCH=1;
9211 HAVE_SECURE_GETENV=1;
9212 HAVE_SETENV=1;
9213 HAVE_DECL_SETENV=1;
9214 HAVE_SETSTATE=1;
9215 HAVE_DECL_SETSTATE=1;
9216 HAVE_STRTOD=1;
9217 HAVE_STRTOL=1;
9218 HAVE_STRTOLD=1;
9219 HAVE_STRTOLL=1;
9220 HAVE_STRTOUL=1;
9221 HAVE_STRTOULL=1;
9222 HAVE_STRUCT_RANDOM_DATA=1;
9223 HAVE_SYS_LOADAVG_H=0;
9224 HAVE_UNLOCKPT=1;
9225 HAVE_DECL_UNSETENV=1;
9226 REPLACE_ALIGNED_ALLOC=0;
9227 REPLACE_CALLOC_FOR_CALLOC_GNU=0;
9228 REPLACE_CALLOC_FOR_CALLOC_POSIX=0;
9229 REPLACE_CANONICALIZE_FILE_NAME=0;
9230 REPLACE_FREE=0;
9231 REPLACE_INITSTATE=0;
9232 REPLACE_MALLOC_FOR_MALLOC_GNU=0;
9233 REPLACE_MALLOC_FOR_MALLOC_POSIX=0;
9234 REPLACE_MBTOWC=0;
9235 REPLACE_MKSTEMP=0;
9236 REPLACE_POSIX_MEMALIGN=0;
9237 REPLACE_PTSNAME=0;
9238 REPLACE_PTSNAME_R=0;
9239 REPLACE_PUTENV=0;
9240 REPLACE_QSORT_R=0;
9241 REPLACE_RANDOM=0;
9242 REPLACE_RANDOM_R=0;
9243 REPLACE_REALLOC_FOR_REALLOC_GNU=0;
9244 REPLACE_REALLOC_FOR_REALLOC_POSIX=0;
9245 REPLACE_REALLOCARRAY=0;
9246 REPLACE_REALPATH=0;
9247 REPLACE_SETENV=0;
9248 REPLACE_SETSTATE=0;
9249 REPLACE_STRTOD=0;
9250 REPLACE_STRTOL=0;
9251 REPLACE_STRTOLD=0;
9252 REPLACE_STRTOLL=0;
9253 REPLACE_STRTOUL=0;
9254 REPLACE_STRTOULL=0;
9255 REPLACE_UNSETENV=0;
9256 REPLACE_WCTOMB=0;
9259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
9260 printf %s "checking whether malloc is ptrdiff_t safe... " >&6; }
9261 if test ${gl_cv_malloc_ptrdiff+y}
9262 then :
9263 printf %s "(cached) " >&6
9264 else case e in #(
9265 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9266 /* end confdefs.h. */
9267 #include <stdint.h>
9270 main (void)
9272 /* 64-bit ptrdiff_t is so wide that no practical platform
9273 can exceed it. */
9274 #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
9276 /* On rare machines where size_t fits in ptrdiff_t there
9277 is no problem. */
9278 #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
9280 /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
9281 bounds even on 32-bit platforms. We don't know which
9282 non-glibc systems are safe. */
9283 #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
9285 #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
9286 return 0;
9287 #else
9288 #error "malloc might not be ptrdiff_t safe"
9289 syntax error
9290 #endif
9293 return 0;
9295 _ACEOF
9296 if ac_fn_c_try_compile "$LINENO"
9297 then :
9298 gl_cv_malloc_ptrdiff=yes
9299 else case e in #(
9300 e) gl_cv_malloc_ptrdiff=no ;;
9301 esac
9303 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9305 esac
9307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
9308 printf "%s\n" "$gl_cv_malloc_ptrdiff" >&6; }
9313 test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
9317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
9318 printf %s "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
9319 if test ${gl_cv_func_malloc_posix+y}
9320 then :
9321 printf %s "(cached) " >&6
9322 else case e in #(
9324 case "$host_os" in
9325 mingw*)
9326 gl_cv_func_malloc_posix=no ;;
9327 irix* | solaris*)
9329 gl_cv_func_malloc_posix=no ;;
9331 gl_cv_func_malloc_posix=yes ;;
9332 esac
9334 esac
9336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
9337 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
9343 if test "$gl_cv_func_malloc_posix" = yes; then
9345 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
9347 else
9348 REPLACE_MALLOC_FOR_MALLOC_POSIX=1
9354 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
9355 REPLACE_CALLOC_FOR_CALLOC_POSIX=1
9359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
9360 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
9361 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
9362 then :
9363 printf %s "(cached) " >&6
9364 else case e in #(
9365 e) rm -f conftest.sym conftest.file
9366 echo >conftest.file
9367 if test "$cross_compiling" = yes
9368 then :
9369 case "$host_os" in
9370 linux-* | linux)
9371 # Guess yes on Linux systems.
9372 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9373 *-gnu* | gnu*)
9374 # Guess yes on glibc systems.
9375 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9376 mingw*)
9377 # Guess no on native Windows.
9378 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9380 # If we don't know, obey --enable-cross-guesses.
9381 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
9382 esac
9384 else case e in #(
9385 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9386 /* end confdefs.h. */
9387 $ac_includes_default
9389 main (void)
9391 struct stat sbuf;
9392 if (symlink ("conftest.file", "conftest.sym") != 0)
9393 return 1;
9394 /* Linux will dereference the symlink and fail, as required by
9395 POSIX. That is better in the sense that it means we will not
9396 have to compile and use the lstat wrapper. */
9397 return lstat ("conftest.sym/", &sbuf) == 0;
9400 return 0;
9402 _ACEOF
9403 if ac_fn_c_try_run "$LINENO"
9404 then :
9405 gl_cv_func_lstat_dereferences_slashed_symlink=yes
9406 else case e in #(
9407 e) gl_cv_func_lstat_dereferences_slashed_symlink=no ;;
9408 esac
9410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9411 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
9412 esac
9415 rm -f conftest.sym conftest.file
9417 esac
9419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9420 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9421 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9422 *yes)
9424 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
9427 esac
9433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9434 printf %s "checking whether // is distinct from /... " >&6; }
9435 if test ${gl_cv_double_slash_root+y}
9436 then :
9437 printf %s "(cached) " >&6
9438 else case e in #(
9439 e) if test x"$cross_compiling" = xyes ; then
9440 # When cross-compiling, there is no way to tell whether // is special
9441 # short of a list of hosts. However, the only known hosts to date
9442 # that have a distinct // are Apollo DomainOS (too old to port to),
9443 # Cygwin, and z/OS. If anyone knows of another system for which // has
9444 # special semantics and is distinct from /, please report it to
9445 # <bug-gnulib@gnu.org>.
9446 case $host in
9447 *-cygwin | i370-ibm-openedition)
9448 gl_cv_double_slash_root=yes ;;
9450 # Be optimistic and assume that / and // are the same when we
9451 # don't know.
9452 gl_cv_double_slash_root='unknown, assuming no' ;;
9453 esac
9454 else
9455 set x `ls -di / // 2>/dev/null`
9456 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9457 gl_cv_double_slash_root=no
9458 else
9459 gl_cv_double_slash_root=yes
9461 fi ;;
9462 esac
9464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9465 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
9466 if test "$gl_cv_double_slash_root" = yes; then
9468 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
9477 printf %s "checking whether realpath works... " >&6; }
9478 if test ${gl_cv_func_realpath_works+y}
9479 then :
9480 printf %s "(cached) " >&6
9481 else case e in #(
9483 rm -rf conftest.a conftest.d
9484 touch conftest.a
9485 # Assume that if we have lstat, we can also check symlinks.
9486 if test $ac_cv_func_lstat = yes; then
9487 ln -s conftest.a conftest.l
9489 mkdir conftest.d
9490 if test "$cross_compiling" = yes
9491 then :
9492 case "$host_os" in
9493 # Guess yes on glibc systems.
9494 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
9495 # Guess 'nearly' on musl systems.
9496 *-musl*) gl_cv_func_realpath_works="guessing nearly" ;;
9497 # Guess no on Cygwin.
9498 cygwin*) gl_cv_func_realpath_works="guessing no" ;;
9499 # Guess no on native Windows.
9500 mingw*) gl_cv_func_realpath_works="guessing no" ;;
9501 # If we don't know, obey --enable-cross-guesses.
9502 *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
9503 esac
9505 else case e in #(
9506 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9507 /* end confdefs.h. */
9511 #include <stdlib.h>
9512 #if defined __MACH__ && defined __APPLE__
9513 /* Avoid a crash on Mac OS X. */
9514 #include <mach/mach.h>
9515 #include <mach/mach_error.h>
9516 #include <mach/thread_status.h>
9517 #include <mach/exception.h>
9518 #include <mach/task.h>
9519 #include <pthread.h>
9520 /* The exception port on which our thread listens. */
9521 static mach_port_t our_exception_port;
9522 /* The main function of the thread listening for exceptions of type
9523 EXC_BAD_ACCESS. */
9524 static void *
9525 mach_exception_thread (void *arg)
9527 /* Buffer for a message to be received. */
9528 struct {
9529 mach_msg_header_t head;
9530 mach_msg_body_t msgh_body;
9531 char data[1024];
9532 } msg;
9533 mach_msg_return_t retval;
9534 /* Wait for a message on the exception port. */
9535 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9536 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9537 if (retval != MACH_MSG_SUCCESS)
9538 abort ();
9539 exit (1);
9541 static void
9542 nocrash_init (void)
9544 mach_port_t self = mach_task_self ();
9545 /* Allocate a port on which the thread shall listen for exceptions. */
9546 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9547 == KERN_SUCCESS) {
9548 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
9549 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9550 MACH_MSG_TYPE_MAKE_SEND)
9551 == KERN_SUCCESS) {
9552 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
9553 for us. */
9554 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9555 /* Create the thread listening on the exception port. */
9556 pthread_attr_t attr;
9557 pthread_t thread;
9558 if (pthread_attr_init (&attr) == 0
9559 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9560 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9561 pthread_attr_destroy (&attr);
9562 /* Replace the exception port info for these exceptions with our own.
9563 Note that we replace the exception port for the entire task, not only
9564 for a particular thread. This has the effect that when our exception
9565 port gets the message, the thread specific exception port has already
9566 been asked, and we don't need to bother about it.
9567 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
9568 task_set_exception_ports (self, mask, our_exception_port,
9569 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9574 #elif defined _WIN32 && ! defined __CYGWIN__
9575 /* Avoid a crash on native Windows. */
9576 #define WIN32_LEAN_AND_MEAN
9577 #include <windows.h>
9578 #include <winerror.h>
9579 static LONG WINAPI
9580 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9582 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9584 case EXCEPTION_ACCESS_VIOLATION:
9585 case EXCEPTION_IN_PAGE_ERROR:
9586 case EXCEPTION_STACK_OVERFLOW:
9587 case EXCEPTION_GUARD_PAGE:
9588 case EXCEPTION_PRIV_INSTRUCTION:
9589 case EXCEPTION_ILLEGAL_INSTRUCTION:
9590 case EXCEPTION_DATATYPE_MISALIGNMENT:
9591 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9592 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9593 exit (1);
9595 return EXCEPTION_CONTINUE_SEARCH;
9597 static void
9598 nocrash_init (void)
9600 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9602 #else
9603 /* Avoid a crash on POSIX systems. */
9604 #include <signal.h>
9605 #include <unistd.h>
9606 /* A POSIX signal handler. */
9607 static void
9608 exception_handler (int sig)
9610 _exit (1);
9612 static void
9613 nocrash_init (void)
9615 #ifdef SIGSEGV
9616 signal (SIGSEGV, exception_handler);
9617 #endif
9618 #ifdef SIGBUS
9619 signal (SIGBUS, exception_handler);
9620 #endif
9622 #endif
9624 #include <errno.h>
9625 #include <stdlib.h>
9626 #include <string.h>
9629 main (void)
9632 int result = 0;
9633 /* This test fails on Solaris 10. */
9635 char *name = realpath ("conftest.a", NULL);
9636 if (!(name && *name == '/'))
9637 result |= 1;
9638 free (name);
9640 /* This test fails on older versions of Cygwin. */
9642 char *name = realpath ("conftest.b/../conftest.a", NULL);
9643 if (name != NULL)
9644 result |= 2;
9645 free (name);
9647 /* This test fails on Cygwin 2.9. */
9648 #if HAVE_LSTAT
9650 char *name = realpath ("conftest.l/../conftest.a", NULL);
9651 if (name != NULL || errno != ENOTDIR)
9652 result |= 4;
9653 free (name);
9655 #endif
9656 /* This test fails on Mac OS X 10.13, OpenBSD 6.0. */
9658 char *name = realpath ("conftest.a/", NULL);
9659 if (name != NULL)
9660 result |= 8;
9661 free (name);
9663 /* This test fails on AIX 7, Solaris 10. */
9665 char *name1 = realpath (".", NULL);
9666 char *name2 = realpath ("conftest.d//./..", NULL);
9667 if (! name1 || ! name2 || strcmp (name1, name2))
9668 result |= 16;
9669 free (name1);
9670 free (name2);
9672 #ifdef __linux__
9673 /* On Linux, // is the same as /. See also double-slash-root.m4.
9674 realpath() should respect this.
9675 This test fails on musl libc 1.2.2. */
9677 char *name = realpath ("//", NULL);
9678 if (! name || strcmp (name, "/"))
9679 result |= 32;
9680 free (name);
9682 #endif
9683 return result;
9686 return 0;
9689 _ACEOF
9690 if ac_fn_c_try_run "$LINENO"
9691 then :
9692 gl_cv_func_realpath_works=yes
9693 else case e in #(
9694 e) case $? in
9695 32) gl_cv_func_realpath_works=nearly ;;
9696 *) gl_cv_func_realpath_works=no ;;
9697 esac
9699 esac
9701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9702 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
9703 esac
9706 rm -rf conftest.a conftest.l conftest.d
9708 esac
9710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
9711 printf "%s\n" "$gl_cv_func_realpath_works" >&6; }
9712 case "$gl_cv_func_realpath_works" in
9713 *yes)
9715 printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
9718 *nearly)
9720 printf "%s\n" "#define FUNC_REALPATH_NEARLY_WORKS 1" >>confdefs.h
9723 esac
9732 case "$host_os" in
9733 mingw*) ;;
9734 *) ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
9735 if test "x$ac_cv_func_getcwd" = xyes
9736 then :
9737 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
9741 esac
9749 GL_GNULIB_ACCESS=0
9753 GL_GNULIB_CHDIR=0
9757 GL_GNULIB_CHOWN=0
9761 GL_GNULIB_CLOSE=0
9765 GL_GNULIB_COPY_FILE_RANGE=0
9769 GL_GNULIB_DUP=0
9773 GL_GNULIB_DUP2=0
9777 GL_GNULIB_DUP3=0
9781 GL_GNULIB_ENVIRON=0
9785 GL_GNULIB_EUIDACCESS=0
9789 GL_GNULIB_EXECL=0
9793 GL_GNULIB_EXECLE=0
9797 GL_GNULIB_EXECLP=0
9801 GL_GNULIB_EXECV=0
9805 GL_GNULIB_EXECVE=0
9809 GL_GNULIB_EXECVP=0
9813 GL_GNULIB_EXECVPE=0
9817 GL_GNULIB_FACCESSAT=0
9821 GL_GNULIB_FCHDIR=0
9825 GL_GNULIB_FCHOWNAT=0
9829 GL_GNULIB_FDATASYNC=0
9833 GL_GNULIB_FSYNC=0
9837 GL_GNULIB_FTRUNCATE=0
9841 GL_GNULIB_GETCWD=0
9845 GL_GNULIB_GETDOMAINNAME=0
9849 GL_GNULIB_GETDTABLESIZE=0
9853 GL_GNULIB_GETENTROPY=0
9857 GL_GNULIB_GETGROUPS=0
9861 GL_GNULIB_GETHOSTNAME=0
9865 GL_GNULIB_GETLOGIN=0
9869 GL_GNULIB_GETLOGIN_R=0
9873 GL_GNULIB_GETOPT_POSIX=0
9877 GL_GNULIB_GETPAGESIZE=0
9881 GL_GNULIB_GETPASS=0
9885 GL_GNULIB_GETPASS_GNU=0
9889 GL_GNULIB_GETUSERSHELL=0
9893 GL_GNULIB_GROUP_MEMBER=0
9897 GL_GNULIB_ISATTY=0
9901 GL_GNULIB_LCHOWN=0
9905 GL_GNULIB_LINK=0
9909 GL_GNULIB_LINKAT=0
9913 GL_GNULIB_LSEEK=0
9917 GL_GNULIB_PIPE=0
9921 GL_GNULIB_PIPE2=0
9925 GL_GNULIB_PREAD=0
9929 GL_GNULIB_PWRITE=0
9933 GL_GNULIB_READ=0
9937 GL_GNULIB_READLINK=0
9941 GL_GNULIB_READLINKAT=0
9945 GL_GNULIB_RMDIR=0
9949 GL_GNULIB_SETHOSTNAME=0
9953 GL_GNULIB_SLEEP=0
9957 GL_GNULIB_SYMLINK=0
9961 GL_GNULIB_SYMLINKAT=0
9965 GL_GNULIB_TRUNCATE=0
9969 GL_GNULIB_TTYNAME_R=0
9973 GL_GNULIB_UNISTD_H_GETOPT=0
9977 GL_GNULIB_UNISTD_H_NONBLOCKING=0
9981 GL_GNULIB_UNISTD_H_SIGPIPE=0
9985 GL_GNULIB_UNLINK=0
9989 GL_GNULIB_UNLINKAT=0
9993 GL_GNULIB_USLEEP=0
9997 GL_GNULIB_WRITE=0
10001 GL_GNULIB_MDA_ACCESS=1
10005 GL_GNULIB_MDA_CHDIR=1
10009 GL_GNULIB_MDA_CLOSE=1
10013 GL_GNULIB_MDA_DUP=1
10017 GL_GNULIB_MDA_DUP2=1
10021 GL_GNULIB_MDA_EXECL=1
10025 GL_GNULIB_MDA_EXECLE=1
10029 GL_GNULIB_MDA_EXECLP=1
10033 GL_GNULIB_MDA_EXECV=1
10037 GL_GNULIB_MDA_EXECVE=1
10041 GL_GNULIB_MDA_EXECVP=1
10045 GL_GNULIB_MDA_EXECVPE=1
10049 GL_GNULIB_MDA_GETCWD=1
10053 GL_GNULIB_MDA_GETPID=1
10057 GL_GNULIB_MDA_ISATTY=1
10061 GL_GNULIB_MDA_LSEEK=1
10065 GL_GNULIB_MDA_READ=1
10069 GL_GNULIB_MDA_RMDIR=1
10073 GL_GNULIB_MDA_SWAB=1
10077 GL_GNULIB_MDA_UNLINK=1
10081 GL_GNULIB_MDA_WRITE=1
10086 HAVE_CHOWN=1;
10087 HAVE_COPY_FILE_RANGE=1;
10088 HAVE_DUP3=1;
10089 HAVE_EUIDACCESS=1;
10090 HAVE_EXECVPE=1;
10091 HAVE_FACCESSAT=1;
10092 HAVE_FCHDIR=1;
10093 HAVE_FCHOWNAT=1;
10094 HAVE_FDATASYNC=1;
10095 HAVE_FSYNC=1;
10096 HAVE_FTRUNCATE=1;
10097 HAVE_GETDTABLESIZE=1;
10098 HAVE_GETENTROPY=1;
10099 HAVE_GETGROUPS=1;
10100 HAVE_GETHOSTNAME=1;
10101 HAVE_GETLOGIN=1;
10102 HAVE_GETPAGESIZE=1;
10103 HAVE_GETPASS=1;
10104 HAVE_GROUP_MEMBER=1;
10105 HAVE_LCHOWN=1;
10106 HAVE_LINK=1;
10107 HAVE_LINKAT=1;
10108 HAVE_PIPE=1;
10109 HAVE_PIPE2=1;
10110 HAVE_PREAD=1;
10111 HAVE_PWRITE=1;
10112 HAVE_READLINK=1;
10113 HAVE_READLINKAT=1;
10114 HAVE_SETHOSTNAME=1;
10115 HAVE_SLEEP=1;
10116 HAVE_SYMLINK=1;
10117 HAVE_SYMLINKAT=1;
10118 HAVE_UNLINKAT=1;
10119 HAVE_USLEEP=1;
10120 HAVE_DECL_ENVIRON=1;
10121 HAVE_DECL_EXECVPE=1;
10122 HAVE_DECL_FCHDIR=1;
10123 HAVE_DECL_FDATASYNC=1;
10124 HAVE_DECL_GETDOMAINNAME=1;
10125 HAVE_DECL_GETLOGIN=1;
10126 HAVE_DECL_GETLOGIN_R=1;
10127 HAVE_DECL_GETPAGESIZE=1;
10128 HAVE_DECL_GETUSERSHELL=1;
10129 HAVE_DECL_SETHOSTNAME=1;
10130 HAVE_DECL_TRUNCATE=1;
10131 HAVE_DECL_TTYNAME_R=1;
10132 HAVE_OS_H=0;
10133 HAVE_SYS_PARAM_H=0;
10134 REPLACE_ACCESS=0;
10135 REPLACE_CHOWN=0;
10136 REPLACE_CLOSE=0;
10137 REPLACE_COPY_FILE_RANGE=0;
10138 REPLACE_DUP=0;
10139 REPLACE_DUP2=0;
10140 REPLACE_EXECL=0;
10141 REPLACE_EXECLE=0;
10142 REPLACE_EXECLP=0;
10143 REPLACE_EXECV=0;
10144 REPLACE_EXECVE=0;
10145 REPLACE_EXECVP=0;
10146 REPLACE_EXECVPE=0;
10147 REPLACE_FACCESSAT=0;
10148 REPLACE_FCHOWNAT=0;
10149 REPLACE_FTRUNCATE=0;
10150 REPLACE_GETCWD=0;
10151 REPLACE_GETDOMAINNAME=0;
10152 REPLACE_GETDTABLESIZE=0;
10153 REPLACE_GETLOGIN_R=0;
10154 REPLACE_GETGROUPS=0;
10155 REPLACE_GETPAGESIZE=0;
10156 REPLACE_GETPASS=0;
10157 REPLACE_GETPASS_FOR_GETPASS_GNU=0;
10158 REPLACE_ISATTY=0;
10159 REPLACE_LCHOWN=0;
10160 REPLACE_LINK=0;
10161 REPLACE_LINKAT=0;
10162 REPLACE_LSEEK=0;
10163 REPLACE_PREAD=0;
10164 REPLACE_PWRITE=0;
10165 REPLACE_READ=0;
10166 REPLACE_READLINK=0;
10167 REPLACE_READLINKAT=0;
10168 REPLACE_RMDIR=0;
10169 REPLACE_SLEEP=0;
10170 REPLACE_SYMLINK=0;
10171 REPLACE_SYMLINKAT=0;
10172 REPLACE_TRUNCATE=0;
10173 REPLACE_TTYNAME_R=0;
10174 REPLACE_UNLINK=0;
10175 REPLACE_UNLINKAT=0;
10176 REPLACE_USLEEP=0;
10177 REPLACE_WRITE=0;
10178 UNISTD_H_HAVE_SYS_RANDOM_H=0;
10179 UNISTD_H_HAVE_WINSOCK2_H=0;
10180 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
10186 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
10187 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
10189 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
10191 else
10192 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
10197 SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
10198 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
10200 REPLACE_IOCTL=0;
10204 HAVE_ISBLANK=1;
10217 if test $gl_cv_have_include_next = yes; then
10218 gl_cv_next_ctype_h='<'ctype.h'>'
10219 else
10220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
10221 printf %s "checking absolute name of <ctype.h>... " >&6; }
10222 if test ${gl_cv_next_ctype_h+y}
10223 then :
10224 printf %s "(cached) " >&6
10225 else case e in #(
10229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10230 /* end confdefs.h. */
10231 #include <ctype.h>
10232 _ACEOF
10233 case "$host_os" in
10234 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10235 *) gl_absname_cpp="$ac_cpp" ;;
10236 esac
10238 case "$host_os" in
10239 mingw*)
10240 gl_dirsep_regex='[/\\]'
10243 gl_dirsep_regex='\/'
10245 esac
10246 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10247 gl_header_literal_regex=`echo 'ctype.h' \
10248 | sed -e "$gl_make_literal_regex_sed"`
10249 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10250 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10251 s|^/[^/]|//&|
10256 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10257 sed -n "$gl_absolute_header_sed"`
10259 gl_header=$gl_cv_absolute_ctype_h
10260 gl_cv_next_ctype_h='"'$gl_header'"'
10263 esac
10265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
10266 printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
10268 NEXT_CTYPE_H=$gl_cv_next_ctype_h
10270 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10271 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10272 gl_next_as_first_directive='<'ctype.h'>'
10273 else
10274 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10275 gl_next_as_first_directive=$gl_cv_next_ctype_h
10277 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
10289 GL_GNULIB_ISBLANK=0
10293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10294 printf %s "checking for inline... " >&6; }
10295 if test ${ac_cv_c_inline+y}
10296 then :
10297 printf %s "(cached) " >&6
10298 else case e in #(
10299 e) ac_cv_c_inline=no
10300 for ac_kw in inline __inline__ __inline; do
10301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10302 /* end confdefs.h. */
10303 #ifndef __cplusplus
10304 typedef int foo_t;
10305 static $ac_kw foo_t static_foo (void) {return 0; }
10306 $ac_kw foo_t foo (void) {return 0; }
10307 #endif
10309 _ACEOF
10310 if ac_fn_c_try_compile "$LINENO"
10311 then :
10312 ac_cv_c_inline=$ac_kw
10314 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10315 test "$ac_cv_c_inline" != no && break
10316 done
10318 esac
10320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10321 printf "%s\n" "$ac_cv_c_inline" >&6; }
10323 case $ac_cv_c_inline in
10324 inline | yes) ;;
10326 case $ac_cv_c_inline in
10327 no) ac_val=;;
10328 *) ac_val=$ac_cv_c_inline;;
10329 esac
10330 cat >>confdefs.h <<_ACEOF
10331 #ifndef __cplusplus
10332 #define inline $ac_val
10333 #endif
10334 _ACEOF
10336 esac
10338 gl_mda_defines='
10339 #if defined _WIN32 && !defined __CYGWIN__
10340 #define access _access
10341 #define chdir _chdir
10342 #define chmod _chmod
10343 #define close _close
10344 #define creat _creat
10345 #define dup _dup
10346 #define dup2 _dup2
10347 #define ecvt _ecvt
10348 #define execl _execl
10349 #define execle _execle
10350 #define execlp _execlp
10351 #define execv _execv
10352 #define execve _execve
10353 #define execvp _execvp
10354 #define execvpe _execvpe
10355 #define fcloseall _fcloseall
10356 #define fcvt _fcvt
10357 #define fdopen _fdopen
10358 #define fileno _fileno
10359 #define gcvt _gcvt
10360 #define getcwd _getcwd
10361 #define getpid _getpid
10362 #define getw _getw
10363 #define isatty _isatty
10364 #define j0 _j0
10365 #define j1 _j1
10366 #define jn _jn
10367 #define lfind _lfind
10368 #define lsearch _lsearch
10369 #define lseek _lseek
10370 #define memccpy _memccpy
10371 #define mkdir _mkdir
10372 #define mktemp _mktemp
10373 #define open _open
10374 #define putenv _putenv
10375 #define putw _putw
10376 #define read _read
10377 #define rmdir _rmdir
10378 #define strdup _strdup
10379 #define swab _swab
10380 #define tempnam _tempnam
10381 #define tzset _tzset
10382 #define umask _umask
10383 #define unlink _unlink
10384 #define utime _utime
10385 #define wcsdup _wcsdup
10386 #define write _write
10387 #define y0 _y0
10388 #define y1 _y1
10389 #define yn _yn
10390 #endif
10395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
10396 printf %s "checking for complete errno.h... " >&6; }
10397 if test ${gl_cv_header_errno_h_complete+y}
10398 then :
10399 printf %s "(cached) " >&6
10400 else case e in #(
10402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10403 /* end confdefs.h. */
10405 #include <errno.h>
10406 #if !defined ETXTBSY
10407 booboo
10408 #endif
10409 #if !defined ENOMSG
10410 booboo
10411 #endif
10412 #if !defined EIDRM
10413 booboo
10414 #endif
10415 #if !defined ENOLINK
10416 booboo
10417 #endif
10418 #if !defined EPROTO
10419 booboo
10420 #endif
10421 #if !defined EMULTIHOP
10422 booboo
10423 #endif
10424 #if !defined EBADMSG
10425 booboo
10426 #endif
10427 #if !defined EOVERFLOW
10428 booboo
10429 #endif
10430 #if !defined ENOTSUP
10431 booboo
10432 #endif
10433 #if !defined ENETRESET
10434 booboo
10435 #endif
10436 #if !defined ECONNABORTED
10437 booboo
10438 #endif
10439 #if !defined ESTALE
10440 booboo
10441 #endif
10442 #if !defined EDQUOT
10443 booboo
10444 #endif
10445 #if !defined ECANCELED
10446 booboo
10447 #endif
10448 #if !defined EOWNERDEAD
10449 booboo
10450 #endif
10451 #if !defined ENOTRECOVERABLE
10452 booboo
10453 #endif
10454 #if !defined EILSEQ
10455 booboo
10456 #endif
10458 _ACEOF
10459 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10460 $EGREP_TRADITIONAL "booboo" >/dev/null 2>&1
10461 then :
10462 gl_cv_header_errno_h_complete=no
10463 else case e in #(
10464 e) gl_cv_header_errno_h_complete=yes ;;
10465 esac
10467 rm -rf conftest*
10470 esac
10472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
10473 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
10474 if test $gl_cv_header_errno_h_complete = yes; then
10475 GL_GENERATE_ERRNO_H=false
10476 else
10485 if test $gl_cv_have_include_next = yes; then
10486 gl_cv_next_errno_h='<'errno.h'>'
10487 else
10488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10489 printf %s "checking absolute name of <errno.h>... " >&6; }
10490 if test ${gl_cv_next_errno_h+y}
10491 then :
10492 printf %s "(cached) " >&6
10493 else case e in #(
10497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10498 /* end confdefs.h. */
10499 #include <errno.h>
10500 _ACEOF
10501 case "$host_os" in
10502 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10503 *) gl_absname_cpp="$ac_cpp" ;;
10504 esac
10506 case "$host_os" in
10507 mingw*)
10508 gl_dirsep_regex='[/\\]'
10511 gl_dirsep_regex='\/'
10513 esac
10514 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10515 gl_header_literal_regex=`echo 'errno.h' \
10516 | sed -e "$gl_make_literal_regex_sed"`
10517 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10518 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10519 s|^/[^/]|//&|
10524 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10525 sed -n "$gl_absolute_header_sed"`
10527 gl_header=$gl_cv_absolute_errno_h
10528 gl_cv_next_errno_h='"'$gl_header'"'
10531 esac
10533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10534 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
10536 NEXT_ERRNO_H=$gl_cv_next_errno_h
10538 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10539 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10540 gl_next_as_first_directive='<'errno.h'>'
10541 else
10542 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10543 gl_next_as_first_directive=$gl_cv_next_errno_h
10545 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10550 GL_GENERATE_ERRNO_H=true
10553 if $GL_GENERATE_ERRNO_H; then
10554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10555 printf %s "checking for EMULTIHOP value... " >&6; }
10556 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
10557 then :
10558 printf %s "(cached) " >&6
10559 else case e in #(
10561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10562 /* end confdefs.h. */
10564 #include <errno.h>
10565 #ifdef EMULTIHOP
10567 #endif
10569 _ACEOF
10570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10571 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
10572 then :
10573 gl_cv_header_errno_h_EMULTIHOP=yes
10574 else case e in #(
10575 e) gl_cv_header_errno_h_EMULTIHOP=no ;;
10576 esac
10578 rm -rf conftest*
10580 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582 /* end confdefs.h. */
10584 #define _XOPEN_SOURCE_EXTENDED 1
10585 #include <errno.h>
10586 #ifdef EMULTIHOP
10588 #endif
10590 _ACEOF
10591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10592 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
10593 then :
10594 gl_cv_header_errno_h_EMULTIHOP=hidden
10596 rm -rf conftest*
10598 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10599 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
10600 #define _XOPEN_SOURCE_EXTENDED 1
10601 #include <errno.h>
10602 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10603 #include <stdio.h>
10604 #include <stdlib.h>
10606 then :
10613 esac
10615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10616 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10617 case $gl_cv_header_errno_h_EMULTIHOP in
10618 yes | no)
10619 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10622 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10624 esac
10630 if $GL_GENERATE_ERRNO_H; then
10631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10632 printf %s "checking for ENOLINK value... " >&6; }
10633 if test ${gl_cv_header_errno_h_ENOLINK+y}
10634 then :
10635 printf %s "(cached) " >&6
10636 else case e in #(
10638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10639 /* end confdefs.h. */
10641 #include <errno.h>
10642 #ifdef ENOLINK
10644 #endif
10646 _ACEOF
10647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10648 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
10649 then :
10650 gl_cv_header_errno_h_ENOLINK=yes
10651 else case e in #(
10652 e) gl_cv_header_errno_h_ENOLINK=no ;;
10653 esac
10655 rm -rf conftest*
10657 if test $gl_cv_header_errno_h_ENOLINK = no; then
10658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10659 /* end confdefs.h. */
10661 #define _XOPEN_SOURCE_EXTENDED 1
10662 #include <errno.h>
10663 #ifdef ENOLINK
10665 #endif
10667 _ACEOF
10668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10669 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
10670 then :
10671 gl_cv_header_errno_h_ENOLINK=hidden
10673 rm -rf conftest*
10675 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10676 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
10677 #define _XOPEN_SOURCE_EXTENDED 1
10678 #include <errno.h>
10679 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10680 #include <stdio.h>
10681 #include <stdlib.h>
10683 then :
10690 esac
10692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10693 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
10694 case $gl_cv_header_errno_h_ENOLINK in
10695 yes | no)
10696 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10699 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10701 esac
10707 if $GL_GENERATE_ERRNO_H; then
10708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10709 printf %s "checking for EOVERFLOW value... " >&6; }
10710 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
10711 then :
10712 printf %s "(cached) " >&6
10713 else case e in #(
10715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10716 /* end confdefs.h. */
10718 #include <errno.h>
10719 #ifdef EOVERFLOW
10721 #endif
10723 _ACEOF
10724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10725 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
10726 then :
10727 gl_cv_header_errno_h_EOVERFLOW=yes
10728 else case e in #(
10729 e) gl_cv_header_errno_h_EOVERFLOW=no ;;
10730 esac
10732 rm -rf conftest*
10734 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10736 /* end confdefs.h. */
10738 #define _XOPEN_SOURCE_EXTENDED 1
10739 #include <errno.h>
10740 #ifdef EOVERFLOW
10742 #endif
10744 _ACEOF
10745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10746 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
10747 then :
10748 gl_cv_header_errno_h_EOVERFLOW=hidden
10750 rm -rf conftest*
10752 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10753 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
10754 #define _XOPEN_SOURCE_EXTENDED 1
10755 #include <errno.h>
10756 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10757 #include <stdio.h>
10758 #include <stdlib.h>
10760 then :
10767 esac
10769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10770 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10771 case $gl_cv_header_errno_h_EOVERFLOW in
10772 yes | no)
10773 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10776 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10778 esac
10784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
10785 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
10786 if test ${ac_cv_c_undeclared_builtin_options+y}
10787 then :
10788 printf %s "(cached) " >&6
10789 else case e in #(
10790 e) ac_save_CFLAGS=$CFLAGS
10791 ac_cv_c_undeclared_builtin_options='cannot detect'
10792 for ac_arg in '' -fno-builtin; do
10793 CFLAGS="$ac_save_CFLAGS $ac_arg"
10794 # This test program should *not* compile successfully.
10795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10796 /* end confdefs.h. */
10799 main (void)
10801 (void) strchr;
10803 return 0;
10805 _ACEOF
10806 if ac_fn_c_try_compile "$LINENO"
10807 then :
10809 else case e in #(
10810 e) # This test program should compile successfully.
10811 # No library function is consistently available on
10812 # freestanding implementations, so test against a dummy
10813 # declaration. Include always-available headers on the
10814 # off chance that they somehow elicit warnings.
10815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10816 /* end confdefs.h. */
10817 #include <float.h>
10818 #include <limits.h>
10819 #include <stdarg.h>
10820 #include <stddef.h>
10821 extern void ac_decl (int, char *);
10824 main (void)
10826 (void) ac_decl (0, (char *) 0);
10827 (void) ac_decl;
10830 return 0;
10832 _ACEOF
10833 if ac_fn_c_try_compile "$LINENO"
10834 then :
10835 if test x"$ac_arg" = x
10836 then :
10837 ac_cv_c_undeclared_builtin_options='none needed'
10838 else case e in #(
10839 e) ac_cv_c_undeclared_builtin_options=$ac_arg ;;
10840 esac
10842 break
10844 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
10845 esac
10847 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10848 done
10849 CFLAGS=$ac_save_CFLAGS
10851 esac
10853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
10854 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
10855 case $ac_cv_c_undeclared_builtin_options in #(
10856 'cannot detect') :
10857 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10858 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
10859 as_fn_error $? "cannot make $CC report undeclared builtins
10860 See 'config.log' for more details" "$LINENO" 5; } ;; #(
10861 'none needed') :
10862 ac_c_undeclared_builtin_options='' ;; #(
10863 *) :
10864 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
10865 esac
10867 ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
10868 if test "x$ac_cv_have_decl_strerror_r" = xyes
10869 then :
10870 ac_have_decl=1
10871 else case e in #(
10872 e) ac_have_decl=0 ;;
10873 esac
10875 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
10878 if test $ac_cv_have_decl_strerror_r = yes; then
10879 # For backward compatibility's sake, define HAVE_STRERROR_R.
10880 # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
10881 # as AC_CHECK_DECLS_ONCE.)
10883 printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
10887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10888 printf %s "checking whether strerror_r returns char *... " >&6; }
10889 if test ${ac_cv_func_strerror_r_char_p+y}
10890 then :
10891 printf %s "(cached) " >&6
10892 else case e in #(
10894 ac_cv_func_strerror_r_char_p=no
10895 if test $ac_cv_have_decl_strerror_r = yes; then
10896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10897 /* end confdefs.h. */
10898 #include <string.h>
10900 main (void)
10903 char buf[100];
10904 char x = *strerror_r (0, buf, sizeof buf);
10905 char *p = strerror_r (0, buf, sizeof buf);
10906 return !p || x;
10909 return 0;
10911 _ACEOF
10912 if ac_fn_c_try_compile "$LINENO"
10913 then :
10914 ac_cv_func_strerror_r_char_p=yes
10916 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10920 esac
10922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10923 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
10924 if test $ac_cv_func_strerror_r_char_p = yes; then
10926 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10931 XGETTEXT_EXTRA_OPTIONS=
10934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ctype.h defines __header_inline" >&5
10935 printf %s "checking whether ctype.h defines __header_inline... " >&6; }
10936 if test ${gl_cv_have___header_inline+y}
10937 then :
10938 printf %s "(cached) " >&6
10939 else case e in #(
10940 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10941 /* end confdefs.h. */
10942 #include <ctype.h>
10943 #ifndef __header_inline
10944 #error "<ctype.h> does not define __header_inline"
10945 #endif
10947 _ACEOF
10948 if ac_fn_c_try_cpp "$LINENO"
10949 then :
10950 gl_cv_have___header_inline=yes
10951 else case e in #(
10952 e) gl_cv_have___header_inline=no ;;
10953 esac
10955 rm -f conftest.err conftest.i conftest.$ac_ext ;;
10956 esac
10958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___header_inline" >&5
10959 printf "%s\n" "$gl_cv_have___header_inline" >&6; }
10960 if test "$gl_cv_have___header_inline" = yes; then
10962 printf "%s\n" "#define HAVE___HEADER_INLINE 1" >>confdefs.h
10969 HAVE_FCNTL=1;
10970 HAVE_OPENAT=1;
10971 REPLACE_CREAT=0;
10972 REPLACE_FCNTL=0;
10973 REPLACE_OPEN=0;
10974 REPLACE_OPENAT=0;
10979 GL_GNULIB_CREAT=0
10983 GL_GNULIB_FCNTL=0
10987 GL_GNULIB_NONBLOCKING=0
10991 GL_GNULIB_OPEN=0
10995 GL_GNULIB_OPENAT=0
10999 GL_GNULIB_MDA_CREAT=1
11003 GL_GNULIB_MDA_OPEN=1
11013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
11014 printf %s "checking for working fcntl.h... " >&6; }
11015 if test ${gl_cv_header_working_fcntl_h+y}
11016 then :
11017 printf %s "(cached) " >&6
11018 else case e in #(
11019 e) if test "$cross_compiling" = yes
11020 then :
11021 case "$host_os" in
11022 # Guess 'no' on native Windows.
11023 mingw*) gl_cv_header_working_fcntl_h='no' ;;
11024 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
11025 esac
11027 else case e in #(
11028 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11029 /* end confdefs.h. */
11030 #include <sys/types.h>
11031 #include <sys/stat.h>
11032 #if HAVE_UNISTD_H
11033 # include <unistd.h>
11034 #else /* on Windows with MSVC */
11035 # include <io.h>
11036 # include <stdlib.h>
11037 # defined sleep(n) _sleep ((n) * 1000)
11038 #endif
11039 #include <fcntl.h>
11042 $gl_mda_defines
11044 #ifndef O_NOATIME
11045 #define O_NOATIME 0
11046 #endif
11047 #ifndef O_NOFOLLOW
11048 #define O_NOFOLLOW 0
11049 #endif
11050 static int const constants[] =
11052 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
11053 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
11057 main (void)
11060 int result = !constants;
11061 #if HAVE_SYMLINK
11063 static char const sym[] = "conftest.sym";
11064 if (symlink ("/dev/null", sym) != 0)
11065 result |= 2;
11066 else
11068 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
11069 if (fd >= 0)
11071 close (fd);
11072 result |= 4;
11075 if (unlink (sym) != 0 || symlink (".", sym) != 0)
11076 result |= 2;
11077 else
11079 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
11080 if (fd >= 0)
11082 close (fd);
11083 result |= 4;
11086 unlink (sym);
11088 #endif
11090 static char const file[] = "confdefs.h";
11091 int fd = open (file, O_RDONLY | O_NOATIME);
11092 if (fd < 0)
11093 result |= 8;
11094 else
11096 struct stat st0;
11097 if (fstat (fd, &st0) != 0)
11098 result |= 16;
11099 else
11101 char c;
11102 sleep (1);
11103 if (read (fd, &c, 1) != 1)
11104 result |= 24;
11105 else
11107 if (close (fd) != 0)
11108 result |= 32;
11109 else
11111 struct stat st1;
11112 if (stat (file, &st1) != 0)
11113 result |= 40;
11114 else
11115 if (st0.st_atime != st1.st_atime)
11116 result |= 64;
11122 return result;
11124 return 0;
11126 _ACEOF
11127 if ac_fn_c_try_run "$LINENO"
11128 then :
11129 gl_cv_header_working_fcntl_h=yes
11130 else case e in #(
11131 e) case $? in #(
11132 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
11133 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
11134 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
11135 *) gl_cv_header_working_fcntl_h='no';;
11136 esac ;;
11137 esac
11139 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11140 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
11141 esac
11145 esac
11147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
11148 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
11150 case $gl_cv_header_working_fcntl_h in #(
11151 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
11152 *) ac_val=1;;
11153 esac
11155 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
11158 case $gl_cv_header_working_fcntl_h in #(
11159 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
11160 *) ac_val=1;;
11161 esac
11163 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
11167 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
11169 if test "x$ac_cv_type_pid_t" = xyes
11170 then :
11172 else case e in #(
11173 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11174 /* end confdefs.h. */
11176 #if defined _WIN64 && !defined __CYGWIN__
11177 LLP64
11178 #endif
11181 main (void)
11185 return 0;
11188 _ACEOF
11189 if ac_fn_c_try_compile "$LINENO"
11190 then :
11191 ac_pid_type='int'
11192 else case e in #(
11193 e) ac_pid_type='__int64' ;;
11194 esac
11196 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11198 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
11201 esac
11205 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
11206 if test "x$ac_cv_type_mode_t" = xyes
11207 then :
11209 else case e in #(
11211 printf "%s\n" "#define mode_t int" >>confdefs.h
11213 esac
11227 if test $gl_cv_have_include_next = yes; then
11228 gl_cv_next_fcntl_h='<'fcntl.h'>'
11229 else
11230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
11231 printf %s "checking absolute name of <fcntl.h>... " >&6; }
11232 if test ${gl_cv_next_fcntl_h+y}
11233 then :
11234 printf %s "(cached) " >&6
11235 else case e in #(
11239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11240 /* end confdefs.h. */
11241 #include <fcntl.h>
11242 _ACEOF
11243 case "$host_os" in
11244 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11245 *) gl_absname_cpp="$ac_cpp" ;;
11246 esac
11248 case "$host_os" in
11249 mingw*)
11250 gl_dirsep_regex='[/\\]'
11253 gl_dirsep_regex='\/'
11255 esac
11256 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11257 gl_header_literal_regex=`echo 'fcntl.h' \
11258 | sed -e "$gl_make_literal_regex_sed"`
11259 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11260 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11261 s|^/[^/]|//&|
11266 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11267 sed -n "$gl_absolute_header_sed"`
11269 gl_header=$gl_cv_absolute_fcntl_h
11270 gl_cv_next_fcntl_h='"'$gl_header'"'
11273 esac
11275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
11276 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
11278 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
11280 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11281 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11282 gl_next_as_first_directive='<'fcntl.h'>'
11283 else
11284 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11285 gl_next_as_first_directive=$gl_cv_next_fcntl_h
11287 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
11303 HAVE_FCHMODAT=1;
11304 HAVE_FSTATAT=1;
11305 HAVE_FUTIMENS=1;
11306 HAVE_GETUMASK=1;
11307 HAVE_LCHMOD=1;
11308 HAVE_LSTAT=1;
11309 HAVE_MKDIRAT=1;
11310 HAVE_MKFIFO=1;
11311 HAVE_MKFIFOAT=1;
11312 HAVE_MKNOD=1;
11313 HAVE_MKNODAT=1;
11314 HAVE_UTIMENSAT=1;
11315 REPLACE_CHMOD=0;
11316 REPLACE_FCHMODAT=0;
11317 REPLACE_FSTAT=0;
11318 REPLACE_FSTATAT=0;
11319 REPLACE_FUTIMENS=0;
11320 REPLACE_LSTAT=0;
11321 REPLACE_MKDIR=0;
11322 REPLACE_MKFIFO=0;
11323 REPLACE_MKFIFOAT=0;
11324 REPLACE_MKNOD=0;
11325 REPLACE_MKNODAT=0;
11326 REPLACE_STAT=0;
11327 REPLACE_UTIMENSAT=0;
11329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11330 printf %s "checking whether stat file-mode macros are broken... " >&6; }
11331 if test ${ac_cv_header_stat_broken+y}
11332 then :
11333 printf %s "(cached) " >&6
11334 else case e in #(
11335 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11336 /* end confdefs.h. */
11337 #include <sys/types.h>
11338 #include <sys/stat.h>
11340 #if defined S_ISBLK && defined S_IFDIR
11341 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11342 #endif
11344 #if defined S_ISBLK && defined S_IFCHR
11345 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11346 #endif
11348 #if defined S_ISLNK && defined S_IFREG
11349 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11350 #endif
11352 #if defined S_ISSOCK && defined S_IFREG
11353 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11354 #endif
11356 _ACEOF
11357 if ac_fn_c_try_compile "$LINENO"
11358 then :
11359 ac_cv_header_stat_broken=no
11360 else case e in #(
11361 e) ac_cv_header_stat_broken=yes ;;
11362 esac
11364 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
11365 esac
11367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11368 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
11369 if test $ac_cv_header_stat_broken = yes; then
11371 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
11377 case "$host_os" in
11378 mingw*)
11379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11380 printf %s "checking for 64-bit off_t... " >&6; }
11381 if test ${gl_cv_type_off_t_64+y}
11382 then :
11383 printf %s "(cached) " >&6
11384 else case e in #(
11385 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11386 /* end confdefs.h. */
11387 #include <sys/types.h>
11388 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
11391 main (void)
11395 return 0;
11397 _ACEOF
11398 if ac_fn_c_try_compile "$LINENO"
11399 then :
11400 gl_cv_type_off_t_64=yes
11401 else case e in #(
11402 e) gl_cv_type_off_t_64=no ;;
11403 esac
11405 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11407 esac
11409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
11410 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
11411 if test $gl_cv_type_off_t_64 = no; then
11412 WINDOWS_64_BIT_OFF_T=1
11413 else
11414 WINDOWS_64_BIT_OFF_T=0
11416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
11417 printf %s "checking for 64-bit st_size... " >&6; }
11418 if test ${gl_cv_member_st_size_64+y}
11419 then :
11420 printf %s "(cached) " >&6
11421 else case e in #(
11422 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11423 /* end confdefs.h. */
11424 #include <sys/types.h>
11425 struct stat buf;
11426 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
11429 main (void)
11433 return 0;
11435 _ACEOF
11436 if ac_fn_c_try_compile "$LINENO"
11437 then :
11438 gl_cv_member_st_size_64=yes
11439 else case e in #(
11440 e) gl_cv_member_st_size_64=no ;;
11441 esac
11443 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11445 esac
11447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
11448 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
11449 if test $gl_cv_member_st_size_64 = no; then
11450 WINDOWS_64_BIT_ST_SIZE=1
11451 else
11452 WINDOWS_64_BIT_ST_SIZE=0
11456 WINDOWS_64_BIT_OFF_T=0
11457 WINDOWS_64_BIT_ST_SIZE=0
11459 esac
11461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
11462 printf %s "checking for C/C++ restrict keyword... " >&6; }
11463 if test ${ac_cv_c_restrict+y}
11464 then :
11465 printf %s "(cached) " >&6
11466 else case e in #(
11467 e) ac_cv_c_restrict=no
11468 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
11469 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
11470 # Put 'restrict' last, because C++ lacks it.
11471 for ac_kw in __restrict__ __restrict _Restrict restrict; do
11472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11473 /* end confdefs.h. */
11474 typedef int *int_ptr;
11475 int foo (int_ptr $ac_kw ip) { return ip[0]; }
11476 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
11477 int bar (int ip[$ac_kw]) { return ip[0]; }
11480 main (void)
11482 int s[1];
11483 int *$ac_kw t = s;
11484 t[0] = 0;
11485 return foo (t) + bar (t);
11488 return 0;
11490 _ACEOF
11491 if ac_fn_c_try_compile "$LINENO"
11492 then :
11493 ac_cv_c_restrict=$ac_kw
11495 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11496 test "$ac_cv_c_restrict" != no && break
11497 done
11499 esac
11501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
11502 printf "%s\n" "$ac_cv_c_restrict" >&6; }
11504 case $ac_cv_c_restrict in
11505 restrict) ;;
11506 no) printf "%s\n" "#define restrict /**/" >>confdefs.h
11508 *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
11510 esac
11526 if test $gl_cv_have_include_next = yes; then
11527 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11528 else
11529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11530 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
11531 if test ${gl_cv_next_sys_stat_h+y}
11532 then :
11533 printf %s "(cached) " >&6
11534 else case e in #(
11536 if test $ac_cv_header_sys_stat_h = yes; then
11541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11542 /* end confdefs.h. */
11543 #include <sys/stat.h>
11544 _ACEOF
11545 case "$host_os" in
11546 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11547 *) gl_absname_cpp="$ac_cpp" ;;
11548 esac
11550 case "$host_os" in
11551 mingw*)
11552 gl_dirsep_regex='[/\\]'
11555 gl_dirsep_regex='\/'
11557 esac
11558 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11559 gl_header_literal_regex=`echo 'sys/stat.h' \
11560 | sed -e "$gl_make_literal_regex_sed"`
11561 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11562 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11563 s|^/[^/]|//&|
11568 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11569 sed -n "$gl_absolute_header_sed"`
11571 gl_header=$gl_cv_absolute_sys_stat_h
11572 gl_cv_next_sys_stat_h='"'$gl_header'"'
11573 else
11574 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11578 esac
11580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11581 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
11583 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11585 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11586 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11587 gl_next_as_first_directive='<'sys/stat.h'>'
11588 else
11589 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11590 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11592 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11601 WINDOWS_STAT_TIMESPEC=0
11610 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11611 #include <sys/stat.h>
11613 if test "x$ac_cv_type_nlink_t" = xyes
11614 then :
11616 else case e in #(
11618 printf "%s\n" "#define nlink_t int" >>confdefs.h
11620 esac
11632 case "$host_os" in
11633 mingw*)
11634 ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
11635 if test "x$ac_cv_header_sdkddkver_h" = xyes
11636 then :
11637 printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h
11642 esac
11650 GL_GNULIB_CHMOD=0
11654 GL_GNULIB_FCHMODAT=0
11658 GL_GNULIB_FSTAT=0
11662 GL_GNULIB_FSTATAT=0
11666 GL_GNULIB_FUTIMENS=0
11670 GL_GNULIB_GETUMASK=0
11674 GL_GNULIB_LCHMOD=0
11678 GL_GNULIB_LSTAT=0
11682 GL_GNULIB_MKDIR=0
11686 GL_GNULIB_MKDIRAT=0
11690 GL_GNULIB_MKFIFO=0
11694 GL_GNULIB_MKFIFOAT=0
11698 GL_GNULIB_MKNOD=0
11702 GL_GNULIB_MKNODAT=0
11706 GL_GNULIB_STAT=0
11710 GL_GNULIB_UTIMENSAT=0
11714 GL_GNULIB_OVERRIDES_STRUCT_STAT=0
11718 GL_GNULIB_MDA_CHMOD=1
11722 GL_GNULIB_MDA_MKDIR=1
11726 GL_GNULIB_MDA_UMASK=1
11732 HAVE_DECL_FCLOSEALL=1;
11733 HAVE_DECL_FPURGE=1;
11734 HAVE_DECL_FSEEKO=1;
11735 HAVE_DECL_FTELLO=1;
11736 HAVE_DECL_GETDELIM=1;
11737 HAVE_DECL_GETLINE=1;
11738 HAVE_DECL_OBSTACK_PRINTF=1;
11739 HAVE_DECL_SNPRINTF=1;
11740 HAVE_DECL_VSNPRINTF=1;
11741 HAVE_DPRINTF=1;
11742 HAVE_FSEEKO=1;
11743 HAVE_FTELLO=1;
11744 HAVE_PCLOSE=1;
11745 HAVE_POPEN=1;
11746 HAVE_RENAMEAT=1;
11747 HAVE_VASPRINTF=1;
11748 HAVE_VDPRINTF=1;
11749 REPLACE_DPRINTF=0;
11750 REPLACE_FCLOSE=0;
11751 REPLACE_FDOPEN=0;
11752 REPLACE_FFLUSH=0;
11753 REPLACE_FOPEN=0;
11754 REPLACE_FOPEN_FOR_FOPEN_GNU=0;
11755 REPLACE_FPRINTF=0;
11756 REPLACE_FPURGE=0;
11757 REPLACE_FREOPEN=0;
11758 REPLACE_FSEEK=0;
11759 REPLACE_FSEEKO=0;
11760 REPLACE_FTELL=0;
11761 REPLACE_FTELLO=0;
11762 REPLACE_GETDELIM=0;
11763 REPLACE_GETLINE=0;
11764 REPLACE_OBSTACK_PRINTF=0;
11765 REPLACE_PERROR=0;
11766 REPLACE_POPEN=0;
11767 REPLACE_PRINTF=0;
11768 REPLACE_REMOVE=0;
11769 REPLACE_RENAME=0;
11770 REPLACE_RENAMEAT=0;
11771 REPLACE_SNPRINTF=0;
11772 REPLACE_SPRINTF=0;
11773 REPLACE_STDIO_READ_FUNCS=0;
11774 REPLACE_STDIO_WRITE_FUNCS=0;
11775 REPLACE_TMPFILE=0;
11776 REPLACE_VASPRINTF=0;
11777 REPLACE_VDPRINTF=0;
11778 REPLACE_VFPRINTF=0;
11779 REPLACE_VPRINTF=0;
11780 REPLACE_VSNPRINTF=0;
11781 REPLACE_VSPRINTF=0;
11783 ac_fn_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
11784 if test "x$ac_cv_have_decl_getdelim" = xyes
11785 then :
11786 ac_have_decl=1
11787 else case e in #(
11788 e) ac_have_decl=0 ;;
11789 esac
11791 printf "%s\n" "#define HAVE_DECL_GETDELIM $ac_have_decl" >>confdefs.h
11796 GL_GNULIB_DPRINTF=0
11800 GL_GNULIB_FCLOSE=0
11804 GL_GNULIB_FDOPEN=0
11808 GL_GNULIB_FFLUSH=0
11812 GL_GNULIB_FGETC=0
11816 GL_GNULIB_FGETS=0
11820 GL_GNULIB_FOPEN=0
11824 GL_GNULIB_FOPEN_GNU=0
11828 GL_GNULIB_FPRINTF=0
11832 GL_GNULIB_FPRINTF_POSIX=0
11836 GL_GNULIB_FPURGE=0
11840 GL_GNULIB_FPUTC=0
11844 GL_GNULIB_FPUTS=0
11848 GL_GNULIB_FREAD=0
11852 GL_GNULIB_FREOPEN=0
11856 GL_GNULIB_FSCANF=0
11860 GL_GNULIB_FSEEK=0
11864 GL_GNULIB_FSEEKO=0
11868 GL_GNULIB_FTELL=0
11872 GL_GNULIB_FTELLO=0
11876 GL_GNULIB_FWRITE=0
11880 GL_GNULIB_GETC=0
11884 GL_GNULIB_GETCHAR=0
11888 GL_GNULIB_GETDELIM=0
11892 GL_GNULIB_GETLINE=0
11896 GL_GNULIB_OBSTACK_PRINTF=0
11900 GL_GNULIB_OBSTACK_PRINTF_POSIX=0
11904 GL_GNULIB_PCLOSE=0
11908 GL_GNULIB_PERROR=0
11912 GL_GNULIB_POPEN=0
11916 GL_GNULIB_PRINTF=0
11920 GL_GNULIB_PRINTF_POSIX=0
11924 GL_GNULIB_PUTC=0
11928 GL_GNULIB_PUTCHAR=0
11932 GL_GNULIB_PUTS=0
11936 GL_GNULIB_REMOVE=0
11940 GL_GNULIB_RENAME=0
11944 GL_GNULIB_RENAMEAT=0
11948 GL_GNULIB_SCANF=0
11952 GL_GNULIB_SNPRINTF=0
11956 GL_GNULIB_SPRINTF_POSIX=0
11960 GL_GNULIB_STDIO_H_NONBLOCKING=0
11964 GL_GNULIB_STDIO_H_SIGPIPE=0
11968 GL_GNULIB_TMPFILE=0
11972 GL_GNULIB_VASPRINTF=0
11976 GL_GNULIB_VFSCANF=0
11980 GL_GNULIB_VSCANF=0
11984 GL_GNULIB_VDPRINTF=0
11988 GL_GNULIB_VFPRINTF=0
11992 GL_GNULIB_VFPRINTF_POSIX=0
11996 GL_GNULIB_VPRINTF=0
12000 GL_GNULIB_VPRINTF_POSIX=0
12004 GL_GNULIB_VSNPRINTF=0
12008 GL_GNULIB_VSPRINTF_POSIX=0
12012 GL_GNULIB_MDA_FCLOSEALL=1
12016 GL_GNULIB_MDA_FDOPEN=1
12020 GL_GNULIB_MDA_FILENO=1
12024 GL_GNULIB_MDA_GETW=1
12028 GL_GNULIB_MDA_PUTW=1
12032 GL_GNULIB_MDA_TEMPNAM=1
12037 ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
12038 if test "x$ac_cv_have_decl_getdtablesize" = xyes
12039 then :
12040 ac_have_decl=1
12041 else case e in #(
12042 e) ac_have_decl=0 ;;
12043 esac
12045 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
12050 HAVE_GETRANDOM=1;
12051 REPLACE_GETRANDOM=0;
12056 GL_GNULIB_GETRANDOM=0
12064 if test -z "$gl_pthreadlib_body_done"; then
12065 gl_pthread_api=no
12066 LIBPTHREAD=
12067 LIBPMULTITHREAD=
12068 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
12069 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
12070 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12071 if test "x$ac_cv_header_pthread_h" = xyes
12072 then :
12073 gl_have_pthread_h=yes
12074 else case e in #(
12075 e) gl_have_pthread_h=no ;;
12076 esac
12079 if test "$gl_have_pthread_h" = yes; then
12080 # Other possible tests:
12081 # -lpthreads (FSU threads, PCthreads)
12082 # -lgthreads
12083 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
12084 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
12085 # the second one only in libpthread, and lock.c needs it.
12087 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
12088 # needs -pthread for some reason. See:
12089 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
12090 save_LIBS=$LIBS
12091 for gl_pthread in '' '-pthread'; do
12092 LIBS="$LIBS $gl_pthread"
12093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12094 /* end confdefs.h. */
12095 #include <pthread.h>
12096 pthread_mutex_t m;
12097 pthread_mutexattr_t ma;
12100 main (void)
12102 pthread_mutex_lock (&m);
12103 pthread_mutexattr_init (&ma);
12105 return 0;
12107 _ACEOF
12108 if ac_fn_c_try_link "$LINENO"
12109 then :
12110 gl_pthread_api=yes
12111 LIBPTHREAD=$gl_pthread
12112 LIBPMULTITHREAD=$gl_pthread
12114 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12115 conftest$ac_exeext conftest.$ac_ext
12116 LIBS=$save_LIBS
12117 test $gl_pthread_api = yes && break
12118 done
12119 echo "$as_me:12119: gl_pthread_api=$gl_pthread_api" >&5
12120 echo "$as_me:12120: LIBPTHREAD=$LIBPTHREAD" >&5
12122 gl_pthread_in_glibc=no
12123 # On Linux with glibc >= 2.34, libc contains the fully functional
12124 # pthread functions.
12125 case "$host_os" in
12126 linux*)
12127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128 /* end confdefs.h. */
12129 #include <features.h>
12130 #ifdef __GNU_LIBRARY__
12131 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
12132 Lucky user
12133 #endif
12134 #endif
12136 _ACEOF
12137 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12138 $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
12139 then :
12140 gl_pthread_in_glibc=yes
12142 rm -rf conftest*
12145 esac
12146 echo "$as_me:12146: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
12148 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
12149 # since it is defined as a macro on OSF/1.)
12150 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
12151 # The program links fine without libpthread. But it may actually
12152 # need to link with libpthread in order to create multiple threads.
12153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12154 printf %s "checking for pthread_kill in -lpthread... " >&6; }
12155 if test ${ac_cv_lib_pthread_pthread_kill+y}
12156 then :
12157 printf %s "(cached) " >&6
12158 else case e in #(
12159 e) ac_check_lib_save_LIBS=$LIBS
12160 LIBS="-lpthread $LIBS"
12161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12162 /* end confdefs.h. */
12164 /* Override any GCC internal prototype to avoid an error.
12165 Use char because int might match the return type of a GCC
12166 builtin and then its argument prototype would still apply.
12167 The 'extern "C"' is for builds by C++ compilers;
12168 although this is not generally supported in C code, supporting it here
12169 has little cost and some practical benefit (sr 110532). */
12170 #ifdef __cplusplus
12171 extern "C"
12172 #endif
12173 char pthread_kill (void);
12175 main (void)
12177 return pthread_kill ();
12179 return 0;
12181 _ACEOF
12182 if ac_fn_c_try_link "$LINENO"
12183 then :
12184 ac_cv_lib_pthread_pthread_kill=yes
12185 else case e in #(
12186 e) ac_cv_lib_pthread_pthread_kill=no ;;
12187 esac
12189 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12190 conftest$ac_exeext conftest.$ac_ext
12191 LIBS=$ac_check_lib_save_LIBS ;;
12192 esac
12194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12195 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
12196 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
12197 then :
12198 if test $gl_pthread_in_glibc = yes; then
12199 LIBPMULTITHREAD=
12200 else
12201 LIBPMULTITHREAD=-lpthread
12202 # On Solaris and HP-UX, most pthread functions exist also in libc.
12203 # Therefore pthread_in_use() needs to actually try to create a
12204 # thread: pthread_create from libc will fail, whereas
12205 # pthread_create will actually create a thread.
12206 # On Solaris 10 or newer, this test is no longer needed, because
12207 # libc contains the fully functional pthread functions.
12208 case "$host_os" in
12209 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
12211 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
12213 esac
12218 elif test $gl_pthread_api != yes; then
12219 # Some library is needed. Try libpthread and libc_r.
12220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12221 printf %s "checking for pthread_kill in -lpthread... " >&6; }
12222 if test ${ac_cv_lib_pthread_pthread_kill+y}
12223 then :
12224 printf %s "(cached) " >&6
12225 else case e in #(
12226 e) ac_check_lib_save_LIBS=$LIBS
12227 LIBS="-lpthread $LIBS"
12228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12229 /* end confdefs.h. */
12231 /* Override any GCC internal prototype to avoid an error.
12232 Use char because int might match the return type of a GCC
12233 builtin and then its argument prototype would still apply.
12234 The 'extern "C"' is for builds by C++ compilers;
12235 although this is not generally supported in C code, supporting it here
12236 has little cost and some practical benefit (sr 110532). */
12237 #ifdef __cplusplus
12238 extern "C"
12239 #endif
12240 char pthread_kill (void);
12242 main (void)
12244 return pthread_kill ();
12246 return 0;
12248 _ACEOF
12249 if ac_fn_c_try_link "$LINENO"
12250 then :
12251 ac_cv_lib_pthread_pthread_kill=yes
12252 else case e in #(
12253 e) ac_cv_lib_pthread_pthread_kill=no ;;
12254 esac
12256 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12257 conftest$ac_exeext conftest.$ac_ext
12258 LIBS=$ac_check_lib_save_LIBS ;;
12259 esac
12261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12262 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
12263 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
12264 then :
12265 gl_pthread_api=yes
12266 LIBPTHREAD=-lpthread
12267 LIBPMULTITHREAD=-lpthread
12270 if test $gl_pthread_api != yes; then
12271 # For FreeBSD 4.
12272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
12273 printf %s "checking for pthread_kill in -lc_r... " >&6; }
12274 if test ${ac_cv_lib_c_r_pthread_kill+y}
12275 then :
12276 printf %s "(cached) " >&6
12277 else case e in #(
12278 e) ac_check_lib_save_LIBS=$LIBS
12279 LIBS="-lc_r $LIBS"
12280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12281 /* end confdefs.h. */
12283 /* Override any GCC internal prototype to avoid an error.
12284 Use char because int might match the return type of a GCC
12285 builtin and then its argument prototype would still apply.
12286 The 'extern "C"' is for builds by C++ compilers;
12287 although this is not generally supported in C code, supporting it here
12288 has little cost and some practical benefit (sr 110532). */
12289 #ifdef __cplusplus
12290 extern "C"
12291 #endif
12292 char pthread_kill (void);
12294 main (void)
12296 return pthread_kill ();
12298 return 0;
12300 _ACEOF
12301 if ac_fn_c_try_link "$LINENO"
12302 then :
12303 ac_cv_lib_c_r_pthread_kill=yes
12304 else case e in #(
12305 e) ac_cv_lib_c_r_pthread_kill=no ;;
12306 esac
12308 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12309 conftest$ac_exeext conftest.$ac_ext
12310 LIBS=$ac_check_lib_save_LIBS ;;
12311 esac
12313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
12314 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
12315 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
12316 then :
12317 gl_pthread_api=yes
12318 LIBPTHREAD=-lc_r
12319 LIBPMULTITHREAD=-lc_r
12324 echo "$as_me:12324: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
12326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
12327 printf %s "checking whether POSIX threads API is available... " >&6; }
12328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
12329 printf "%s\n" "$gl_pthread_api" >&6; }
12332 if test $gl_pthread_api = yes; then
12334 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
12338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12339 /* end confdefs.h. */
12340 #include <sched.h>
12342 main (void)
12344 sched_yield ();
12346 return 0;
12348 _ACEOF
12349 if ac_fn_c_try_link "$LINENO"
12350 then :
12351 LIB_SCHED_YIELD=
12353 else case e in #(
12354 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
12355 printf %s "checking for sched_yield in -lrt... " >&6; }
12356 if test ${ac_cv_lib_rt_sched_yield+y}
12357 then :
12358 printf %s "(cached) " >&6
12359 else case e in #(
12360 e) ac_check_lib_save_LIBS=$LIBS
12361 LIBS="-lrt $LIBS"
12362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12363 /* end confdefs.h. */
12365 /* Override any GCC internal prototype to avoid an error.
12366 Use char because int might match the return type of a GCC
12367 builtin and then its argument prototype would still apply.
12368 The 'extern "C"' is for builds by C++ compilers;
12369 although this is not generally supported in C code, supporting it here
12370 has little cost and some practical benefit (sr 110532). */
12371 #ifdef __cplusplus
12372 extern "C"
12373 #endif
12374 char sched_yield (void);
12376 main (void)
12378 return sched_yield ();
12380 return 0;
12382 _ACEOF
12383 if ac_fn_c_try_link "$LINENO"
12384 then :
12385 ac_cv_lib_rt_sched_yield=yes
12386 else case e in #(
12387 e) ac_cv_lib_rt_sched_yield=no ;;
12388 esac
12390 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12391 conftest$ac_exeext conftest.$ac_ext
12392 LIBS=$ac_check_lib_save_LIBS ;;
12393 esac
12395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
12396 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
12397 if test "x$ac_cv_lib_rt_sched_yield" = xyes
12398 then :
12399 LIB_SCHED_YIELD=-lrt
12400 else case e in #(
12401 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
12402 printf %s "checking for sched_yield in -lposix4... " >&6; }
12403 if test ${ac_cv_lib_posix4_sched_yield+y}
12404 then :
12405 printf %s "(cached) " >&6
12406 else case e in #(
12407 e) ac_check_lib_save_LIBS=$LIBS
12408 LIBS="-lposix4 $LIBS"
12409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12410 /* end confdefs.h. */
12412 /* Override any GCC internal prototype to avoid an error.
12413 Use char because int might match the return type of a GCC
12414 builtin and then its argument prototype would still apply.
12415 The 'extern "C"' is for builds by C++ compilers;
12416 although this is not generally supported in C code, supporting it here
12417 has little cost and some practical benefit (sr 110532). */
12418 #ifdef __cplusplus
12419 extern "C"
12420 #endif
12421 char sched_yield (void);
12423 main (void)
12425 return sched_yield ();
12427 return 0;
12429 _ACEOF
12430 if ac_fn_c_try_link "$LINENO"
12431 then :
12432 ac_cv_lib_posix4_sched_yield=yes
12433 else case e in #(
12434 e) ac_cv_lib_posix4_sched_yield=no ;;
12435 esac
12437 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12438 conftest$ac_exeext conftest.$ac_ext
12439 LIBS=$ac_check_lib_save_LIBS ;;
12440 esac
12442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
12443 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
12444 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
12445 then :
12446 LIB_SCHED_YIELD=-lposix4
12449 esac
12453 esac
12455 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12456 conftest$ac_exeext conftest.$ac_ext
12459 gl_pthreadlib_body_done=done
12469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
12470 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
12471 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
12472 then :
12473 printf %s "(cached) " >&6
12474 else case e in #(
12475 e) case "$host_os" in
12476 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
12477 *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
12478 gl_cv_func_setlocale_null_all_mtsafe=no ;;
12479 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
12480 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
12481 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
12482 # If we don't know, obey --enable-cross-guesses.
12484 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
12485 esac
12487 esac
12489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
12490 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
12491 case "$host_os" in
12492 mingw*) ;;
12494 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
12495 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
12498 esac
12499 case "$gl_cv_func_setlocale_null_all_mtsafe" in
12500 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
12501 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
12502 esac
12504 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
12507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
12508 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
12509 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
12510 then :
12511 printf %s "(cached) " >&6
12512 else case e in #(
12513 e) case "$host_os" in
12514 # Guess no on OpenBSD, AIX.
12515 openbsd* | aix*)
12516 gl_cv_func_setlocale_null_one_mtsafe=no ;;
12517 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
12518 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
12519 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
12520 # If we don't know, obey --enable-cross-guesses.
12522 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
12523 esac
12525 esac
12527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
12528 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
12529 case "$host_os" in
12530 mingw*) ;;
12532 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
12533 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
12536 esac
12537 case "$gl_cv_func_setlocale_null_one_mtsafe" in
12538 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
12539 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
12540 esac
12542 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
12545 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
12546 case "$host_os" in
12547 mingw*) LIB_SETLOCALE_NULL= ;;
12551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
12552 printf %s "checking whether imported symbols can be declared weak... " >&6; }
12553 if test ${gl_cv_have_weak+y}
12554 then :
12555 printf %s "(cached) " >&6
12556 else case e in #(
12557 e) case "$host_os" in
12558 cygwin*)
12559 gl_cv_have_weak="guessing no"
12562 gl_cv_have_weak=no
12563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12564 /* end confdefs.h. */
12565 extern void xyzzy ();
12566 #pragma weak xyzzy
12568 main (void)
12570 xyzzy();
12572 return 0;
12574 _ACEOF
12575 if ac_fn_c_try_link "$LINENO"
12576 then :
12577 gl_cv_have_weak=maybe
12579 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12580 conftest$ac_exeext conftest.$ac_ext
12581 if test $gl_cv_have_weak = maybe; then
12582 if test "$cross_compiling" = yes
12583 then :
12584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12585 /* end confdefs.h. */
12586 #ifdef __ELF__
12587 Extensible Linking Format
12588 #endif
12590 _ACEOF
12591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12592 $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
12593 then :
12594 gl_cv_have_weak="guessing yes"
12595 else case e in #(
12596 e) gl_cv_have_weak="guessing no" ;;
12597 esac
12599 rm -rf conftest*
12602 else case e in #(
12603 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12604 /* end confdefs.h. */
12606 #include <stdio.h>
12607 #pragma weak fputs
12608 int main ()
12610 return (fputs == NULL);
12612 _ACEOF
12613 if ac_fn_c_try_run "$LINENO"
12614 then :
12615 gl_cv_have_weak=yes
12616 else case e in #(
12617 e) gl_cv_have_weak=no ;;
12618 esac
12620 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12621 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12622 esac
12627 esac
12628 case " $LDFLAGS " in
12629 *" -static "*) gl_cv_have_weak=no ;;
12630 esac
12631 case "$gl_cv_have_weak" in
12632 *yes)
12633 case "$host_os" in
12634 freebsd* | dragonfly* | midnightbsd*)
12635 : > conftest1.c
12636 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
12637 cat <<EOF > conftest2.c
12638 #include <pthread.h>
12639 #pragma weak pthread_mutexattr_gettype
12640 int main ()
12642 return (pthread_mutexattr_gettype != NULL);
12645 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
12646 || gl_cv_have_weak=no
12647 rm -f conftest1.c libempty.so conftest2.c conftest
12649 esac
12651 esac
12653 esac
12655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
12656 printf "%s\n" "$gl_cv_have_weak" >&6; }
12657 case "$gl_cv_have_weak" in
12658 *yes)
12660 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
12663 esac
12665 case "$gl_cv_have_weak" in
12666 *yes) LIB_SETLOCALE_NULL= ;;
12667 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
12668 esac
12670 esac
12671 else
12672 LIB_SETLOCALE_NULL=
12687 if test $gl_cv_have_include_next = yes; then
12688 gl_cv_next_limits_h='<'limits.h'>'
12689 else
12690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
12691 printf %s "checking absolute name of <limits.h>... " >&6; }
12692 if test ${gl_cv_next_limits_h+y}
12693 then :
12694 printf %s "(cached) " >&6
12695 else case e in #(
12697 if test $ac_cv_header_limits_h = yes; then
12702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12703 /* end confdefs.h. */
12704 #include <limits.h>
12705 _ACEOF
12706 case "$host_os" in
12707 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12708 *) gl_absname_cpp="$ac_cpp" ;;
12709 esac
12711 case "$host_os" in
12712 mingw*)
12713 gl_dirsep_regex='[/\\]'
12716 gl_dirsep_regex='\/'
12718 esac
12719 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12720 gl_header_literal_regex=`echo 'limits.h' \
12721 | sed -e "$gl_make_literal_regex_sed"`
12722 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12723 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12724 s|^/[^/]|//&|
12729 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12730 sed -n "$gl_absolute_header_sed"`
12732 gl_header=$gl_cv_absolute_limits_h
12733 gl_cv_next_limits_h='"'$gl_header'"'
12734 else
12735 gl_cv_next_limits_h='<'limits.h'>'
12739 esac
12741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
12742 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
12744 NEXT_LIMITS_H=$gl_cv_next_limits_h
12746 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12747 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12748 gl_next_as_first_directive='<'limits.h'>'
12749 else
12750 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12751 gl_next_as_first_directive=$gl_cv_next_limits_h
12753 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
12759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has WORD_BIT, BOOL_WIDTH etc." >&5
12760 printf %s "checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... " >&6; }
12761 if test ${gl_cv_header_limits_width+y}
12762 then :
12763 printf %s "(cached) " >&6
12764 else case e in #(
12765 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12766 /* end confdefs.h. */
12767 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
12768 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
12769 #endif
12770 #include <limits.h>
12771 long long llm = LLONG_MAX;
12772 int wb = WORD_BIT;
12773 int ullw = ULLONG_WIDTH;
12774 int bw = BOOL_WIDTH;
12777 main (void)
12781 return 0;
12783 _ACEOF
12784 if ac_fn_c_try_compile "$LINENO"
12785 then :
12786 gl_cv_header_limits_width=yes
12787 else case e in #(
12788 e) gl_cv_header_limits_width=no ;;
12789 esac
12791 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12792 esac
12794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
12795 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
12796 if test "$gl_cv_header_limits_width" = yes; then
12797 GL_GENERATE_LIMITS_H=false
12798 else
12799 GL_GENERATE_LIMITS_H=true
12803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12804 printf %s "checking for wint_t... " >&6; }
12805 if test ${gt_cv_c_wint_t+y}
12806 then :
12807 printf %s "(cached) " >&6
12808 else case e in #(
12809 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12810 /* end confdefs.h. */
12811 #include <wchar.h>
12812 wint_t foo = (wchar_t)'\0';
12814 main (void)
12818 return 0;
12820 _ACEOF
12821 if ac_fn_c_try_compile "$LINENO"
12822 then :
12823 gt_cv_c_wint_t=yes
12824 else case e in #(
12825 e) gt_cv_c_wint_t=no ;;
12826 esac
12828 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12829 esac
12831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12832 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
12833 if test $gt_cv_c_wint_t = yes; then
12835 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
12838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
12839 printf %s "checking whether wint_t is large enough... " >&6; }
12840 if test ${gl_cv_type_wint_t_large_enough+y}
12841 then :
12842 printf %s "(cached) " >&6
12843 else case e in #(
12844 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12845 /* end confdefs.h. */
12846 #include <wchar.h>
12847 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
12850 main (void)
12854 return 0;
12856 _ACEOF
12857 if ac_fn_c_try_compile "$LINENO"
12858 then :
12859 gl_cv_type_wint_t_large_enough=yes
12860 else case e in #(
12861 e) gl_cv_type_wint_t_large_enough=no ;;
12862 esac
12864 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12865 esac
12867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
12868 printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; }
12869 if test $gl_cv_type_wint_t_large_enough = no; then
12870 GNULIBHEADERS_OVERRIDE_WINT_T=1
12871 else
12872 GNULIBHEADERS_OVERRIDE_WINT_T=0
12874 else
12875 GNULIBHEADERS_OVERRIDE_WINT_T=0
12880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
12881 printf %s "checking whether the compiler produces multi-arch binaries... " >&6; }
12882 if test ${gl_cv_c_multiarch+y}
12883 then :
12884 printf %s "(cached) " >&6
12885 else case e in #(
12886 e) gl_cv_c_multiarch=no
12887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12888 /* end confdefs.h. */
12889 #ifndef __APPLE_CC__
12890 not a universal capable compiler
12891 #endif
12892 typedef int dummy;
12894 _ACEOF
12895 if ac_fn_c_try_compile "$LINENO"
12896 then :
12898 arch=
12899 prev=
12900 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12901 if test -n "$prev"; then
12902 case $word in
12903 i?86 | x86_64 | ppc | ppc64 | arm | arm64)
12904 if test -z "$arch" || test "$arch" = "$word"; then
12905 arch="$word"
12906 else
12907 gl_cv_c_multiarch=yes
12910 esac
12911 prev=
12912 else
12913 if test "x$word" = "x-arch"; then
12914 prev=arch
12917 done
12920 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12922 esac
12924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
12925 printf "%s\n" "$gl_cv_c_multiarch" >&6; }
12926 if test $gl_cv_c_multiarch = yes; then
12927 APPLE_UNIVERSAL_BUILD=1
12928 else
12929 APPLE_UNIVERSAL_BUILD=0
12939 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12942 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12946 if test $ac_cv_header_wchar_h = yes; then
12947 HAVE_WCHAR_H=1
12948 else
12949 HAVE_WCHAR_H=0
12954 if test $ac_cv_header_inttypes_h = yes; then
12955 HAVE_INTTYPES_H=1
12956 else
12957 HAVE_INTTYPES_H=0
12962 if test $ac_cv_header_sys_types_h = yes; then
12963 HAVE_SYS_TYPES_H=1
12964 else
12965 HAVE_SYS_TYPES_H=0
12978 if test $gl_cv_have_include_next = yes; then
12979 gl_cv_next_stdint_h='<'stdint.h'>'
12980 else
12981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12982 printf %s "checking absolute name of <stdint.h>... " >&6; }
12983 if test ${gl_cv_next_stdint_h+y}
12984 then :
12985 printf %s "(cached) " >&6
12986 else case e in #(
12988 if test $ac_cv_header_stdint_h = yes; then
12993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12994 /* end confdefs.h. */
12995 #include <stdint.h>
12996 _ACEOF
12997 case "$host_os" in
12998 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12999 *) gl_absname_cpp="$ac_cpp" ;;
13000 esac
13002 case "$host_os" in
13003 mingw*)
13004 gl_dirsep_regex='[/\\]'
13007 gl_dirsep_regex='\/'
13009 esac
13010 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13011 gl_header_literal_regex=`echo 'stdint.h' \
13012 | sed -e "$gl_make_literal_regex_sed"`
13013 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13014 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13015 s|^/[^/]|//&|
13020 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13021 sed -n "$gl_absolute_header_sed"`
13023 gl_header=$gl_cv_absolute_stdint_h
13024 gl_cv_next_stdint_h='"'$gl_header'"'
13025 else
13026 gl_cv_next_stdint_h='<'stdint.h'>'
13030 esac
13032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
13033 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
13035 NEXT_STDINT_H=$gl_cv_next_stdint_h
13037 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13038 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13039 gl_next_as_first_directive='<'stdint.h'>'
13040 else
13041 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13042 gl_next_as_first_directive=$gl_cv_next_stdint_h
13044 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
13049 if test $ac_cv_header_stdint_h = yes; then
13050 HAVE_STDINT_H=1
13051 else
13052 HAVE_STDINT_H=0
13056 if test $ac_cv_header_stdint_h = yes; then
13057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
13058 printf %s "checking whether stdint.h conforms to C99... " >&6; }
13059 if test ${gl_cv_header_working_stdint_h+y}
13060 then :
13061 printf %s "(cached) " >&6
13062 else case e in #(
13063 e) gl_cv_header_working_stdint_h=no
13064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13065 /* end confdefs.h. */
13068 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13069 #define __STDC_CONSTANT_MACROS 1
13070 #define __STDC_LIMIT_MACROS 1
13071 #include <stdint.h>
13072 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
13073 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
13074 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
13075 #endif
13078 #include <stddef.h>
13079 #include <signal.h>
13080 #if HAVE_WCHAR_H
13081 # include <wchar.h>
13082 #endif
13085 #ifdef INT8_MAX
13086 int8_t a1 = INT8_MAX;
13087 int8_t a1min = INT8_MIN;
13088 #endif
13089 #ifdef INT16_MAX
13090 int16_t a2 = INT16_MAX;
13091 int16_t a2min = INT16_MIN;
13092 #endif
13093 #ifdef INT32_MAX
13094 int32_t a3 = INT32_MAX;
13095 int32_t a3min = INT32_MIN;
13096 #endif
13097 #ifdef INT64_MAX
13098 int64_t a4 = INT64_MAX;
13099 int64_t a4min = INT64_MIN;
13100 #endif
13101 #ifdef UINT8_MAX
13102 uint8_t b1 = UINT8_MAX;
13103 #else
13104 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
13105 #endif
13106 #ifdef UINT16_MAX
13107 uint16_t b2 = UINT16_MAX;
13108 #endif
13109 #ifdef UINT32_MAX
13110 uint32_t b3 = UINT32_MAX;
13111 #endif
13112 #ifdef UINT64_MAX
13113 uint64_t b4 = UINT64_MAX;
13114 #endif
13115 int_least8_t c1 = INT8_C (0x7f);
13116 int_least8_t c1max = INT_LEAST8_MAX;
13117 int_least8_t c1min = INT_LEAST8_MIN;
13118 int_least16_t c2 = INT16_C (0x7fff);
13119 int_least16_t c2max = INT_LEAST16_MAX;
13120 int_least16_t c2min = INT_LEAST16_MIN;
13121 int_least32_t c3 = INT32_C (0x7fffffff);
13122 int_least32_t c3max = INT_LEAST32_MAX;
13123 int_least32_t c3min = INT_LEAST32_MIN;
13124 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
13125 int_least64_t c4max = INT_LEAST64_MAX;
13126 int_least64_t c4min = INT_LEAST64_MIN;
13127 uint_least8_t d1 = UINT8_C (0xff);
13128 uint_least8_t d1max = UINT_LEAST8_MAX;
13129 uint_least16_t d2 = UINT16_C (0xffff);
13130 uint_least16_t d2max = UINT_LEAST16_MAX;
13131 uint_least32_t d3 = UINT32_C (0xffffffff);
13132 uint_least32_t d3max = UINT_LEAST32_MAX;
13133 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
13134 uint_least64_t d4max = UINT_LEAST64_MAX;
13135 int_fast8_t e1 = INT_FAST8_MAX;
13136 int_fast8_t e1min = INT_FAST8_MIN;
13137 int_fast16_t e2 = INT_FAST16_MAX;
13138 int_fast16_t e2min = INT_FAST16_MIN;
13139 int_fast32_t e3 = INT_FAST32_MAX;
13140 int_fast32_t e3min = INT_FAST32_MIN;
13141 int_fast64_t e4 = INT_FAST64_MAX;
13142 int_fast64_t e4min = INT_FAST64_MIN;
13143 uint_fast8_t f1 = UINT_FAST8_MAX;
13144 uint_fast16_t f2 = UINT_FAST16_MAX;
13145 uint_fast32_t f3 = UINT_FAST32_MAX;
13146 uint_fast64_t f4 = UINT_FAST64_MAX;
13147 #ifdef INTPTR_MAX
13148 intptr_t g = INTPTR_MAX;
13149 intptr_t gmin = INTPTR_MIN;
13150 #endif
13151 #ifdef UINTPTR_MAX
13152 uintptr_t h = UINTPTR_MAX;
13153 #endif
13154 intmax_t i = INTMAX_MAX;
13155 uintmax_t j = UINTMAX_MAX;
13157 /* Check that SIZE_MAX has the correct type, if possible. */
13158 #if 201112 <= __STDC_VERSION__
13159 int k = _Generic (SIZE_MAX, size_t: 0);
13160 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
13161 || (0x5110 <= __SUNPRO_C && !__STDC__))
13162 extern size_t k;
13163 extern __typeof__ (SIZE_MAX) k;
13164 #endif
13166 #include <limits.h> /* for CHAR_BIT */
13167 #define TYPE_MINIMUM(t) \
13168 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
13169 #define TYPE_MAXIMUM(t) \
13170 ((t) ((t) 0 < (t) -1 \
13171 ? (t) -1 \
13172 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
13173 struct s {
13174 int check_PTRDIFF:
13175 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
13176 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
13177 ? 1 : -1;
13178 /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64. */
13179 int check_SIG_ATOMIC:
13180 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
13181 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
13182 ? 1 : -1;
13183 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
13184 int check_WCHAR:
13185 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
13186 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
13187 ? 1 : -1;
13188 /* Detect bug in mingw. */
13189 int check_WINT:
13190 WINT_MIN == TYPE_MINIMUM (wint_t)
13191 && WINT_MAX == TYPE_MAXIMUM (wint_t)
13192 ? 1 : -1;
13194 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
13195 int check_UINT8_C:
13196 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
13197 int check_UINT16_C:
13198 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
13200 /* Detect bugs in OpenBSD 3.9 stdint.h. */
13201 #ifdef UINT8_MAX
13202 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
13203 #endif
13204 #ifdef UINT16_MAX
13205 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
13206 #endif
13207 #ifdef UINT32_MAX
13208 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
13209 #endif
13210 #ifdef UINT64_MAX
13211 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
13212 #endif
13213 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
13214 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
13215 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
13216 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
13217 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
13218 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
13219 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
13220 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
13221 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
13222 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
13223 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
13227 main (void)
13231 return 0;
13233 _ACEOF
13234 if ac_fn_c_try_compile "$LINENO"
13235 then :
13236 if test "$cross_compiling" = yes
13237 then :
13238 case "$host_os" in
13239 # Guess yes on native Windows.
13240 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
13241 # In general, assume it works.
13242 *) gl_cv_header_working_stdint_h="guessing yes" ;;
13243 esac
13245 else case e in #(
13246 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247 /* end confdefs.h. */
13250 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13251 #define __STDC_CONSTANT_MACROS 1
13252 #define __STDC_LIMIT_MACROS 1
13253 #include <stdint.h>
13256 #include <stddef.h>
13257 #include <signal.h>
13258 #if HAVE_WCHAR_H
13259 # include <wchar.h>
13260 #endif
13263 #include <stdio.h>
13264 #include <string.h>
13265 #define MVAL(macro) MVAL1(macro)
13266 #define MVAL1(expression) #expression
13267 static const char *macro_values[] =
13269 #ifdef INT8_MAX
13270 MVAL (INT8_MAX),
13271 #endif
13272 #ifdef INT16_MAX
13273 MVAL (INT16_MAX),
13274 #endif
13275 #ifdef INT32_MAX
13276 MVAL (INT32_MAX),
13277 #endif
13278 #ifdef INT64_MAX
13279 MVAL (INT64_MAX),
13280 #endif
13281 #ifdef UINT8_MAX
13282 MVAL (UINT8_MAX),
13283 #endif
13284 #ifdef UINT16_MAX
13285 MVAL (UINT16_MAX),
13286 #endif
13287 #ifdef UINT32_MAX
13288 MVAL (UINT32_MAX),
13289 #endif
13290 #ifdef UINT64_MAX
13291 MVAL (UINT64_MAX),
13292 #endif
13293 NULL
13297 main (void)
13300 const char **mv;
13301 for (mv = macro_values; *mv != NULL; mv++)
13303 const char *value = *mv;
13304 /* Test whether it looks like a cast expression. */
13305 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
13306 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
13307 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
13308 || strncmp (value, "((int)"/*)*/, 6) == 0
13309 || strncmp (value, "((signed short)"/*)*/, 15) == 0
13310 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
13311 return mv - macro_values + 1;
13313 return 0;
13316 return 0;
13318 _ACEOF
13319 if ac_fn_c_try_run "$LINENO"
13320 then :
13321 gl_cv_header_working_stdint_h=yes
13323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13324 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13325 esac
13330 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13332 esac
13334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
13335 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
13338 HAVE_C99_STDINT_H=0
13339 HAVE_SYS_BITYPES_H=0
13340 HAVE_SYS_INTTYPES_H=0
13341 GL_GENERATE_STDINT_H=true
13342 case "$gl_cv_header_working_stdint_h" in
13343 *yes)
13344 HAVE_C99_STDINT_H=1
13345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
13346 printf %s "checking whether stdint.h works without ISO C predefines... " >&6; }
13347 if test ${gl_cv_header_stdint_without_STDC_macros+y}
13348 then :
13349 printf %s "(cached) " >&6
13350 else case e in #(
13351 e) gl_cv_header_stdint_without_STDC_macros=no
13352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13353 /* end confdefs.h. */
13356 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13357 #include <stdint.h>
13360 #include <stddef.h>
13361 #include <signal.h>
13362 #if HAVE_WCHAR_H
13363 # include <wchar.h>
13364 #endif
13367 intmax_t im = INTMAX_MAX;
13368 int32_t i32 = INT32_C (0x7fffffff);
13371 main (void)
13375 return 0;
13377 _ACEOF
13378 if ac_fn_c_try_compile "$LINENO"
13379 then :
13380 gl_cv_header_stdint_without_STDC_macros=yes
13382 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13384 esac
13386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
13387 printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; }
13389 if test $gl_cv_header_stdint_without_STDC_macros = no; then
13391 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
13394 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
13397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
13398 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
13399 if test ${gl_cv_header_stdint_width+y}
13400 then :
13401 printf %s "(cached) " >&6
13402 else case e in #(
13403 e) gl_cv_header_stdint_width=no
13404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13405 /* end confdefs.h. */
13407 /* Work if build is not clean. */
13408 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
13409 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
13410 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
13411 #endif
13412 #include <stdint.h>
13414 #include <stddef.h>
13415 #include <signal.h>
13416 #if HAVE_WCHAR_H
13417 # include <wchar.h>
13418 #endif
13420 int iw = UINTMAX_WIDTH;
13423 main (void)
13427 return 0;
13429 _ACEOF
13430 if ac_fn_c_try_compile "$LINENO"
13431 then :
13432 gl_cv_header_stdint_width=yes
13434 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13435 esac
13437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
13438 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
13439 if test "$gl_cv_header_stdint_width" = yes; then
13440 GL_GENERATE_STDINT_H=false
13444 ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
13445 if test "x$ac_cv_header_sys_inttypes_h" = xyes
13446 then :
13447 printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
13450 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
13451 if test "x$ac_cv_header_sys_bitypes_h" = xyes
13452 then :
13453 printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
13457 if test $ac_cv_header_sys_inttypes_h = yes; then
13458 HAVE_SYS_INTTYPES_H=1
13460 if test $ac_cv_header_sys_bitypes_h = yes; then
13461 HAVE_SYS_BITYPES_H=1
13465 if test $APPLE_UNIVERSAL_BUILD = 0; then
13468 for gltype in ptrdiff_t size_t ; do
13469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13470 printf %s "checking for bit size of $gltype... " >&6; }
13471 if eval test \${gl_cv_bitsizeof_${gltype}+y}
13472 then :
13473 printf %s "(cached) " >&6
13474 else case e in #(
13475 e) if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13476 #include <stddef.h>
13477 #include <signal.h>
13478 #if HAVE_WCHAR_H
13479 # include <wchar.h>
13480 #endif
13482 #include <limits.h>"
13483 then :
13485 else case e in #(
13486 e) result=unknown ;;
13487 esac
13490 eval gl_cv_bitsizeof_${gltype}=\$result
13492 esac
13494 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13496 printf "%s\n" "$ac_res" >&6; }
13497 eval result=\$gl_cv_bitsizeof_${gltype}
13498 if test $result = unknown; then
13499 result=0
13501 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13502 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
13504 eval BITSIZEOF_${GLTYPE}=\$result
13505 done
13511 for gltype in sig_atomic_t wchar_t wint_t ; do
13512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13513 printf %s "checking for bit size of $gltype... " >&6; }
13514 if eval test \${gl_cv_bitsizeof_${gltype}+y}
13515 then :
13516 printf %s "(cached) " >&6
13517 else case e in #(
13518 e) if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13519 #include <stddef.h>
13520 #include <signal.h>
13521 #if HAVE_WCHAR_H
13522 # include <wchar.h>
13523 #endif
13525 #include <limits.h>"
13526 then :
13528 else case e in #(
13529 e) result=unknown ;;
13530 esac
13533 eval gl_cv_bitsizeof_${gltype}=\$result
13535 esac
13537 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13539 printf "%s\n" "$ac_res" >&6; }
13540 eval result=\$gl_cv_bitsizeof_${gltype}
13541 if test $result = unknown; then
13542 result=0
13544 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13545 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
13547 eval BITSIZEOF_${GLTYPE}=\$result
13548 done
13553 for gltype in sig_atomic_t wchar_t wint_t ; do
13554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
13555 printf %s "checking whether $gltype is signed... " >&6; }
13556 if eval test \${gl_cv_type_${gltype}_signed+y}
13557 then :
13558 printf %s "(cached) " >&6
13559 else case e in #(
13560 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13561 /* end confdefs.h. */
13563 #include <stddef.h>
13564 #include <signal.h>
13565 #if HAVE_WCHAR_H
13566 # include <wchar.h>
13567 #endif
13569 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
13571 main (void)
13575 return 0;
13577 _ACEOF
13578 if ac_fn_c_try_compile "$LINENO"
13579 then :
13580 result=yes
13581 else case e in #(
13582 e) result=no ;;
13583 esac
13585 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13586 eval gl_cv_type_${gltype}_signed=\$result
13588 esac
13590 eval ac_res=\$gl_cv_type_${gltype}_signed
13591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13592 printf "%s\n" "$ac_res" >&6; }
13593 eval result=\$gl_cv_type_${gltype}_signed
13594 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13595 if test "$result" = yes; then
13596 printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
13598 eval HAVE_SIGNED_${GLTYPE}=1
13599 else
13600 eval HAVE_SIGNED_${GLTYPE}=0
13602 done
13605 gl_cv_type_ptrdiff_t_signed=yes
13606 gl_cv_type_size_t_signed=no
13607 if test $APPLE_UNIVERSAL_BUILD = 0; then
13610 for gltype in ptrdiff_t size_t ; do
13611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13612 printf %s "checking for $gltype integer literal suffix... " >&6; }
13613 if eval test \${gl_cv_type_${gltype}_suffix+y}
13614 then :
13615 printf %s "(cached) " >&6
13616 else case e in #(
13617 e) eval gl_cv_type_${gltype}_suffix=no
13618 eval result=\$gl_cv_type_${gltype}_signed
13619 if test "$result" = yes; then
13620 glsufu=
13621 else
13622 glsufu=u
13624 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13625 case $glsuf in
13626 '') gltype1='int';;
13627 l) gltype1='long int';;
13628 ll) gltype1='long long int';;
13629 i64) gltype1='__int64';;
13630 u) gltype1='unsigned int';;
13631 ul) gltype1='unsigned long int';;
13632 ull) gltype1='unsigned long long int';;
13633 ui64)gltype1='unsigned __int64';;
13634 esac
13635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13636 /* end confdefs.h. */
13638 #include <stddef.h>
13639 #include <signal.h>
13640 #if HAVE_WCHAR_H
13641 # include <wchar.h>
13642 #endif
13644 extern $gltype foo;
13645 extern $gltype1 foo;
13647 main (void)
13651 return 0;
13653 _ACEOF
13654 if ac_fn_c_try_compile "$LINENO"
13655 then :
13656 eval gl_cv_type_${gltype}_suffix=\$glsuf
13658 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13659 eval result=\$gl_cv_type_${gltype}_suffix
13660 test "$result" != no && break
13661 done ;;
13662 esac
13664 eval ac_res=\$gl_cv_type_${gltype}_suffix
13665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13666 printf "%s\n" "$ac_res" >&6; }
13667 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13668 eval result=\$gl_cv_type_${gltype}_suffix
13669 test "$result" = no && result=
13670 eval ${GLTYPE}_SUFFIX=\$result
13671 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
13673 done
13679 for gltype in sig_atomic_t wchar_t wint_t ; do
13680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13681 printf %s "checking for $gltype integer literal suffix... " >&6; }
13682 if eval test \${gl_cv_type_${gltype}_suffix+y}
13683 then :
13684 printf %s "(cached) " >&6
13685 else case e in #(
13686 e) eval gl_cv_type_${gltype}_suffix=no
13687 eval result=\$gl_cv_type_${gltype}_signed
13688 if test "$result" = yes; then
13689 glsufu=
13690 else
13691 glsufu=u
13693 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13694 case $glsuf in
13695 '') gltype1='int';;
13696 l) gltype1='long int';;
13697 ll) gltype1='long long int';;
13698 i64) gltype1='__int64';;
13699 u) gltype1='unsigned int';;
13700 ul) gltype1='unsigned long int';;
13701 ull) gltype1='unsigned long long int';;
13702 ui64)gltype1='unsigned __int64';;
13703 esac
13704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13705 /* end confdefs.h. */
13707 #include <stddef.h>
13708 #include <signal.h>
13709 #if HAVE_WCHAR_H
13710 # include <wchar.h>
13711 #endif
13713 extern $gltype foo;
13714 extern $gltype1 foo;
13716 main (void)
13720 return 0;
13722 _ACEOF
13723 if ac_fn_c_try_compile "$LINENO"
13724 then :
13725 eval gl_cv_type_${gltype}_suffix=\$glsuf
13727 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13728 eval result=\$gl_cv_type_${gltype}_suffix
13729 test "$result" != no && break
13730 done ;;
13731 esac
13733 eval ac_res=\$gl_cv_type_${gltype}_suffix
13734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13735 printf "%s\n" "$ac_res" >&6; }
13736 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13737 eval result=\$gl_cv_type_${gltype}_suffix
13738 test "$result" = no && result=
13739 eval ${GLTYPE}_SUFFIX=\$result
13740 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
13742 done
13746 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
13747 BITSIZEOF_WINT_T=32
13751 esac
13755 GL_GENERATE_LIMITS_H=true
13763 HAVE_DECL_IMAXABS=1;
13764 HAVE_DECL_IMAXDIV=1;
13765 HAVE_DECL_STRTOIMAX=1;
13766 HAVE_DECL_STRTOUMAX=1;
13767 HAVE_IMAXDIV_T=1;
13768 REPLACE_STRTOIMAX=0;
13769 REPLACE_STRTOUMAX=0;
13770 INT32_MAX_LT_INTMAX_MAX=1;
13771 INT64_MAX_EQ_LONG_MAX='defined _LP64';
13772 PRIPTR_PREFIX=__PRIPTR_PREFIX;
13773 UINT32_MAX_LT_UINTMAX_MAX=1;
13774 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13790 if test $gl_cv_have_include_next = yes; then
13791 gl_cv_next_inttypes_h='<'inttypes.h'>'
13792 else
13793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13794 printf %s "checking absolute name of <inttypes.h>... " >&6; }
13795 if test ${gl_cv_next_inttypes_h+y}
13796 then :
13797 printf %s "(cached) " >&6
13798 else case e in #(
13800 if test $ac_cv_header_inttypes_h = yes; then
13805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13806 /* end confdefs.h. */
13807 #include <inttypes.h>
13808 _ACEOF
13809 case "$host_os" in
13810 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13811 *) gl_absname_cpp="$ac_cpp" ;;
13812 esac
13814 case "$host_os" in
13815 mingw*)
13816 gl_dirsep_regex='[/\\]'
13819 gl_dirsep_regex='\/'
13821 esac
13822 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13823 gl_header_literal_regex=`echo 'inttypes.h' \
13824 | sed -e "$gl_make_literal_regex_sed"`
13825 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13826 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13827 s|^/[^/]|//&|
13832 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13833 sed -n "$gl_absolute_header_sed"`
13835 gl_header=$gl_cv_absolute_inttypes_h
13836 gl_cv_next_inttypes_h='"'$gl_header'"'
13837 else
13838 gl_cv_next_inttypes_h='<'inttypes.h'>'
13842 esac
13844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13845 printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
13847 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13849 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13850 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13851 gl_next_as_first_directive='<'inttypes.h'>'
13852 else
13853 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13854 gl_next_as_first_directive=$gl_cv_next_inttypes_h
13856 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13872 GL_GNULIB_IMAXABS=0
13876 GL_GNULIB_IMAXDIV=0
13880 GL_GNULIB_STRTOIMAX=0
13884 GL_GNULIB_STRTOUMAX=0
13889 HAVE_NL_LANGINFO=1;
13890 REPLACE_NL_LANGINFO=0;
13907 if test $gl_cv_have_include_next = yes; then
13908 gl_cv_next_langinfo_h='<'langinfo.h'>'
13909 else
13910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
13911 printf %s "checking absolute name of <langinfo.h>... " >&6; }
13912 if test ${gl_cv_next_langinfo_h+y}
13913 then :
13914 printf %s "(cached) " >&6
13915 else case e in #(
13917 if test $ac_cv_header_langinfo_h = yes; then
13922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13923 /* end confdefs.h. */
13924 #include <langinfo.h>
13925 _ACEOF
13926 case "$host_os" in
13927 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13928 *) gl_absname_cpp="$ac_cpp" ;;
13929 esac
13931 case "$host_os" in
13932 mingw*)
13933 gl_dirsep_regex='[/\\]'
13936 gl_dirsep_regex='\/'
13938 esac
13939 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13940 gl_header_literal_regex=`echo 'langinfo.h' \
13941 | sed -e "$gl_make_literal_regex_sed"`
13942 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13943 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13944 s|^/[^/]|//&|
13949 gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13950 sed -n "$gl_absolute_header_sed"`
13952 gl_header=$gl_cv_absolute_langinfo_h
13953 gl_cv_next_langinfo_h='"'$gl_header'"'
13954 else
13955 gl_cv_next_langinfo_h='<'langinfo.h'>'
13959 esac
13961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
13962 printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
13964 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
13966 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13967 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13968 gl_next_as_first_directive='<'langinfo.h'>'
13969 else
13970 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13971 gl_next_as_first_directive=$gl_cv_next_langinfo_h
13973 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
13979 HAVE_LANGINFO_CODESET=0
13980 HAVE_LANGINFO_T_FMT_AMPM=0
13981 HAVE_LANGINFO_ALTMON=0
13982 HAVE_LANGINFO_ERA=0
13983 HAVE_LANGINFO_YESEXPR=0
13985 if test $ac_cv_header_langinfo_h = yes; then
13986 HAVE_LANGINFO_H=1
13987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
13988 printf %s "checking whether langinfo.h defines CODESET... " >&6; }
13989 if test ${gl_cv_header_langinfo_codeset+y}
13990 then :
13991 printf %s "(cached) " >&6
13992 else case e in #(
13993 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13994 /* end confdefs.h. */
13995 #include <langinfo.h>
13996 int a = CODESET;
13999 main (void)
14003 return 0;
14005 _ACEOF
14006 if ac_fn_c_try_compile "$LINENO"
14007 then :
14008 gl_cv_header_langinfo_codeset=yes
14009 else case e in #(
14010 e) gl_cv_header_langinfo_codeset=no ;;
14011 esac
14013 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14015 esac
14017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
14018 printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
14019 if test $gl_cv_header_langinfo_codeset = yes; then
14020 HAVE_LANGINFO_CODESET=1
14022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
14023 printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
14024 if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
14025 then :
14026 printf %s "(cached) " >&6
14027 else case e in #(
14028 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14029 /* end confdefs.h. */
14030 #include <langinfo.h>
14031 int a = T_FMT_AMPM;
14034 main (void)
14038 return 0;
14040 _ACEOF
14041 if ac_fn_c_try_compile "$LINENO"
14042 then :
14043 gl_cv_header_langinfo_t_fmt_ampm=yes
14044 else case e in #(
14045 e) gl_cv_header_langinfo_t_fmt_ampm=no ;;
14046 esac
14048 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14050 esac
14052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
14053 printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
14054 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
14055 HAVE_LANGINFO_T_FMT_AMPM=1
14057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
14058 printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
14059 if test ${gl_cv_header_langinfo_altmon+y}
14060 then :
14061 printf %s "(cached) " >&6
14062 else case e in #(
14063 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14064 /* end confdefs.h. */
14065 #include <langinfo.h>
14066 int a = ALTMON_1;
14069 main (void)
14073 return 0;
14075 _ACEOF
14076 if ac_fn_c_try_compile "$LINENO"
14077 then :
14078 gl_cv_header_langinfo_altmon=yes
14079 else case e in #(
14080 e) gl_cv_header_langinfo_altmon=no ;;
14081 esac
14083 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14085 esac
14087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
14088 printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
14089 if test $gl_cv_header_langinfo_altmon = yes; then
14090 HAVE_LANGINFO_ALTMON=1
14092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
14093 printf %s "checking whether langinfo.h defines ERA... " >&6; }
14094 if test ${gl_cv_header_langinfo_era+y}
14095 then :
14096 printf %s "(cached) " >&6
14097 else case e in #(
14098 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14099 /* end confdefs.h. */
14100 #include <langinfo.h>
14101 int a = ERA;
14104 main (void)
14108 return 0;
14110 _ACEOF
14111 if ac_fn_c_try_compile "$LINENO"
14112 then :
14113 gl_cv_header_langinfo_era=yes
14114 else case e in #(
14115 e) gl_cv_header_langinfo_era=no ;;
14116 esac
14118 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14120 esac
14122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
14123 printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
14124 if test $gl_cv_header_langinfo_era = yes; then
14125 HAVE_LANGINFO_ERA=1
14127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
14128 printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
14129 if test ${gl_cv_header_langinfo_yesexpr+y}
14130 then :
14131 printf %s "(cached) " >&6
14132 else case e in #(
14133 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14134 /* end confdefs.h. */
14135 #include <langinfo.h>
14136 int a = YESEXPR;
14139 main (void)
14143 return 0;
14145 _ACEOF
14146 if ac_fn_c_try_compile "$LINENO"
14147 then :
14148 gl_cv_header_langinfo_yesexpr=yes
14149 else case e in #(
14150 e) gl_cv_header_langinfo_yesexpr=no ;;
14151 esac
14153 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14155 esac
14157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
14158 printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
14159 if test $gl_cv_header_langinfo_yesexpr = yes; then
14160 HAVE_LANGINFO_YESEXPR=1
14162 else
14163 HAVE_LANGINFO_H=0
14178 GL_GNULIB_NL_LANGINFO=0
14183 HAVE_NEWLOCALE=1;
14184 HAVE_DUPLOCALE=1;
14185 HAVE_FREELOCALE=1;
14186 REPLACE_LOCALECONV=0;
14187 REPLACE_SETLOCALE=0;
14188 REPLACE_NEWLOCALE=0;
14189 REPLACE_DUPLOCALE=0;
14190 REPLACE_FREELOCALE=0;
14191 REPLACE_STRUCT_LCONV=0;
14192 LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
14195 REPLACE_NULL=0;
14196 HAVE_MAX_ALIGN_T=1;
14197 HAVE_WCHAR_T=1;
14200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
14201 printf %s "checking for wchar_t... " >&6; }
14202 if test ${gt_cv_c_wchar_t+y}
14203 then :
14204 printf %s "(cached) " >&6
14205 else case e in #(
14206 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14207 /* end confdefs.h. */
14208 #include <stddef.h>
14209 wchar_t foo = (wchar_t)'\0';
14211 main (void)
14215 return 0;
14217 _ACEOF
14218 if ac_fn_c_try_compile "$LINENO"
14219 then :
14220 gt_cv_c_wchar_t=yes
14221 else case e in #(
14222 e) gt_cv_c_wchar_t=no ;;
14223 esac
14225 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14226 esac
14228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
14229 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
14230 if test $gt_cv_c_wchar_t = yes; then
14232 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
14242 GL_GENERATE_STDDEF_H=false
14244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
14245 printf %s "checking for good max_align_t... " >&6; }
14246 if test ${gl_cv_type_max_align_t+y}
14247 then :
14248 printf %s "(cached) " >&6
14249 else case e in #(
14250 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14251 /* end confdefs.h. */
14252 #include <stddef.h>
14253 unsigned int s = sizeof (max_align_t);
14254 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
14255 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
14256 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
14257 #endif
14258 typedef struct { char a; max_align_t b; } max_helper;
14259 typedef struct { char a; long b; } long_helper;
14260 typedef struct { char a; double b; } double_helper;
14261 typedef struct { char a; long double b; } long_double_helper;
14262 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
14263 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
14264 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
14267 main (void)
14271 return 0;
14273 _ACEOF
14274 if ac_fn_c_try_compile "$LINENO"
14275 then :
14276 gl_cv_type_max_align_t=yes
14277 else case e in #(
14278 e) gl_cv_type_max_align_t=no ;;
14279 esac
14281 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14283 esac
14285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
14286 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
14287 if test $gl_cv_type_max_align_t = no; then
14288 HAVE_MAX_ALIGN_T=0
14289 GL_GENERATE_STDDEF_H=true
14292 if test $gt_cv_c_wchar_t = no; then
14293 HAVE_WCHAR_T=0
14294 GL_GENERATE_STDDEF_H=true
14297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
14298 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
14299 if test ${gl_cv_decl_null_works+y}
14300 then :
14301 printf %s "(cached) " >&6
14302 else case e in #(
14303 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14304 /* end confdefs.h. */
14305 #include <stddef.h>
14306 int test[2 * (sizeof NULL == sizeof (void *)) -1];
14309 main (void)
14313 return 0;
14315 _ACEOF
14316 if ac_fn_c_try_compile "$LINENO"
14317 then :
14318 gl_cv_decl_null_works=yes
14319 else case e in #(
14320 e) gl_cv_decl_null_works=no ;;
14321 esac
14323 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14324 esac
14326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
14327 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
14328 if test $gl_cv_decl_null_works = no; then
14329 REPLACE_NULL=1
14330 GL_GENERATE_STDDEF_H=true
14333 if $GL_GENERATE_STDDEF_H; then
14342 if test $gl_cv_have_include_next = yes; then
14343 gl_cv_next_stddef_h='<'stddef.h'>'
14344 else
14345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
14346 printf %s "checking absolute name of <stddef.h>... " >&6; }
14347 if test ${gl_cv_next_stddef_h+y}
14348 then :
14349 printf %s "(cached) " >&6
14350 else case e in #(
14354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14355 /* end confdefs.h. */
14356 #include <stddef.h>
14357 _ACEOF
14358 case "$host_os" in
14359 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14360 *) gl_absname_cpp="$ac_cpp" ;;
14361 esac
14363 case "$host_os" in
14364 mingw*)
14365 gl_dirsep_regex='[/\\]'
14368 gl_dirsep_regex='\/'
14370 esac
14371 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14372 gl_header_literal_regex=`echo 'stddef.h' \
14373 | sed -e "$gl_make_literal_regex_sed"`
14374 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14375 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14376 s|^/[^/]|//&|
14381 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14382 sed -n "$gl_absolute_header_sed"`
14384 gl_header=$gl_cv_absolute_stddef_h
14385 gl_cv_next_stddef_h='"'$gl_header'"'
14388 esac
14390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14391 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
14393 NEXT_STDDEF_H=$gl_cv_next_stddef_h
14395 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14396 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14397 gl_next_as_first_directive='<'stddef.h'>'
14398 else
14399 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14400 gl_next_as_first_directive=$gl_cv_next_stddef_h
14402 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
14414 printf %s "checking whether locale.h defines locale_t... " >&6; }
14415 if test ${gl_cv_header_locale_has_locale_t+y}
14416 then :
14417 printf %s "(cached) " >&6
14418 else case e in #(
14419 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14420 /* end confdefs.h. */
14421 #include <locale.h>
14422 locale_t x;
14424 main (void)
14428 return 0;
14430 _ACEOF
14431 if ac_fn_c_try_compile "$LINENO"
14432 then :
14433 gl_cv_header_locale_has_locale_t=yes
14434 else case e in #(
14435 e) gl_cv_header_locale_has_locale_t=no ;;
14436 esac
14438 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14440 esac
14442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
14443 printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
14446 if test $ac_cv_header_xlocale_h = yes; then
14447 HAVE_XLOCALE_H=1
14448 if test $gl_cv_header_locale_has_locale_t = yes; then
14449 gl_cv_header_locale_h_needs_xlocale_h=no
14450 else
14451 gl_cv_header_locale_h_needs_xlocale_h=yes
14453 HAVE_LOCALE_T=1
14454 else
14455 HAVE_XLOCALE_H=0
14456 gl_cv_header_locale_h_needs_xlocale_h=no
14457 if test $gl_cv_header_locale_has_locale_t = yes; then
14458 HAVE_LOCALE_T=1
14459 else
14460 HAVE_LOCALE_T=0
14475 case "$host_os" in
14476 solaris*)
14478 printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
14481 esac
14483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
14484 printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
14485 if test ${gl_cv_header_locale_h_posix2001+y}
14486 then :
14487 printf %s "(cached) " >&6
14488 else case e in #(
14489 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14490 /* end confdefs.h. */
14491 #include <locale.h>
14492 int x = LC_MESSAGES;
14493 int y = sizeof (((struct lconv *) 0)->decimal_point);
14495 main (void)
14499 return 0;
14501 _ACEOF
14502 if ac_fn_c_try_compile "$LINENO"
14503 then :
14504 gl_cv_header_locale_h_posix2001=yes
14505 else case e in #(
14506 e) gl_cv_header_locale_h_posix2001=no ;;
14507 esac
14509 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14510 esac
14512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
14513 printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
14515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
14516 printf %s "checking whether struct lconv is properly defined... " >&6; }
14517 if test ${gl_cv_sys_struct_lconv_ok+y}
14518 then :
14519 printf %s "(cached) " >&6
14520 else case e in #(
14521 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14522 /* end confdefs.h. */
14523 #include <locale.h>
14524 struct lconv l;
14525 int x = sizeof (l.decimal_point);
14526 int y = sizeof (l.int_p_cs_precedes);
14528 main (void)
14532 return 0;
14534 _ACEOF
14535 if ac_fn_c_try_compile "$LINENO"
14536 then :
14537 gl_cv_sys_struct_lconv_ok=yes
14538 else case e in #(
14539 e) gl_cv_sys_struct_lconv_ok=no ;;
14540 esac
14542 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14544 esac
14546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
14547 printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
14548 if test $gl_cv_sys_struct_lconv_ok = no; then
14549 case "$host_os" in
14550 mingw*)
14551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14552 /* end confdefs.h. */
14554 #ifdef _MSC_VER
14555 Special
14556 #endif
14558 _ACEOF
14559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14560 $EGREP_TRADITIONAL "Special" >/dev/null 2>&1
14561 then :
14563 else case e in #(
14564 e) REPLACE_STRUCT_LCONV=1 ;;
14565 esac
14567 rm -rf conftest*
14570 *) REPLACE_STRUCT_LCONV=1 ;;
14571 esac
14582 if test $gl_cv_have_include_next = yes; then
14583 gl_cv_next_locale_h='<'locale.h'>'
14584 else
14585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
14586 printf %s "checking absolute name of <locale.h>... " >&6; }
14587 if test ${gl_cv_next_locale_h+y}
14588 then :
14589 printf %s "(cached) " >&6
14590 else case e in #(
14594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14595 /* end confdefs.h. */
14596 #include <locale.h>
14597 _ACEOF
14598 case "$host_os" in
14599 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14600 *) gl_absname_cpp="$ac_cpp" ;;
14601 esac
14603 case "$host_os" in
14604 mingw*)
14605 gl_dirsep_regex='[/\\]'
14608 gl_dirsep_regex='\/'
14610 esac
14611 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14612 gl_header_literal_regex=`echo 'locale.h' \
14613 | sed -e "$gl_make_literal_regex_sed"`
14614 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14615 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14616 s|^/[^/]|//&|
14621 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14622 sed -n "$gl_absolute_header_sed"`
14624 gl_header=$gl_cv_absolute_locale_h
14625 gl_cv_next_locale_h='"'$gl_header'"'
14628 esac
14630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
14631 printf "%s\n" "$gl_cv_next_locale_h" >&6; }
14633 NEXT_LOCALE_H=$gl_cv_next_locale_h
14635 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14636 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14637 gl_next_as_first_directive='<'locale.h'>'
14638 else
14639 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14640 gl_next_as_first_directive=$gl_cv_next_locale_h
14642 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
14654 GL_GNULIB_LOCALECONV=0
14658 GL_GNULIB_SETLOCALE=0
14662 GL_GNULIB_SETLOCALE_NULL=0
14666 GL_GNULIB_DUPLOCALE=0
14670 GL_GNULIB_LOCALENAME=0
14676 gl_threads_api=none
14677 LIBTHREAD=
14678 LTLIBTHREAD=
14679 LIBMULTITHREAD=
14680 LTLIBMULTITHREAD=
14681 if test "$gl_use_threads" != no; then
14684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14685 printf %s "checking whether imported symbols can be declared weak... " >&6; }
14686 if test ${gl_cv_have_weak+y}
14687 then :
14688 printf %s "(cached) " >&6
14689 else case e in #(
14690 e) case "$host_os" in
14691 cygwin*)
14692 gl_cv_have_weak="guessing no"
14695 gl_cv_have_weak=no
14696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14697 /* end confdefs.h. */
14698 extern void xyzzy ();
14699 #pragma weak xyzzy
14701 main (void)
14703 xyzzy();
14705 return 0;
14707 _ACEOF
14708 if ac_fn_c_try_link "$LINENO"
14709 then :
14710 gl_cv_have_weak=maybe
14712 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14713 conftest$ac_exeext conftest.$ac_ext
14714 if test $gl_cv_have_weak = maybe; then
14715 if test "$cross_compiling" = yes
14716 then :
14717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14718 /* end confdefs.h. */
14719 #ifdef __ELF__
14720 Extensible Linking Format
14721 #endif
14723 _ACEOF
14724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14725 $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
14726 then :
14727 gl_cv_have_weak="guessing yes"
14728 else case e in #(
14729 e) gl_cv_have_weak="guessing no" ;;
14730 esac
14732 rm -rf conftest*
14735 else case e in #(
14736 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14737 /* end confdefs.h. */
14739 #include <stdio.h>
14740 #pragma weak fputs
14741 int main ()
14743 return (fputs == NULL);
14745 _ACEOF
14746 if ac_fn_c_try_run "$LINENO"
14747 then :
14748 gl_cv_have_weak=yes
14749 else case e in #(
14750 e) gl_cv_have_weak=no ;;
14751 esac
14753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14754 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14755 esac
14760 esac
14761 case " $LDFLAGS " in
14762 *" -static "*) gl_cv_have_weak=no ;;
14763 esac
14764 case "$gl_cv_have_weak" in
14765 *yes)
14766 case "$host_os" in
14767 freebsd* | dragonfly* | midnightbsd*)
14768 : > conftest1.c
14769 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
14770 cat <<EOF > conftest2.c
14771 #include <pthread.h>
14772 #pragma weak pthread_mutexattr_gettype
14773 int main ()
14775 return (pthread_mutexattr_gettype != NULL);
14778 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
14779 || gl_cv_have_weak=no
14780 rm -f conftest1.c libempty.so conftest2.c conftest
14782 esac
14784 esac
14786 esac
14788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14789 printf "%s\n" "$gl_cv_have_weak" >&6; }
14790 case "$gl_cv_have_weak" in
14791 *yes)
14793 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
14796 esac
14798 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14802 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
14804 gl_have_isoc_threads="$ac_cv_header_threads_h"
14806 if test "$gl_use_threads" = yes \
14807 || test "$gl_use_threads" = posix \
14808 || test "$gl_use_threads" = isoc+posix; then
14811 if test -z "$gl_pthreadlib_body_done"; then
14812 gl_pthread_api=no
14813 LIBPTHREAD=
14814 LIBPMULTITHREAD=
14815 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14816 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14817 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14818 if test "x$ac_cv_header_pthread_h" = xyes
14819 then :
14820 gl_have_pthread_h=yes
14821 else case e in #(
14822 e) gl_have_pthread_h=no ;;
14823 esac
14826 if test "$gl_have_pthread_h" = yes; then
14827 # Other possible tests:
14828 # -lpthreads (FSU threads, PCthreads)
14829 # -lgthreads
14830 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14831 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14832 # the second one only in libpthread, and lock.c needs it.
14834 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14835 # needs -pthread for some reason. See:
14836 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14837 save_LIBS=$LIBS
14838 for gl_pthread in '' '-pthread'; do
14839 LIBS="$LIBS $gl_pthread"
14840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14841 /* end confdefs.h. */
14842 #include <pthread.h>
14843 pthread_mutex_t m;
14844 pthread_mutexattr_t ma;
14847 main (void)
14849 pthread_mutex_lock (&m);
14850 pthread_mutexattr_init (&ma);
14852 return 0;
14854 _ACEOF
14855 if ac_fn_c_try_link "$LINENO"
14856 then :
14857 gl_pthread_api=yes
14858 LIBPTHREAD=$gl_pthread
14859 LIBPMULTITHREAD=$gl_pthread
14861 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14862 conftest$ac_exeext conftest.$ac_ext
14863 LIBS=$save_LIBS
14864 test $gl_pthread_api = yes && break
14865 done
14866 echo "$as_me:14866: gl_pthread_api=$gl_pthread_api" >&5
14867 echo "$as_me:14867: LIBPTHREAD=$LIBPTHREAD" >&5
14869 gl_pthread_in_glibc=no
14870 # On Linux with glibc >= 2.34, libc contains the fully functional
14871 # pthread functions.
14872 case "$host_os" in
14873 linux*)
14874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14875 /* end confdefs.h. */
14876 #include <features.h>
14877 #ifdef __GNU_LIBRARY__
14878 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
14879 Lucky user
14880 #endif
14881 #endif
14883 _ACEOF
14884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14885 $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
14886 then :
14887 gl_pthread_in_glibc=yes
14889 rm -rf conftest*
14892 esac
14893 echo "$as_me:14893: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
14895 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14896 # since it is defined as a macro on OSF/1.)
14897 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14898 # The program links fine without libpthread. But it may actually
14899 # need to link with libpthread in order to create multiple threads.
14900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14901 printf %s "checking for pthread_kill in -lpthread... " >&6; }
14902 if test ${ac_cv_lib_pthread_pthread_kill+y}
14903 then :
14904 printf %s "(cached) " >&6
14905 else case e in #(
14906 e) ac_check_lib_save_LIBS=$LIBS
14907 LIBS="-lpthread $LIBS"
14908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14909 /* end confdefs.h. */
14911 /* Override any GCC internal prototype to avoid an error.
14912 Use char because int might match the return type of a GCC
14913 builtin and then its argument prototype would still apply.
14914 The 'extern "C"' is for builds by C++ compilers;
14915 although this is not generally supported in C code, supporting it here
14916 has little cost and some practical benefit (sr 110532). */
14917 #ifdef __cplusplus
14918 extern "C"
14919 #endif
14920 char pthread_kill (void);
14922 main (void)
14924 return pthread_kill ();
14926 return 0;
14928 _ACEOF
14929 if ac_fn_c_try_link "$LINENO"
14930 then :
14931 ac_cv_lib_pthread_pthread_kill=yes
14932 else case e in #(
14933 e) ac_cv_lib_pthread_pthread_kill=no ;;
14934 esac
14936 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14937 conftest$ac_exeext conftest.$ac_ext
14938 LIBS=$ac_check_lib_save_LIBS ;;
14939 esac
14941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14942 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
14943 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
14944 then :
14945 if test $gl_pthread_in_glibc = yes; then
14946 LIBPMULTITHREAD=
14947 else
14948 LIBPMULTITHREAD=-lpthread
14949 # On Solaris and HP-UX, most pthread functions exist also in libc.
14950 # Therefore pthread_in_use() needs to actually try to create a
14951 # thread: pthread_create from libc will fail, whereas
14952 # pthread_create will actually create a thread.
14953 # On Solaris 10 or newer, this test is no longer needed, because
14954 # libc contains the fully functional pthread functions.
14955 case "$host_os" in
14956 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
14958 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14960 esac
14965 elif test $gl_pthread_api != yes; then
14966 # Some library is needed. Try libpthread and libc_r.
14967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14968 printf %s "checking for pthread_kill in -lpthread... " >&6; }
14969 if test ${ac_cv_lib_pthread_pthread_kill+y}
14970 then :
14971 printf %s "(cached) " >&6
14972 else case e in #(
14973 e) ac_check_lib_save_LIBS=$LIBS
14974 LIBS="-lpthread $LIBS"
14975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14976 /* end confdefs.h. */
14978 /* Override any GCC internal prototype to avoid an error.
14979 Use char because int might match the return type of a GCC
14980 builtin and then its argument prototype would still apply.
14981 The 'extern "C"' is for builds by C++ compilers;
14982 although this is not generally supported in C code, supporting it here
14983 has little cost and some practical benefit (sr 110532). */
14984 #ifdef __cplusplus
14985 extern "C"
14986 #endif
14987 char pthread_kill (void);
14989 main (void)
14991 return pthread_kill ();
14993 return 0;
14995 _ACEOF
14996 if ac_fn_c_try_link "$LINENO"
14997 then :
14998 ac_cv_lib_pthread_pthread_kill=yes
14999 else case e in #(
15000 e) ac_cv_lib_pthread_pthread_kill=no ;;
15001 esac
15003 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15004 conftest$ac_exeext conftest.$ac_ext
15005 LIBS=$ac_check_lib_save_LIBS ;;
15006 esac
15008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15009 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15010 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15011 then :
15012 gl_pthread_api=yes
15013 LIBPTHREAD=-lpthread
15014 LIBPMULTITHREAD=-lpthread
15017 if test $gl_pthread_api != yes; then
15018 # For FreeBSD 4.
15019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15020 printf %s "checking for pthread_kill in -lc_r... " >&6; }
15021 if test ${ac_cv_lib_c_r_pthread_kill+y}
15022 then :
15023 printf %s "(cached) " >&6
15024 else case e in #(
15025 e) ac_check_lib_save_LIBS=$LIBS
15026 LIBS="-lc_r $LIBS"
15027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15028 /* end confdefs.h. */
15030 /* Override any GCC internal prototype to avoid an error.
15031 Use char because int might match the return type of a GCC
15032 builtin and then its argument prototype would still apply.
15033 The 'extern "C"' is for builds by C++ compilers;
15034 although this is not generally supported in C code, supporting it here
15035 has little cost and some practical benefit (sr 110532). */
15036 #ifdef __cplusplus
15037 extern "C"
15038 #endif
15039 char pthread_kill (void);
15041 main (void)
15043 return pthread_kill ();
15045 return 0;
15047 _ACEOF
15048 if ac_fn_c_try_link "$LINENO"
15049 then :
15050 ac_cv_lib_c_r_pthread_kill=yes
15051 else case e in #(
15052 e) ac_cv_lib_c_r_pthread_kill=no ;;
15053 esac
15055 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15056 conftest$ac_exeext conftest.$ac_ext
15057 LIBS=$ac_check_lib_save_LIBS ;;
15058 esac
15060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15061 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
15062 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
15063 then :
15064 gl_pthread_api=yes
15065 LIBPTHREAD=-lc_r
15066 LIBPMULTITHREAD=-lc_r
15071 echo "$as_me:15071: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
15073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
15074 printf %s "checking whether POSIX threads API is available... " >&6; }
15075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
15076 printf "%s\n" "$gl_pthread_api" >&6; }
15079 if test $gl_pthread_api = yes; then
15081 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
15085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15086 /* end confdefs.h. */
15087 #include <sched.h>
15089 main (void)
15091 sched_yield ();
15093 return 0;
15095 _ACEOF
15096 if ac_fn_c_try_link "$LINENO"
15097 then :
15098 LIB_SCHED_YIELD=
15100 else case e in #(
15101 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
15102 printf %s "checking for sched_yield in -lrt... " >&6; }
15103 if test ${ac_cv_lib_rt_sched_yield+y}
15104 then :
15105 printf %s "(cached) " >&6
15106 else case e in #(
15107 e) ac_check_lib_save_LIBS=$LIBS
15108 LIBS="-lrt $LIBS"
15109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15110 /* end confdefs.h. */
15112 /* Override any GCC internal prototype to avoid an error.
15113 Use char because int might match the return type of a GCC
15114 builtin and then its argument prototype would still apply.
15115 The 'extern "C"' is for builds by C++ compilers;
15116 although this is not generally supported in C code, supporting it here
15117 has little cost and some practical benefit (sr 110532). */
15118 #ifdef __cplusplus
15119 extern "C"
15120 #endif
15121 char sched_yield (void);
15123 main (void)
15125 return sched_yield ();
15127 return 0;
15129 _ACEOF
15130 if ac_fn_c_try_link "$LINENO"
15131 then :
15132 ac_cv_lib_rt_sched_yield=yes
15133 else case e in #(
15134 e) ac_cv_lib_rt_sched_yield=no ;;
15135 esac
15137 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15138 conftest$ac_exeext conftest.$ac_ext
15139 LIBS=$ac_check_lib_save_LIBS ;;
15140 esac
15142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
15143 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
15144 if test "x$ac_cv_lib_rt_sched_yield" = xyes
15145 then :
15146 LIB_SCHED_YIELD=-lrt
15147 else case e in #(
15148 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
15149 printf %s "checking for sched_yield in -lposix4... " >&6; }
15150 if test ${ac_cv_lib_posix4_sched_yield+y}
15151 then :
15152 printf %s "(cached) " >&6
15153 else case e in #(
15154 e) ac_check_lib_save_LIBS=$LIBS
15155 LIBS="-lposix4 $LIBS"
15156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15157 /* end confdefs.h. */
15159 /* Override any GCC internal prototype to avoid an error.
15160 Use char because int might match the return type of a GCC
15161 builtin and then its argument prototype would still apply.
15162 The 'extern "C"' is for builds by C++ compilers;
15163 although this is not generally supported in C code, supporting it here
15164 has little cost and some practical benefit (sr 110532). */
15165 #ifdef __cplusplus
15166 extern "C"
15167 #endif
15168 char sched_yield (void);
15170 main (void)
15172 return sched_yield ();
15174 return 0;
15176 _ACEOF
15177 if ac_fn_c_try_link "$LINENO"
15178 then :
15179 ac_cv_lib_posix4_sched_yield=yes
15180 else case e in #(
15181 e) ac_cv_lib_posix4_sched_yield=no ;;
15182 esac
15184 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15185 conftest$ac_exeext conftest.$ac_ext
15186 LIBS=$ac_check_lib_save_LIBS ;;
15187 esac
15189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
15190 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
15191 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
15192 then :
15193 LIB_SCHED_YIELD=-lposix4
15196 esac
15200 esac
15202 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15203 conftest$ac_exeext conftest.$ac_ext
15206 gl_pthreadlib_body_done=done
15209 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
15210 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
15211 if test $gl_pthread_api = yes; then
15212 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
15213 gl_threads_api='isoc+posix'
15215 printf "%s\n" "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
15217 LIBTHREAD= LTLIBTHREAD=
15218 else
15219 gl_threads_api=posix
15221 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
15223 if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
15225 printf "%s\n" "#define USE_POSIX_THREADS_FROM_LIBC 1" >>confdefs.h
15227 else
15228 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15230 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
15232 LIBTHREAD= LTLIBTHREAD=
15233 else
15234 case "$host_os" in
15235 freebsd* | dragonfly* | midnightbsd*)
15236 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
15238 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15242 esac
15248 if test $gl_threads_api = none; then
15249 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
15253 if test -z "$gl_stdthreadlib_body_done"; then
15256 case "$host_os" in
15257 mingw*)
15258 LIBSTDTHREAD=
15263 if test -z "$gl_pthreadlib_body_done"; then
15264 gl_pthread_api=no
15265 LIBPTHREAD=
15266 LIBPMULTITHREAD=
15267 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
15268 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
15269 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15270 if test "x$ac_cv_header_pthread_h" = xyes
15271 then :
15272 gl_have_pthread_h=yes
15273 else case e in #(
15274 e) gl_have_pthread_h=no ;;
15275 esac
15278 if test "$gl_have_pthread_h" = yes; then
15279 # Other possible tests:
15280 # -lpthreads (FSU threads, PCthreads)
15281 # -lgthreads
15282 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
15283 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
15284 # the second one only in libpthread, and lock.c needs it.
15286 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
15287 # needs -pthread for some reason. See:
15288 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
15289 save_LIBS=$LIBS
15290 for gl_pthread in '' '-pthread'; do
15291 LIBS="$LIBS $gl_pthread"
15292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15293 /* end confdefs.h. */
15294 #include <pthread.h>
15295 pthread_mutex_t m;
15296 pthread_mutexattr_t ma;
15299 main (void)
15301 pthread_mutex_lock (&m);
15302 pthread_mutexattr_init (&ma);
15304 return 0;
15306 _ACEOF
15307 if ac_fn_c_try_link "$LINENO"
15308 then :
15309 gl_pthread_api=yes
15310 LIBPTHREAD=$gl_pthread
15311 LIBPMULTITHREAD=$gl_pthread
15313 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15314 conftest$ac_exeext conftest.$ac_ext
15315 LIBS=$save_LIBS
15316 test $gl_pthread_api = yes && break
15317 done
15318 echo "$as_me:15318: gl_pthread_api=$gl_pthread_api" >&5
15319 echo "$as_me:15319: LIBPTHREAD=$LIBPTHREAD" >&5
15321 gl_pthread_in_glibc=no
15322 # On Linux with glibc >= 2.34, libc contains the fully functional
15323 # pthread functions.
15324 case "$host_os" in
15325 linux*)
15326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15327 /* end confdefs.h. */
15328 #include <features.h>
15329 #ifdef __GNU_LIBRARY__
15330 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
15331 Lucky user
15332 #endif
15333 #endif
15335 _ACEOF
15336 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15337 $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1
15338 then :
15339 gl_pthread_in_glibc=yes
15341 rm -rf conftest*
15344 esac
15345 echo "$as_me:15345: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
15347 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
15348 # since it is defined as a macro on OSF/1.)
15349 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
15350 # The program links fine without libpthread. But it may actually
15351 # need to link with libpthread in order to create multiple threads.
15352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15353 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15354 if test ${ac_cv_lib_pthread_pthread_kill+y}
15355 then :
15356 printf %s "(cached) " >&6
15357 else case e in #(
15358 e) ac_check_lib_save_LIBS=$LIBS
15359 LIBS="-lpthread $LIBS"
15360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15361 /* end confdefs.h. */
15363 /* Override any GCC internal prototype to avoid an error.
15364 Use char because int might match the return type of a GCC
15365 builtin and then its argument prototype would still apply.
15366 The 'extern "C"' is for builds by C++ compilers;
15367 although this is not generally supported in C code, supporting it here
15368 has little cost and some practical benefit (sr 110532). */
15369 #ifdef __cplusplus
15370 extern "C"
15371 #endif
15372 char pthread_kill (void);
15374 main (void)
15376 return pthread_kill ();
15378 return 0;
15380 _ACEOF
15381 if ac_fn_c_try_link "$LINENO"
15382 then :
15383 ac_cv_lib_pthread_pthread_kill=yes
15384 else case e in #(
15385 e) ac_cv_lib_pthread_pthread_kill=no ;;
15386 esac
15388 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15389 conftest$ac_exeext conftest.$ac_ext
15390 LIBS=$ac_check_lib_save_LIBS ;;
15391 esac
15393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15394 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15395 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15396 then :
15397 if test $gl_pthread_in_glibc = yes; then
15398 LIBPMULTITHREAD=
15399 else
15400 LIBPMULTITHREAD=-lpthread
15401 # On Solaris and HP-UX, most pthread functions exist also in libc.
15402 # Therefore pthread_in_use() needs to actually try to create a
15403 # thread: pthread_create from libc will fail, whereas
15404 # pthread_create will actually create a thread.
15405 # On Solaris 10 or newer, this test is no longer needed, because
15406 # libc contains the fully functional pthread functions.
15407 case "$host_os" in
15408 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
15410 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15412 esac
15417 elif test $gl_pthread_api != yes; then
15418 # Some library is needed. Try libpthread and libc_r.
15419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15420 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15421 if test ${ac_cv_lib_pthread_pthread_kill+y}
15422 then :
15423 printf %s "(cached) " >&6
15424 else case e in #(
15425 e) ac_check_lib_save_LIBS=$LIBS
15426 LIBS="-lpthread $LIBS"
15427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15428 /* end confdefs.h. */
15430 /* Override any GCC internal prototype to avoid an error.
15431 Use char because int might match the return type of a GCC
15432 builtin and then its argument prototype would still apply.
15433 The 'extern "C"' is for builds by C++ compilers;
15434 although this is not generally supported in C code, supporting it here
15435 has little cost and some practical benefit (sr 110532). */
15436 #ifdef __cplusplus
15437 extern "C"
15438 #endif
15439 char pthread_kill (void);
15441 main (void)
15443 return pthread_kill ();
15445 return 0;
15447 _ACEOF
15448 if ac_fn_c_try_link "$LINENO"
15449 then :
15450 ac_cv_lib_pthread_pthread_kill=yes
15451 else case e in #(
15452 e) ac_cv_lib_pthread_pthread_kill=no ;;
15453 esac
15455 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15456 conftest$ac_exeext conftest.$ac_ext
15457 LIBS=$ac_check_lib_save_LIBS ;;
15458 esac
15460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15461 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15462 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15463 then :
15464 gl_pthread_api=yes
15465 LIBPTHREAD=-lpthread
15466 LIBPMULTITHREAD=-lpthread
15469 if test $gl_pthread_api != yes; then
15470 # For FreeBSD 4.
15471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15472 printf %s "checking for pthread_kill in -lc_r... " >&6; }
15473 if test ${ac_cv_lib_c_r_pthread_kill+y}
15474 then :
15475 printf %s "(cached) " >&6
15476 else case e in #(
15477 e) ac_check_lib_save_LIBS=$LIBS
15478 LIBS="-lc_r $LIBS"
15479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15480 /* end confdefs.h. */
15482 /* Override any GCC internal prototype to avoid an error.
15483 Use char because int might match the return type of a GCC
15484 builtin and then its argument prototype would still apply.
15485 The 'extern "C"' is for builds by C++ compilers;
15486 although this is not generally supported in C code, supporting it here
15487 has little cost and some practical benefit (sr 110532). */
15488 #ifdef __cplusplus
15489 extern "C"
15490 #endif
15491 char pthread_kill (void);
15493 main (void)
15495 return pthread_kill ();
15497 return 0;
15499 _ACEOF
15500 if ac_fn_c_try_link "$LINENO"
15501 then :
15502 ac_cv_lib_c_r_pthread_kill=yes
15503 else case e in #(
15504 e) ac_cv_lib_c_r_pthread_kill=no ;;
15505 esac
15507 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15508 conftest$ac_exeext conftest.$ac_ext
15509 LIBS=$ac_check_lib_save_LIBS ;;
15510 esac
15512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15513 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
15514 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
15515 then :
15516 gl_pthread_api=yes
15517 LIBPTHREAD=-lc_r
15518 LIBPMULTITHREAD=-lc_r
15523 echo "$as_me:15523: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
15525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
15526 printf %s "checking whether POSIX threads API is available... " >&6; }
15527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
15528 printf "%s\n" "$gl_pthread_api" >&6; }
15531 if test $gl_pthread_api = yes; then
15533 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
15537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15538 /* end confdefs.h. */
15539 #include <sched.h>
15541 main (void)
15543 sched_yield ();
15545 return 0;
15547 _ACEOF
15548 if ac_fn_c_try_link "$LINENO"
15549 then :
15550 LIB_SCHED_YIELD=
15552 else case e in #(
15553 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
15554 printf %s "checking for sched_yield in -lrt... " >&6; }
15555 if test ${ac_cv_lib_rt_sched_yield+y}
15556 then :
15557 printf %s "(cached) " >&6
15558 else case e in #(
15559 e) ac_check_lib_save_LIBS=$LIBS
15560 LIBS="-lrt $LIBS"
15561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15562 /* end confdefs.h. */
15564 /* Override any GCC internal prototype to avoid an error.
15565 Use char because int might match the return type of a GCC
15566 builtin and then its argument prototype would still apply.
15567 The 'extern "C"' is for builds by C++ compilers;
15568 although this is not generally supported in C code, supporting it here
15569 has little cost and some practical benefit (sr 110532). */
15570 #ifdef __cplusplus
15571 extern "C"
15572 #endif
15573 char sched_yield (void);
15575 main (void)
15577 return sched_yield ();
15579 return 0;
15581 _ACEOF
15582 if ac_fn_c_try_link "$LINENO"
15583 then :
15584 ac_cv_lib_rt_sched_yield=yes
15585 else case e in #(
15586 e) ac_cv_lib_rt_sched_yield=no ;;
15587 esac
15589 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15590 conftest$ac_exeext conftest.$ac_ext
15591 LIBS=$ac_check_lib_save_LIBS ;;
15592 esac
15594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
15595 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
15596 if test "x$ac_cv_lib_rt_sched_yield" = xyes
15597 then :
15598 LIB_SCHED_YIELD=-lrt
15599 else case e in #(
15600 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
15601 printf %s "checking for sched_yield in -lposix4... " >&6; }
15602 if test ${ac_cv_lib_posix4_sched_yield+y}
15603 then :
15604 printf %s "(cached) " >&6
15605 else case e in #(
15606 e) ac_check_lib_save_LIBS=$LIBS
15607 LIBS="-lposix4 $LIBS"
15608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15609 /* end confdefs.h. */
15611 /* Override any GCC internal prototype to avoid an error.
15612 Use char because int might match the return type of a GCC
15613 builtin and then its argument prototype would still apply.
15614 The 'extern "C"' is for builds by C++ compilers;
15615 although this is not generally supported in C code, supporting it here
15616 has little cost and some practical benefit (sr 110532). */
15617 #ifdef __cplusplus
15618 extern "C"
15619 #endif
15620 char sched_yield (void);
15622 main (void)
15624 return sched_yield ();
15626 return 0;
15628 _ACEOF
15629 if ac_fn_c_try_link "$LINENO"
15630 then :
15631 ac_cv_lib_posix4_sched_yield=yes
15632 else case e in #(
15633 e) ac_cv_lib_posix4_sched_yield=no ;;
15634 esac
15636 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15637 conftest$ac_exeext conftest.$ac_ext
15638 LIBS=$ac_check_lib_save_LIBS ;;
15639 esac
15641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
15642 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
15643 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
15644 then :
15645 LIB_SCHED_YIELD=-lposix4
15648 esac
15652 esac
15654 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15655 conftest$ac_exeext conftest.$ac_ext
15658 gl_pthreadlib_body_done=done
15661 if test $ac_cv_header_threads_h = yes; then
15662 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
15663 if test "x$ac_cv_func_thrd_create" = xyes
15664 then :
15665 printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h
15669 if test $ac_cv_func_thrd_create = yes; then
15670 LIBSTDTHREAD=
15671 else
15672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
15673 printf %s "checking for thrd_create in -lstdthreads... " >&6; }
15674 if test ${ac_cv_lib_stdthreads_thrd_create+y}
15675 then :
15676 printf %s "(cached) " >&6
15677 else case e in #(
15678 e) ac_check_lib_save_LIBS=$LIBS
15679 LIBS="-lstdthreads $LIBS"
15680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15681 /* end confdefs.h. */
15683 /* Override any GCC internal prototype to avoid an error.
15684 Use char because int might match the return type of a GCC
15685 builtin and then its argument prototype would still apply.
15686 The 'extern "C"' is for builds by C++ compilers;
15687 although this is not generally supported in C code, supporting it here
15688 has little cost and some practical benefit (sr 110532). */
15689 #ifdef __cplusplus
15690 extern "C"
15691 #endif
15692 char thrd_create (void);
15694 main (void)
15696 return thrd_create ();
15698 return 0;
15700 _ACEOF
15701 if ac_fn_c_try_link "$LINENO"
15702 then :
15703 ac_cv_lib_stdthreads_thrd_create=yes
15704 else case e in #(
15705 e) ac_cv_lib_stdthreads_thrd_create=no ;;
15706 esac
15708 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15709 conftest$ac_exeext conftest.$ac_ext
15710 LIBS=$ac_check_lib_save_LIBS ;;
15711 esac
15713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
15714 printf "%s\n" "$ac_cv_lib_stdthreads_thrd_create" >&6; }
15715 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes
15716 then :
15718 LIBSTDTHREAD='-lstdthreads -lpthread'
15720 else case e in #(
15722 LIBSTDTHREAD="$LIBPMULTITHREAD"
15724 esac
15728 else
15729 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
15732 esac
15735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
15736 printf %s "checking whether ISO C threads API is available... " >&6; }
15737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
15738 printf "%s\n" "$ac_cv_header_threads_h" >&6; }
15739 gl_stdthreadlib_body_done=done
15742 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
15743 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
15744 gl_threads_api=isoc
15746 printf "%s\n" "#define USE_ISOC_THREADS 1" >>confdefs.h
15750 if test $gl_threads_api = none; then
15751 case "$gl_use_threads" in
15752 yes | windows | win32) # The 'win32' is for backward compatibility.
15753 if { case "$host_os" in
15754 mingw*) true;;
15755 *) false;;
15756 esac
15757 }; then
15758 gl_threads_api=windows
15760 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
15764 esac
15767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
15768 printf %s "checking for multithread API to use... " >&6; }
15769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
15770 printf "%s\n" "$gl_threads_api" >&6; }
15780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
15781 printf %s "checking for a sed that does not truncate output... " >&6; }
15782 if test ${ac_cv_path_SED+y}
15783 then :
15784 printf %s "(cached) " >&6
15785 else case e in #(
15786 e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
15787 for ac_i in 1 2 3 4 5 6 7; do
15788 ac_script="$ac_script$as_nl$ac_script"
15789 done
15790 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
15791 { ac_script=; unset ac_script;}
15792 if test -z "$SED"; then
15793 ac_path_SED_found=false
15794 # Loop through the user's path and test for each of PROGNAME-LIST
15795 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15796 for as_dir in $PATH
15798 IFS=$as_save_IFS
15799 case $as_dir in #(((
15800 '') as_dir=./ ;;
15801 */) ;;
15802 *) as_dir=$as_dir/ ;;
15803 esac
15804 for ac_prog in sed gsed
15806 for ac_exec_ext in '' $ac_executable_extensions; do
15807 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
15808 as_fn_executable_p "$ac_path_SED" || continue
15809 # Check for GNU ac_path_SED and select it if it is found.
15810 # Check for GNU $ac_path_SED
15811 case `"$ac_path_SED" --version 2>&1` in
15812 *GNU*)
15813 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
15815 ac_count=0
15816 printf %s 0123456789 >"conftest.in"
15817 while :
15819 cat "conftest.in" "conftest.in" >"conftest.tmp"
15820 mv "conftest.tmp" "conftest.in"
15821 cp "conftest.in" "conftest.nl"
15822 printf "%s\n" '' >> "conftest.nl"
15823 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
15824 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
15825 as_fn_arith $ac_count + 1 && ac_count=$as_val
15826 if test $ac_count -gt ${ac_path_SED_max-0}; then
15827 # Best one so far, save it but keep looking for a better one
15828 ac_cv_path_SED="$ac_path_SED"
15829 ac_path_SED_max=$ac_count
15831 # 10*(2^10) chars as input seems more than enough
15832 test $ac_count -gt 10 && break
15833 done
15834 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
15835 esac
15837 $ac_path_SED_found && break 3
15838 done
15839 done
15840 done
15841 IFS=$as_save_IFS
15842 if test -z "$ac_cv_path_SED"; then
15843 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
15845 else
15846 ac_cv_path_SED=$SED
15849 esac
15851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
15852 printf "%s\n" "$ac_cv_path_SED" >&6; }
15853 SED="$ac_cv_path_SED"
15854 rm -f conftest.sed
15856 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
15857 printf %s "checking for grep that handles long lines and -e... " >&6; }
15858 if test ${ac_cv_path_GREP+y}
15859 then :
15860 printf %s "(cached) " >&6
15861 else case e in #(
15862 e) if test -z "$GREP"; then
15863 ac_path_GREP_found=false
15864 # Loop through the user's path and test for each of PROGNAME-LIST
15865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15866 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
15868 IFS=$as_save_IFS
15869 case $as_dir in #(((
15870 '') as_dir=./ ;;
15871 */) ;;
15872 *) as_dir=$as_dir/ ;;
15873 esac
15874 for ac_prog in grep ggrep
15876 for ac_exec_ext in '' $ac_executable_extensions; do
15877 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
15878 as_fn_executable_p "$ac_path_GREP" || continue
15879 # Check for GNU ac_path_GREP and select it if it is found.
15880 # Check for GNU $ac_path_GREP
15881 case `"$ac_path_GREP" --version 2>&1` in
15882 *GNU*)
15883 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
15885 ac_count=0
15886 printf %s 0123456789 >"conftest.in"
15887 while :
15889 cat "conftest.in" "conftest.in" >"conftest.tmp"
15890 mv "conftest.tmp" "conftest.in"
15891 cp "conftest.in" "conftest.nl"
15892 printf "%s\n" 'GREP' >> "conftest.nl"
15893 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
15894 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
15895 as_fn_arith $ac_count + 1 && ac_count=$as_val
15896 if test $ac_count -gt ${ac_path_GREP_max-0}; then
15897 # Best one so far, save it but keep looking for a better one
15898 ac_cv_path_GREP="$ac_path_GREP"
15899 ac_path_GREP_max=$ac_count
15901 # 10*(2^10) chars as input seems more than enough
15902 test $ac_count -gt 10 && break
15903 done
15904 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
15905 esac
15907 $ac_path_GREP_found && break 3
15908 done
15909 done
15910 done
15911 IFS=$as_save_IFS
15912 if test -z "$ac_cv_path_GREP"; then
15913 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
15915 else
15916 ac_cv_path_GREP=$GREP
15919 esac
15921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
15922 printf "%s\n" "$ac_cv_path_GREP" >&6; }
15923 GREP="$ac_cv_path_GREP"
15928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
15929 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
15930 if test ${ac_cv_func_malloc_0_nonnull+y}
15931 then :
15932 printf %s "(cached) " >&6
15933 else case e in #(
15934 e) if test "$cross_compiling" = yes
15935 then :
15936 case "$host_os" in
15937 # Guess yes on platforms where we know the result.
15938 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
15939 | gnu* | *-musl* | midnightbsd* \
15940 | hpux* | solaris* | cygwin* | mingw* | msys* )
15941 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
15942 # If we don't know, obey --enable-cross-guesses.
15943 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
15944 esac
15946 else case e in #(
15947 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15948 /* end confdefs.h. */
15949 #include <stdlib.h>
15952 main (void)
15954 void *p = malloc (0);
15955 int result = !p;
15956 free (p);
15957 return result;
15959 return 0;
15962 _ACEOF
15963 if ac_fn_c_try_run "$LINENO"
15964 then :
15965 ac_cv_func_malloc_0_nonnull=yes
15966 else case e in #(
15967 e) ac_cv_func_malloc_0_nonnull=no ;;
15968 esac
15970 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15971 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
15972 esac
15976 esac
15978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15979 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
15980 case $ac_cv_func_malloc_0_nonnull in #(
15981 *yes) :
15982 gl_cv_func_malloc_0_nonnull=1 ;; #(
15983 *) :
15984 gl_cv_func_malloc_0_nonnull=0 ;;
15985 esac
15988 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
15993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15994 printf %s "checking for mbstate_t... " >&6; }
15995 if test ${ac_cv_type_mbstate_t+y}
15996 then :
15997 printf %s "(cached) " >&6
15998 else case e in #(
15999 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16000 /* end confdefs.h. */
16001 $ac_includes_default
16002 #include <wchar.h>
16004 main (void)
16006 mbstate_t x; return sizeof x;
16008 return 0;
16010 _ACEOF
16011 if ac_fn_c_try_compile "$LINENO"
16012 then :
16013 ac_cv_type_mbstate_t=yes
16014 else case e in #(
16015 e) ac_cv_type_mbstate_t=no ;;
16016 esac
16018 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16019 esac
16021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
16022 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
16023 if test $ac_cv_type_mbstate_t = yes; then
16025 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
16027 else
16029 printf "%s\n" "#define mbstate_t int" >>confdefs.h
16038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
16039 printf %s "checking for a traditional japanese locale... " >&6; }
16040 if test ${gt_cv_locale_ja+y}
16041 then :
16042 printf %s "(cached) " >&6
16043 else case e in #(
16045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16046 /* end confdefs.h. */
16048 #include <locale.h>
16049 #include <time.h>
16050 #if HAVE_LANGINFO_CODESET
16051 # include <langinfo.h>
16052 #endif
16053 #include <stdlib.h>
16054 #include <string.h>
16055 struct tm t;
16056 char buf[16];
16057 int main ()
16059 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
16060 imitates locale dependent behaviour by looking at the environment
16061 variables, and all locales use the UTF-8 encoding. */
16062 #if defined __BEOS__ || defined __HAIKU__
16063 return 1;
16064 #else
16065 /* Check whether the given locale name is recognized by the system. */
16066 # if defined _WIN32 && !defined __CYGWIN__
16067 /* On native Windows, setlocale(category, "") looks at the system settings,
16068 not at the environment variables. Also, when an encoding suffix such
16069 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
16070 category of the locale to "C". */
16071 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
16072 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
16073 return 1;
16074 # else
16075 if (setlocale (LC_ALL, "") == NULL) return 1;
16076 # endif
16077 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
16078 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
16079 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
16080 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
16081 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
16082 some unit tests fail.
16083 On MirBSD 10, when an unsupported locale is specified, setlocale()
16084 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
16085 # if HAVE_LANGINFO_CODESET
16087 const char *cs = nl_langinfo (CODESET);
16088 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
16089 || strcmp (cs, "UTF-8") == 0)
16090 return 1;
16092 # endif
16093 # ifdef __CYGWIN__
16094 /* On Cygwin, avoid locale names without encoding suffix, because the
16095 locale_charset() function relies on the encoding suffix. Note that
16096 LC_ALL is set on the command line. */
16097 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
16098 # endif
16099 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
16100 on Cygwin 1.5.x. */
16101 if (MB_CUR_MAX == 1)
16102 return 1;
16103 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
16104 This excludes the UTF-8 encoding (except on MirBSD). */
16106 const char *p;
16107 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
16108 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
16109 for (p = buf; *p != '\0'; p++)
16110 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
16111 return 1;
16113 return 0;
16114 #endif
16117 _ACEOF
16118 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16119 (eval $ac_link) 2>&5
16120 ac_status=$?
16121 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16122 test $ac_status = 0; } && test -s conftest$ac_exeext; then
16123 case "$host_os" in
16124 # Handle native Windows specially, because there setlocale() interprets
16125 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
16126 # "fr" or "fra" as "French" or "French_France.1252",
16127 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
16128 # "ja" as "Japanese" or "Japanese_Japan.932",
16129 # and similar.
16130 mingw*)
16131 # Note that on native Windows, the Japanese locale is
16132 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
16133 # cannot use it here.
16134 gt_cv_locale_ja=none
16137 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
16138 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
16139 # configure script would override the LC_ALL setting. Likewise for
16140 # LC_CTYPE, which is also set at the beginning of the configure script.
16141 # Test for the AIX locale name.
16142 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16143 gt_cv_locale_ja=ja_JP
16144 else
16145 # Test for the locale name with explicit encoding suffix.
16146 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16147 gt_cv_locale_ja=ja_JP.EUC-JP
16148 else
16149 # Test for the HP-UX, OSF/1, NetBSD locale name.
16150 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16151 gt_cv_locale_ja=ja_JP.eucJP
16152 else
16153 # Test for the IRIX, FreeBSD locale name.
16154 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16155 gt_cv_locale_ja=ja_JP.EUC
16156 else
16157 # Test for the Solaris 7 locale name.
16158 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16159 gt_cv_locale_ja=ja
16160 else
16161 # Special test for NetBSD 1.6.
16162 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
16163 gt_cv_locale_ja=ja_JP.eucJP
16164 else
16165 # None found.
16166 gt_cv_locale_ja=none
16174 esac
16176 rm -fr conftest*
16178 esac
16180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
16181 printf "%s\n" "$gt_cv_locale_ja" >&6; }
16182 LOCALE_JA=$gt_cv_locale_ja
16187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
16188 printf %s "checking for a french Unicode locale... " >&6; }
16189 if test ${gt_cv_locale_fr_utf8+y}
16190 then :
16191 printf %s "(cached) " >&6
16192 else case e in #(
16194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16195 /* end confdefs.h. */
16197 #include <locale.h>
16198 #include <time.h>
16199 #if HAVE_LANGINFO_CODESET
16200 # include <langinfo.h>
16201 #endif
16202 #include <stdlib.h>
16203 #include <string.h>
16204 struct tm t;
16205 char buf[16];
16206 int main () {
16207 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
16208 imitates locale dependent behaviour by looking at the environment
16209 variables, and all locales use the UTF-8 encoding. */
16210 #if !(defined __BEOS__ || defined __HAIKU__)
16211 /* Check whether the given locale name is recognized by the system. */
16212 # if defined _WIN32 && !defined __CYGWIN__
16213 /* On native Windows, setlocale(category, "") looks at the system settings,
16214 not at the environment variables. Also, when an encoding suffix such
16215 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
16216 category of the locale to "C". */
16217 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
16218 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
16219 return 1;
16220 # else
16221 if (setlocale (LC_ALL, "") == NULL) return 1;
16222 # endif
16223 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
16224 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
16225 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
16226 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
16227 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
16228 some unit tests fail. */
16229 # if HAVE_LANGINFO_CODESET
16231 const char *cs = nl_langinfo (CODESET);
16232 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
16233 return 1;
16235 # endif
16236 # ifdef __CYGWIN__
16237 /* On Cygwin, avoid locale names without encoding suffix, because the
16238 locale_charset() function relies on the encoding suffix. Note that
16239 LC_ALL is set on the command line. */
16240 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
16241 # endif
16242 /* Check whether in the abbreviation of the second month, the second
16243 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
16244 two bytes long, with UTF-8 encoding. */
16245 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
16246 if (strftime (buf, sizeof (buf), "%b", &t) < 4
16247 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
16248 return 1;
16249 #endif
16250 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
16251 /* Check whether the decimal separator is a comma.
16252 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
16253 are nl_langinfo(RADIXCHAR) are both ".". */
16254 if (localeconv () ->decimal_point[0] != ',') return 1;
16255 #endif
16256 return 0;
16259 _ACEOF
16260 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16261 (eval $ac_link) 2>&5
16262 ac_status=$?
16263 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16264 test $ac_status = 0; } && test -s conftest$ac_exeext; then
16265 case "$host_os" in
16266 # Handle native Windows specially, because there setlocale() interprets
16267 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
16268 # "fr" or "fra" as "French" or "French_France.1252",
16269 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
16270 # "ja" as "Japanese" or "Japanese_Japan.932",
16271 # and similar.
16272 mingw*)
16273 # Test for the hypothetical native Windows locale name.
16274 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16275 gt_cv_locale_fr_utf8=French_France.65001
16276 else
16277 # None found.
16278 gt_cv_locale_fr_utf8=none
16282 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
16283 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
16284 # configure script would override the LC_ALL setting. Likewise for
16285 # LC_CTYPE, which is also set at the beginning of the configure script.
16286 # Test for the usual locale name.
16287 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16288 gt_cv_locale_fr_utf8=fr_FR
16289 else
16290 # Test for the locale name with explicit encoding suffix.
16291 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16292 gt_cv_locale_fr_utf8=fr_FR.UTF-8
16293 else
16294 # Test for the Solaris 7 locale name.
16295 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16296 gt_cv_locale_fr_utf8=fr.UTF-8
16297 else
16298 # None found.
16299 gt_cv_locale_fr_utf8=none
16304 esac
16306 rm -fr conftest*
16308 esac
16310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
16311 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
16312 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
16318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
16319 printf %s "checking for a transitional chinese locale... " >&6; }
16320 if test ${gt_cv_locale_zh_CN+y}
16321 then :
16322 printf %s "(cached) " >&6
16323 else case e in #(
16325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16326 /* end confdefs.h. */
16328 #include <locale.h>
16329 #include <stdlib.h>
16330 #include <time.h>
16331 #if HAVE_LANGINFO_CODESET
16332 # include <langinfo.h>
16333 #endif
16334 #include <stdlib.h>
16335 #include <string.h>
16336 struct tm t;
16337 char buf[16];
16338 int main ()
16340 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
16341 imitates locale dependent behaviour by looking at the environment
16342 variables, and all locales use the UTF-8 encoding. */
16343 #if defined __BEOS__ || defined __HAIKU__
16344 return 1;
16345 #else
16346 /* Check whether the given locale name is recognized by the system. */
16347 # if defined _WIN32 && !defined __CYGWIN__
16348 /* On native Windows, setlocale(category, "") looks at the system settings,
16349 not at the environment variables. Also, when an encoding suffix such
16350 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
16351 category of the locale to "C". */
16352 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
16353 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
16354 return 1;
16355 # else
16356 if (setlocale (LC_ALL, "") == NULL) return 1;
16357 # endif
16358 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
16359 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
16360 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
16361 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
16362 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
16363 some unit tests fail.
16364 On MirBSD 10, when an unsupported locale is specified, setlocale()
16365 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
16366 # if HAVE_LANGINFO_CODESET
16368 const char *cs = nl_langinfo (CODESET);
16369 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
16370 || strcmp (cs, "UTF-8") == 0)
16371 return 1;
16373 # endif
16374 # ifdef __CYGWIN__
16375 /* On Cygwin, avoid locale names without encoding suffix, because the
16376 locale_charset() function relies on the encoding suffix. Note that
16377 LC_ALL is set on the command line. */
16378 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
16379 # endif
16380 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
16381 This excludes the UTF-8 encoding (except on MirBSD). */
16383 const char *p;
16384 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
16385 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
16386 for (p = buf; *p != '\0'; p++)
16387 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
16388 return 1;
16390 /* Check whether a typical GB18030 multibyte sequence is recognized as a
16391 single wide character. This excludes the GB2312 and GBK encodings. */
16392 if (mblen ("\203\062\332\066", 5) != 4)
16393 return 1;
16394 return 0;
16395 #endif
16398 _ACEOF
16399 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16400 (eval $ac_link) 2>&5
16401 ac_status=$?
16402 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16403 test $ac_status = 0; } && test -s conftest$ac_exeext; then
16404 case "$host_os" in
16405 # Handle native Windows specially, because there setlocale() interprets
16406 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
16407 # "fr" or "fra" as "French" or "French_France.1252",
16408 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
16409 # "ja" as "Japanese" or "Japanese_Japan.932",
16410 # and similar.
16411 mingw*)
16412 # Test for the hypothetical native Windows locale name.
16413 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16414 gt_cv_locale_zh_CN=Chinese_China.54936
16415 else
16416 # None found.
16417 gt_cv_locale_zh_CN=none
16420 solaris2.8)
16421 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
16422 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
16423 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
16424 gt_cv_locale_zh_CN=none
16427 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
16428 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
16429 # configure script would override the LC_ALL setting. Likewise for
16430 # LC_CTYPE, which is also set at the beginning of the configure script.
16431 # Test for the locale name without encoding suffix.
16432 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16433 gt_cv_locale_zh_CN=zh_CN
16434 else
16435 # Test for the locale name with explicit encoding suffix.
16436 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16437 gt_cv_locale_zh_CN=zh_CN.GB18030
16438 else
16439 # None found.
16440 gt_cv_locale_zh_CN=none
16444 esac
16445 else
16446 # If there was a link error, due to mblen(), the system is so old that
16447 # it certainly doesn't have a chinese locale.
16448 gt_cv_locale_zh_CN=none
16450 rm -fr conftest*
16452 esac
16454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
16455 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
16456 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
16472 if case "$host_os" in
16473 mingw*) true ;;
16474 *) test $ac_cv_func_mbsinit = yes ;;
16475 esac \
16476 && test $ac_cv_func_mbrtowc = yes; then
16481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
16482 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
16483 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
16484 then :
16485 printf %s "(cached) " >&6
16486 else case e in #(
16488 case "$host_os" in
16489 # Guess no on AIX and OSF/1.
16490 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
16491 # Guess yes otherwise.
16492 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
16493 esac
16494 if test $LOCALE_JA != none; then
16495 if test "$cross_compiling" = yes
16496 then :
16498 else case e in #(
16499 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16500 /* end confdefs.h. */
16502 #include <locale.h>
16503 #include <string.h>
16504 #include <wchar.h>
16505 int main ()
16507 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
16509 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
16510 mbstate_t state;
16511 wchar_t wc;
16513 memset (&state, '\0', sizeof (mbstate_t));
16514 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
16515 if (mbsinit (&state))
16516 return 2;
16518 return 0;
16520 _ACEOF
16521 if ac_fn_c_try_run "$LINENO"
16522 then :
16523 gl_cv_func_mbrtowc_incomplete_state=yes
16524 else case e in #(
16525 e) gl_cv_func_mbrtowc_incomplete_state=no ;;
16526 esac
16528 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16529 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16530 esac
16533 else
16534 if test $LOCALE_FR_UTF8 != none; then
16535 if test "$cross_compiling" = yes
16536 then :
16538 else case e in #(
16539 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16540 /* end confdefs.h. */
16542 #include <locale.h>
16543 #include <string.h>
16544 #include <wchar.h>
16545 int main ()
16547 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
16549 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
16550 mbstate_t state;
16551 wchar_t wc;
16553 memset (&state, '\0', sizeof (mbstate_t));
16554 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
16555 if (mbsinit (&state))
16556 return 2;
16558 return 0;
16560 _ACEOF
16561 if ac_fn_c_try_run "$LINENO"
16562 then :
16563 gl_cv_func_mbrtowc_incomplete_state=yes
16564 else case e in #(
16565 e) gl_cv_func_mbrtowc_incomplete_state=no ;;
16566 esac
16568 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16569 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16570 esac
16576 esac
16578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
16579 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
16584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
16585 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
16586 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
16587 then :
16588 printf %s "(cached) " >&6
16589 else case e in #(
16591 case "$host_os" in
16592 # Guess no on Solaris 8.
16593 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
16594 # Guess yes otherwise.
16595 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
16596 esac
16597 if test $LOCALE_ZH_CN != none; then
16598 if test "$cross_compiling" = yes
16599 then :
16601 else case e in #(
16602 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16603 /* end confdefs.h. */
16605 #include <locale.h>
16606 #include <stdlib.h>
16607 #include <string.h>
16608 #include <wchar.h>
16609 int main ()
16611 /* This fails on Solaris 8:
16612 mbrtowc returns 2, and sets wc to 0x00F0.
16613 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
16614 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
16616 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
16617 mbstate_t state;
16618 wchar_t wc;
16620 memset (&state, '\0', sizeof (mbstate_t));
16621 if (mbrtowc (&wc, input + 3, 6, &state) != 4
16622 && mbtowc (&wc, input + 3, 6) == 4)
16623 return 2;
16625 return 0;
16627 _ACEOF
16628 if ac_fn_c_try_run "$LINENO"
16629 then :
16630 gl_cv_func_mbrtowc_sanitycheck=yes
16631 else case e in #(
16632 e) gl_cv_func_mbrtowc_sanitycheck=no ;;
16633 esac
16635 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16636 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16637 esac
16642 esac
16644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
16645 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
16647 REPLACE_MBSTATE_T=0
16648 case "$gl_cv_func_mbrtowc_incomplete_state" in
16649 *yes) ;;
16650 *) REPLACE_MBSTATE_T=1 ;;
16651 esac
16652 case "$gl_cv_func_mbrtowc_sanitycheck" in
16653 *yes) ;;
16654 *) REPLACE_MBSTATE_T=1 ;;
16655 esac
16656 else
16657 REPLACE_MBSTATE_T=1
16662 if test $ac_cv_func_mbrtowc = no; then
16663 HAVE_MBRTOWC=0
16664 ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
16665 #include <wchar.h>
16667 " "$ac_c_undeclared_builtin_options" "CFLAGS"
16668 if test "x$ac_cv_have_decl_mbrtowc" = xyes
16669 then :
16670 ac_have_decl=1
16671 else case e in #(
16672 e) ac_have_decl=0 ;;
16673 esac
16675 printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
16677 if test $ac_cv_have_decl_mbrtowc = yes; then
16678 REPLACE_MBRTOWC=1
16680 else
16681 if test $REPLACE_MBSTATE_T = 1; then
16682 REPLACE_MBRTOWC=1
16683 else
16687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
16688 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
16689 if test ${gl_cv_func_mbrtowc_null_arg1+y}
16690 then :
16691 printf %s "(cached) " >&6
16692 else case e in #(
16694 case "$host_os" in
16695 # Guess no on Solaris.
16696 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
16697 # Guess yes otherwise.
16698 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
16699 esac
16700 if test $LOCALE_FR_UTF8 != none; then
16701 if test "$cross_compiling" = yes
16702 then :
16704 else case e in #(
16705 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16706 /* end confdefs.h. */
16708 #include <locale.h>
16709 #include <stdlib.h>
16710 #include <string.h>
16711 #include <wchar.h>
16712 int main ()
16714 int result = 0;
16716 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
16718 char input[] = "\303\237er";
16719 mbstate_t state;
16720 wchar_t wc;
16721 size_t ret;
16723 memset (&state, '\0', sizeof (mbstate_t));
16724 wc = (wchar_t) 0xBADFACE;
16725 ret = mbrtowc (&wc, input, 5, &state);
16726 if (ret != 2)
16727 result |= 1;
16728 if (!mbsinit (&state))
16729 result |= 2;
16731 memset (&state, '\0', sizeof (mbstate_t));
16732 ret = mbrtowc (NULL, input, 5, &state);
16733 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
16734 result |= 4;
16735 if (!mbsinit (&state))
16736 result |= 8;
16738 return result;
16740 _ACEOF
16741 if ac_fn_c_try_run "$LINENO"
16742 then :
16743 gl_cv_func_mbrtowc_null_arg1=yes
16744 else case e in #(
16745 e) gl_cv_func_mbrtowc_null_arg1=no ;;
16746 esac
16748 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16749 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16750 esac
16755 esac
16757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
16758 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
16763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
16764 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
16765 if test ${gl_cv_func_mbrtowc_null_arg2+y}
16766 then :
16767 printf %s "(cached) " >&6
16768 else case e in #(
16770 case "$host_os" in
16771 # Guess no on OSF/1.
16772 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
16773 # Guess yes otherwise.
16774 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
16775 esac
16776 if test $LOCALE_FR_UTF8 != none; then
16777 if test "$cross_compiling" = yes
16778 then :
16780 else case e in #(
16781 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16782 /* end confdefs.h. */
16784 #include <locale.h>
16785 #include <string.h>
16786 #include <wchar.h>
16787 int main ()
16789 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
16791 mbstate_t state;
16792 wchar_t wc;
16793 int ret;
16795 memset (&state, '\0', sizeof (mbstate_t));
16796 wc = (wchar_t) 0xBADFACE;
16797 mbrtowc (&wc, NULL, 5, &state);
16798 /* Check that wc was not modified. */
16799 if (wc != (wchar_t) 0xBADFACE)
16800 return 2;
16802 return 0;
16804 _ACEOF
16805 if ac_fn_c_try_run "$LINENO"
16806 then :
16807 gl_cv_func_mbrtowc_null_arg2=yes
16808 else case e in #(
16809 e) gl_cv_func_mbrtowc_null_arg2=no ;;
16810 esac
16812 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16813 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16814 esac
16819 esac
16821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
16822 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
16829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
16830 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
16831 if test ${gl_cv_func_mbrtowc_retval+y}
16832 then :
16833 printf %s "(cached) " >&6
16834 else case e in #(
16836 case "$host_os" in
16837 # Guess no on HP-UX, Solaris, native Windows.
16838 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
16839 # Guess yes otherwise.
16840 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
16841 esac
16842 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
16843 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
16844 if test "$cross_compiling" = yes
16845 then :
16847 else case e in #(
16848 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16849 /* end confdefs.h. */
16851 #include <locale.h>
16852 #include <string.h>
16853 #include <wchar.h>
16854 int main ()
16856 int result = 0;
16857 int found_some_locale = 0;
16858 /* This fails on Solaris. */
16859 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
16861 char input[] = "B\303\274\303\237er"; /* "Büßer" */
16862 mbstate_t state;
16863 wchar_t wc;
16865 memset (&state, '\0', sizeof (mbstate_t));
16866 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
16868 input[1] = '\0';
16869 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
16870 result |= 1;
16872 found_some_locale = 1;
16874 /* This fails on HP-UX 11.11. */
16875 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
16877 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
16878 mbstate_t state;
16879 wchar_t wc;
16881 memset (&state, '\0', sizeof (mbstate_t));
16882 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
16884 input[1] = '\0';
16885 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
16886 result |= 2;
16888 found_some_locale = 1;
16890 /* This fails on native Windows. */
16891 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
16893 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
16894 mbstate_t state;
16895 wchar_t wc;
16897 memset (&state, '\0', sizeof (mbstate_t));
16898 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
16900 input[3] = '\0';
16901 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
16902 result |= 4;
16904 found_some_locale = 1;
16906 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
16908 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
16909 mbstate_t state;
16910 wchar_t wc;
16912 memset (&state, '\0', sizeof (mbstate_t));
16913 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
16915 input[3] = '\0';
16916 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
16917 result |= 8;
16919 found_some_locale = 1;
16921 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
16923 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
16924 mbstate_t state;
16925 wchar_t wc;
16927 memset (&state, '\0', sizeof (mbstate_t));
16928 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
16930 input[3] = '\0';
16931 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
16932 result |= 16;
16934 found_some_locale = 1;
16936 return (found_some_locale ? result : 77);
16938 _ACEOF
16939 if ac_fn_c_try_run "$LINENO"
16940 then :
16941 gl_cv_func_mbrtowc_retval=yes
16942 else case e in #(
16943 e) if test $? != 77; then
16944 gl_cv_func_mbrtowc_retval=no
16947 esac
16949 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16950 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16951 esac
16956 esac
16958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
16959 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
16964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
16965 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
16966 if test ${gl_cv_func_mbrtowc_nul_retval+y}
16967 then :
16968 printf %s "(cached) " >&6
16969 else case e in #(
16971 case "$host_os" in
16972 # Guess no on Solaris 8 and 9.
16973 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
16974 # Guess yes otherwise.
16975 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
16976 esac
16977 if test $LOCALE_ZH_CN != none; then
16978 if test "$cross_compiling" = yes
16979 then :
16981 else case e in #(
16982 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16983 /* end confdefs.h. */
16985 #include <locale.h>
16986 #include <string.h>
16987 #include <wchar.h>
16988 int main ()
16990 /* This fails on Solaris 8 and 9. */
16991 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
16993 mbstate_t state;
16994 wchar_t wc;
16996 memset (&state, '\0', sizeof (mbstate_t));
16997 if (mbrtowc (&wc, "", 1, &state) != 0)
16998 return 2;
17000 return 0;
17002 _ACEOF
17003 if ac_fn_c_try_run "$LINENO"
17004 then :
17005 gl_cv_func_mbrtowc_nul_retval=yes
17006 else case e in #(
17007 e) gl_cv_func_mbrtowc_nul_retval=no ;;
17008 esac
17010 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17011 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17012 esac
17017 esac
17019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
17020 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
17024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
17025 printf %s "checking whether mbrtowc stores incomplete characters... " >&6; }
17026 if test ${gl_cv_func_mbrtowc_stores_incomplete+y}
17027 then :
17028 printf %s "(cached) " >&6
17029 else case e in #(
17031 case "$host_os" in
17032 # Guess yes on native Windows.
17033 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
17034 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
17035 esac
17036 case "$host_os" in
17037 mingw*)
17038 if test "$cross_compiling" = yes
17039 then :
17041 else case e in #(
17042 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17043 /* end confdefs.h. */
17045 #include <locale.h>
17046 #include <string.h>
17047 #include <wchar.h>
17048 int main ()
17050 int result = 0;
17051 if (setlocale (LC_ALL, "French_France.65001") != NULL)
17053 wchar_t wc = (wchar_t) 0xBADFACE;
17054 mbstate_t state;
17056 memset (&state, '\0', sizeof (mbstate_t));
17057 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
17058 && wc != (wchar_t) 0xBADFACE)
17059 result |= 1;
17061 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
17063 wchar_t wc = (wchar_t) 0xBADFACE;
17064 mbstate_t state;
17066 memset (&state, '\0', sizeof (mbstate_t));
17067 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
17068 && wc != (wchar_t) 0xBADFACE)
17069 result |= 2;
17071 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
17073 wchar_t wc = (wchar_t) 0xBADFACE;
17074 mbstate_t state;
17076 memset (&state, '\0', sizeof (mbstate_t));
17077 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
17078 && wc != (wchar_t) 0xBADFACE)
17079 result |= 4;
17081 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
17083 wchar_t wc = (wchar_t) 0xBADFACE;
17084 mbstate_t state;
17086 memset (&state, '\0', sizeof (mbstate_t));
17087 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
17088 && wc != (wchar_t) 0xBADFACE)
17089 result |= 8;
17091 return result;
17093 _ACEOF
17094 if ac_fn_c_try_run "$LINENO"
17095 then :
17096 gl_cv_func_mbrtowc_stores_incomplete=no
17097 else case e in #(
17098 e) gl_cv_func_mbrtowc_stores_incomplete=yes ;;
17099 esac
17101 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17102 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17103 esac
17109 if test $LOCALE_FR_UTF8 != none; then
17110 if test "$cross_compiling" = yes
17111 then :
17113 else case e in #(
17114 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17115 /* end confdefs.h. */
17117 #include <locale.h>
17118 #include <string.h>
17119 #include <wchar.h>
17120 int main ()
17122 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
17124 wchar_t wc = (wchar_t) 0xBADFACE;
17125 mbstate_t state;
17127 memset (&state, '\0', sizeof (mbstate_t));
17128 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
17129 && wc != (wchar_t) 0xBADFACE)
17130 return 1;
17132 return 0;
17134 _ACEOF
17135 if ac_fn_c_try_run "$LINENO"
17136 then :
17137 gl_cv_func_mbrtowc_stores_incomplete=no
17138 else case e in #(
17139 e) gl_cv_func_mbrtowc_stores_incomplete=yes ;;
17140 esac
17142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17143 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17144 esac
17149 esac
17151 esac
17153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
17154 printf "%s\n" "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
17158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
17159 printf %s "checking whether mbrtowc works on empty input... " >&6; }
17160 if test ${gl_cv_func_mbrtowc_empty_input+y}
17161 then :
17162 printf %s "(cached) " >&6
17163 else case e in #(
17165 case "$host_os" in
17166 # Guess no on AIX and glibc systems.
17167 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
17168 # Guess yes on native Windows.
17169 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
17170 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
17171 esac
17172 if test "$cross_compiling" = yes
17173 then :
17175 else case e in #(
17176 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17177 /* end confdefs.h. */
17179 #include <wchar.h>
17180 static wchar_t wc;
17181 static mbstate_t mbs;
17183 main (void)
17185 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
17187 _ACEOF
17188 if ac_fn_c_try_run "$LINENO"
17189 then :
17190 gl_cv_func_mbrtowc_empty_input=yes
17191 else case e in #(
17192 e) gl_cv_func_mbrtowc_empty_input=no ;;
17193 esac
17195 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17196 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17197 esac
17201 esac
17203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
17204 printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
17207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
17208 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
17209 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
17210 then :
17211 printf %s "(cached) " >&6
17212 else case e in #(
17214 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
17216 if test "$cross_compiling" = yes
17217 then :
17218 case "$host_os" in
17219 # Guess yes on native Windows.
17220 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
17221 esac
17223 else case e in #(
17224 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17225 /* end confdefs.h. */
17226 #include <limits.h>
17227 #include <locale.h>
17228 #include <wchar.h>
17231 main (void)
17234 int i;
17235 char *locale = setlocale (LC_ALL, "C");
17236 if (! locale)
17237 return 2;
17238 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
17240 char c = i;
17241 wchar_t wc;
17242 mbstate_t mbs = { 0, };
17243 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
17244 if (1 < ss)
17245 return 3;
17247 return 0;
17250 return 0;
17252 _ACEOF
17253 if ac_fn_c_try_run "$LINENO"
17254 then :
17255 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
17256 else case e in #(
17257 e) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no ;;
17258 esac
17260 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17261 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17262 esac
17266 esac
17268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
17269 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
17271 case "$gl_cv_func_mbrtowc_null_arg1" in
17272 *yes) ;;
17274 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
17276 REPLACE_MBRTOWC=1
17278 esac
17279 case "$gl_cv_func_mbrtowc_null_arg2" in
17280 *yes) ;;
17282 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
17284 REPLACE_MBRTOWC=1
17286 esac
17287 case "$gl_cv_func_mbrtowc_retval" in
17288 *yes) ;;
17290 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
17292 REPLACE_MBRTOWC=1
17294 esac
17295 case "$gl_cv_func_mbrtowc_nul_retval" in
17296 *yes) ;;
17298 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
17300 REPLACE_MBRTOWC=1
17302 esac
17303 case "$gl_cv_func_mbrtowc_stores_incomplete" in
17304 *no) ;;
17306 printf "%s\n" "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
17308 REPLACE_MBRTOWC=1
17310 esac
17311 case "$gl_cv_func_mbrtowc_empty_input" in
17312 *yes) ;;
17314 printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
17316 REPLACE_MBRTOWC=1
17318 esac
17319 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
17320 *yes) ;;
17322 printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
17324 REPLACE_MBRTOWC=1
17326 esac
17329 if test $REPLACE_MBSTATE_T = 1; then
17330 case "$host_os" in
17331 mingw*) LIB_MBRTOWC= ;;
17335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
17336 printf %s "checking whether imported symbols can be declared weak... " >&6; }
17337 if test ${gl_cv_have_weak+y}
17338 then :
17339 printf %s "(cached) " >&6
17340 else case e in #(
17341 e) case "$host_os" in
17342 cygwin*)
17343 gl_cv_have_weak="guessing no"
17346 gl_cv_have_weak=no
17347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17348 /* end confdefs.h. */
17349 extern void xyzzy ();
17350 #pragma weak xyzzy
17352 main (void)
17354 xyzzy();
17356 return 0;
17358 _ACEOF
17359 if ac_fn_c_try_link "$LINENO"
17360 then :
17361 gl_cv_have_weak=maybe
17363 rm -f core conftest.err conftest.$ac_objext conftest.beam \
17364 conftest$ac_exeext conftest.$ac_ext
17365 if test $gl_cv_have_weak = maybe; then
17366 if test "$cross_compiling" = yes
17367 then :
17368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17369 /* end confdefs.h. */
17370 #ifdef __ELF__
17371 Extensible Linking Format
17372 #endif
17374 _ACEOF
17375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17376 $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
17377 then :
17378 gl_cv_have_weak="guessing yes"
17379 else case e in #(
17380 e) gl_cv_have_weak="guessing no" ;;
17381 esac
17383 rm -rf conftest*
17386 else case e in #(
17387 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17388 /* end confdefs.h. */
17390 #include <stdio.h>
17391 #pragma weak fputs
17392 int main ()
17394 return (fputs == NULL);
17396 _ACEOF
17397 if ac_fn_c_try_run "$LINENO"
17398 then :
17399 gl_cv_have_weak=yes
17400 else case e in #(
17401 e) gl_cv_have_weak=no ;;
17402 esac
17404 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17405 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17406 esac
17411 esac
17412 case " $LDFLAGS " in
17413 *" -static "*) gl_cv_have_weak=no ;;
17414 esac
17415 case "$gl_cv_have_weak" in
17416 *yes)
17417 case "$host_os" in
17418 freebsd* | dragonfly* | midnightbsd*)
17419 : > conftest1.c
17420 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
17421 cat <<EOF > conftest2.c
17422 #include <pthread.h>
17423 #pragma weak pthread_mutexattr_gettype
17424 int main ()
17426 return (pthread_mutexattr_gettype != NULL);
17429 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
17430 || gl_cv_have_weak=no
17431 rm -f conftest1.c libempty.so conftest2.c conftest
17433 esac
17435 esac
17437 esac
17439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
17440 printf "%s\n" "$gl_cv_have_weak" >&6; }
17441 case "$gl_cv_have_weak" in
17442 *yes)
17444 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
17447 esac
17449 case "$gl_cv_have_weak" in
17450 *yes) LIB_MBRTOWC= ;;
17451 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
17452 esac
17454 esac
17455 else
17456 LIB_MBRTOWC=
17464 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
17465 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
17466 # irrelevant for anonymous mappings.
17467 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
17468 if test "x$ac_cv_func_mmap" = xyes
17469 then :
17470 gl_have_mmap=yes
17471 else case e in #(
17472 e) gl_have_mmap=no ;;
17473 esac
17477 # Try to allow MAP_ANONYMOUS.
17478 gl_have_mmap_anonymous=no
17479 if test $gl_have_mmap = yes; then
17480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
17481 printf %s "checking for MAP_ANONYMOUS... " >&6; }
17482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17483 /* end confdefs.h. */
17485 #include <sys/mman.h>
17486 #ifdef MAP_ANONYMOUS
17487 I cannot identify this map
17488 #endif
17490 _ACEOF
17491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17492 $EGREP_TRADITIONAL "I cannot identify this map" >/dev/null 2>&1
17493 then :
17494 gl_have_mmap_anonymous=yes
17496 rm -rf conftest*
17498 if test $gl_have_mmap_anonymous != yes; then
17499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17500 /* end confdefs.h. */
17502 #include <sys/mman.h>
17503 #ifdef MAP_ANON
17504 I cannot identify this map
17505 #endif
17507 _ACEOF
17508 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17509 $EGREP_TRADITIONAL "I cannot identify this map" >/dev/null 2>&1
17510 then :
17512 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
17514 gl_have_mmap_anonymous=yes
17516 rm -rf conftest*
17519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
17520 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
17521 if test $gl_have_mmap_anonymous = yes; then
17523 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
17531 HAVE_MBSLEN=0;
17532 HAVE_EXPLICIT_BZERO=1;
17533 HAVE_FFSL=1;
17534 HAVE_FFSLL=1;
17535 HAVE_DECL_MEMMEM=1;
17536 HAVE_MEMPCPY=1;
17537 HAVE_DECL_MEMRCHR=1;
17538 HAVE_RAWMEMCHR=1;
17539 HAVE_STPCPY=1;
17540 HAVE_STPNCPY=1;
17541 HAVE_STRCHRNUL=1;
17542 HAVE_DECL_STRDUP=1;
17543 HAVE_DECL_STRNDUP=1;
17544 HAVE_DECL_STRNLEN=1;
17545 HAVE_STRPBRK=1;
17546 HAVE_STRSEP=1;
17547 HAVE_STRCASESTR=1;
17548 HAVE_DECL_STRTOK_R=1;
17549 HAVE_DECL_STRERROR_R=1;
17550 HAVE_STRERRORNAME_NP=1;
17551 HAVE_SIGABBREV_NP=1;
17552 HAVE_SIGDESCR_NP=1;
17553 HAVE_DECL_STRSIGNAL=1;
17554 HAVE_STRVERSCMP=1;
17555 REPLACE_FFSLL=0;
17556 REPLACE_MEMCHR=0;
17557 REPLACE_MEMMEM=0;
17558 REPLACE_STPNCPY=0;
17559 REPLACE_STRCHRNUL=0;
17560 REPLACE_STRDUP=0;
17561 REPLACE_STRNCAT=0;
17562 REPLACE_STRNDUP=0;
17563 REPLACE_STRNLEN=0;
17564 REPLACE_STRSTR=0;
17565 REPLACE_STRCASESTR=0;
17566 REPLACE_STRTOK_R=0;
17567 REPLACE_STRERROR=0;
17568 REPLACE_STRERROR_R=0;
17569 REPLACE_STRERRORNAME_NP=0;
17570 REPLACE_STRSIGNAL=0;
17571 UNDEFINE_STRTOK_R=0;
17580 # Detect platform-specific bugs in some versions of glibc:
17581 # memchr should not dereference anything with length 0
17582 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
17583 # memchr should not dereference overestimated length after a match
17584 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
17585 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
17586 # memchr should cast the second argument to 'unsigned char'.
17587 # This bug exists in Android 4.3.
17588 # Assume that memchr works on platforms that lack mprotect.
17589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
17590 printf %s "checking whether memchr works... " >&6; }
17591 if test ${gl_cv_func_memchr_works+y}
17592 then :
17593 printf %s "(cached) " >&6
17594 else case e in #(
17595 e) if test "$cross_compiling" = yes
17596 then :
17597 case "$host_os" in
17598 # Guess no on Android.
17599 linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
17600 # Guess yes on native Windows.
17601 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
17602 # If we don't know, obey --enable-cross-guesses.
17603 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
17604 esac
17606 else case e in #(
17607 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17608 /* end confdefs.h. */
17610 #include <string.h>
17611 #if HAVE_SYS_MMAN_H
17612 # include <fcntl.h>
17613 # include <unistd.h>
17614 # include <sys/types.h>
17615 # include <sys/mman.h>
17616 # ifndef MAP_FILE
17617 # define MAP_FILE 0
17618 # endif
17619 #endif
17622 main (void)
17625 int result = 0;
17626 char *fence = NULL;
17627 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
17628 # if HAVE_MAP_ANONYMOUS
17629 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
17630 const int fd = -1;
17631 # else /* !HAVE_MAP_ANONYMOUS */
17632 const int flags = MAP_FILE | MAP_PRIVATE;
17633 int fd = open ("/dev/zero", O_RDONLY, 0666);
17634 if (fd >= 0)
17635 # endif
17637 int pagesize = getpagesize ();
17638 char *two_pages =
17639 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
17640 flags, fd, 0);
17641 if (two_pages != (char *)(-1)
17642 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
17643 fence = two_pages + pagesize;
17645 #endif
17646 if (fence)
17648 /* Test against bugs on glibc systems. */
17649 if (memchr (fence, 0, 0))
17650 result |= 1;
17651 strcpy (fence - 9, "12345678");
17652 if (memchr (fence - 9, 0, 79) != fence - 1)
17653 result |= 2;
17654 if (memchr (fence - 1, 0, 3) != fence - 1)
17655 result |= 4;
17656 /* Test against bug on AIX 7.2. */
17657 if (memchr (fence - 4, '6', 16) != fence - 4)
17658 result |= 8;
17660 /* Test against bug on Android 4.3. */
17662 char input[3];
17663 input[0] = 'a';
17664 input[1] = 'b';
17665 input[2] = 'c';
17666 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
17667 result |= 16;
17669 return result;
17672 return 0;
17674 _ACEOF
17675 if ac_fn_c_try_run "$LINENO"
17676 then :
17677 gl_cv_func_memchr_works=yes
17678 else case e in #(
17679 e) gl_cv_func_memchr_works=no ;;
17680 esac
17682 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17683 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17684 esac
17688 esac
17690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
17691 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
17692 case "$gl_cv_func_memchr_works" in
17693 *yes) ;;
17694 *) REPLACE_MEMCHR=1 ;;
17695 esac
17699 GL_GNULIB_EXPLICIT_BZERO=0
17703 GL_GNULIB_FFSL=0
17707 GL_GNULIB_FFSLL=0
17711 GL_GNULIB_MEMCHR=0
17715 GL_GNULIB_MEMMEM=0
17719 GL_GNULIB_MEMPCPY=0
17723 GL_GNULIB_MEMRCHR=0
17727 GL_GNULIB_RAWMEMCHR=0
17731 GL_GNULIB_STPCPY=0
17735 GL_GNULIB_STPNCPY=0
17739 GL_GNULIB_STRCHRNUL=0
17743 GL_GNULIB_STRDUP=0
17747 GL_GNULIB_STRNCAT=0
17751 GL_GNULIB_STRNDUP=0
17755 GL_GNULIB_STRNLEN=0
17759 GL_GNULIB_STRPBRK=0
17763 GL_GNULIB_STRSEP=0
17767 GL_GNULIB_STRSTR=0
17771 GL_GNULIB_STRCASESTR=0
17775 GL_GNULIB_STRTOK_R=0
17779 GL_GNULIB_MBSLEN=0
17783 GL_GNULIB_MBSNLEN=0
17787 GL_GNULIB_MBSCHR=0
17791 GL_GNULIB_MBSRCHR=0
17795 GL_GNULIB_MBSSTR=0
17799 GL_GNULIB_MBSCASECMP=0
17803 GL_GNULIB_MBSNCASECMP=0
17807 GL_GNULIB_MBSPCASECMP=0
17811 GL_GNULIB_MBSCASESTR=0
17815 GL_GNULIB_MBSCSPN=0
17819 GL_GNULIB_MBSPBRK=0
17823 GL_GNULIB_MBSSPN=0
17827 GL_GNULIB_MBSSEP=0
17831 GL_GNULIB_MBSTOK_R=0
17835 GL_GNULIB_STRERROR=0
17839 GL_GNULIB_STRERROR_R=0
17843 GL_GNULIB_STRERRORNAME_NP=0
17847 GL_GNULIB_SIGABBREV_NP=0
17851 GL_GNULIB_SIGDESCR_NP=0
17855 GL_GNULIB_STRSIGNAL=0
17859 GL_GNULIB_STRVERSCMP=0
17863 GL_GNULIB_MDA_MEMCCPY=1
17867 GL_GNULIB_MDA_STRDUP=1
17871 ac_fn_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
17872 if test "x$ac_cv_have_decl_memrchr" = xyes
17873 then :
17874 ac_have_decl=1
17875 else case e in #(
17876 e) ac_have_decl=0 ;;
17877 esac
17879 printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h
17885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
17886 printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
17887 if test ${gl_cv_minmax_in_limits_h+y}
17888 then :
17889 printf %s "(cached) " >&6
17890 else case e in #(
17891 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17892 /* end confdefs.h. */
17893 #include <limits.h>
17894 int x = MIN (42, 17);
17896 main (void)
17900 return 0;
17902 _ACEOF
17903 if ac_fn_c_try_compile "$LINENO"
17904 then :
17905 gl_cv_minmax_in_limits_h=yes
17906 else case e in #(
17907 e) gl_cv_minmax_in_limits_h=no ;;
17908 esac
17910 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17911 esac
17913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
17914 printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
17915 if test $gl_cv_minmax_in_limits_h = yes; then
17917 printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
17926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
17927 printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
17928 if test ${gl_cv_minmax_in_sys_param_h+y}
17929 then :
17930 printf %s "(cached) " >&6
17931 else case e in #(
17932 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17933 /* end confdefs.h. */
17934 #include <sys/param.h>
17935 int x = MIN (42, 17);
17937 main (void)
17941 return 0;
17943 _ACEOF
17944 if ac_fn_c_try_compile "$LINENO"
17945 then :
17946 gl_cv_minmax_in_sys_param_h=yes
17947 else case e in #(
17948 e) gl_cv_minmax_in_sys_param_h=no ;;
17949 esac
17951 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
17952 esac
17954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
17955 printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
17956 if test $gl_cv_minmax_in_sys_param_h = yes; then
17958 printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
17971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
17972 printf %s "checking for O_CLOEXEC... " >&6; }
17973 if test ${gl_cv_macro_O_CLOEXEC+y}
17974 then :
17975 printf %s "(cached) " >&6
17976 else case e in #(
17977 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17978 /* end confdefs.h. */
17979 #include <fcntl.h>
17980 #ifndef O_CLOEXEC
17981 choke me;
17982 #endif
17985 main (void)
17987 return O_CLOEXEC;
17989 return 0;
17991 _ACEOF
17992 if ac_fn_c_try_compile "$LINENO"
17993 then :
17994 gl_cv_macro_O_CLOEXEC=yes
17995 else case e in #(
17996 e) gl_cv_macro_O_CLOEXEC=no ;;
17997 esac
17999 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18000 esac
18002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
18003 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
18007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
18008 printf %s "checking for promoted mode_t type... " >&6; }
18009 if test ${gl_cv_promoted_mode_t+y}
18010 then :
18011 printf %s "(cached) " >&6
18012 else case e in #(
18014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18015 /* end confdefs.h. */
18016 #include <sys/types.h>
18018 main (void)
18020 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
18022 return 0;
18024 _ACEOF
18025 if ac_fn_c_try_compile "$LINENO"
18026 then :
18027 gl_cv_promoted_mode_t='int'
18028 else case e in #(
18029 e) gl_cv_promoted_mode_t='mode_t' ;;
18030 esac
18032 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18034 esac
18036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
18037 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
18039 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
18046 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
18047 REPLACE_REALLOC_FOR_REALLOC_POSIX=1
18050 ac_fn_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
18051 if test "x$ac_cv_have_decl_alarm" = xyes
18052 then :
18053 ac_have_decl=1
18054 else case e in #(
18055 e) ac_have_decl=0 ;;
18056 esac
18058 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
18069 # Check whether --with-selinux was given.
18070 if test ${with_selinux+y}
18071 then :
18072 withval=$with_selinux;
18073 else case e in #(
18074 e) with_selinux=maybe ;;
18075 esac
18079 LIB_SELINUX=
18080 if test "$with_selinux" != no; then
18081 gl_save_LIBS=$LIBS
18082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
18083 printf %s "checking for library containing setfilecon... " >&6; }
18084 if test ${ac_cv_search_setfilecon+y}
18085 then :
18086 printf %s "(cached) " >&6
18087 else case e in #(
18088 e) ac_func_search_save_LIBS=$LIBS
18089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18090 /* end confdefs.h. */
18092 /* Override any GCC internal prototype to avoid an error.
18093 Use char because int might match the return type of a GCC
18094 builtin and then its argument prototype would still apply.
18095 The 'extern "C"' is for builds by C++ compilers;
18096 although this is not generally supported in C code, supporting it here
18097 has little cost and some practical benefit (sr 110532). */
18098 #ifdef __cplusplus
18099 extern "C"
18100 #endif
18101 char setfilecon (void);
18103 main (void)
18105 return setfilecon ();
18107 return 0;
18109 _ACEOF
18110 for ac_lib in '' selinux
18112 if test -z "$ac_lib"; then
18113 ac_res="none required"
18114 else
18115 ac_res=-l$ac_lib
18116 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18118 if ac_fn_c_try_link "$LINENO"
18119 then :
18120 ac_cv_search_setfilecon=$ac_res
18122 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18123 conftest$ac_exeext
18124 if test ${ac_cv_search_setfilecon+y}
18125 then :
18126 break
18128 done
18129 if test ${ac_cv_search_setfilecon+y}
18130 then :
18132 else case e in #(
18133 e) ac_cv_search_setfilecon=no ;;
18134 esac
18136 rm conftest.$ac_ext
18137 LIBS=$ac_func_search_save_LIBS ;;
18138 esac
18140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
18141 printf "%s\n" "$ac_cv_search_setfilecon" >&6; }
18142 ac_res=$ac_cv_search_setfilecon
18143 if test "$ac_res" != no
18144 then :
18145 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18146 test "$ac_cv_search_setfilecon" = "none required" ||
18147 LIB_SELINUX=$ac_cv_search_setfilecon
18150 LIBS=$gl_save_LIBS
18154 # Warn if SELinux is found but libselinux is absent;
18155 if test "$ac_cv_search_setfilecon" = no; then
18156 if test "$host" = "$build" && test -d /selinux; then
18157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
18158 printf "%s\n" "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
18159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: GNU sed will be compiled without SELinux support." >&5
18160 printf "%s\n" "$as_me: WARNING: GNU sed will be compiled without SELinux support." >&2;}
18162 with_selinux=no
18172 ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
18173 if test "x$ac_cv_have_decl_fcloseall" = xyes
18174 then :
18175 ac_have_decl=1
18176 else case e in #(
18177 e) ac_have_decl=0 ;;
18178 esac
18180 printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
18185 printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
18195 if test $gl_cv_have_include_next = yes; then
18196 gl_cv_next_stdio_h='<'stdio.h'>'
18197 else
18198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
18199 printf %s "checking absolute name of <stdio.h>... " >&6; }
18200 if test ${gl_cv_next_stdio_h+y}
18201 then :
18202 printf %s "(cached) " >&6
18203 else case e in #(
18207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18208 /* end confdefs.h. */
18209 #include <stdio.h>
18210 _ACEOF
18211 case "$host_os" in
18212 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18213 *) gl_absname_cpp="$ac_cpp" ;;
18214 esac
18216 case "$host_os" in
18217 mingw*)
18218 gl_dirsep_regex='[/\\]'
18221 gl_dirsep_regex='\/'
18223 esac
18224 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18225 gl_header_literal_regex=`echo 'stdio.h' \
18226 | sed -e "$gl_make_literal_regex_sed"`
18227 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18228 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18229 s|^/[^/]|//&|
18234 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18235 sed -n "$gl_absolute_header_sed"`
18237 gl_header=$gl_cv_absolute_stdio_h
18238 gl_cv_next_stdio_h='"'$gl_header'"'
18241 esac
18243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
18244 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
18246 NEXT_STDIO_H=$gl_cv_next_stdio_h
18248 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18249 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18250 gl_next_as_first_directive='<'stdio.h'>'
18251 else
18252 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18253 gl_next_as_first_directive=$gl_cv_next_stdio_h
18255 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
18261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
18262 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
18263 if test ${gl_cv_func_printf_attribute_flavor+y}
18264 then :
18265 printf %s "(cached) " >&6
18266 else case e in #(
18267 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18268 /* end confdefs.h. */
18270 #define __STDC_FORMAT_MACROS 1
18271 #include <stdio.h>
18272 #include <inttypes.h>
18273 /* For non-mingw systems, compilation will trivially succeed.
18274 For mingw, compilation will succeed for older mingw (system
18275 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
18276 #if (defined _WIN32 && ! defined __CYGWIN__) && \
18277 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
18278 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
18279 #endif
18282 main (void)
18286 return 0;
18288 _ACEOF
18289 if ac_fn_c_try_compile "$LINENO"
18290 then :
18291 gl_cv_func_printf_attribute_flavor=system
18292 else case e in #(
18293 e) gl_cv_func_printf_attribute_flavor=gnu ;;
18294 esac
18296 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18297 esac
18299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
18300 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
18301 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
18303 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
18319 if test $ac_cv_have_decl_fcloseall = no; then
18320 HAVE_DECL_FCLOSEALL=0
18323 ac_fn_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
18324 if test "x$ac_cv_have_decl_ecvt" = xyes
18325 then :
18326 ac_have_decl=1
18327 else case e in #(
18328 e) ac_have_decl=0 ;;
18329 esac
18331 printf "%s\n" "#define HAVE_DECL_ECVT $ac_have_decl" >>confdefs.h
18333 ac_fn_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
18334 if test "x$ac_cv_have_decl_fcvt" = xyes
18335 then :
18336 ac_have_decl=1
18337 else case e in #(
18338 e) ac_have_decl=0 ;;
18339 esac
18341 printf "%s\n" "#define HAVE_DECL_FCVT $ac_have_decl" >>confdefs.h
18343 ac_fn_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
18344 if test "x$ac_cv_have_decl_gcvt" = xyes
18345 then :
18346 ac_have_decl=1
18347 else case e in #(
18348 e) ac_have_decl=0 ;;
18349 esac
18351 printf "%s\n" "#define HAVE_DECL_GCVT $ac_have_decl" >>confdefs.h
18363 if test $gl_cv_have_include_next = yes; then
18364 gl_cv_next_stdlib_h='<'stdlib.h'>'
18365 else
18366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
18367 printf %s "checking absolute name of <stdlib.h>... " >&6; }
18368 if test ${gl_cv_next_stdlib_h+y}
18369 then :
18370 printf %s "(cached) " >&6
18371 else case e in #(
18375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18376 /* end confdefs.h. */
18377 #include <stdlib.h>
18378 _ACEOF
18379 case "$host_os" in
18380 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18381 *) gl_absname_cpp="$ac_cpp" ;;
18382 esac
18384 case "$host_os" in
18385 mingw*)
18386 gl_dirsep_regex='[/\\]'
18389 gl_dirsep_regex='\/'
18391 esac
18392 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18393 gl_header_literal_regex=`echo 'stdlib.h' \
18394 | sed -e "$gl_make_literal_regex_sed"`
18395 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18396 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18397 s|^/[^/]|//&|
18402 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18403 sed -n "$gl_absolute_header_sed"`
18405 gl_header=$gl_cv_absolute_stdlib_h
18406 gl_cv_next_stdlib_h='"'$gl_header'"'
18409 esac
18411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
18412 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
18414 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
18416 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18417 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18418 gl_next_as_first_directive='<'stdlib.h'>'
18419 else
18420 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18421 gl_next_as_first_directive=$gl_cv_next_stdlib_h
18423 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
18436 if test $ac_cv_have_decl_ecvt = no; then
18437 HAVE_DECL_ECVT=0
18440 if test $ac_cv_have_decl_fcvt = no; then
18441 HAVE_DECL_FCVT=0
18444 if test $ac_cv_have_decl_gcvt = no; then
18445 HAVE_DECL_GCVT=0
18449 REPLACE_STRERROR_0=0
18450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
18451 printf %s "checking whether strerror(0) succeeds... " >&6; }
18452 if test ${gl_cv_func_strerror_0_works+y}
18453 then :
18454 printf %s "(cached) " >&6
18455 else case e in #(
18456 e) if test "$cross_compiling" = yes
18457 then :
18458 case "$host_os" in
18459 # Guess yes on glibc systems.
18460 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
18461 # Guess yes on musl systems.
18462 *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
18463 # Guess yes on native Windows.
18464 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
18465 # If we don't know, obey --enable-cross-guesses.
18466 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
18467 esac
18469 else case e in #(
18470 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18471 /* end confdefs.h. */
18472 #include <string.h>
18473 #include <errno.h>
18476 main (void)
18478 int result = 0;
18479 char *str;
18480 errno = 0;
18481 str = strerror (0);
18482 if (!*str) result |= 1;
18483 if (errno) result |= 2;
18484 if (strstr (str, "nknown") || strstr (str, "ndefined"))
18485 result |= 4;
18486 return result;
18488 return 0;
18490 _ACEOF
18491 if ac_fn_c_try_run "$LINENO"
18492 then :
18493 gl_cv_func_strerror_0_works=yes
18494 else case e in #(
18495 e) gl_cv_func_strerror_0_works=no ;;
18496 esac
18498 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18499 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18500 esac
18504 esac
18506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
18507 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
18508 case "$gl_cv_func_strerror_0_works" in
18509 *yes) ;;
18511 REPLACE_STRERROR_0=1
18513 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
18516 esac
18528 if test $ac_cv_func_strerror_r = yes; then
18529 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
18530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
18531 printf %s "checking for strerror_r with POSIX signature... " >&6; }
18532 if test ${gl_cv_func_strerror_r_posix_signature+y}
18533 then :
18534 printf %s "(cached) " >&6
18535 else case e in #(
18536 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18537 /* end confdefs.h. */
18538 #include <string.h>
18539 int strerror_r (int, char *, size_t);
18542 main (void)
18546 return 0;
18548 _ACEOF
18549 if ac_fn_c_try_compile "$LINENO"
18550 then :
18551 gl_cv_func_strerror_r_posix_signature=yes
18552 else case e in #(
18553 e) gl_cv_func_strerror_r_posix_signature=no ;;
18554 esac
18556 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18558 esac
18560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
18561 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
18562 if test $gl_cv_func_strerror_r_posix_signature = yes; then
18563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
18564 printf %s "checking whether strerror_r works... " >&6; }
18565 if test ${gl_cv_func_strerror_r_works+y}
18566 then :
18567 printf %s "(cached) " >&6
18568 else case e in #(
18569 e) if test "$cross_compiling" = yes
18570 then :
18572 case "$host_os" in
18573 # Guess no on AIX.
18574 aix*) gl_cv_func_strerror_r_works="guessing no";;
18575 # Guess no on HP-UX.
18576 hpux*) gl_cv_func_strerror_r_works="guessing no";;
18577 # Guess no on BSD variants.
18578 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
18579 # Guess yes otherwise.
18580 *) gl_cv_func_strerror_r_works="guessing yes";;
18581 esac
18583 else case e in #(
18584 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18585 /* end confdefs.h. */
18586 #include <errno.h>
18587 #include <string.h>
18590 main (void)
18592 int result = 0;
18593 char buf[79];
18594 if (strerror_r (EACCES, buf, 0) < 0)
18595 result |= 1;
18596 errno = 0;
18597 if (strerror_r (EACCES, buf, sizeof buf) != 0)
18598 result |= 2;
18599 strcpy (buf, "Unknown");
18600 if (strerror_r (0, buf, sizeof buf) != 0)
18601 result |= 4;
18602 if (errno)
18603 result |= 8;
18604 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
18605 result |= 0x10;
18606 errno = 0;
18607 *buf = 0;
18608 if (strerror_r (-3, buf, sizeof buf) < 0)
18609 result |= 0x20;
18610 if (errno)
18611 result |= 0x40;
18612 if (!*buf)
18613 result |= 0x80;
18614 return result;
18617 return 0;
18619 _ACEOF
18620 if ac_fn_c_try_run "$LINENO"
18621 then :
18622 gl_cv_func_strerror_r_works=yes
18623 else case e in #(
18624 e) gl_cv_func_strerror_r_works=no ;;
18625 esac
18627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18628 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18629 esac
18633 esac
18635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
18636 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
18637 else
18639 if test $ac_cv_func___xpg_strerror_r = yes; then
18640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
18641 printf %s "checking whether __xpg_strerror_r works... " >&6; }
18642 if test ${gl_cv_func_strerror_r_works+y}
18643 then :
18644 printf %s "(cached) " >&6
18645 else case e in #(
18646 e) if test "$cross_compiling" = yes
18647 then :
18648 gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
18650 else case e in #(
18651 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18652 /* end confdefs.h. */
18653 #include <errno.h>
18654 #include <string.h>
18655 extern
18656 #ifdef __cplusplus
18658 #endif
18659 int __xpg_strerror_r(int, char *, size_t);
18662 main (void)
18664 int result = 0;
18665 char buf[256] = "^";
18666 char copy[256];
18667 char *str = strerror (-1);
18668 strcpy (copy, str);
18669 if (__xpg_strerror_r (-2, buf, 1) == 0)
18670 result |= 1;
18671 if (*buf)
18672 result |= 2;
18673 __xpg_strerror_r (-2, buf, 256);
18674 if (strcmp (str, copy))
18675 result |= 4;
18676 return result;
18679 return 0;
18681 _ACEOF
18682 if ac_fn_c_try_run "$LINENO"
18683 then :
18684 gl_cv_func_strerror_r_works=yes
18685 else case e in #(
18686 e) gl_cv_func_strerror_r_works=no ;;
18687 esac
18689 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18690 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
18691 esac
18695 esac
18697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
18698 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
18714 if test $gl_cv_have_include_next = yes; then
18715 gl_cv_next_string_h='<'string.h'>'
18716 else
18717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
18718 printf %s "checking absolute name of <string.h>... " >&6; }
18719 if test ${gl_cv_next_string_h+y}
18720 then :
18721 printf %s "(cached) " >&6
18722 else case e in #(
18726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18727 /* end confdefs.h. */
18728 #include <string.h>
18729 _ACEOF
18730 case "$host_os" in
18731 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18732 *) gl_absname_cpp="$ac_cpp" ;;
18733 esac
18735 case "$host_os" in
18736 mingw*)
18737 gl_dirsep_regex='[/\\]'
18740 gl_dirsep_regex='\/'
18742 esac
18743 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18744 gl_header_literal_regex=`echo 'string.h' \
18745 | sed -e "$gl_make_literal_regex_sed"`
18746 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18747 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18748 s|^/[^/]|//&|
18753 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18754 sed -n "$gl_absolute_header_sed"`
18756 gl_header=$gl_cv_absolute_string_h
18757 gl_cv_next_string_h='"'$gl_header'"'
18760 esac
18762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
18763 printf "%s\n" "$gl_cv_next_string_h" >&6; }
18765 NEXT_STRING_H=$gl_cv_next_string_h
18767 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18768 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18769 gl_next_as_first_directive='<'string.h'>'
18770 else
18771 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18772 gl_next_as_first_directive=$gl_cv_next_string_h
18774 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
18798 if test $gl_cv_have_include_next = yes; then
18799 gl_cv_next_sys_random_h='<'sys/random.h'>'
18800 else
18801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
18802 printf %s "checking absolute name of <sys/random.h>... " >&6; }
18803 if test ${gl_cv_next_sys_random_h+y}
18804 then :
18805 printf %s "(cached) " >&6
18806 else case e in #(
18808 if test $ac_cv_header_sys_random_h = yes; then
18813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18814 /* end confdefs.h. */
18815 #include <sys/random.h>
18816 _ACEOF
18817 case "$host_os" in
18818 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18819 *) gl_absname_cpp="$ac_cpp" ;;
18820 esac
18822 case "$host_os" in
18823 mingw*)
18824 gl_dirsep_regex='[/\\]'
18827 gl_dirsep_regex='\/'
18829 esac
18830 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18831 gl_header_literal_regex=`echo 'sys/random.h' \
18832 | sed -e "$gl_make_literal_regex_sed"`
18833 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18834 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18835 s|^/[^/]|//&|
18840 gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18841 sed -n "$gl_absolute_header_sed"`
18843 gl_header=$gl_cv_absolute_sys_random_h
18844 gl_cv_next_sys_random_h='"'$gl_header'"'
18845 else
18846 gl_cv_next_sys_random_h='<'sys/random.h'>'
18850 esac
18852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
18853 printf "%s\n" "$gl_cv_next_sys_random_h" >&6; }
18855 NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
18857 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18858 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18859 gl_next_as_first_directive='<'sys/random.h'>'
18860 else
18861 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18862 gl_next_as_first_directive=$gl_cv_next_sys_random_h
18864 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
18869 if test $ac_cv_header_sys_random_h = yes; then
18870 HAVE_SYS_RANDOM_H=1
18871 else
18872 HAVE_SYS_RANDOM_H=0
18877 if test $ac_cv_header_sys_random_h = yes; then
18878 UNISTD_H_HAVE_SYS_RANDOM_H=1
18897 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
18908 if test $gl_cv_have_include_next = yes; then
18909 gl_cv_next_sys_types_h='<'sys/types.h'>'
18910 else
18911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
18912 printf %s "checking absolute name of <sys/types.h>... " >&6; }
18913 if test ${gl_cv_next_sys_types_h+y}
18914 then :
18915 printf %s "(cached) " >&6
18916 else case e in #(
18920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18921 /* end confdefs.h. */
18922 #include <sys/types.h>
18923 _ACEOF
18924 case "$host_os" in
18925 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18926 *) gl_absname_cpp="$ac_cpp" ;;
18927 esac
18929 case "$host_os" in
18930 mingw*)
18931 gl_dirsep_regex='[/\\]'
18934 gl_dirsep_regex='\/'
18936 esac
18937 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18938 gl_header_literal_regex=`echo 'sys/types.h' \
18939 | sed -e "$gl_make_literal_regex_sed"`
18940 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18941 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18942 s|^/[^/]|//&|
18947 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18948 sed -n "$gl_absolute_header_sed"`
18950 gl_header=$gl_cv_absolute_sys_types_h
18951 gl_cv_next_sys_types_h='"'$gl_header'"'
18954 esac
18956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
18957 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
18959 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
18961 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18962 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18963 gl_next_as_first_directive='<'sys/types.h'>'
18964 else
18965 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18966 gl_next_as_first_directive=$gl_cv_next_sys_types_h
18968 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
18981 WINDOWS_STAT_INODES=0
18988 HAVE_DECL_LOCALTIME_R=1;
18989 HAVE_NANOSLEEP=1;
18990 HAVE_STRPTIME=1;
18991 HAVE_TIMEGM=1;
18992 HAVE_TIMESPEC_GET=1;
18993 HAVE_TIMESPEC_GETRES=1;
18994 HAVE_TIMEZONE_T=0;
18995 REPLACE_CTIME=GNULIB_PORTCHECK;
18996 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
18997 REPLACE_MKTIME=GNULIB_PORTCHECK;
18998 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
18999 REPLACE_STRFTIME=GNULIB_PORTCHECK;
19000 REPLACE_TIMEGM=GNULIB_PORTCHECK;
19001 REPLACE_TZSET=GNULIB_PORTCHECK;
19003 : ${GNULIB_GETTIMEOFDAY=0};
19004 REPLACE_GMTIME=0;
19005 REPLACE_LOCALTIME=0;
19009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
19010 printf %s "checking for struct timespec in <time.h>... " >&6; }
19011 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
19012 then :
19013 printf %s "(cached) " >&6
19014 else case e in #(
19015 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19016 /* end confdefs.h. */
19017 #include <time.h>
19020 main (void)
19022 static struct timespec x; x.tv_sec = x.tv_nsec;
19024 return 0;
19026 _ACEOF
19027 if ac_fn_c_try_compile "$LINENO"
19028 then :
19029 gl_cv_sys_struct_timespec_in_time_h=yes
19030 else case e in #(
19031 e) gl_cv_sys_struct_timespec_in_time_h=no ;;
19032 esac
19034 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
19035 esac
19037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
19038 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
19040 TIME_H_DEFINES_STRUCT_TIMESPEC=0
19041 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
19042 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
19043 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
19044 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
19045 TIME_H_DEFINES_STRUCT_TIMESPEC=1
19046 else
19047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
19048 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
19049 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
19050 then :
19051 printf %s "(cached) " >&6
19052 else case e in #(
19053 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19054 /* end confdefs.h. */
19055 #include <sys/time.h>
19058 main (void)
19060 static struct timespec x; x.tv_sec = x.tv_nsec;
19062 return 0;
19064 _ACEOF
19065 if ac_fn_c_try_compile "$LINENO"
19066 then :
19067 gl_cv_sys_struct_timespec_in_sys_time_h=yes
19068 else case e in #(
19069 e) gl_cv_sys_struct_timespec_in_sys_time_h=no ;;
19070 esac
19072 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
19073 esac
19075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
19076 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
19077 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
19078 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
19079 else
19080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
19081 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
19082 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
19083 then :
19084 printf %s "(cached) " >&6
19085 else case e in #(
19086 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19087 /* end confdefs.h. */
19088 #include <pthread.h>
19091 main (void)
19093 static struct timespec x; x.tv_sec = x.tv_nsec;
19095 return 0;
19097 _ACEOF
19098 if ac_fn_c_try_compile "$LINENO"
19099 then :
19100 gl_cv_sys_struct_timespec_in_pthread_h=yes
19101 else case e in #(
19102 e) gl_cv_sys_struct_timespec_in_pthread_h=no ;;
19103 esac
19105 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
19106 esac
19108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
19109 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
19110 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
19111 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
19112 else
19113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
19114 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
19115 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
19116 then :
19117 printf %s "(cached) " >&6
19118 else case e in #(
19119 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19120 /* end confdefs.h. */
19121 #include <unistd.h>
19124 main (void)
19126 static struct timespec x; x.tv_sec = x.tv_nsec;
19128 return 0;
19130 _ACEOF
19131 if ac_fn_c_try_compile "$LINENO"
19132 then :
19133 gl_cv_sys_struct_timespec_in_unistd_h=yes
19134 else case e in #(
19135 e) gl_cv_sys_struct_timespec_in_unistd_h=no ;;
19136 esac
19138 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
19139 esac
19141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
19142 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
19143 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
19144 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
19165 if test $gl_cv_have_include_next = yes; then
19166 gl_cv_next_time_h='<'time.h'>'
19167 else
19168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
19169 printf %s "checking absolute name of <time.h>... " >&6; }
19170 if test ${gl_cv_next_time_h+y}
19171 then :
19172 printf %s "(cached) " >&6
19173 else case e in #(
19177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19178 /* end confdefs.h. */
19179 #include <time.h>
19180 _ACEOF
19181 case "$host_os" in
19182 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19183 *) gl_absname_cpp="$ac_cpp" ;;
19184 esac
19186 case "$host_os" in
19187 mingw*)
19188 gl_dirsep_regex='[/\\]'
19191 gl_dirsep_regex='\/'
19193 esac
19194 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19195 gl_header_literal_regex=`echo 'time.h' \
19196 | sed -e "$gl_make_literal_regex_sed"`
19197 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19198 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19199 s|^/[^/]|//&|
19204 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19205 sed -n "$gl_absolute_header_sed"`
19207 gl_header=$gl_cv_absolute_time_h
19208 gl_cv_next_time_h='"'$gl_header'"'
19211 esac
19213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
19214 printf "%s\n" "$gl_cv_next_time_h" >&6; }
19216 NEXT_TIME_H=$gl_cv_next_time_h
19218 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19219 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19220 gl_next_as_first_directive='<'time.h'>'
19221 else
19222 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19223 gl_next_as_first_directive=$gl_cv_next_time_h
19225 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
19238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
19239 printf %s "checking for TIME_UTC in <time.h>... " >&6; }
19240 if test ${gl_cv_time_h_has_TIME_UTC+y}
19241 then :
19242 printf %s "(cached) " >&6
19243 else case e in #(
19244 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19245 /* end confdefs.h. */
19246 #include <time.h>
19249 main (void)
19251 static int x = TIME_UTC; x++;
19253 return 0;
19255 _ACEOF
19256 if ac_fn_c_try_compile "$LINENO"
19257 then :
19258 gl_cv_time_h_has_TIME_UTC=yes
19259 else case e in #(
19260 e) gl_cv_time_h_has_TIME_UTC=no ;;
19261 esac
19263 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
19264 esac
19266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
19267 printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
19268 if test $gl_cv_time_h_has_TIME_UTC = yes; then
19269 TIME_H_DEFINES_TIME_UTC=1
19270 else
19271 TIME_H_DEFINES_TIME_UTC=0
19277 GL_GNULIB_CTIME=0
19281 GL_GNULIB_MKTIME=0
19285 GL_GNULIB_LOCALTIME=0
19289 GL_GNULIB_NANOSLEEP=0
19293 GL_GNULIB_STRFTIME=0
19297 GL_GNULIB_STRPTIME=0
19301 GL_GNULIB_TIMEGM=0
19305 GL_GNULIB_TIMESPEC_GET=0
19309 GL_GNULIB_TIMESPEC_GETRES=0
19313 GL_GNULIB_TIME_R=0
19317 GL_GNULIB_TIME_RZ=0
19321 GL_GNULIB_TZSET=0
19325 GL_GNULIB_MDA_TZSET=1
19329 ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19330 if test "x$ac_cv_have_decl_execvpe" = xyes
19331 then :
19332 ac_have_decl=1
19333 else case e in #(
19334 e) ac_have_decl=0 ;;
19335 esac
19337 printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h
19351 if test $gl_cv_have_include_next = yes; then
19352 gl_cv_next_unistd_h='<'unistd.h'>'
19353 else
19354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
19355 printf %s "checking absolute name of <unistd.h>... " >&6; }
19356 if test ${gl_cv_next_unistd_h+y}
19357 then :
19358 printf %s "(cached) " >&6
19359 else case e in #(
19361 if test $ac_cv_header_unistd_h = yes; then
19366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19367 /* end confdefs.h. */
19368 #include <unistd.h>
19369 _ACEOF
19370 case "$host_os" in
19371 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19372 *) gl_absname_cpp="$ac_cpp" ;;
19373 esac
19375 case "$host_os" in
19376 mingw*)
19377 gl_dirsep_regex='[/\\]'
19380 gl_dirsep_regex='\/'
19382 esac
19383 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19384 gl_header_literal_regex=`echo 'unistd.h' \
19385 | sed -e "$gl_make_literal_regex_sed"`
19386 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19387 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19388 s|^/[^/]|//&|
19393 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19394 sed -n "$gl_absolute_header_sed"`
19396 gl_header=$gl_cv_absolute_unistd_h
19397 gl_cv_next_unistd_h='"'$gl_header'"'
19398 else
19399 gl_cv_next_unistd_h='<'unistd.h'>'
19403 esac
19405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
19406 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
19408 NEXT_UNISTD_H=$gl_cv_next_unistd_h
19410 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19411 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19412 gl_next_as_first_directive='<'unistd.h'>'
19413 else
19414 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19415 gl_next_as_first_directive=$gl_cv_next_unistd_h
19417 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
19422 if test $ac_cv_header_unistd_h = yes; then
19423 HAVE_UNISTD_H=1
19424 else
19425 HAVE_UNISTD_H=0
19440 if test $ac_cv_have_decl_execvpe = no; then
19441 HAVE_DECL_EXECVPE=0
19444 ac_fn_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19445 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
19446 then :
19447 ac_have_decl=1
19448 else case e in #(
19449 e) ac_have_decl=0 ;;
19450 esac
19452 printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
19454 ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19455 if test "x$ac_cv_have_decl_feof_unlocked" = xyes
19456 then :
19457 ac_have_decl=1
19458 else case e in #(
19459 e) ac_have_decl=0 ;;
19460 esac
19462 printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
19464 ac_fn_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19465 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
19466 then :
19467 ac_have_decl=1
19468 else case e in #(
19469 e) ac_have_decl=0 ;;
19470 esac
19472 printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
19474 ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19475 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
19476 then :
19477 ac_have_decl=1
19478 else case e in #(
19479 e) ac_have_decl=0 ;;
19480 esac
19482 printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
19484 ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19485 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
19486 then :
19487 ac_have_decl=1
19488 else case e in #(
19489 e) ac_have_decl=0 ;;
19490 esac
19492 printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
19494 ac_fn_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19495 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
19496 then :
19497 ac_have_decl=1
19498 else case e in #(
19499 e) ac_have_decl=0 ;;
19500 esac
19502 printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
19504 ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19505 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
19506 then :
19507 ac_have_decl=1
19508 else case e in #(
19509 e) ac_have_decl=0 ;;
19510 esac
19512 printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
19514 ac_fn_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19515 if test "x$ac_cv_have_decl_fread_unlocked" = xyes
19516 then :
19517 ac_have_decl=1
19518 else case e in #(
19519 e) ac_have_decl=0 ;;
19520 esac
19522 printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
19524 ac_fn_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19525 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
19526 then :
19527 ac_have_decl=1
19528 else case e in #(
19529 e) ac_have_decl=0 ;;
19530 esac
19532 printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
19534 ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19535 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
19536 then :
19537 ac_have_decl=1
19538 else case e in #(
19539 e) ac_have_decl=0 ;;
19540 esac
19542 printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
19544 ac_fn_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19545 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
19546 then :
19547 ac_have_decl=1
19548 else case e in #(
19549 e) ac_have_decl=0 ;;
19550 esac
19552 printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
19554 ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19555 if test "x$ac_cv_have_decl_putc_unlocked" = xyes
19556 then :
19557 ac_have_decl=1
19558 else case e in #(
19559 e) ac_have_decl=0 ;;
19560 esac
19562 printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
19564 ac_fn_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19565 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
19566 then :
19567 ac_have_decl=1
19568 else case e in #(
19569 e) ac_have_decl=0 ;;
19570 esac
19572 printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
19577 if test $ac_cv_header_features_h = yes; then
19578 HAVE_FEATURES_H=1
19579 else
19580 HAVE_FEATURES_H=0
19587 if test $ac_cv_header_crtdefs_h = yes; then
19588 HAVE_CRTDEFS_H=1
19589 else
19590 HAVE_CRTDEFS_H=0
19606 if test $gl_cv_have_include_next = yes; then
19607 gl_cv_next_wchar_h='<'wchar.h'>'
19608 else
19609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
19610 printf %s "checking absolute name of <wchar.h>... " >&6; }
19611 if test ${gl_cv_next_wchar_h+y}
19612 then :
19613 printf %s "(cached) " >&6
19614 else case e in #(
19616 if test $ac_cv_header_wchar_h = yes; then
19621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19622 /* end confdefs.h. */
19623 #include <wchar.h>
19624 _ACEOF
19625 case "$host_os" in
19626 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19627 *) gl_absname_cpp="$ac_cpp" ;;
19628 esac
19630 case "$host_os" in
19631 mingw*)
19632 gl_dirsep_regex='[/\\]'
19635 gl_dirsep_regex='\/'
19637 esac
19638 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19639 gl_header_literal_regex=`echo 'wchar.h' \
19640 | sed -e "$gl_make_literal_regex_sed"`
19641 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19642 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19643 s|^/[^/]|//&|
19648 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19649 sed -n "$gl_absolute_header_sed"`
19651 gl_header=$gl_cv_absolute_wchar_h
19652 gl_cv_next_wchar_h='"'$gl_header'"'
19653 else
19654 gl_cv_next_wchar_h='<'wchar.h'>'
19658 esac
19660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
19661 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
19663 NEXT_WCHAR_H=$gl_cv_next_wchar_h
19665 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19667 gl_next_as_first_directive='<'wchar.h'>'
19668 else
19669 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19670 gl_next_as_first_directive=$gl_cv_next_wchar_h
19672 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
19677 if test $ac_cv_header_wchar_h = yes; then
19678 HAVE_WCHAR_H=1
19679 else
19680 HAVE_WCHAR_H=0
19687 if test $gt_cv_c_wint_t = yes; then
19688 HAVE_WINT_T=1
19689 else
19690 HAVE_WINT_T=0
19702 ac_fn_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
19703 #include <wchar.h>
19705 " "$ac_c_undeclared_builtin_options" "CFLAGS"
19706 if test "x$ac_cv_have_decl_wcsdup" = xyes
19707 then :
19708 ac_have_decl=1
19709 else case e in #(
19710 e) ac_have_decl=0 ;;
19711 esac
19713 printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h
19715 if test $ac_cv_have_decl_wcsdup = no; then
19716 HAVE_DECL_WCSDUP=0
19722 HAVE_ISWBLANK=1;
19723 HAVE_WCTYPE_T=1;
19724 HAVE_WCTRANS_T=1;
19725 REPLACE_ISWBLANK=0;
19726 REPLACE_ISWDIGIT=0;
19727 REPLACE_ISWXDIGIT=0;
19736 if test $ac_cv_func_iswcntrl = yes; then
19737 HAVE_ISWCNTRL=1
19738 else
19739 HAVE_ISWCNTRL=0
19744 if test $gt_cv_c_wint_t = yes; then
19745 HAVE_WINT_T=1
19746 else
19747 HAVE_WINT_T=0
19762 if test $gl_cv_have_include_next = yes; then
19763 gl_cv_next_wctype_h='<'wctype.h'>'
19764 else
19765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
19766 printf %s "checking absolute name of <wctype.h>... " >&6; }
19767 if test ${gl_cv_next_wctype_h+y}
19768 then :
19769 printf %s "(cached) " >&6
19770 else case e in #(
19772 if test $ac_cv_header_wctype_h = yes; then
19777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19778 /* end confdefs.h. */
19779 #include <wctype.h>
19780 _ACEOF
19781 case "$host_os" in
19782 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19783 *) gl_absname_cpp="$ac_cpp" ;;
19784 esac
19786 case "$host_os" in
19787 mingw*)
19788 gl_dirsep_regex='[/\\]'
19791 gl_dirsep_regex='\/'
19793 esac
19794 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19795 gl_header_literal_regex=`echo 'wctype.h' \
19796 | sed -e "$gl_make_literal_regex_sed"`
19797 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19798 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19799 s|^/[^/]|//&|
19804 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19805 sed -n "$gl_absolute_header_sed"`
19807 gl_header=$gl_cv_absolute_wctype_h
19808 gl_cv_next_wctype_h='"'$gl_header'"'
19809 else
19810 gl_cv_next_wctype_h='<'wctype.h'>'
19814 esac
19816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
19817 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
19819 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
19821 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19822 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19823 gl_next_as_first_directive='<'wctype.h'>'
19824 else
19825 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19826 gl_next_as_first_directive=$gl_cv_next_wctype_h
19828 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
19833 if test $ac_cv_header_wctype_h = yes; then
19834 if test $ac_cv_func_iswcntrl = yes; then
19835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
19836 printf %s "checking whether iswcntrl works... " >&6; }
19837 if test ${gl_cv_func_iswcntrl_works+y}
19838 then :
19839 printf %s "(cached) " >&6
19840 else case e in #(
19842 if test "$cross_compiling" = yes
19843 then :
19844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19845 /* end confdefs.h. */
19846 #include <stdlib.h>
19847 #if __GNU_LIBRARY__ == 1
19848 Linux libc5 i18n is broken.
19849 #endif
19851 main (void)
19855 return 0;
19857 _ACEOF
19858 if ac_fn_c_try_compile "$LINENO"
19859 then :
19860 gl_cv_func_iswcntrl_works="guessing yes"
19861 else case e in #(
19862 e) gl_cv_func_iswcntrl_works="guessing no" ;;
19863 esac
19865 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19867 else case e in #(
19868 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19869 /* end confdefs.h. */
19871 #include <wchar.h>
19872 #include <wctype.h>
19873 int main () { return iswprint ('x') == 0; }
19875 _ACEOF
19876 if ac_fn_c_try_run "$LINENO"
19877 then :
19878 gl_cv_func_iswcntrl_works=yes
19879 else case e in #(
19880 e) gl_cv_func_iswcntrl_works=no ;;
19881 esac
19883 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19884 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
19885 esac
19889 esac
19891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
19892 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
19894 HAVE_WCTYPE_H=1
19895 else
19896 HAVE_WCTYPE_H=0
19900 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
19901 REPLACE_ISWCNTRL=1
19902 else
19903 case "$gl_cv_func_iswcntrl_works" in
19904 *yes) REPLACE_ISWCNTRL=0 ;;
19905 *) REPLACE_ISWCNTRL=1 ;;
19906 esac
19910 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
19914 if test $REPLACE_ISWCNTRL = 1; then
19915 REPLACE_TOWLOWER=1
19916 else
19917 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
19918 if test "x$ac_cv_func_towlower" = xyes
19919 then :
19920 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
19924 if test $ac_cv_func_towlower = yes; then
19925 REPLACE_TOWLOWER=0
19926 else
19927 ac_fn_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
19928 #if HAVE_WCTYPE_H
19929 # include <wctype.h>
19930 #endif
19932 " "$ac_c_undeclared_builtin_options" "CFLAGS"
19933 if test "x$ac_cv_have_decl_towlower" = xyes
19934 then :
19935 ac_have_decl=1
19936 else case e in #(
19937 e) ac_have_decl=0 ;;
19938 esac
19940 printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
19942 if test $ac_cv_have_decl_towlower = yes; then
19943 REPLACE_TOWLOWER=1
19944 else
19945 REPLACE_TOWLOWER=0
19951 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
19955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
19956 printf %s "checking for wctype_t... " >&6; }
19957 if test ${gl_cv_type_wctype_t+y}
19958 then :
19959 printf %s "(cached) " >&6
19960 else case e in #(
19961 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19962 /* end confdefs.h. */
19963 #include <wchar.h>
19964 #if HAVE_WCTYPE_H
19965 # include <wctype.h>
19966 #endif
19967 wctype_t a;
19970 main (void)
19974 return 0;
19976 _ACEOF
19977 if ac_fn_c_try_compile "$LINENO"
19978 then :
19979 gl_cv_type_wctype_t=yes
19980 else case e in #(
19981 e) gl_cv_type_wctype_t=no ;;
19982 esac
19984 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19986 esac
19988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
19989 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
19990 if test $gl_cv_type_wctype_t = no; then
19991 HAVE_WCTYPE_T=0
19994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
19995 printf %s "checking for wctrans_t... " >&6; }
19996 if test ${gl_cv_type_wctrans_t+y}
19997 then :
19998 printf %s "(cached) " >&6
19999 else case e in #(
20000 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20001 /* end confdefs.h. */
20002 #include <wchar.h>
20003 #include <wctype.h>
20004 wctrans_t a;
20007 main (void)
20011 return 0;
20013 _ACEOF
20014 if ac_fn_c_try_compile "$LINENO"
20015 then :
20016 gl_cv_type_wctrans_t=yes
20017 else case e in #(
20018 e) gl_cv_type_wctrans_t=no ;;
20019 esac
20021 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20023 esac
20025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
20026 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
20027 if test $gl_cv_type_wctrans_t = no; then
20028 HAVE_WCTRANS_T=0
20037 GL_GNULIB_ISWBLANK=0
20041 GL_GNULIB_ISWDIGIT=0
20045 GL_GNULIB_ISWXDIGIT=0
20049 GL_GNULIB_WCTYPE=0
20053 GL_GNULIB_ISWCTYPE=0
20057 GL_GNULIB_WCTRANS=0
20061 GL_GNULIB_TOWCTRANS=0
20067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler option to allow warnings" >&5
20068 printf %s "checking for C compiler option to allow warnings... " >&6; }
20069 if test ${gl_cv_cc_wallow+y}
20070 then :
20071 printf %s "(cached) " >&6
20072 else case e in #(
20073 e) rm -f conftest*
20074 echo 'int dummy;' > conftest.c
20075 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err'
20076 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
20077 (eval $ac_try) 2>&5
20078 ac_status=$?
20079 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20080 test $ac_status = 0; }; } >/dev/null
20081 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err'
20082 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
20083 (eval $ac_try) 2>&5
20084 ac_status=$?
20085 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20086 test $ac_status = 0; }; } >/dev/null
20087 if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
20088 gl_cv_cc_wallow='-Wno-error'
20089 else
20090 gl_cv_cc_wallow=none
20092 rm -f conftest*
20094 esac
20096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_wallow" >&5
20097 printf "%s\n" "$gl_cv_cc_wallow" >&6; }
20098 case "$gl_cv_cc_wallow" in
20099 none) GL_CFLAG_ALLOW_WARNINGS='' ;;
20100 *) GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;;
20101 esac
20105 if test -n "$CXX" && test "$CXX" != no; then
20106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler option to allow warnings" >&5
20107 printf %s "checking for C++ compiler option to allow warnings... " >&6; }
20108 if test ${gl_cv_cxx_wallow+y}
20109 then :
20110 printf %s "(cached) " >&6
20111 else case e in #(
20112 e) rm -f conftest*
20113 echo 'int dummy;' > conftest.cc
20114 { ac_try='${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>conftest1.err'
20115 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
20116 (eval $ac_try) 2>&5
20117 ac_status=$?
20118 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20119 test $ac_status = 0; }; } >/dev/null
20120 { ac_try='${CXX-c++} $CXXFLAGS $CPPFLAGS -Wno-error -c conftest.cc 2>conftest2.err'
20121 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
20122 (eval $ac_try) 2>&5
20123 ac_status=$?
20124 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20125 test $ac_status = 0; }; } >/dev/null
20126 if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
20127 gl_cv_cxx_wallow='-Wno-error'
20128 else
20129 gl_cv_cxx_wallow=none
20131 rm -f conftest*
20133 esac
20135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cxx_wallow" >&5
20136 printf "%s\n" "$gl_cv_cxx_wallow" >&6; }
20137 case "$gl_cv_cxx_wallow" in
20138 none) GL_CXXFLAG_ALLOW_WARNINGS='' ;;
20139 *) GL_CXXFLAG_ALLOW_WARNINGS="$gl_cv_cxx_wallow" ;;
20140 esac
20141 else
20142 GL_CXXFLAG_ALLOW_WARNINGS=''
20147 HAVE_STRUCT_SOCKADDR_STORAGE=1;
20148 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
20150 HAVE_SA_FAMILY_T=1;
20151 HAVE_ACCEPT4=1;
20154 if test $ac_cv_header_sys_socket_h = no; then
20155 ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
20156 if test "x$ac_cv_header_ws2tcpip_h" = xyes
20157 then :
20158 printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
20168 case "$host_os" in
20169 osf*)
20171 printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
20174 esac
20176 GL_GENERATE_SYS_SOCKET_H=false
20177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
20178 printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
20179 if test ${gl_cv_header_sys_socket_h_selfcontained+y}
20180 then :
20181 printf %s "(cached) " >&6
20182 else case e in #(
20184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20185 /* end confdefs.h. */
20186 #include <sys/socket.h>
20188 main (void)
20192 return 0;
20194 _ACEOF
20195 if ac_fn_c_try_compile "$LINENO"
20196 then :
20197 gl_cv_header_sys_socket_h_selfcontained=yes
20198 else case e in #(
20199 e) gl_cv_header_sys_socket_h_selfcontained=no ;;
20200 esac
20202 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20204 esac
20206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
20207 printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
20208 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
20209 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
20210 if test "x$ac_cv_func_shutdown" = xyes
20211 then :
20212 printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
20216 if test $ac_cv_func_shutdown = yes; then
20217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
20218 printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
20219 if test ${gl_cv_header_sys_socket_h_shut+y}
20220 then :
20221 printf %s "(cached) " >&6
20222 else case e in #(
20224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20225 /* end confdefs.h. */
20226 #include <sys/socket.h>
20228 main (void)
20230 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
20232 return 0;
20234 _ACEOF
20235 if ac_fn_c_try_compile "$LINENO"
20236 then :
20237 gl_cv_header_sys_socket_h_shut=yes
20238 else case e in #(
20239 e) gl_cv_header_sys_socket_h_shut=no ;;
20240 esac
20242 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20244 esac
20246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
20247 printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
20248 if test $gl_cv_header_sys_socket_h_shut = no; then
20249 GL_GENERATE_SYS_SOCKET_H=true
20253 # We need to check for ws2tcpip.h now.
20265 if test $gl_cv_have_include_next = yes; then
20266 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
20267 else
20268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
20269 printf %s "checking absolute name of <sys/socket.h>... " >&6; }
20270 if test ${gl_cv_next_sys_socket_h+y}
20271 then :
20272 printf %s "(cached) " >&6
20273 else case e in #(
20275 if test $ac_cv_header_sys_socket_h = yes; then
20280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20281 /* end confdefs.h. */
20282 #include <sys/socket.h>
20283 _ACEOF
20284 case "$host_os" in
20285 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20286 *) gl_absname_cpp="$ac_cpp" ;;
20287 esac
20289 case "$host_os" in
20290 mingw*)
20291 gl_dirsep_regex='[/\\]'
20294 gl_dirsep_regex='\/'
20296 esac
20297 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20298 gl_header_literal_regex=`echo 'sys/socket.h' \
20299 | sed -e "$gl_make_literal_regex_sed"`
20300 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20301 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20302 s|^/[^/]|//&|
20307 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20308 sed -n "$gl_absolute_header_sed"`
20310 gl_header=$gl_cv_absolute_sys_socket_h
20311 gl_cv_next_sys_socket_h='"'$gl_header'"'
20312 else
20313 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
20317 esac
20319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
20320 printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
20322 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
20324 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20325 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20326 gl_next_as_first_directive='<'sys/socket.h'>'
20327 else
20328 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20329 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
20331 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
20336 if test $ac_cv_header_sys_socket_h = yes; then
20337 HAVE_SYS_SOCKET_H=1
20338 else
20339 HAVE_SYS_SOCKET_H=0
20344 if test $ac_cv_header_sys_socket_h = yes; then
20345 HAVE_WS2TCPIP_H=0
20346 else
20347 if test $ac_cv_header_ws2tcpip_h = yes; then
20348 HAVE_WS2TCPIP_H=1
20349 else
20350 HAVE_WS2TCPIP_H=0
20356 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
20357 /* sys/types.h is not needed according to POSIX, but the
20358 sys/socket.h in i386-unknown-freebsd4.10 and
20359 powerpc-apple-darwin5.5 required it. */
20360 #include <sys/types.h>
20361 #ifdef HAVE_SYS_SOCKET_H
20362 #include <sys/socket.h>
20363 #endif
20364 #ifdef HAVE_WS2TCPIP_H
20365 #include <ws2tcpip.h>
20366 #endif
20369 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
20370 then :
20372 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
20376 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
20377 /* sys/types.h is not needed according to POSIX, but the
20378 sys/socket.h in i386-unknown-freebsd4.10 and
20379 powerpc-apple-darwin5.5 required it. */
20380 #include <sys/types.h>
20381 #ifdef HAVE_SYS_SOCKET_H
20382 #include <sys/socket.h>
20383 #endif
20384 #ifdef HAVE_WS2TCPIP_H
20385 #include <ws2tcpip.h>
20386 #endif
20389 if test "x$ac_cv_type_sa_family_t" = xyes
20390 then :
20392 printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
20397 if test $ac_cv_type_struct_sockaddr_storage = no; then
20398 HAVE_STRUCT_SOCKADDR_STORAGE=0
20400 if test $ac_cv_type_sa_family_t = no; then
20401 HAVE_SA_FAMILY_T=0
20403 if test $ac_cv_type_struct_sockaddr_storage != no; then
20404 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
20405 #ifdef HAVE_SYS_SOCKET_H
20406 #include <sys/socket.h>
20407 #endif
20408 #ifdef HAVE_WS2TCPIP_H
20409 #include <ws2tcpip.h>
20410 #endif
20413 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
20414 then :
20416 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
20419 else case e in #(
20420 e) HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 ;;
20421 esac
20425 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
20426 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
20427 GL_GENERATE_SYS_SOCKET_H=true
20433 if test $ac_cv_header_sys_socket_h != yes; then
20434 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20435 if test "x$ac_cv_header_winsock2_h" = xyes
20436 then :
20437 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
20442 if test "$ac_cv_header_winsock2_h" = yes; then
20443 HAVE_WINSOCK2_H=1
20444 UNISTD_H_HAVE_WINSOCK2_H=1
20445 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20446 else
20447 HAVE_WINSOCK2_H=0
20460 GL_GNULIB_SOCKET=0
20464 GL_GNULIB_CONNECT=0
20468 GL_GNULIB_ACCEPT=0
20472 GL_GNULIB_BIND=0
20476 GL_GNULIB_GETPEERNAME=0
20480 GL_GNULIB_GETSOCKNAME=0
20484 GL_GNULIB_GETSOCKOPT=0
20488 GL_GNULIB_LISTEN=0
20492 GL_GNULIB_RECV=0
20496 GL_GNULIB_SEND=0
20500 GL_GNULIB_RECVFROM=0
20504 GL_GNULIB_SENDTO=0
20508 GL_GNULIB_SETSOCKOPT=0
20512 GL_GNULIB_SHUTDOWN=0
20516 GL_GNULIB_ACCEPT4=0
20521 HAVE_DECL_INET_NTOP=1;
20522 HAVE_DECL_INET_PTON=1;
20523 REPLACE_INET_NTOP=0;
20524 REPLACE_INET_PTON=0;
20531 if test $ac_cv_header_arpa_inet_h = yes; then
20532 HAVE_ARPA_INET_H=1
20533 else
20534 HAVE_ARPA_INET_H=0
20546 if test $gl_cv_have_include_next = yes; then
20547 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
20548 else
20549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
20550 printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
20551 if test ${gl_cv_next_arpa_inet_h+y}
20552 then :
20553 printf %s "(cached) " >&6
20554 else case e in #(
20556 if test $ac_cv_header_arpa_inet_h = yes; then
20561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20562 /* end confdefs.h. */
20563 #include <arpa/inet.h>
20564 _ACEOF
20565 case "$host_os" in
20566 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20567 *) gl_absname_cpp="$ac_cpp" ;;
20568 esac
20570 case "$host_os" in
20571 mingw*)
20572 gl_dirsep_regex='[/\\]'
20575 gl_dirsep_regex='\/'
20577 esac
20578 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20579 gl_header_literal_regex=`echo 'arpa/inet.h' \
20580 | sed -e "$gl_make_literal_regex_sed"`
20581 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20582 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20583 s|^/[^/]|//&|
20588 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20589 sed -n "$gl_absolute_header_sed"`
20591 gl_header=$gl_cv_absolute_arpa_inet_h
20592 gl_cv_next_arpa_inet_h='"'$gl_header'"'
20593 else
20594 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
20598 esac
20600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
20601 printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
20603 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
20605 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20606 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20607 gl_next_as_first_directive='<'arpa/inet.h'>'
20608 else
20609 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20610 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
20612 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
20622 if test $ac_cv_header_sys_socket_h = yes; then
20623 HAVE_WS2TCPIP_H=0
20624 else
20625 if test $ac_cv_header_ws2tcpip_h = yes; then
20626 HAVE_WS2TCPIP_H=1
20627 else
20628 HAVE_WS2TCPIP_H=0
20640 GL_GNULIB_INET_NTOP=0
20644 GL_GNULIB_INET_PTON=0
20649 HAVE_OPENDIR=1;
20650 HAVE_READDIR=1;
20651 HAVE_REWINDDIR=1;
20652 HAVE_CLOSEDIR=1;
20653 HAVE_DECL_DIRFD=1;
20654 HAVE_DECL_FDOPENDIR=1;
20655 HAVE_FDOPENDIR=1;
20656 HAVE_SCANDIR=1;
20657 HAVE_ALPHASORT=1;
20658 REPLACE_OPENDIR=0;
20659 REPLACE_CLOSEDIR=0;
20660 REPLACE_DIRFD=0;
20661 REPLACE_FDOPENDIR=0;
20669 GL_GNULIB_OPENDIR=0
20673 GL_GNULIB_READDIR=0
20677 GL_GNULIB_REWINDDIR=0
20681 GL_GNULIB_CLOSEDIR=0
20685 GL_GNULIB_DIRFD=0
20689 GL_GNULIB_FDOPENDIR=0
20693 GL_GNULIB_SCANDIR=0
20697 GL_GNULIB_ALPHASORT=0
20714 if test $gl_cv_have_include_next = yes; then
20715 gl_cv_next_dirent_h='<'dirent.h'>'
20716 else
20717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
20718 printf %s "checking absolute name of <dirent.h>... " >&6; }
20719 if test ${gl_cv_next_dirent_h+y}
20720 then :
20721 printf %s "(cached) " >&6
20722 else case e in #(
20724 if test $ac_cv_header_dirent_h = yes; then
20729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20730 /* end confdefs.h. */
20731 #include <dirent.h>
20732 _ACEOF
20733 case "$host_os" in
20734 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20735 *) gl_absname_cpp="$ac_cpp" ;;
20736 esac
20738 case "$host_os" in
20739 mingw*)
20740 gl_dirsep_regex='[/\\]'
20743 gl_dirsep_regex='\/'
20745 esac
20746 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20747 gl_header_literal_regex=`echo 'dirent.h' \
20748 | sed -e "$gl_make_literal_regex_sed"`
20749 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20750 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20751 s|^/[^/]|//&|
20756 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20757 sed -n "$gl_absolute_header_sed"`
20759 gl_header=$gl_cv_absolute_dirent_h
20760 gl_cv_next_dirent_h='"'$gl_header'"'
20761 else
20762 gl_cv_next_dirent_h='<'dirent.h'>'
20766 esac
20768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
20769 printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
20771 NEXT_DIRENT_H=$gl_cv_next_dirent_h
20773 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20774 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20775 gl_next_as_first_directive='<'dirent.h'>'
20776 else
20777 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20778 gl_next_as_first_directive=$gl_cv_next_dirent_h
20780 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
20785 if test $ac_cv_header_dirent_h = yes; then
20786 HAVE_DIRENT_H=1
20787 else
20788 HAVE_DIRENT_H=0
20803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
20804 printf %s "checking if environ is properly declared... " >&6; }
20805 if test ${gt_cv_var_environ_declaration+y}
20806 then :
20807 printf %s "(cached) " >&6
20808 else case e in #(
20809 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20810 /* end confdefs.h. */
20811 #if HAVE_UNISTD_H
20812 #include <unistd.h>
20813 #endif
20814 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
20815 #include <stdlib.h>
20817 typedef struct { int foo; } foo_t;
20818 extern foo_t environ;
20820 main (void)
20822 environ.foo = 1;
20824 return 0;
20826 _ACEOF
20827 if ac_fn_c_try_compile "$LINENO"
20828 then :
20829 gt_cv_var_environ_declaration=no
20830 else case e in #(
20831 e) gt_cv_var_environ_declaration=yes ;;
20832 esac
20834 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
20835 esac
20837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
20838 printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
20839 if test $gt_cv_var_environ_declaration = yes; then
20841 printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
20846 if test $gt_cv_var_environ_declaration != yes; then
20847 HAVE_DECL_ENVIRON=0
20856 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
20857 printf %s "checking whether stdin defaults to large file offsets... " >&6; }
20858 if test ${gl_cv_var_stdin_large_offset+y}
20859 then :
20860 printf %s "(cached) " >&6
20861 else case e in #(
20862 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20863 /* end confdefs.h. */
20864 #include <stdio.h>
20866 main (void)
20868 #if defined __SL64 && defined __SCLE /* cygwin */
20869 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
20870 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
20871 it is easier to do a version check than building a runtime test. */
20872 # include <cygwin/version.h>
20873 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
20874 choke me
20875 # endif
20876 #endif
20878 return 0;
20880 _ACEOF
20881 if ac_fn_c_try_link "$LINENO"
20882 then :
20883 gl_cv_var_stdin_large_offset=yes
20884 else case e in #(
20885 e) gl_cv_var_stdin_large_offset=no ;;
20886 esac
20888 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20889 conftest$ac_exeext conftest.$ac_ext ;;
20890 esac
20892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
20893 printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
20895 ac_fn_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20896 if test "x$ac_cv_have_decl_fseeko" = xyes
20897 then :
20898 ac_have_decl=1
20899 else case e in #(
20900 e) ac_have_decl=0 ;;
20901 esac
20903 printf "%s\n" "#define HAVE_DECL_FSEEKO $ac_have_decl" >>confdefs.h
20913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
20914 printf %s "checking for fseeko... " >&6; }
20915 if test ${gl_cv_func_fseeko+y}
20916 then :
20917 printf %s "(cached) " >&6
20918 else case e in #(
20920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20921 /* end confdefs.h. */
20922 #include <stdio.h>
20925 main (void)
20927 fseeko (stdin, 0, 0);
20929 return 0;
20931 _ACEOF
20932 if ac_fn_c_try_link "$LINENO"
20933 then :
20934 gl_cv_func_fseeko=yes
20935 else case e in #(
20936 e) gl_cv_func_fseeko=no ;;
20937 esac
20939 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20940 conftest$ac_exeext conftest.$ac_ext
20942 esac
20944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
20945 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
20948 if test $ac_cv_have_decl_fseeko = no; then
20949 HAVE_DECL_FSEEKO=0
20952 if test $gl_cv_func_fseeko = no; then
20953 HAVE_FSEEKO=0
20954 else
20955 if test $WINDOWS_64_BIT_OFF_T = 1; then
20956 REPLACE_FSEEKO=1
20958 if test $gl_cv_var_stdin_large_offset = no; then
20959 REPLACE_FSEEKO=1
20964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20965 printf %s "checking whether fflush works on input streams... " >&6; }
20966 if test ${gl_cv_func_fflush_stdin+y}
20967 then :
20968 printf %s "(cached) " >&6
20969 else case e in #(
20970 e) echo hello world > conftest.txt
20971 if test "$cross_compiling" = yes
20972 then :
20973 case "$host_os" in
20974 # Guess no on native Windows.
20975 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
20976 *) gl_cv_func_fflush_stdin=cross ;;
20977 esac
20979 else case e in #(
20980 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20981 /* end confdefs.h. */
20983 #include <stdio.h>
20984 #if HAVE_UNISTD_H
20985 # include <unistd.h>
20986 #else /* on Windows with MSVC */
20987 # include <io.h>
20988 #endif
20991 $gl_mda_defines
20994 main (void)
20996 FILE *f = fopen ("conftest.txt", "r");
20997 char buffer[10];
20998 int fd;
20999 int c;
21000 if (f == NULL)
21001 return 1;
21002 fd = fileno (f);
21003 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
21004 { fclose (f); return 2; }
21005 /* For deterministic results, ensure f read a bigger buffer. */
21006 if (lseek (fd, 0, SEEK_CUR) == 5)
21007 { fclose (f); return 3; }
21008 /* POSIX requires fflush-fseek to set file offset of fd. This fails
21009 on BSD systems and on mingw. */
21010 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
21011 { fclose (f); return 4; }
21012 if (lseek (fd, 0, SEEK_CUR) != 5)
21013 { fclose (f); return 5; }
21014 /* Verify behaviour of fflush after ungetc. See
21015 <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
21016 /* Verify behaviour of fflush after a backup ungetc. This fails on
21017 mingw. */
21018 c = fgetc (f);
21019 ungetc (c, f);
21020 fflush (f);
21021 if (fgetc (f) != c)
21022 { fclose (f); return 6; }
21023 /* Verify behaviour of fflush after a non-backup ungetc. This fails
21024 on glibc 2.8 and on BSD systems. */
21025 c = fgetc (f);
21026 ungetc ('@', f);
21027 fflush (f);
21028 if (fgetc (f) != c)
21029 { fclose (f); return 7; }
21030 fclose (f);
21031 return 0;
21034 return 0;
21036 _ACEOF
21037 if ac_fn_c_try_run "$LINENO"
21038 then :
21039 gl_cv_func_fflush_stdin=yes
21040 else case e in #(
21041 e) gl_cv_func_fflush_stdin=no ;;
21042 esac
21044 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21045 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21046 esac
21049 rm conftest.txt
21051 esac
21053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
21054 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
21055 case "$gl_cv_func_fflush_stdin" in
21056 *yes) gl_func_fflush_stdin=1 ;;
21057 *no) gl_func_fflush_stdin=0 ;;
21058 *) gl_func_fflush_stdin='(-1)' ;;
21059 esac
21061 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
21064 case "$gl_cv_func_fflush_stdin" in
21065 *yes) ;;
21066 *) REPLACE_FSEEKO=1 ;;
21067 esac
21074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
21075 printf %s "checking whether ungetc works on arbitrary bytes... " >&6; }
21076 if test ${gl_cv_func_ungetc_works+y}
21077 then :
21078 printf %s "(cached) " >&6
21079 else case e in #(
21080 e) if test "$cross_compiling" = yes
21081 then :
21082 case "$host_os" in
21083 # Guess yes on glibc systems.
21084 *-gnu* | gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
21085 # Guess yes on musl systems.
21086 *-musl*) gl_cv_func_ungetc_works="guessing yes" ;;
21087 # Guess yes on bionic systems.
21088 *-android*) gl_cv_func_ungetc_works="guessing yes" ;;
21089 # Guess yes on native Windows.
21090 mingw*) gl_cv_func_ungetc_works="guessing yes" ;;
21091 # If we don't know, obey --enable-cross-guesses.
21092 *) gl_cv_func_ungetc_works="$gl_cross_guess_normal" ;;
21093 esac
21095 else case e in #(
21096 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21097 /* end confdefs.h. */
21099 #include <stdio.h>
21102 main (void)
21104 FILE *f;
21105 if (!(f = fopen ("conftest.tmp", "w+")))
21106 return 1;
21107 if (fputs ("abc", f) < 0)
21108 { fclose (f); return 2; }
21109 rewind (f);
21110 if (fgetc (f) != 'a')
21111 { fclose (f); return 3; }
21112 if (fgetc (f) != 'b')
21113 { fclose (f); return 4; }
21114 if (ungetc ('d', f) != 'd')
21115 { fclose (f); return 5; }
21116 if (ftell (f) != 1)
21117 { fclose (f); return 6; }
21118 if (fgetc (f) != 'd')
21119 { fclose (f); return 7; }
21120 if (ftell (f) != 2)
21121 { fclose (f); return 8; }
21122 if (fseek (f, 0, SEEK_CUR) != 0)
21123 { fclose (f); return 9; }
21124 if (ftell (f) != 2)
21125 { fclose (f); return 10; }
21126 if (fgetc (f) != 'c')
21127 { fclose (f); return 11; }
21128 fclose (f);
21129 remove ("conftest.tmp");
21132 return 0;
21134 _ACEOF
21135 if ac_fn_c_try_run "$LINENO"
21136 then :
21137 gl_cv_func_ungetc_works=yes
21138 else case e in #(
21139 e) gl_cv_func_ungetc_works=no ;;
21140 esac
21142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21143 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21144 esac
21148 esac
21150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
21151 printf "%s\n" "$gl_cv_func_ungetc_works" >&6; }
21152 gl_ftello_broken_after_ungetc=no
21153 case "$gl_cv_func_ungetc_works" in
21154 *yes) ;;
21156 case "$host_os" in
21157 darwin*) gl_ftello_broken_after_ungetc=yes ;;
21160 printf "%s\n" "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
21163 esac
21165 esac
21167 ac_fn_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21168 if test "x$ac_cv_have_decl_ftello" = xyes
21169 then :
21170 ac_have_decl=1
21171 else case e in #(
21172 e) ac_have_decl=0 ;;
21173 esac
21175 printf "%s\n" "#define HAVE_DECL_FTELLO $ac_have_decl" >>confdefs.h
21186 if test $ac_cv_have_decl_ftello = no; then
21187 HAVE_DECL_FTELLO=0
21190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
21191 printf %s "checking for ftello... " >&6; }
21192 if test ${gl_cv_func_ftello+y}
21193 then :
21194 printf %s "(cached) " >&6
21195 else case e in #(
21197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21198 /* end confdefs.h. */
21199 #include <stdio.h>
21201 main (void)
21203 ftello (stdin);
21205 return 0;
21207 _ACEOF
21208 if ac_fn_c_try_link "$LINENO"
21209 then :
21210 gl_cv_func_ftello=yes
21211 else case e in #(
21212 e) gl_cv_func_ftello=no ;;
21213 esac
21215 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21216 conftest$ac_exeext conftest.$ac_ext
21218 esac
21220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
21221 printf "%s\n" "$gl_cv_func_ftello" >&6; }
21222 if test $gl_cv_func_ftello = no; then
21223 HAVE_FTELLO=0
21224 else
21225 if test $WINDOWS_64_BIT_OFF_T = 1; then
21226 REPLACE_FTELLO=1
21228 if test $gl_cv_var_stdin_large_offset = no; then
21229 REPLACE_FTELLO=1
21231 if test $REPLACE_FTELLO = 0; then
21233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
21234 printf %s "checking whether ftello works... " >&6; }
21235 if test ${gl_cv_func_ftello_works+y}
21236 then :
21237 printf %s "(cached) " >&6
21238 else case e in #(
21240 case "$host_os" in
21241 # Guess no on Solaris.
21242 solaris*) gl_cv_func_ftello_works="guessing no" ;;
21243 # Guess yes on native Windows.
21244 mingw*) gl_cv_func_ftello_works="guessing yes" ;;
21245 # Guess yes otherwise.
21246 *) gl_cv_func_ftello_works="guessing yes" ;;
21247 esac
21248 if test "$cross_compiling" = yes
21249 then :
21251 else case e in #(
21252 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21253 /* end confdefs.h. */
21255 #include <stdio.h>
21256 #include <stdlib.h>
21257 #include <string.h>
21258 #define TESTFILE "conftest.tmp"
21260 main (void)
21262 FILE *fp;
21264 /* Create a file with some contents. */
21265 fp = fopen (TESTFILE, "w");
21266 if (fp == NULL)
21267 return 70;
21268 if (fwrite ("foogarsh", 1, 8, fp) < 8)
21269 { fclose (fp); return 71; }
21270 if (fclose (fp))
21271 return 72;
21273 /* The file's contents is now "foogarsh". */
21275 /* Try writing after reading to EOF. */
21276 fp = fopen (TESTFILE, "r+");
21277 if (fp == NULL)
21278 return 73;
21279 if (fseek (fp, -1, SEEK_END))
21280 { fclose (fp); return 74; }
21281 if (!(getc (fp) == 'h'))
21282 { fclose (fp); return 1; }
21283 if (!(getc (fp) == EOF))
21284 { fclose (fp); return 2; }
21285 if (!(ftell (fp) == 8))
21286 { fclose (fp); return 3; }
21287 if (!(ftell (fp) == 8))
21288 { fclose (fp); return 4; }
21289 if (!(putc ('!', fp) == '!'))
21290 { fclose (fp); return 5; }
21291 if (!(ftell (fp) == 9))
21292 { fclose (fp); return 6; }
21293 if (!(fclose (fp) == 0))
21294 return 7;
21295 fp = fopen (TESTFILE, "r");
21296 if (fp == NULL)
21297 return 75;
21299 char buf[10];
21300 if (!(fread (buf, 1, 10, fp) == 9))
21301 { fclose (fp); return 10; }
21302 if (!(memcmp (buf, "foogarsh!", 9) == 0))
21303 { fclose (fp); return 11; }
21305 if (!(fclose (fp) == 0))
21306 return 12;
21308 /* The file's contents is now "foogarsh!". */
21310 return 0;
21312 _ACEOF
21313 if ac_fn_c_try_run "$LINENO"
21314 then :
21315 gl_cv_func_ftello_works=yes
21316 else case e in #(
21317 e) gl_cv_func_ftello_works=no ;;
21318 esac
21320 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21321 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21322 esac
21326 esac
21328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
21329 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
21330 case "$gl_cv_func_ftello_works" in
21331 *yes) ;;
21333 REPLACE_FTELLO=1
21335 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
21338 esac
21340 if test $REPLACE_FTELLO = 0; then
21342 if test $gl_ftello_broken_after_ungetc = yes; then
21343 REPLACE_FTELLO=1
21345 printf "%s\n" "#define FTELLO_BROKEN_AFTER_UNGETC 1" >>confdefs.h
21354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
21355 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
21356 if test ${gl_cv_func_getcwd_null+y}
21357 then :
21358 printf %s "(cached) " >&6
21359 else case e in #(
21360 e) if test "$cross_compiling" = yes
21361 then :
21362 case "$host_os" in
21363 # Guess yes on glibc systems.
21364 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
21365 # Guess yes on musl systems.
21366 *-musl*) gl_cv_func_getcwd_null="guessing yes";;
21367 # Guess yes on Cygwin.
21368 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
21369 # If we don't know, obey --enable-cross-guesses.
21370 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
21371 esac
21373 else case e in #(
21374 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21375 /* end confdefs.h. */
21377 # include <stdlib.h>
21378 # if HAVE_UNISTD_H
21379 # include <unistd.h>
21380 # else /* on Windows with MSVC */
21381 # include <direct.h>
21382 # endif
21385 $gl_mda_defines
21387 # ifndef getcwd
21388 char *getcwd ();
21389 # endif
21392 main (void)
21395 #if defined _WIN32 && ! defined __CYGWIN__
21396 /* mingw cwd does not start with '/', but _getcwd does allocate.
21397 However, mingw fails to honor non-zero size. */
21398 #else
21399 if (chdir ("/") != 0)
21400 return 1;
21401 else
21403 char *f = getcwd (NULL, 0);
21404 if (! f)
21405 return 2;
21406 if (f[0] != '/')
21407 { free (f); return 3; }
21408 if (f[1] != '\0')
21409 { free (f); return 4; }
21410 free (f);
21411 return 0;
21413 #endif
21416 return 0;
21418 _ACEOF
21419 if ac_fn_c_try_run "$LINENO"
21420 then :
21421 gl_cv_func_getcwd_null=yes
21422 else case e in #(
21423 e) gl_cv_func_getcwd_null=no ;;
21424 esac
21426 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21427 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21428 esac
21431 esac
21433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
21434 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
21437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
21438 printf %s "checking for getcwd with POSIX signature... " >&6; }
21439 if test ${gl_cv_func_getcwd_posix_signature+y}
21440 then :
21441 printf %s "(cached) " >&6
21442 else case e in #(
21443 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21444 /* end confdefs.h. */
21445 #include <unistd.h>
21448 $gl_mda_defines
21451 main (void)
21453 extern
21454 #ifdef __cplusplus
21456 #endif
21457 char *getcwd (char *, size_t);
21460 return 0;
21463 _ACEOF
21464 if ac_fn_c_try_compile "$LINENO"
21465 then :
21466 gl_cv_func_getcwd_posix_signature=yes
21467 else case e in #(
21468 e) gl_cv_func_getcwd_posix_signature=no ;;
21469 esac
21471 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21473 esac
21475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
21476 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
21479 HAVE_GETTIMEOFDAY=1;
21480 HAVE_STRUCT_TIMEVAL=1;
21481 HAVE_SYS_TIME_H=1;
21482 REPLACE_GETTIMEOFDAY=0;
21483 REPLACE_STRUCT_TIMEVAL=0;
21498 if test $gl_cv_have_include_next = yes; then
21499 gl_cv_next_sys_time_h='<'sys/time.h'>'
21500 else
21501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
21502 printf %s "checking absolute name of <sys/time.h>... " >&6; }
21503 if test ${gl_cv_next_sys_time_h+y}
21504 then :
21505 printf %s "(cached) " >&6
21506 else case e in #(
21508 if test $ac_cv_header_sys_time_h = yes; then
21513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21514 /* end confdefs.h. */
21515 #include <sys/time.h>
21516 _ACEOF
21517 case "$host_os" in
21518 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21519 *) gl_absname_cpp="$ac_cpp" ;;
21520 esac
21522 case "$host_os" in
21523 mingw*)
21524 gl_dirsep_regex='[/\\]'
21527 gl_dirsep_regex='\/'
21529 esac
21530 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21531 gl_header_literal_regex=`echo 'sys/time.h' \
21532 | sed -e "$gl_make_literal_regex_sed"`
21533 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21534 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21535 s|^/[^/]|//&|
21540 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21541 sed -n "$gl_absolute_header_sed"`
21543 gl_header=$gl_cv_absolute_sys_time_h
21544 gl_cv_next_sys_time_h='"'$gl_header'"'
21545 else
21546 gl_cv_next_sys_time_h='<'sys/time.h'>'
21550 esac
21552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
21553 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
21555 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
21557 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21558 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21559 gl_next_as_first_directive='<'sys/time.h'>'
21560 else
21561 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21562 gl_next_as_first_directive=$gl_cv_next_sys_time_h
21564 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
21570 if test $ac_cv_header_sys_time_h != yes; then
21571 HAVE_SYS_TIME_H=0
21578 if test $ac_cv_header_sys_socket_h != yes; then
21579 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21580 if test "x$ac_cv_header_winsock2_h" = xyes
21581 then :
21582 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
21587 if test "$ac_cv_header_winsock2_h" = yes; then
21588 HAVE_WINSOCK2_H=1
21589 UNISTD_H_HAVE_WINSOCK2_H=1
21590 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21591 else
21592 HAVE_WINSOCK2_H=0
21596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
21597 printf %s "checking for struct timeval... " >&6; }
21598 if test ${gl_cv_sys_struct_timeval+y}
21599 then :
21600 printf %s "(cached) " >&6
21601 else case e in #(
21602 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21603 /* end confdefs.h. */
21604 #if HAVE_SYS_TIME_H
21605 #include <sys/time.h>
21606 #endif
21607 #include <time.h>
21608 #if HAVE_WINSOCK2_H
21609 # include <winsock2.h>
21610 #endif
21613 main (void)
21615 static struct timeval x; x.tv_sec = x.tv_usec;
21617 return 0;
21619 _ACEOF
21620 if ac_fn_c_try_compile "$LINENO"
21621 then :
21622 gl_cv_sys_struct_timeval=yes
21623 else case e in #(
21624 e) gl_cv_sys_struct_timeval=no ;;
21625 esac
21627 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21629 esac
21631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
21632 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
21633 if test $gl_cv_sys_struct_timeval != yes; then
21634 HAVE_STRUCT_TIMEVAL=0
21635 else
21636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
21637 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
21638 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
21639 then :
21640 printf %s "(cached) " >&6
21641 else case e in #(
21642 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21643 /* end confdefs.h. */
21644 #if HAVE_SYS_TIME_H
21645 #include <sys/time.h>
21646 #endif
21647 #include <time.h>
21648 #if HAVE_WINSOCK2_H
21649 # include <winsock2.h>
21650 #endif
21653 main (void)
21655 static struct timeval x;
21656 typedef int verify_tv_sec_type[
21657 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
21661 return 0;
21663 _ACEOF
21664 if ac_fn_c_try_compile "$LINENO"
21665 then :
21666 gl_cv_sys_struct_timeval_tv_sec=yes
21667 else case e in #(
21668 e) gl_cv_sys_struct_timeval_tv_sec=no ;;
21669 esac
21671 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21673 esac
21675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
21676 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
21677 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
21678 REPLACE_STRUCT_TIMEVAL=1
21689 GL_GNULIB_GETTIMEOFDAY=0
21695 case "$host_os" in
21696 *-musl*)
21697 printf "%s\n" "#define MUSL_LIBC 1" >>confdefs.h
21699 esac
21708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
21709 printf %s "checking for IPv4 sockets... " >&6; }
21710 if test ${gl_cv_socket_ipv4+y}
21711 then :
21712 printf %s "(cached) " >&6
21713 else case e in #(
21714 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21715 /* end confdefs.h. */
21716 #include <sys/types.h>
21717 #ifdef HAVE_SYS_SOCKET_H
21718 #include <sys/socket.h>
21719 #endif
21720 #ifdef HAVE_NETINET_IN_H
21721 #include <netinet/in.h>
21722 #endif
21723 #ifdef HAVE_WINSOCK2_H
21724 #include <winsock2.h>
21725 #endif
21727 main (void)
21729 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
21730 if (&x && &y && &z) return 0;
21732 return 0;
21734 _ACEOF
21735 if ac_fn_c_try_compile "$LINENO"
21736 then :
21737 gl_cv_socket_ipv4=yes
21738 else case e in #(
21739 e) gl_cv_socket_ipv4=no ;;
21740 esac
21742 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21743 esac
21745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
21746 printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
21747 if test $gl_cv_socket_ipv4 = yes; then
21749 printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
21753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
21754 printf %s "checking for IPv6 sockets... " >&6; }
21755 if test ${gl_cv_socket_ipv6+y}
21756 then :
21757 printf %s "(cached) " >&6
21758 else case e in #(
21759 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21760 /* end confdefs.h. */
21761 #include <sys/types.h>
21762 #ifdef HAVE_SYS_SOCKET_H
21763 #include <sys/socket.h>
21764 #endif
21765 #ifdef HAVE_NETINET_IN_H
21766 #include <netinet/in.h>
21767 #endif
21768 #ifdef HAVE_WINSOCK2_H
21769 #include <winsock2.h>
21770 #endif
21771 #ifdef HAVE_WS2TCPIP_H
21772 #include <ws2tcpip.h>
21773 #endif
21775 main (void)
21777 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
21778 if (&x && &y && &z) return 0;
21780 return 0;
21782 _ACEOF
21783 if ac_fn_c_try_compile "$LINENO"
21784 then :
21785 gl_cv_socket_ipv6=yes
21786 else case e in #(
21787 e) gl_cv_socket_ipv6=no ;;
21788 esac
21790 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21791 esac
21793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
21794 printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
21795 if test $gl_cv_socket_ipv6 = yes; then
21797 printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
21804 PRIPTR_PREFIX=
21805 if $GL_GENERATE_STDINT_H; then
21806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21807 /* end confdefs.h. */
21809 #ifdef _WIN64
21810 LLP64
21811 #endif
21814 main (void)
21818 return 0;
21821 _ACEOF
21822 if ac_fn_c_try_compile "$LINENO"
21823 then :
21824 PRIPTR_PREFIX='"l"'
21825 else case e in #(
21826 e) PRIPTR_PREFIX='"ll"' ;;
21827 esac
21829 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21830 else
21831 for glpfx in '' l ll I64; do
21832 case $glpfx in
21833 '') gltype1='int';;
21834 l) gltype1='long int';;
21835 ll) gltype1='long long int';;
21836 I64) gltype1='__int64';;
21837 esac
21838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21839 /* end confdefs.h. */
21840 #include <stdint.h>
21841 extern intptr_t foo;
21842 extern $gltype1 foo;
21844 main (void)
21848 return 0;
21850 _ACEOF
21851 if ac_fn_c_try_compile "$LINENO"
21852 then :
21853 PRIPTR_PREFIX='"'$glpfx'"'
21855 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21856 test -n "$PRIPTR_PREFIX" && break
21857 done
21862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
21863 printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
21864 if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
21865 then :
21866 printf %s "(cached) " >&6
21867 else case e in #(
21868 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21869 /* end confdefs.h. */
21870 /* Work also in C++ mode. */
21871 #define __STDC_LIMIT_MACROS 1
21873 /* Work if build is not clean. */
21874 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21876 #include <limits.h>
21877 #if HAVE_STDINT_H
21878 #include <stdint.h>
21879 #endif
21881 #if defined INT32_MAX && defined INTMAX_MAX
21882 #define CONDITION (INT32_MAX < INTMAX_MAX)
21883 #else
21884 #define CONDITION (sizeof (int) < sizeof (long long int))
21885 #endif
21886 int test[CONDITION ? 1 : -1];
21888 main (void)
21892 return 0;
21894 _ACEOF
21895 if ac_fn_c_try_compile "$LINENO"
21896 then :
21897 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
21898 else case e in #(
21899 e) gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no ;;
21900 esac
21902 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21903 esac
21905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
21906 printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
21907 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
21908 INT32_MAX_LT_INTMAX_MAX=1;
21909 else
21910 INT32_MAX_LT_INTMAX_MAX=0;
21914 if test $APPLE_UNIVERSAL_BUILD = 0; then
21916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
21917 printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
21918 if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
21919 then :
21920 printf %s "(cached) " >&6
21921 else case e in #(
21922 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21923 /* end confdefs.h. */
21924 /* Work also in C++ mode. */
21925 #define __STDC_LIMIT_MACROS 1
21927 /* Work if build is not clean. */
21928 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21930 #include <limits.h>
21931 #if HAVE_STDINT_H
21932 #include <stdint.h>
21933 #endif
21935 #if defined INT64_MAX
21936 #define CONDITION (INT64_MAX == LONG_MAX)
21937 #else
21938 #define CONDITION (sizeof (long long int) == sizeof (long int))
21939 #endif
21940 int test[CONDITION ? 1 : -1];
21942 main (void)
21946 return 0;
21948 _ACEOF
21949 if ac_fn_c_try_compile "$LINENO"
21950 then :
21951 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
21952 else case e in #(
21953 e) gl_cv_test_INT64_MAX_EQ_LONG_MAX=no ;;
21954 esac
21956 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
21957 esac
21959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
21960 printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
21961 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
21962 INT64_MAX_EQ_LONG_MAX=1;
21963 else
21964 INT64_MAX_EQ_LONG_MAX=0;
21968 else
21969 INT64_MAX_EQ_LONG_MAX=-1
21972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
21973 printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
21974 if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
21975 then :
21976 printf %s "(cached) " >&6
21977 else case e in #(
21978 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21979 /* end confdefs.h. */
21980 /* Work also in C++ mode. */
21981 #define __STDC_LIMIT_MACROS 1
21983 /* Work if build is not clean. */
21984 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21986 #include <limits.h>
21987 #if HAVE_STDINT_H
21988 #include <stdint.h>
21989 #endif
21991 #if defined UINT32_MAX && defined UINTMAX_MAX
21992 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
21993 #else
21994 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
21995 #endif
21996 int test[CONDITION ? 1 : -1];
21998 main (void)
22002 return 0;
22004 _ACEOF
22005 if ac_fn_c_try_compile "$LINENO"
22006 then :
22007 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
22008 else case e in #(
22009 e) gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no ;;
22010 esac
22012 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22013 esac
22015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
22016 printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
22017 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
22018 UINT32_MAX_LT_UINTMAX_MAX=1;
22019 else
22020 UINT32_MAX_LT_UINTMAX_MAX=0;
22024 if test $APPLE_UNIVERSAL_BUILD = 0; then
22026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
22027 printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
22028 if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
22029 then :
22030 printf %s "(cached) " >&6
22031 else case e in #(
22032 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22033 /* end confdefs.h. */
22034 /* Work also in C++ mode. */
22035 #define __STDC_LIMIT_MACROS 1
22037 /* Work if build is not clean. */
22038 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22040 #include <limits.h>
22041 #if HAVE_STDINT_H
22042 #include <stdint.h>
22043 #endif
22045 #if defined UINT64_MAX
22046 #define CONDITION (UINT64_MAX == ULONG_MAX)
22047 #else
22048 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
22049 #endif
22050 int test[CONDITION ? 1 : -1];
22052 main (void)
22056 return 0;
22058 _ACEOF
22059 if ac_fn_c_try_compile "$LINENO"
22060 then :
22061 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
22062 else case e in #(
22063 e) gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no ;;
22064 esac
22066 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22067 esac
22069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
22070 printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
22071 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
22072 UINT64_MAX_EQ_ULONG_MAX=1;
22073 else
22074 UINT64_MAX_EQ_ULONG_MAX=0;
22078 else
22079 UINT64_MAX_EQ_ULONG_MAX=-1
22085 GL_GNULIB_IOCTL=0
22091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
22092 printf %s "checking for LC_MESSAGES... " >&6; }
22093 if test ${gt_cv_val_LC_MESSAGES+y}
22094 then :
22095 printf %s "(cached) " >&6
22096 else case e in #(
22097 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22098 /* end confdefs.h. */
22099 #include <locale.h>
22101 main (void)
22103 return LC_MESSAGES
22105 return 0;
22107 _ACEOF
22108 if ac_fn_c_try_link "$LINENO"
22109 then :
22110 gt_cv_val_LC_MESSAGES=yes
22111 else case e in #(
22112 e) gt_cv_val_LC_MESSAGES=no ;;
22113 esac
22115 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22116 conftest$ac_exeext conftest.$ac_ext ;;
22117 esac
22119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
22120 printf "%s\n" "$gt_cv_val_LC_MESSAGES" >&6; }
22121 if test $gt_cv_val_LC_MESSAGES = yes; then
22123 printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h
22139 if test $ac_cv_func_uselocale = yes; then
22141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5
22142 printf %s "checking whether uselocale works... " >&6; }
22143 if test ${gt_cv_func_uselocale_works+y}
22144 then :
22145 printf %s "(cached) " >&6
22146 else case e in #(
22147 e) if test "$cross_compiling" = yes
22148 then :
22149 # Guess no on AIX and z/OS, yes otherwise.
22150 case "$host_os" in
22151 aix* | openedition*) gt_cv_func_uselocale_works="guessing no" ;;
22152 *) gt_cv_func_uselocale_works="guessing yes" ;;
22153 esac
22155 else case e in #(
22156 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22157 /* end confdefs.h. */
22159 #include <locale.h>
22160 #if HAVE_XLOCALE_H
22161 # include <xlocale.h>
22162 #endif
22163 locale_t loc1;
22164 int main ()
22166 uselocale (NULL);
22167 setlocale (LC_ALL, "en_US.UTF-8");
22168 return 0;
22170 _ACEOF
22171 if ac_fn_c_try_run "$LINENO"
22172 then :
22173 gt_cv_func_uselocale_works=yes
22174 else case e in #(
22175 e) gt_cv_func_uselocale_works=no ;;
22176 esac
22178 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22179 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22180 esac
22184 esac
22186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5
22187 printf "%s\n" "$gt_cv_func_uselocale_works" >&6; }
22188 else
22189 gt_cv_func_uselocale_works=no
22191 case "$gt_cv_func_uselocale_works" in
22192 *yes)
22193 gt_working_uselocale=yes
22195 printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h
22199 gt_working_uselocale=no
22201 esac
22204 case "$gt_cv_func_uselocale_works" in
22205 *yes)
22207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5
22208 printf %s "checking for fake locale system (OpenBSD)... " >&6; }
22209 if test ${gt_cv_locale_fake+y}
22210 then :
22211 printf %s "(cached) " >&6
22212 else case e in #(
22213 e) if test "$cross_compiling" = yes
22214 then :
22215 case "$host_os" in
22216 openbsd*) gt_cv_locale_fake="guessing yes" ;;
22217 *) gt_cv_locale_fake="guessing no" ;;
22218 esac
22220 else case e in #(
22221 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22222 /* end confdefs.h. */
22224 #include <locale.h>
22225 #if HAVE_XLOCALE_H
22226 # include <xlocale.h>
22227 #endif
22228 int main ()
22230 locale_t loc1, loc2;
22231 if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1;
22232 if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1;
22233 loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0);
22234 loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0);
22235 return !(loc1 == loc2);
22237 _ACEOF
22238 if ac_fn_c_try_run "$LINENO"
22239 then :
22240 gt_cv_locale_fake=yes
22241 else case e in #(
22242 e) gt_cv_locale_fake=no ;;
22243 esac
22245 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22246 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
22247 esac
22251 esac
22253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fake" >&5
22254 printf "%s\n" "$gt_cv_locale_fake" >&6; }
22256 *) gt_cv_locale_fake=no ;;
22257 esac
22258 case "$gt_cv_locale_fake" in
22259 *yes)
22260 gt_fake_locales=yes
22262 printf "%s\n" "#define HAVE_FAKE_LOCALES 1" >>confdefs.h
22266 gt_fake_locales=no
22268 esac
22270 case "$gt_cv_func_uselocale_works" in
22271 *yes)
22272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5
22273 printf %s "checking for Solaris 11.4 locale system... " >&6; }
22274 if test ${gt_cv_locale_solaris114+y}
22275 then :
22276 printf %s "(cached) " >&6
22277 else case e in #(
22278 e) case "$host_os" in
22279 solaris*)
22280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22281 /* end confdefs.h. */
22283 #include <locale.h>
22284 struct _LC_locale_t *x;
22285 locale_t y;
22288 main (void)
22290 *y = x;
22292 return 0;
22294 _ACEOF
22295 if ac_fn_c_try_compile "$LINENO"
22296 then :
22297 gt_cv_locale_solaris114=yes
22298 else case e in #(
22299 e) gt_cv_locale_solaris114=no ;;
22300 esac
22302 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22304 *) gt_cv_locale_solaris114=no ;;
22305 esac
22307 esac
22309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5
22310 printf "%s\n" "$gt_cv_locale_solaris114" >&6; }
22312 *) gt_cv_locale_solaris114=no ;;
22313 esac
22314 if test $gt_cv_locale_solaris114 = yes; then
22316 printf "%s\n" "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h
22320 case "$gt_cv_func_uselocale_works" in
22321 *yes)
22322 ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l"
22323 if test "x$ac_cv_func_getlocalename_l" = xyes
22324 then :
22325 printf "%s\n" "#define HAVE_GETLOCALENAME_L 1" >>confdefs.h
22330 esac
22332 gt_nameless_locales=no
22333 case "$host_os" in
22334 aix*)
22335 gt_nameless_locales=yes
22337 printf "%s\n" "#define HAVE_NAMELESS_LOCALES 1" >>confdefs.h
22340 esac
22342 if test $gt_working_uselocale = yes && test $gt_fake_locales = no; then
22343 gt_good_uselocale=yes
22345 printf "%s\n" "#define HAVE_GOOD_USELOCALE 1" >>confdefs.h
22347 else
22348 gt_good_uselocale=no
22351 if test $gt_good_uselocale = yes && test $gt_nameless_locales = yes; then
22352 gt_localename_enhances_locale_funcs=yes
22353 LOCALENAME_ENHANCE_LOCALE_FUNCS=1
22355 printf "%s\n" "#define LOCALENAME_ENHANCE_LOCALE_FUNCS 1" >>confdefs.h
22357 else
22358 gt_localename_enhances_locale_funcs=no
22362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
22363 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
22364 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
22365 then :
22366 printf %s "(cached) " >&6
22367 else case e in #(
22368 e) gt_save_LIBS="$LIBS"
22369 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
22370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22371 /* end confdefs.h. */
22372 #include <CoreFoundation/CFPreferences.h>
22374 main (void)
22376 CFPreferencesCopyAppValue(NULL, NULL)
22378 return 0;
22380 _ACEOF
22381 if ac_fn_c_try_link "$LINENO"
22382 then :
22383 gt_cv_func_CFPreferencesCopyAppValue=yes
22384 else case e in #(
22385 e) gt_cv_func_CFPreferencesCopyAppValue=no ;;
22386 esac
22388 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22389 conftest$ac_exeext conftest.$ac_ext
22390 LIBS="$gt_save_LIBS" ;;
22391 esac
22393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
22394 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
22395 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
22397 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
22400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
22401 printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
22402 if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y}
22403 then :
22404 printf %s "(cached) " >&6
22405 else case e in #(
22406 e) gt_save_LIBS="$LIBS"
22407 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
22408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22409 /* end confdefs.h. */
22410 #include <CoreFoundation/CFLocale.h>
22412 main (void)
22414 CFLocaleCopyPreferredLanguages();
22416 return 0;
22418 _ACEOF
22419 if ac_fn_c_try_link "$LINENO"
22420 then :
22421 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
22422 else case e in #(
22423 e) gt_cv_func_CFLocaleCopyPreferredLanguages=no ;;
22424 esac
22426 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22427 conftest$ac_exeext conftest.$ac_ext
22428 LIBS="$gt_save_LIBS" ;;
22429 esac
22431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
22432 printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
22433 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
22435 printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
22438 INTL_MACOSX_LIBS=
22439 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
22440 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
22441 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
22451 if test $ac_cv_have_decl_strerror_r = no; then
22452 HAVE_DECL_STRERROR_R=0
22455 if test $ac_cv_func_strerror_r = yes; then
22456 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
22457 if test $gl_cv_func_strerror_r_posix_signature = yes; then
22458 case "$gl_cv_func_strerror_r_works" in
22459 *no) REPLACE_STRERROR_R=1 ;;
22460 esac
22461 else
22462 REPLACE_STRERROR_R=1
22464 else
22465 REPLACE_STRERROR_R=1
22471 HAVE_PSELECT=1;
22472 REPLACE_PSELECT=0;
22473 REPLACE_SELECT=0;
22479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
22480 printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
22481 if test ${gl_cv_header_sys_select_h_selfcontained+y}
22482 then :
22483 printf %s "(cached) " >&6
22484 else case e in #(
22486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22487 /* end confdefs.h. */
22488 #include <sys/select.h>
22490 main (void)
22492 struct timeval b;
22494 return 0;
22496 _ACEOF
22497 if ac_fn_c_try_compile "$LINENO"
22498 then :
22499 gl_cv_header_sys_select_h_selfcontained=yes
22500 else case e in #(
22501 e) gl_cv_header_sys_select_h_selfcontained=no ;;
22502 esac
22504 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22505 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
22506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22507 /* end confdefs.h. */
22508 #include <sys/select.h>
22510 main (void)
22512 int memset; int bzero;
22514 return 0;
22517 _ACEOF
22518 if ac_fn_c_try_compile "$LINENO"
22519 then :
22520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22521 /* end confdefs.h. */
22522 #include <sys/select.h>
22524 main (void)
22527 #undef memset
22528 #define memset nonexistent_memset
22529 extern
22530 #ifdef __cplusplus
22532 #endif
22533 void *memset (void *, int, unsigned long);
22534 #undef bzero
22535 #define bzero nonexistent_bzero
22536 extern
22537 #ifdef __cplusplus
22539 #endif
22540 void bzero (void *, unsigned long);
22541 fd_set fds;
22542 FD_ZERO (&fds);
22545 return 0;
22548 _ACEOF
22549 if ac_fn_c_try_link "$LINENO"
22550 then :
22552 else case e in #(
22553 e) gl_cv_header_sys_select_h_selfcontained=no ;;
22554 esac
22556 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22557 conftest$ac_exeext conftest.$ac_ext
22560 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22563 esac
22565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
22566 printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
22576 if test $gl_cv_have_include_next = yes; then
22577 gl_cv_next_sys_select_h='<'sys/select.h'>'
22578 else
22579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
22580 printf %s "checking absolute name of <sys/select.h>... " >&6; }
22581 if test ${gl_cv_next_sys_select_h+y}
22582 then :
22583 printf %s "(cached) " >&6
22584 else case e in #(
22586 if test $ac_cv_header_sys_select_h = yes; then
22591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22592 /* end confdefs.h. */
22593 #include <sys/select.h>
22594 _ACEOF
22595 case "$host_os" in
22596 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22597 *) gl_absname_cpp="$ac_cpp" ;;
22598 esac
22600 case "$host_os" in
22601 mingw*)
22602 gl_dirsep_regex='[/\\]'
22605 gl_dirsep_regex='\/'
22607 esac
22608 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22609 gl_header_literal_regex=`echo 'sys/select.h' \
22610 | sed -e "$gl_make_literal_regex_sed"`
22611 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22612 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22613 s|^/[^/]|//&|
22618 gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22619 sed -n "$gl_absolute_header_sed"`
22621 gl_header=$gl_cv_absolute_sys_select_h
22622 gl_cv_next_sys_select_h='"'$gl_header'"'
22623 else
22624 gl_cv_next_sys_select_h='<'sys/select.h'>'
22628 esac
22630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
22631 printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
22633 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
22635 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22636 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22637 gl_next_as_first_directive='<'sys/select.h'>'
22638 else
22639 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22640 gl_next_as_first_directive=$gl_cv_next_sys_select_h
22642 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
22647 if test $ac_cv_header_sys_select_h = yes; then
22648 HAVE_SYS_SELECT_H=1
22649 else
22650 HAVE_SYS_SELECT_H=0
22657 if test $ac_cv_header_sys_socket_h != yes; then
22658 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
22659 if test "x$ac_cv_header_winsock2_h" = xyes
22660 then :
22661 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
22666 if test "$ac_cv_header_winsock2_h" = yes; then
22667 HAVE_WINSOCK2_H=1
22668 UNISTD_H_HAVE_WINSOCK2_H=1
22669 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
22670 else
22671 HAVE_WINSOCK2_H=0
22683 GL_GNULIB_PSELECT=0
22687 GL_GNULIB_SELECT=0
22693 HAVE_PTHREAD_T=1;
22694 HAVE_PTHREAD_SPINLOCK_T=1;
22695 HAVE_PTHREAD_CREATE_DETACHED=1;
22696 HAVE_PTHREAD_MUTEX_RECURSIVE=1;
22697 HAVE_PTHREAD_MUTEX_ROBUST=1;
22698 HAVE_PTHREAD_PROCESS_SHARED=1;
22699 HAVE_PTHREAD_CREATE=1;
22700 HAVE_PTHREAD_ATTR_INIT=1;
22701 HAVE_PTHREAD_ATTR_GETDETACHSTATE=1;
22702 HAVE_PTHREAD_ATTR_SETDETACHSTATE=1;
22703 HAVE_PTHREAD_ATTR_DESTROY=1;
22704 HAVE_PTHREAD_SELF=1;
22705 HAVE_PTHREAD_EQUAL=1;
22706 HAVE_PTHREAD_DETACH=1;
22707 HAVE_PTHREAD_JOIN=1;
22708 HAVE_PTHREAD_EXIT=1;
22709 HAVE_PTHREAD_ONCE=1;
22710 HAVE_PTHREAD_MUTEX_INIT=1;
22711 HAVE_PTHREAD_MUTEXATTR_INIT=1;
22712 HAVE_PTHREAD_MUTEXATTR_GETTYPE=1;
22713 HAVE_PTHREAD_MUTEXATTR_SETTYPE=1;
22714 HAVE_PTHREAD_MUTEXATTR_GETROBUST=1;
22715 HAVE_PTHREAD_MUTEXATTR_SETROBUST=1;
22716 HAVE_PTHREAD_MUTEXATTR_DESTROY=1;
22717 HAVE_PTHREAD_MUTEX_LOCK=1;
22718 HAVE_PTHREAD_MUTEX_TRYLOCK=1;
22719 HAVE_PTHREAD_MUTEX_TIMEDLOCK=1;
22720 HAVE_PTHREAD_MUTEX_UNLOCK=1;
22721 HAVE_PTHREAD_MUTEX_DESTROY=1;
22722 HAVE_PTHREAD_RWLOCK_INIT=1;
22723 HAVE_PTHREAD_RWLOCKATTR_INIT=1;
22724 HAVE_PTHREAD_RWLOCKATTR_DESTROY=1;
22725 HAVE_PTHREAD_RWLOCK_RDLOCK=1;
22726 HAVE_PTHREAD_RWLOCK_WRLOCK=1;
22727 HAVE_PTHREAD_RWLOCK_TRYRDLOCK=1;
22728 HAVE_PTHREAD_RWLOCK_TRYWRLOCK=1;
22729 HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=1;
22730 HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=1;
22731 HAVE_PTHREAD_RWLOCK_UNLOCK=1;
22732 HAVE_PTHREAD_RWLOCK_DESTROY=1;
22733 HAVE_PTHREAD_COND_INIT=1;
22734 HAVE_PTHREAD_CONDATTR_INIT=1;
22735 HAVE_PTHREAD_CONDATTR_DESTROY=1;
22736 HAVE_PTHREAD_COND_WAIT=1;
22737 HAVE_PTHREAD_COND_TIMEDWAIT=1;
22738 HAVE_PTHREAD_COND_SIGNAL=1;
22739 HAVE_PTHREAD_COND_BROADCAST=1;
22740 HAVE_PTHREAD_COND_DESTROY=1;
22741 HAVE_PTHREAD_KEY_CREATE=1;
22742 HAVE_PTHREAD_SETSPECIFIC=1;
22743 HAVE_PTHREAD_GETSPECIFIC=1;
22744 HAVE_PTHREAD_KEY_DELETE=1;
22745 HAVE_PTHREAD_SPIN_INIT=1;
22746 HAVE_PTHREAD_SPIN_LOCK=1;
22747 HAVE_PTHREAD_SPIN_TRYLOCK=1;
22748 HAVE_PTHREAD_SPIN_UNLOCK=1;
22749 HAVE_PTHREAD_SPIN_DESTROY=1;
22750 REPLACE_PTHREAD_CREATE=0;
22751 REPLACE_PTHREAD_ATTR_INIT=0;
22752 REPLACE_PTHREAD_ATTR_GETDETACHSTATE=0;
22753 REPLACE_PTHREAD_ATTR_SETDETACHSTATE=0;
22754 REPLACE_PTHREAD_ATTR_DESTROY=0;
22755 REPLACE_PTHREAD_SELF=0;
22756 REPLACE_PTHREAD_EQUAL=0;
22757 REPLACE_PTHREAD_DETACH=0;
22758 REPLACE_PTHREAD_JOIN=0;
22759 REPLACE_PTHREAD_EXIT=0;
22760 REPLACE_PTHREAD_ONCE=0;
22761 REPLACE_PTHREAD_MUTEX_INIT=0;
22762 REPLACE_PTHREAD_MUTEXATTR_INIT=0;
22763 REPLACE_PTHREAD_MUTEXATTR_GETTYPE=0;
22764 REPLACE_PTHREAD_MUTEXATTR_SETTYPE=0;
22765 REPLACE_PTHREAD_MUTEXATTR_GETROBUST=0;
22766 REPLACE_PTHREAD_MUTEXATTR_SETROBUST=0;
22767 REPLACE_PTHREAD_MUTEXATTR_DESTROY=0;
22768 REPLACE_PTHREAD_MUTEX_LOCK=0;
22769 REPLACE_PTHREAD_MUTEX_TRYLOCK=0;
22770 REPLACE_PTHREAD_MUTEX_TIMEDLOCK=0;
22771 REPLACE_PTHREAD_MUTEX_UNLOCK=0;
22772 REPLACE_PTHREAD_MUTEX_DESTROY=0;
22773 REPLACE_PTHREAD_RWLOCK_INIT=0;
22774 REPLACE_PTHREAD_RWLOCKATTR_INIT=0;
22775 REPLACE_PTHREAD_RWLOCKATTR_DESTROY=0;
22776 REPLACE_PTHREAD_RWLOCK_RDLOCK=0;
22777 REPLACE_PTHREAD_RWLOCK_WRLOCK=0;
22778 REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=0;
22779 REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=0;
22780 REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=0;
22781 REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=0;
22782 REPLACE_PTHREAD_RWLOCK_UNLOCK=0;
22783 REPLACE_PTHREAD_RWLOCK_DESTROY=0;
22784 REPLACE_PTHREAD_COND_INIT=0;
22785 REPLACE_PTHREAD_CONDATTR_INIT=0;
22786 REPLACE_PTHREAD_CONDATTR_DESTROY=0;
22787 REPLACE_PTHREAD_COND_WAIT=0;
22788 REPLACE_PTHREAD_COND_TIMEDWAIT=0;
22789 REPLACE_PTHREAD_COND_SIGNAL=0;
22790 REPLACE_PTHREAD_COND_BROADCAST=0;
22791 REPLACE_PTHREAD_COND_DESTROY=0;
22792 REPLACE_PTHREAD_KEY_CREATE=0;
22793 REPLACE_PTHREAD_SETSPECIFIC=0;
22794 REPLACE_PTHREAD_GETSPECIFIC=0;
22795 REPLACE_PTHREAD_KEY_DELETE=0;
22796 REPLACE_PTHREAD_SPIN_INIT=0;
22797 REPLACE_PTHREAD_SPIN_LOCK=0;
22798 REPLACE_PTHREAD_SPIN_TRYLOCK=0;
22799 REPLACE_PTHREAD_SPIN_UNLOCK=0;
22800 REPLACE_PTHREAD_SPIN_DESTROY=0;
22818 if test $gl_cv_have_include_next = yes; then
22819 gl_cv_next_pthread_h='<'pthread.h'>'
22820 else
22821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <pthread.h>" >&5
22822 printf %s "checking absolute name of <pthread.h>... " >&6; }
22823 if test ${gl_cv_next_pthread_h+y}
22824 then :
22825 printf %s "(cached) " >&6
22826 else case e in #(
22828 if test $ac_cv_header_pthread_h = yes; then
22833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22834 /* end confdefs.h. */
22835 #include <pthread.h>
22836 _ACEOF
22837 case "$host_os" in
22838 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22839 *) gl_absname_cpp="$ac_cpp" ;;
22840 esac
22842 case "$host_os" in
22843 mingw*)
22844 gl_dirsep_regex='[/\\]'
22847 gl_dirsep_regex='\/'
22849 esac
22850 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22851 gl_header_literal_regex=`echo 'pthread.h' \
22852 | sed -e "$gl_make_literal_regex_sed"`
22853 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22854 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22855 s|^/[^/]|//&|
22860 gl_cv_absolute_pthread_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22861 sed -n "$gl_absolute_header_sed"`
22863 gl_header=$gl_cv_absolute_pthread_h
22864 gl_cv_next_pthread_h='"'$gl_header'"'
22865 else
22866 gl_cv_next_pthread_h='<'pthread.h'>'
22870 esac
22872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_pthread_h" >&5
22873 printf "%s\n" "$gl_cv_next_pthread_h" >&6; }
22875 NEXT_PTHREAD_H=$gl_cv_next_pthread_h
22877 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22878 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22879 gl_next_as_first_directive='<'pthread.h'>'
22880 else
22881 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22882 gl_next_as_first_directive=$gl_cv_next_pthread_h
22884 NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H=$gl_next_as_first_directive
22889 if test $ac_cv_header_pthread_h = yes; then
22890 HAVE_PTHREAD_H=1
22893 if { case "$host_os" in mingw*) true;; *) false;; esac; } \
22894 && test $gl_threads_api = windows; then
22895 HAVE_PTHREAD_H=0
22898 else
22899 HAVE_PTHREAD_H=0
22903 ac_fn_c_check_type "$LINENO" "pthread_t" "ac_cv_type_pthread_t" "$ac_includes_default
22904 #if HAVE_PTHREAD_H
22905 #include <pthread.h>
22906 #endif
22908 if test "x$ac_cv_type_pthread_t" = xyes
22909 then :
22911 printf "%s\n" "#define HAVE_PTHREAD_T 1" >>confdefs.h
22915 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "$ac_includes_default
22916 #if HAVE_PTHREAD_H
22917 #include <pthread.h>
22918 #endif
22920 if test "x$ac_cv_type_pthread_spinlock_t" = xyes
22921 then :
22923 printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
22928 if test $ac_cv_type_pthread_t != yes; then
22929 HAVE_PTHREAD_T=0
22931 if test $ac_cv_type_pthread_spinlock_t != yes; then
22932 HAVE_PTHREAD_SPINLOCK_T=0
22936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_CREATE_DETACHED" >&5
22937 printf %s "checking for PTHREAD_CREATE_DETACHED... " >&6; }
22938 if test ${gl_cv_const_PTHREAD_CREATE_DETACHED+y}
22939 then :
22940 printf %s "(cached) " >&6
22941 else case e in #(
22942 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22943 /* end confdefs.h. */
22944 #include <pthread.h>
22945 int x = PTHREAD_CREATE_DETACHED;
22948 main (void)
22952 return 0;
22954 _ACEOF
22955 if ac_fn_c_try_compile "$LINENO"
22956 then :
22957 gl_cv_const_PTHREAD_CREATE_DETACHED=yes
22958 else case e in #(
22959 e) gl_cv_const_PTHREAD_CREATE_DETACHED=no ;;
22960 esac
22962 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22964 esac
22966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_CREATE_DETACHED" >&5
22967 printf "%s\n" "$gl_cv_const_PTHREAD_CREATE_DETACHED" >&6; }
22968 if test $gl_cv_const_PTHREAD_CREATE_DETACHED != yes; then
22969 HAVE_PTHREAD_CREATE_DETACHED=0
22972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_RECURSIVE" >&5
22973 printf %s "checking for PTHREAD_MUTEX_RECURSIVE... " >&6; }
22974 if test ${gl_cv_const_PTHREAD_MUTEX_RECURSIVE+y}
22975 then :
22976 printf %s "(cached) " >&6
22977 else case e in #(
22978 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22979 /* end confdefs.h. */
22980 #include <pthread.h>
22981 int x = PTHREAD_MUTEX_RECURSIVE;
22984 main (void)
22988 return 0;
22990 _ACEOF
22991 if ac_fn_c_try_compile "$LINENO"
22992 then :
22993 gl_cv_const_PTHREAD_MUTEX_RECURSIVE=yes
22994 else case e in #(
22995 e) gl_cv_const_PTHREAD_MUTEX_RECURSIVE=no ;;
22996 esac
22998 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23000 esac
23002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&5
23003 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&6; }
23004 if test $gl_cv_const_PTHREAD_MUTEX_RECURSIVE != yes; then
23005 HAVE_PTHREAD_MUTEX_RECURSIVE=0
23008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_ROBUST" >&5
23009 printf %s "checking for PTHREAD_MUTEX_ROBUST... " >&6; }
23010 if test ${gl_cv_const_PTHREAD_MUTEX_ROBUST+y}
23011 then :
23012 printf %s "(cached) " >&6
23013 else case e in #(
23014 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23015 /* end confdefs.h. */
23016 #include <pthread.h>
23017 int x = PTHREAD_MUTEX_ROBUST;
23020 main (void)
23024 return 0;
23026 _ACEOF
23027 if ac_fn_c_try_compile "$LINENO"
23028 then :
23029 gl_cv_const_PTHREAD_MUTEX_ROBUST=yes
23030 else case e in #(
23031 e) gl_cv_const_PTHREAD_MUTEX_ROBUST=no ;;
23032 esac
23034 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23036 esac
23038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_ROBUST" >&5
23039 printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_ROBUST" >&6; }
23040 if test $gl_cv_const_PTHREAD_MUTEX_ROBUST != yes; then
23041 HAVE_PTHREAD_MUTEX_ROBUST=0
23044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PROCESS_SHARED" >&5
23045 printf %s "checking for PTHREAD_PROCESS_SHARED... " >&6; }
23046 if test ${gl_cv_const_PTHREAD_PROCESS_SHARED+y}
23047 then :
23048 printf %s "(cached) " >&6
23049 else case e in #(
23050 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23051 /* end confdefs.h. */
23052 #include <pthread.h>
23053 int x = PTHREAD_PROCESS_SHARED;
23056 main (void)
23060 return 0;
23062 _ACEOF
23063 if ac_fn_c_try_compile "$LINENO"
23064 then :
23065 gl_cv_const_PTHREAD_PROCESS_SHARED=yes
23066 else case e in #(
23067 e) gl_cv_const_PTHREAD_PROCESS_SHARED=no ;;
23068 esac
23070 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23072 esac
23074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_PROCESS_SHARED" >&5
23075 printf "%s\n" "$gl_cv_const_PTHREAD_PROCESS_SHARED" >&6; }
23076 if test $gl_cv_const_PTHREAD_PROCESS_SHARED != yes; then
23077 HAVE_PTHREAD_PROCESS_SHARED=0
23086 LIB_PTHREAD="$LIBPMULTITHREAD"
23091 GL_GNULIB_PTHREAD_THREAD=0
23095 GL_GNULIB_PTHREAD_ONCE=0
23099 GL_GNULIB_PTHREAD_MUTEX=0
23103 GL_GNULIB_PTHREAD_RWLOCK=0
23107 GL_GNULIB_PTHREAD_COND=0
23111 GL_GNULIB_PTHREAD_TSS=0
23115 GL_GNULIB_PTHREAD_SPIN=0
23119 GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK=0
23124 HAVE_POSIX_SIGNALBLOCKING=1;
23125 HAVE_PTHREAD_SIGMASK=1;
23126 HAVE_RAISE=1;
23127 HAVE_SIGSET_T=1;
23128 HAVE_SIGINFO_T=1;
23129 HAVE_SIGACTION=1;
23130 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
23132 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
23134 HAVE_SIGHANDLER_T=1;
23135 REPLACE_PTHREAD_SIGMASK=0;
23136 REPLACE_RAISE=0;
23141 GL_GNULIB_PTHREAD_SIGMASK=0
23145 GL_GNULIB_RAISE=0
23149 GL_GNULIB_SIGNAL_H_SIGPIPE=0
23153 GL_GNULIB_SIGPROCMASK=0
23157 GL_GNULIB_SIGACTION=0
23162 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
23163 #include <signal.h>
23164 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
23165 #include <sys/types.h>
23168 if test "x$ac_cv_type_sigset_t" = xyes
23169 then :
23171 printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
23173 gl_cv_type_sigset_t=yes
23174 else case e in #(
23175 e) gl_cv_type_sigset_t=no ;;
23176 esac
23179 if test $gl_cv_type_sigset_t != yes; then
23180 HAVE_SIGSET_T=0
23184 HAVE_SCHED_YIELD=1;
23185 REPLACE_SCHED_YIELD=0;
23194 ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
23195 #include <sys/cdefs.h>
23196 #endif
23199 if test "x$ac_cv_header_sched_h" = xyes
23200 then :
23201 printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
23213 if test $gl_cv_have_include_next = yes; then
23214 gl_cv_next_sched_h='<'sched.h'>'
23215 else
23216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
23217 printf %s "checking absolute name of <sched.h>... " >&6; }
23218 if test ${gl_cv_next_sched_h+y}
23219 then :
23220 printf %s "(cached) " >&6
23221 else case e in #(
23225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23226 /* end confdefs.h. */
23227 #include <sched.h>
23228 _ACEOF
23229 case "$host_os" in
23230 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23231 *) gl_absname_cpp="$ac_cpp" ;;
23232 esac
23234 case "$host_os" in
23235 mingw*)
23236 gl_dirsep_regex='[/\\]'
23239 gl_dirsep_regex='\/'
23241 esac
23242 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23243 gl_header_literal_regex=`echo 'sched.h' \
23244 | sed -e "$gl_make_literal_regex_sed"`
23245 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23246 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23247 s|^/[^/]|//&|
23252 gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23253 sed -n "$gl_absolute_header_sed"`
23255 gl_header=$gl_cv_absolute_sched_h
23256 gl_cv_next_sched_h='"'$gl_header'"'
23259 esac
23261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
23262 printf "%s\n" "$gl_cv_next_sched_h" >&6; }
23264 NEXT_SCHED_H=$gl_cv_next_sched_h
23266 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23267 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23268 gl_next_as_first_directive='<'sched.h'>'
23269 else
23270 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23271 gl_next_as_first_directive=$gl_cv_next_sched_h
23273 NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
23279 if test "$ac_cv_header_sched_h" = yes; then
23280 HAVE_SCHED_H=1
23281 else
23282 HAVE_SCHED_H=0
23286 if test "$HAVE_SCHED_H" = 1; then
23287 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
23288 #include <sys/cdefs.h>
23289 #endif
23290 #include <sched.h>
23293 if test "x$ac_cv_type_struct_sched_param" = xyes
23294 then :
23295 HAVE_STRUCT_SCHED_PARAM=1
23296 else case e in #(
23297 e) HAVE_STRUCT_SCHED_PARAM=0 ;;
23298 esac
23301 else
23302 HAVE_STRUCT_SCHED_PARAM=0
23303 case "$host_os" in
23304 os2*)
23305 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
23307 if test "x$ac_cv_type_struct_sched_param" = xyes
23308 then :
23309 HAVE_STRUCT_SCHED_PARAM=1
23313 vms)
23314 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
23316 if test "x$ac_cv_type_struct_sched_param" = xyes
23317 then :
23318 HAVE_STRUCT_SCHED_PARAM=1
23322 esac
23326 if test "$ac_cv_header_sys_cdefs_h" = yes; then
23327 HAVE_SYS_CDEFS_H=1
23328 else
23329 HAVE_SYS_CDEFS_H=0
23341 GL_GNULIB_SCHED_YIELD=0
23350 if test $ac_cv_header_sys_socket_h != yes; then
23351 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
23352 if test "x$ac_cv_header_winsock2_h" = xyes
23353 then :
23354 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
23359 if test "$ac_cv_header_winsock2_h" = yes; then
23360 HAVE_WINSOCK2_H=1
23361 UNISTD_H_HAVE_WINSOCK2_H=1
23362 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
23363 else
23364 HAVE_WINSOCK2_H=0
23367 LIBSOCKET=
23368 if test $HAVE_WINSOCK2_H = 1; then
23369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
23370 printf %s "checking for WSAStartup... " >&6; }
23371 if test ${gl_cv_func_wsastartup+y}
23372 then :
23373 printf %s "(cached) " >&6
23374 else case e in #(
23376 gl_save_LIBS="$LIBS"
23377 LIBS="$LIBS -lws2_32"
23378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23379 /* end confdefs.h. */
23381 #ifdef HAVE_WINSOCK2_H
23382 # include <winsock2.h>
23383 #endif
23385 main (void)
23388 WORD wVersionRequested = MAKEWORD(1, 1);
23389 WSADATA wsaData;
23390 int err = WSAStartup(wVersionRequested, &wsaData);
23391 WSACleanup ();
23394 return 0;
23397 _ACEOF
23398 if ac_fn_c_try_link "$LINENO"
23399 then :
23400 gl_cv_func_wsastartup=yes
23401 else case e in #(
23402 e) gl_cv_func_wsastartup=no ;;
23403 esac
23405 rm -f core conftest.err conftest.$ac_objext conftest.beam \
23406 conftest$ac_exeext conftest.$ac_ext
23407 LIBS="$gl_save_LIBS"
23409 esac
23411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
23412 printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
23413 if test "$gl_cv_func_wsastartup" = "yes"; then
23415 printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
23417 LIBSOCKET='-lws2_32'
23419 else
23420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
23421 printf %s "checking for library containing setsockopt... " >&6; }
23422 if test ${gl_cv_lib_socket+y}
23423 then :
23424 printf %s "(cached) " >&6
23425 else case e in #(
23427 gl_cv_lib_socket=
23428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23429 /* end confdefs.h. */
23430 extern
23431 #ifdef __cplusplus
23433 #endif
23434 char setsockopt();
23436 main (void)
23438 setsockopt();
23440 return 0;
23442 _ACEOF
23443 if ac_fn_c_try_link "$LINENO"
23444 then :
23446 else case e in #(
23447 e) gl_save_LIBS="$LIBS"
23448 LIBS="$gl_save_LIBS -lsocket"
23449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23450 /* end confdefs.h. */
23451 extern
23452 #ifdef __cplusplus
23454 #endif
23455 char setsockopt();
23457 main (void)
23459 setsockopt();
23461 return 0;
23463 _ACEOF
23464 if ac_fn_c_try_link "$LINENO"
23465 then :
23466 gl_cv_lib_socket="-lsocket"
23468 rm -f core conftest.err conftest.$ac_objext conftest.beam \
23469 conftest$ac_exeext conftest.$ac_ext
23470 if test -z "$gl_cv_lib_socket"; then
23471 LIBS="$gl_save_LIBS -lnetwork"
23472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23473 /* end confdefs.h. */
23474 extern
23475 #ifdef __cplusplus
23477 #endif
23478 char setsockopt();
23480 main (void)
23482 setsockopt();
23484 return 0;
23486 _ACEOF
23487 if ac_fn_c_try_link "$LINENO"
23488 then :
23489 gl_cv_lib_socket="-lnetwork"
23491 rm -f core conftest.err conftest.$ac_objext conftest.beam \
23492 conftest$ac_exeext conftest.$ac_ext
23493 if test -z "$gl_cv_lib_socket"; then
23494 LIBS="$gl_save_LIBS -lnet"
23495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23496 /* end confdefs.h. */
23497 extern
23498 #ifdef __cplusplus
23500 #endif
23501 char setsockopt();
23503 main (void)
23505 setsockopt();
23507 return 0;
23509 _ACEOF
23510 if ac_fn_c_try_link "$LINENO"
23511 then :
23512 gl_cv_lib_socket="-lnet"
23514 rm -f core conftest.err conftest.$ac_objext conftest.beam \
23515 conftest$ac_exeext conftest.$ac_ext
23518 LIBS="$gl_save_LIBS"
23520 esac
23522 rm -f core conftest.err conftest.$ac_objext conftest.beam \
23523 conftest$ac_exeext conftest.$ac_ext
23524 if test -z "$gl_cv_lib_socket"; then
23525 gl_cv_lib_socket="none needed"
23528 esac
23530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
23531 printf "%s\n" "$gl_cv_lib_socket" >&6; }
23532 if test "$gl_cv_lib_socket" != "none needed"; then
23533 LIBSOCKET="$gl_cv_lib_socket"
23545 ac_fn_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23546 if test "x$ac_cv_have_decl_setenv" = xyes
23547 then :
23548 ac_have_decl=1
23549 else case e in #(
23550 e) ac_have_decl=0 ;;
23551 esac
23553 printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h
23559 if test $ac_cv_have_decl_setenv = no; then
23560 HAVE_DECL_SETENV=0
23567 ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
23568 if test "x$ac_cv_header_search_h" = xyes
23569 then :
23570 printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h
23574 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
23575 if test "x$ac_cv_func_tsearch" = xyes
23576 then :
23577 printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
23583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
23584 printf %s "checking for uid_t in sys/types.h... " >&6; }
23585 if test ${ac_cv_type_uid_t+y}
23586 then :
23587 printf %s "(cached) " >&6
23588 else case e in #(
23589 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23590 /* end confdefs.h. */
23591 #include <sys/types.h>
23593 _ACEOF
23594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23595 $EGREP_TRADITIONAL "uid_t" >/dev/null 2>&1
23596 then :
23597 ac_cv_type_uid_t=yes
23598 else case e in #(
23599 e) ac_cv_type_uid_t=no ;;
23600 esac
23602 rm -rf conftest*
23604 esac
23606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
23607 printf "%s\n" "$ac_cv_type_uid_t" >&6; }
23608 if test $ac_cv_type_uid_t = no; then
23610 printf "%s\n" "#define uid_t int" >>confdefs.h
23613 printf "%s\n" "#define gid_t int" >>confdefs.h
23628 if test $gl_cv_have_include_next = yes; then
23629 gl_cv_next_signal_h='<'signal.h'>'
23630 else
23631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
23632 printf %s "checking absolute name of <signal.h>... " >&6; }
23633 if test ${gl_cv_next_signal_h+y}
23634 then :
23635 printf %s "(cached) " >&6
23636 else case e in #(
23640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23641 /* end confdefs.h. */
23642 #include <signal.h>
23643 _ACEOF
23644 case "$host_os" in
23645 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23646 *) gl_absname_cpp="$ac_cpp" ;;
23647 esac
23649 case "$host_os" in
23650 mingw*)
23651 gl_dirsep_regex='[/\\]'
23654 gl_dirsep_regex='\/'
23656 esac
23657 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23658 gl_header_literal_regex=`echo 'signal.h' \
23659 | sed -e "$gl_make_literal_regex_sed"`
23660 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23661 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23662 s|^/[^/]|//&|
23667 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23668 sed -n "$gl_absolute_header_sed"`
23670 gl_header=$gl_cv_absolute_signal_h
23671 gl_cv_next_signal_h='"'$gl_header'"'
23674 esac
23676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
23677 printf "%s\n" "$gl_cv_next_signal_h" >&6; }
23679 NEXT_SIGNAL_H=$gl_cv_next_signal_h
23681 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23682 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23683 gl_next_as_first_directive='<'signal.h'>'
23684 else
23685 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23686 gl_next_as_first_directive=$gl_cv_next_signal_h
23688 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
23694 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
23695 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
23696 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
23697 #include <signal.h>
23700 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
23701 then :
23703 else case e in #(
23704 e) HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 ;;
23705 esac
23714 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
23715 #include <signal.h>
23718 if test "x$ac_cv_type_sighandler_t" = xyes
23719 then :
23721 else case e in #(
23722 e) HAVE_SIGHANDLER_T=0 ;;
23723 esac
23734 ac_fn_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23735 if test "x$ac_cv_have_decl_strdup" = xyes
23736 then :
23737 ac_have_decl=1
23738 else case e in #(
23739 e) ac_have_decl=0 ;;
23740 esac
23742 printf "%s\n" "#define HAVE_DECL_STRDUP $ac_have_decl" >>confdefs.h
23751 if test $ac_cv_header_sys_ioctl_h = yes; then
23752 HAVE_SYS_IOCTL_H=1
23753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
23754 printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
23755 if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
23756 then :
23757 printf %s "(cached) " >&6
23758 else case e in #(
23759 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23760 /* end confdefs.h. */
23761 #include <sys/ioctl.h>
23763 main (void)
23765 (void) ioctl;
23767 return 0;
23769 _ACEOF
23770 if ac_fn_c_try_compile "$LINENO"
23771 then :
23772 gl_cv_decl_ioctl_in_sys_ioctl_h=yes
23773 else case e in #(
23774 e) gl_cv_decl_ioctl_in_sys_ioctl_h=no ;;
23775 esac
23777 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23779 esac
23781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
23782 printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
23783 else
23784 HAVE_SYS_IOCTL_H=0
23796 if test $gl_cv_have_include_next = yes; then
23797 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
23798 else
23799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
23800 printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
23801 if test ${gl_cv_next_sys_ioctl_h+y}
23802 then :
23803 printf %s "(cached) " >&6
23804 else case e in #(
23806 if test $ac_cv_header_sys_ioctl_h = yes; then
23811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23812 /* end confdefs.h. */
23813 #include <sys/ioctl.h>
23814 _ACEOF
23815 case "$host_os" in
23816 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23817 *) gl_absname_cpp="$ac_cpp" ;;
23818 esac
23820 case "$host_os" in
23821 mingw*)
23822 gl_dirsep_regex='[/\\]'
23825 gl_dirsep_regex='\/'
23827 esac
23828 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23829 gl_header_literal_regex=`echo 'sys/ioctl.h' \
23830 | sed -e "$gl_make_literal_regex_sed"`
23831 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23832 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23833 s|^/[^/]|//&|
23838 gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23839 sed -n "$gl_absolute_header_sed"`
23841 gl_header=$gl_cv_absolute_sys_ioctl_h
23842 gl_cv_next_sys_ioctl_h='"'$gl_header'"'
23843 else
23844 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
23848 esac
23850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
23851 printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
23853 NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
23855 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23856 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23857 gl_next_as_first_directive='<'sys/ioctl.h'>'
23858 else
23859 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23860 gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
23862 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
23887 if test $gl_cv_have_include_next = yes; then
23888 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
23889 else
23890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
23891 printf %s "checking absolute name of <sys/uio.h>... " >&6; }
23892 if test ${gl_cv_next_sys_uio_h+y}
23893 then :
23894 printf %s "(cached) " >&6
23895 else case e in #(
23897 if test $ac_cv_header_sys_uio_h = yes; then
23902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23903 /* end confdefs.h. */
23904 #include <sys/uio.h>
23905 _ACEOF
23906 case "$host_os" in
23907 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23908 *) gl_absname_cpp="$ac_cpp" ;;
23909 esac
23911 case "$host_os" in
23912 mingw*)
23913 gl_dirsep_regex='[/\\]'
23916 gl_dirsep_regex='\/'
23918 esac
23919 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23920 gl_header_literal_regex=`echo 'sys/uio.h' \
23921 | sed -e "$gl_make_literal_regex_sed"`
23922 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23923 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23924 s|^/[^/]|//&|
23929 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23930 sed -n "$gl_absolute_header_sed"`
23932 gl_header=$gl_cv_absolute_sys_uio_h
23933 gl_cv_next_sys_uio_h='"'$gl_header'"'
23934 else
23935 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
23939 esac
23941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
23942 printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
23944 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
23946 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23947 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23948 gl_next_as_first_directive='<'sys/uio.h'>'
23949 else
23950 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23951 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
23953 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
23958 if test $ac_cv_header_sys_uio_h = yes; then
23959 HAVE_SYS_UIO_H=1
23960 else
23961 HAVE_SYS_UIO_H=0
23967 ac_fn_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23968 if test "x$ac_cv_have_decl_unsetenv" = xyes
23969 then :
23970 ac_have_decl=1
23971 else case e in #(
23972 e) ac_have_decl=0 ;;
23973 esac
23975 printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
23981 GL_CFLAG_GNULIB_WARNINGS=''
23982 if test -n "$GL_CFLAG_ALLOW_WARNINGS"; then
23983 cat > conftest.c <<\EOF
23984 #if __GNUC__ >= 3 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
23985 -Wno-cast-qual
23986 -Wno-conversion
23987 -Wno-float-equal
23988 -Wno-sign-compare
23989 -Wno-undef
23990 -Wno-unused-function
23991 -Wno-unused-parameter
23992 #endif
23993 #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
23994 -Wno-float-conversion
23995 #endif
23996 #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
23997 -Wimplicit-fallthrough
23998 #endif
23999 #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
24000 -Wno-pedantic
24001 #endif
24002 #if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
24003 -Wno-sign-conversion
24004 -Wno-type-limits
24005 #endif
24006 #if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4
24007 -Wno-unsuffixed-float-constants
24008 #endif
24010 gl_command="$CC $CFLAGS $CPPFLAGS -E conftest.c > conftest.out"
24011 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gl_command\""; } >&5
24012 (eval $gl_command) 2>&5
24013 ac_status=$?
24014 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24015 test $ac_status = 0; }; then
24016 gl_options=`grep -v '#' conftest.out`
24017 for word in $gl_options; do
24018 GL_CFLAG_GNULIB_WARNINGS="$GL_CFLAG_GNULIB_WARNINGS $word"
24019 done
24021 rm -f conftest.c conftest.out
24027 if false; then
24028 GL_COND_LIBTOOL_TRUE=
24029 GL_COND_LIBTOOL_FALSE='#'
24030 else
24031 GL_COND_LIBTOOL_TRUE='#'
24032 GL_COND_LIBTOOL_FALSE=
24035 gl_cond_libtool=false
24036 gl_libdeps=
24037 gl_ltlibdeps=
24038 gl_m4_base='m4'
24051 gl_source_base='lib'
24052 gl_source_base_prefix='$(top_build_prefix)lib/'
24056 LIB_ACL=
24057 use_acl=0
24058 if test "$enable_acl" != no; then
24059 ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
24060 if test "x$ac_cv_header_sys_acl_h" = xyes
24061 then :
24062 printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
24066 if test $ac_cv_header_sys_acl_h = yes; then
24067 ac_save_LIBS=$LIBS
24069 if test $use_acl = 0; then
24070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
24071 printf %s "checking for library containing acl_get_file... " >&6; }
24072 if test ${ac_cv_search_acl_get_file+y}
24073 then :
24074 printf %s "(cached) " >&6
24075 else case e in #(
24076 e) ac_func_search_save_LIBS=$LIBS
24077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24078 /* end confdefs.h. */
24080 /* Override any GCC internal prototype to avoid an error.
24081 Use char because int might match the return type of a GCC
24082 builtin and then its argument prototype would still apply.
24083 The 'extern "C"' is for builds by C++ compilers;
24084 although this is not generally supported in C code, supporting it here
24085 has little cost and some practical benefit (sr 110532). */
24086 #ifdef __cplusplus
24087 extern "C"
24088 #endif
24089 char acl_get_file (void);
24091 main (void)
24093 return acl_get_file ();
24095 return 0;
24097 _ACEOF
24098 for ac_lib in '' acl pacl
24100 if test -z "$ac_lib"; then
24101 ac_res="none required"
24102 else
24103 ac_res=-l$ac_lib
24104 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24106 if ac_fn_c_try_link "$LINENO"
24107 then :
24108 ac_cv_search_acl_get_file=$ac_res
24110 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24111 conftest$ac_exeext
24112 if test ${ac_cv_search_acl_get_file+y}
24113 then :
24114 break
24116 done
24117 if test ${ac_cv_search_acl_get_file+y}
24118 then :
24120 else case e in #(
24121 e) ac_cv_search_acl_get_file=no ;;
24122 esac
24124 rm conftest.$ac_ext
24125 LIBS=$ac_func_search_save_LIBS ;;
24126 esac
24128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
24129 printf "%s\n" "$ac_cv_search_acl_get_file" >&6; }
24130 ac_res=$ac_cv_search_acl_get_file
24131 if test "$ac_res" != no
24132 then :
24133 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24134 if test "$ac_cv_search_acl_get_file" != "none required"; then
24135 LIB_ACL=$ac_cv_search_acl_get_file
24137 ac_fn_c_check_func "$LINENO" "acl_get_file" "ac_cv_func_acl_get_file"
24138 if test "x$ac_cv_func_acl_get_file" = xyes
24139 then :
24140 printf "%s\n" "#define HAVE_ACL_GET_FILE 1" >>confdefs.h
24143 ac_fn_c_check_func "$LINENO" "acl_get_fd" "ac_cv_func_acl_get_fd"
24144 if test "x$ac_cv_func_acl_get_fd" = xyes
24145 then :
24146 printf "%s\n" "#define HAVE_ACL_GET_FD 1" >>confdefs.h
24149 ac_fn_c_check_func "$LINENO" "acl_set_file" "ac_cv_func_acl_set_file"
24150 if test "x$ac_cv_func_acl_set_file" = xyes
24151 then :
24152 printf "%s\n" "#define HAVE_ACL_SET_FILE 1" >>confdefs.h
24155 ac_fn_c_check_func "$LINENO" "acl_set_fd" "ac_cv_func_acl_set_fd"
24156 if test "x$ac_cv_func_acl_set_fd" = xyes
24157 then :
24158 printf "%s\n" "#define HAVE_ACL_SET_FD 1" >>confdefs.h
24161 ac_fn_c_check_func "$LINENO" "acl_free" "ac_cv_func_acl_free"
24162 if test "x$ac_cv_func_acl_free" = xyes
24163 then :
24164 printf "%s\n" "#define HAVE_ACL_FREE 1" >>confdefs.h
24167 ac_fn_c_check_func "$LINENO" "acl_from_mode" "ac_cv_func_acl_from_mode"
24168 if test "x$ac_cv_func_acl_from_mode" = xyes
24169 then :
24170 printf "%s\n" "#define HAVE_ACL_FROM_MODE 1" >>confdefs.h
24173 ac_fn_c_check_func "$LINENO" "acl_from_text" "ac_cv_func_acl_from_text"
24174 if test "x$ac_cv_func_acl_from_text" = xyes
24175 then :
24176 printf "%s\n" "#define HAVE_ACL_FROM_TEXT 1" >>confdefs.h
24179 ac_fn_c_check_func "$LINENO" "acl_delete_def_file" "ac_cv_func_acl_delete_def_file"
24180 if test "x$ac_cv_func_acl_delete_def_file" = xyes
24181 then :
24182 printf "%s\n" "#define HAVE_ACL_DELETE_DEF_FILE 1" >>confdefs.h
24185 ac_fn_c_check_func "$LINENO" "acl_extended_file" "ac_cv_func_acl_extended_file"
24186 if test "x$ac_cv_func_acl_extended_file" = xyes
24187 then :
24188 printf "%s\n" "#define HAVE_ACL_EXTENDED_FILE 1" >>confdefs.h
24191 ac_fn_c_check_func "$LINENO" "acl_delete_fd_np" "ac_cv_func_acl_delete_fd_np"
24192 if test "x$ac_cv_func_acl_delete_fd_np" = xyes
24193 then :
24194 printf "%s\n" "#define HAVE_ACL_DELETE_FD_NP 1" >>confdefs.h
24197 ac_fn_c_check_func "$LINENO" "acl_delete_file_np" "ac_cv_func_acl_delete_file_np"
24198 if test "x$ac_cv_func_acl_delete_file_np" = xyes
24199 then :
24200 printf "%s\n" "#define HAVE_ACL_DELETE_FILE_NP 1" >>confdefs.h
24203 ac_fn_c_check_func "$LINENO" "acl_copy_ext_native" "ac_cv_func_acl_copy_ext_native"
24204 if test "x$ac_cv_func_acl_copy_ext_native" = xyes
24205 then :
24206 printf "%s\n" "#define HAVE_ACL_COPY_EXT_NATIVE 1" >>confdefs.h
24209 ac_fn_c_check_func "$LINENO" "acl_create_entry_np" "ac_cv_func_acl_create_entry_np"
24210 if test "x$ac_cv_func_acl_create_entry_np" = xyes
24211 then :
24212 printf "%s\n" "#define HAVE_ACL_CREATE_ENTRY_NP 1" >>confdefs.h
24215 ac_fn_c_check_func "$LINENO" "acl_to_short_text" "ac_cv_func_acl_to_short_text"
24216 if test "x$ac_cv_func_acl_to_short_text" = xyes
24217 then :
24218 printf "%s\n" "#define HAVE_ACL_TO_SHORT_TEXT 1" >>confdefs.h
24221 ac_fn_c_check_func "$LINENO" "acl_free_text" "ac_cv_func_acl_free_text"
24222 if test "x$ac_cv_func_acl_free_text" = xyes
24223 then :
24224 printf "%s\n" "#define HAVE_ACL_FREE_TEXT 1" >>confdefs.h
24228 # If the acl_get_file bug is detected, don't enable the ACL support.
24230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
24231 printf %s "checking for working acl_get_file... " >&6; }
24232 if test ${gl_cv_func_working_acl_get_file+y}
24233 then :
24234 printf %s "(cached) " >&6
24235 else case e in #(
24236 e) gl_cv_func_working_acl_get_file=no
24237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24238 /* end confdefs.h. */
24239 #include <sys/types.h>
24240 #include <sys/acl.h>
24241 #include <errno.h>
24244 main (void)
24246 acl_t acl = acl_get_file (".", ACL_TYPE_ACCESS);
24247 return acl ? acl_free (acl) != 0 : errno == ENOENT;
24250 return 0;
24252 _ACEOF
24253 if ac_fn_c_try_link "$LINENO"
24254 then :
24255 if test $cross_compiling = yes; then
24256 gl_cv_func_working_acl_get_file="guessing yes"
24257 elif ./conftest$ac_exeext; then
24258 gl_cv_func_working_acl_get_file=yes
24261 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24262 conftest$ac_exeext conftest.$ac_ext ;;
24263 esac
24265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
24266 printf "%s\n" "$gl_cv_func_working_acl_get_file" >&6; }
24267 if test "$gl_cv_func_working_acl_get_file" != no
24268 then :
24269 use_acl=1
24272 if test $use_acl = 1; then
24273 ac_fn_c_check_header_compile "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
24274 if test "x$ac_cv_header_acl_libacl_h" = xyes
24275 then :
24276 printf "%s\n" "#define HAVE_ACL_LIBACL_H 1" >>confdefs.h
24289 for ac_func in acl_entries
24290 do :
24291 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
24292 if test "x$ac_cv_func_acl_entries" = xyes
24293 then :
24294 printf "%s\n" "#define HAVE_ACL_ENTRIES 1" >>confdefs.h
24296 else case e in #(
24298 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
24300 esac
24303 done
24305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
24306 printf %s "checking for ACL_FIRST_ENTRY... " >&6; }
24307 if test ${gl_cv_acl_ACL_FIRST_ENTRY+y}
24308 then :
24309 printf %s "(cached) " >&6
24310 else case e in #(
24311 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24312 /* end confdefs.h. */
24313 #include <sys/types.h>
24314 #include <sys/acl.h>
24315 int type = ACL_FIRST_ENTRY;
24317 main (void)
24321 return 0;
24323 _ACEOF
24324 if ac_fn_c_try_compile "$LINENO"
24325 then :
24326 gl_cv_acl_ACL_FIRST_ENTRY=yes
24327 else case e in #(
24328 e) gl_cv_acl_ACL_FIRST_ENTRY=no ;;
24329 esac
24331 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24332 esac
24334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
24335 printf "%s\n" "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
24336 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
24338 printf "%s\n" "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
24341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
24342 printf %s "checking for ACL_TYPE_EXTENDED... " >&6; }
24343 if test ${gl_cv_acl_ACL_TYPE_EXTENDED+y}
24344 then :
24345 printf %s "(cached) " >&6
24346 else case e in #(
24347 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24348 /* end confdefs.h. */
24349 #include <sys/types.h>
24350 #include <sys/acl.h>
24351 int type = ACL_TYPE_EXTENDED;
24353 main (void)
24357 return 0;
24359 _ACEOF
24360 if ac_fn_c_try_compile "$LINENO"
24361 then :
24362 gl_cv_acl_ACL_TYPE_EXTENDED=yes
24363 else case e in #(
24364 e) gl_cv_acl_ACL_TYPE_EXTENDED=no ;;
24365 esac
24367 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24368 esac
24370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
24371 printf "%s\n" "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
24372 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
24374 printf "%s\n" "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
24377 else
24378 LIB_ACL=
24385 if test $use_acl = 0; then
24386 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
24387 if test "x$ac_cv_func_facl" = xyes
24388 then :
24389 printf "%s\n" "#define HAVE_FACL 1" >>confdefs.h
24393 if test $ac_cv_func_facl = yes; then
24394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
24395 printf %s "checking for library containing acl_trivial... " >&6; }
24396 if test ${ac_cv_search_acl_trivial+y}
24397 then :
24398 printf %s "(cached) " >&6
24399 else case e in #(
24400 e) ac_func_search_save_LIBS=$LIBS
24401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24402 /* end confdefs.h. */
24404 /* Override any GCC internal prototype to avoid an error.
24405 Use char because int might match the return type of a GCC
24406 builtin and then its argument prototype would still apply.
24407 The 'extern "C"' is for builds by C++ compilers;
24408 although this is not generally supported in C code, supporting it here
24409 has little cost and some practical benefit (sr 110532). */
24410 #ifdef __cplusplus
24411 extern "C"
24412 #endif
24413 char acl_trivial (void);
24415 main (void)
24417 return acl_trivial ();
24419 return 0;
24421 _ACEOF
24422 for ac_lib in '' sec
24424 if test -z "$ac_lib"; then
24425 ac_res="none required"
24426 else
24427 ac_res=-l$ac_lib
24428 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24430 if ac_fn_c_try_link "$LINENO"
24431 then :
24432 ac_cv_search_acl_trivial=$ac_res
24434 rm -f core conftest.err conftest.$ac_objext conftest.beam \
24435 conftest$ac_exeext
24436 if test ${ac_cv_search_acl_trivial+y}
24437 then :
24438 break
24440 done
24441 if test ${ac_cv_search_acl_trivial+y}
24442 then :
24444 else case e in #(
24445 e) ac_cv_search_acl_trivial=no ;;
24446 esac
24448 rm conftest.$ac_ext
24449 LIBS=$ac_func_search_save_LIBS ;;
24450 esac
24452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
24453 printf "%s\n" "$ac_cv_search_acl_trivial" >&6; }
24454 ac_res=$ac_cv_search_acl_trivial
24455 if test "$ac_res" != no
24456 then :
24457 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24458 if test "$ac_cv_search_acl_trivial" != "none required"; then
24459 LIB_ACL=$ac_cv_search_acl_trivial
24464 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
24465 if test "x$ac_cv_func_acl_trivial" = xyes
24466 then :
24467 printf "%s\n" "#define HAVE_ACL_TRIVIAL 1" >>confdefs.h
24471 use_acl=1
24475 if test $use_acl = 0; then
24476 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
24477 if test "x$ac_cv_func_getacl" = xyes
24478 then :
24479 printf "%s\n" "#define HAVE_GETACL 1" >>confdefs.h
24483 if test $ac_cv_func_getacl = yes; then
24484 use_acl=1
24486 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
24488 if test "x$ac_cv_header_aclv_h" = xyes
24489 then :
24490 printf "%s\n" "#define HAVE_ACLV_H 1" >>confdefs.h
24496 if test $use_acl = 0; then
24497 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
24498 if test "x$ac_cv_func_aclx_get" = xyes
24499 then :
24500 printf "%s\n" "#define HAVE_ACLX_GET 1" >>confdefs.h
24504 if test $ac_cv_func_aclx_get = yes; then
24505 use_acl=1
24509 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
24510 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
24511 if test "x$ac_cv_func_statacl" = xyes
24512 then :
24513 printf "%s\n" "#define HAVE_STATACL 1" >>confdefs.h
24517 if test $ac_cv_func_statacl = yes; then
24518 use_acl=1
24522 if test $use_acl = 0; then
24523 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
24524 if test "x$ac_cv_func_aclsort" = xyes
24525 then :
24526 printf "%s\n" "#define HAVE_ACLSORT 1" >>confdefs.h
24530 if test $ac_cv_func_aclsort = yes; then
24531 use_acl=1
24535 LIBS=$ac_save_LIBS
24538 if test "$enable_acl$use_acl" = yes0; then
24539 as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5
24540 elif test "$enable_acl$use_acl" = auto0; then
24541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
24542 printf "%s\n" "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
24543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: GNU sed will be built without ACL support." >&5
24544 printf "%s\n" "$as_me: WARNING: GNU sed will be built without ACL support." >&2;}
24547 test -n "$gl_need_lib_has_acl" && LIB_HAS_ACL=$LIB_ACL
24550 printf "%s\n" "#define USE_ACL $use_acl" >>confdefs.h
24552 USE_ACL=$use_acl
24557 if test $ac_cv_func_alloca_works = no; then
24561 # Define an additional variable used in the Makefile substitution.
24562 if test $ac_cv_working_alloca_h = yes; then
24563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
24564 printf %s "checking for alloca as a compiler built-in... " >&6; }
24565 if test ${gl_cv_rpl_alloca+y}
24566 then :
24567 printf %s "(cached) " >&6
24568 else case e in #(
24570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24571 /* end confdefs.h. */
24573 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
24574 Need own alloca
24575 #endif
24577 _ACEOF
24578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24579 $EGREP_TRADITIONAL "Need own alloca" >/dev/null 2>&1
24580 then :
24581 gl_cv_rpl_alloca=yes
24582 else case e in #(
24583 e) gl_cv_rpl_alloca=no ;;
24584 esac
24586 rm -rf conftest*
24589 esac
24591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
24592 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
24593 if test $gl_cv_rpl_alloca = yes; then
24595 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
24597 GL_GENERATE_ALLOCA_H=true
24598 else
24599 GL_GENERATE_ALLOCA_H=false
24601 else
24602 GL_GENERATE_ALLOCA_H=true
24605 if test $ac_cv_working_alloca_h = yes; then
24606 HAVE_ALLOCA_H=1
24607 else
24608 HAVE_ALLOCA_H=0
24616 case "$GL_GENERATE_ALLOCA_H" in
24617 false) ALLOCA_H='' ;;
24618 true)
24619 if test -z "$ALLOCA_H"; then
24620 ALLOCA_H="${gl_source_base_prefix}alloca.h"
24623 *) echo "*** GL_GENERATE_ALLOCA_H is not set correctly" 1>&2; exit 1 ;;
24624 esac
24627 if $GL_GENERATE_ALLOCA_H; then
24628 GL_GENERATE_ALLOCA_H_TRUE=
24629 GL_GENERATE_ALLOCA_H_FALSE='#'
24630 else
24631 GL_GENERATE_ALLOCA_H_TRUE='#'
24632 GL_GENERATE_ALLOCA_H_FALSE=
24635 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
24636 GL_GENERATE_ALLOCA_H_TRUE='#'
24637 GL_GENERATE_ALLOCA_H_FALSE='#'
24646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
24647 printf %s "checking whether to enable assertions... " >&6; }
24648 # Check whether --enable-assert was given.
24649 if test ${enable_assert+y}
24650 then :
24651 enableval=$enable_assert; if test "x$enableval" = xno
24652 then :
24654 printf "%s\n" "#define NDEBUG 1" >>confdefs.h
24656 elif test "x$enableval" != xyes
24657 then :
24658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
24659 printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
24660 enable_assert=yes
24662 else case e in #(
24663 e) enable_assert=yes ;;
24664 esac
24667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
24668 printf "%s\n" "$enable_assert" >&6; }
24671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for static_assert" >&5
24672 printf %s "checking for static_assert... " >&6; }
24673 if test ${gl_cv_static_assert+y}
24674 then :
24675 printf %s "(cached) " >&6
24676 else case e in #(
24677 e) gl_save_CFLAGS=$CFLAGS
24678 for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do
24679 case $gl_working in #(
24680 *assert.h*) :
24681 CFLAGS="$gl_save_CFLAGS -DINCLUDE_ASSERT_H" ;; #(
24682 *) :
24684 esac
24686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24687 /* end confdefs.h. */
24688 #if defined __clang__ && __STDC_VERSION__ < 202311
24689 #pragma clang diagnostic error "-Wc2x-extensions"
24690 #pragma clang diagnostic error "-Wc++17-extensions"
24691 #endif
24692 #ifdef INCLUDE_ASSERT_H
24693 #include <assert.h>
24694 #endif
24695 static_assert (2 + 2 == 4, "arithmetic does not work");
24696 static_assert (2 + 2 == 4);
24699 main (void)
24702 static_assert (sizeof (char) == 1, "sizeof does not work");
24703 static_assert (sizeof (char) == 1);
24706 return 0;
24708 _ACEOF
24709 if ac_fn_c_try_compile "$LINENO"
24710 then :
24711 gl_cv_static_assert=$gl_working
24712 else case e in #(
24713 e) gl_cv_static_assert=no ;;
24714 esac
24716 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24717 CFLAGS=$gl_save_CFLAGS
24718 test "$gl_cv_static_assert" != no && break
24719 done ;;
24720 esac
24722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_static_assert" >&5
24723 printf "%s\n" "$gl_cv_static_assert" >&6; }
24725 GL_GENERATE_ASSERT_H=false
24726 case $gl_cv_static_assert in #(
24727 yes*keyword*) :
24729 printf "%s\n" "#define HAVE_C_STATIC_ASSERT 1" >>confdefs.h
24730 ;; #(
24731 no) :
24732 GL_GENERATE_ASSERT_H=true
24741 if test $gl_cv_have_include_next = yes; then
24742 gl_cv_next_assert_h='<'assert.h'>'
24743 else
24744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <assert.h>" >&5
24745 printf %s "checking absolute name of <assert.h>... " >&6; }
24746 if test ${gl_cv_next_assert_h+y}
24747 then :
24748 printf %s "(cached) " >&6
24749 else case e in #(
24753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24754 /* end confdefs.h. */
24755 #include <assert.h>
24756 _ACEOF
24757 case "$host_os" in
24758 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24759 *) gl_absname_cpp="$ac_cpp" ;;
24760 esac
24762 case "$host_os" in
24763 mingw*)
24764 gl_dirsep_regex='[/\\]'
24767 gl_dirsep_regex='\/'
24769 esac
24770 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24771 gl_header_literal_regex=`echo 'assert.h' \
24772 | sed -e "$gl_make_literal_regex_sed"`
24773 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24774 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24775 s|^/[^/]|//&|
24780 gl_cv_absolute_assert_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24781 sed -n "$gl_absolute_header_sed"`
24783 gl_header=$gl_cv_absolute_assert_h
24784 gl_cv_next_assert_h='"'$gl_header'"'
24787 esac
24789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_assert_h" >&5
24790 printf "%s\n" "$gl_cv_next_assert_h" >&6; }
24792 NEXT_ASSERT_H=$gl_cv_next_assert_h
24794 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24795 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24796 gl_next_as_first_directive='<'assert.h'>'
24797 else
24798 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24799 gl_next_as_first_directive=$gl_cv_next_assert_h
24801 NEXT_AS_FIRST_DIRECTIVE_ASSERT_H=$gl_next_as_first_directive
24805 ;; #(
24806 *) :
24808 esac
24816 case "$GL_GENERATE_ASSERT_H" in
24817 false) ASSERT_H='' ;;
24818 true)
24819 if test -z "$ASSERT_H"; then
24820 ASSERT_H="${gl_source_base_prefix}assert.h"
24823 *) echo "*** GL_GENERATE_ASSERT_H is not set correctly" 1>&2; exit 1 ;;
24824 esac
24827 if $GL_GENERATE_ASSERT_H; then
24828 GL_GENERATE_ASSERT_H_TRUE=
24829 GL_GENERATE_ASSERT_H_FALSE='#'
24830 else
24831 GL_GENERATE_ASSERT_H_TRUE='#'
24832 GL_GENERATE_ASSERT_H_FALSE=
24835 if test -z "${GL_GENERATE_ASSERT_H_TRUE}" && test -z "${GL_GENERATE_ASSERT_H_FALSE}"; then
24836 GL_GENERATE_ASSERT_H_TRUE='#'
24837 GL_GENERATE_ASSERT_H_FALSE='#'
24851 if test $ac_cv_func_btowc = no; then
24852 HAVE_BTOWC=0
24853 else
24858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
24859 printf %s "checking whether btowc(0) is correct... " >&6; }
24860 if test ${gl_cv_func_btowc_nul+y}
24861 then :
24862 printf %s "(cached) " >&6
24863 else case e in #(
24865 if test "$cross_compiling" = yes
24866 then :
24868 case "$host_os" in
24869 # Guess no on Cygwin.
24870 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
24871 # Guess yes on native Windows.
24872 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
24873 # Guess yes otherwise.
24874 *) gl_cv_func_btowc_nul="guessing yes" ;;
24875 esac
24877 else case e in #(
24878 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24879 /* end confdefs.h. */
24881 #include <wchar.h>
24882 int main ()
24884 if (btowc ('\0') != 0)
24885 return 1;
24886 return 0;
24888 _ACEOF
24889 if ac_fn_c_try_run "$LINENO"
24890 then :
24891 gl_cv_func_btowc_nul=yes
24892 else case e in #(
24893 e) gl_cv_func_btowc_nul=no ;;
24894 esac
24896 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24897 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24898 esac
24902 esac
24904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
24905 printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
24907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
24908 printf %s "checking whether btowc(EOF) is correct... " >&6; }
24909 if test ${gl_cv_func_btowc_eof+y}
24910 then :
24911 printf %s "(cached) " >&6
24912 else case e in #(
24914 case "$host_os" in
24915 # Guess no on IRIX.
24916 irix*) gl_cv_func_btowc_eof="guessing no" ;;
24917 # Guess yes on native Windows.
24918 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
24919 # Guess yes otherwise.
24920 *) gl_cv_func_btowc_eof="guessing yes" ;;
24921 esac
24922 if test $LOCALE_FR != none; then
24923 if test "$cross_compiling" = yes
24924 then :
24926 else case e in #(
24927 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24928 /* end confdefs.h. */
24930 #include <locale.h>
24931 #include <stdio.h>
24932 #include <wchar.h>
24933 int main ()
24935 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
24937 if (btowc (EOF) != WEOF)
24938 return 1;
24940 return 0;
24942 _ACEOF
24943 if ac_fn_c_try_run "$LINENO"
24944 then :
24945 gl_cv_func_btowc_eof=yes
24946 else case e in #(
24947 e) gl_cv_func_btowc_eof=no ;;
24948 esac
24950 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24951 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
24952 esac
24957 esac
24959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
24960 printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
24962 case "$gl_cv_func_btowc_nul" in
24963 *yes) ;;
24964 *) REPLACE_BTOWC=1 ;;
24965 esac
24966 case "$gl_cv_func_btowc_eof" in
24967 *yes) ;;
24968 *) REPLACE_BTOWC=1 ;;
24969 esac
24973 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
24974 GL_COND_OBJ_BTOWC_TRUE=
24975 GL_COND_OBJ_BTOWC_FALSE='#'
24976 else
24977 GL_COND_OBJ_BTOWC_TRUE='#'
24978 GL_COND_OBJ_BTOWC_FALSE=
24981 if test -z "${GL_COND_OBJ_BTOWC_TRUE}" && test -z "${GL_COND_OBJ_BTOWC_FALSE}"; then
24982 GL_COND_OBJ_BTOWC_TRUE='#'
24983 GL_COND_OBJ_BTOWC_FALSE='#'
24986 if test -z "$GL_COND_OBJ_BTOWC_TRUE"; then :
25007 GL_GNULIB_BTOWC=1
25013 printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
25018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
25019 printf %s "checking for __builtin_expect... " >&6; }
25020 if test ${gl_cv___builtin_expect+y}
25021 then :
25022 printf %s "(cached) " >&6
25023 else case e in #(
25024 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25025 /* end confdefs.h. */
25028 main (int argc, char **argv)
25030 argc = __builtin_expect (argc, 100);
25031 return argv[argc != 100][0];
25033 _ACEOF
25034 if ac_fn_c_try_link "$LINENO"
25035 then :
25036 gl_cv___builtin_expect=yes
25037 else case e in #(
25038 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25039 /* end confdefs.h. */
25041 #include <builtins.h>
25043 main (int argc, char **argv)
25045 argc = __builtin_expect (argc, 100);
25046 return argv[argc != 100][0];
25048 _ACEOF
25049 if ac_fn_c_try_link "$LINENO"
25050 then :
25051 gl_cv___builtin_expect="in <builtins.h>"
25052 else case e in #(
25053 e) gl_cv___builtin_expect=no ;;
25054 esac
25056 rm -f core conftest.err conftest.$ac_objext conftest.beam \
25057 conftest$ac_exeext conftest.$ac_ext ;;
25058 esac
25060 rm -f core conftest.err conftest.$ac_objext conftest.beam \
25061 conftest$ac_exeext conftest.$ac_ext ;;
25062 esac
25064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
25065 printf "%s\n" "$gl_cv___builtin_expect" >&6; }
25066 if test "$gl_cv___builtin_expect" = yes; then
25067 printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
25069 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
25070 printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
25078 REPLACE_CALLOC_FOR_CALLOC_GNU="$REPLACE_CALLOC_FOR_CALLOC_POSIX"
25079 if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 0; then
25081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether calloc (0, n) and calloc (n, 0) return nonnull" >&5
25082 printf %s "checking whether calloc (0, n) and calloc (n, 0) return nonnull... " >&6; }
25083 if test ${ac_cv_func_calloc_0_nonnull+y}
25084 then :
25085 printf %s "(cached) " >&6
25086 else case e in #(
25087 e) if test $cross_compiling != yes; then
25088 ac_cv_func_calloc_0_nonnull=yes
25089 if test "$cross_compiling" = yes
25090 then :
25091 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
25092 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
25093 as_fn_error $? "cannot run test program while cross compiling
25094 See 'config.log' for more details" "$LINENO" 5; }
25095 else case e in #(
25096 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25097 /* end confdefs.h. */
25098 $ac_includes_default
25100 main (void)
25102 int result = 0;
25103 char * volatile p = calloc (0, 0);
25104 if (!p)
25105 result |= 1;
25106 free (p);
25107 return result;
25110 return 0;
25112 _ACEOF
25113 if ac_fn_c_try_run "$LINENO"
25114 then :
25116 else case e in #(
25117 e) ac_cv_func_calloc_0_nonnull=no ;;
25118 esac
25120 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25121 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
25122 esac
25125 else
25126 case "$host_os" in
25127 # Guess yes on glibc systems.
25128 *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
25129 # Guess yes on musl systems.
25130 *-musl*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
25131 # Guess yes on native Windows.
25132 mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
25133 # If we don't know, obey --enable-cross-guesses.
25134 *) ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
25135 esac
25138 esac
25140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
25141 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
25142 case $ac_cv_func_calloc_0_nonnull in #(
25143 *yes) :
25144 ;; #(
25145 *) :
25146 REPLACE_CALLOC_FOR_CALLOC_GNU=1 ;;
25147 esac
25151 if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 1; then
25160 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
25172 GL_GNULIB_CALLOC_GNU=1
25178 printf "%s\n" "#define GNULIB_TEST_CALLOC_GNU 1" >>confdefs.h
25185 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
25186 REPLACE_CALLOC_FOR_CALLOC_POSIX=1
25189 if test $REPLACE_CALLOC_FOR_CALLOC_POSIX = 1; then
25198 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
25210 GL_GNULIB_CALLOC_POSIX=1
25216 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
25223 if test $ac_cv_func_canonicalize_file_name = no; then
25224 HAVE_CANONICALIZE_FILE_NAME=0
25225 if test $ac_cv_func_realpath = no; then
25226 HAVE_REALPATH=0
25227 else
25228 case "$gl_cv_func_realpath_works" in
25229 *yes) ;;
25230 *) REPLACE_REALPATH=1 ;;
25231 esac
25233 else
25234 case "$gl_cv_func_realpath_works" in
25235 *yes)
25238 REPLACE_CANONICALIZE_FILE_NAME=1
25239 REPLACE_REALPATH=1
25241 esac
25245 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
25246 GL_COND_OBJ_CANONICALIZE_LGPL_TRUE=
25247 GL_COND_OBJ_CANONICALIZE_LGPL_FALSE='#'
25248 else
25249 GL_COND_OBJ_CANONICALIZE_LGPL_TRUE='#'
25250 GL_COND_OBJ_CANONICALIZE_LGPL_FALSE=
25253 if test -z "${GL_COND_OBJ_CANONICALIZE_LGPL_TRUE}" && test -z "${GL_COND_OBJ_CANONICALIZE_LGPL_FALSE}"; then
25254 GL_COND_OBJ_CANONICALIZE_LGPL_TRUE='#'
25255 GL_COND_OBJ_CANONICALIZE_LGPL_FALSE='#'
25260 printf "%s\n" "#define GNULIB_CANONICALIZE_LGPL 1" >>confdefs.h
25272 GL_GNULIB_CANONICALIZE_FILE_NAME=1
25278 printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
25291 GL_GNULIB_REALPATH=1
25297 printf "%s\n" "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
25310 GL_GNULIB_CHDIR=1
25316 printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
25323 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
25324 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
25326 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
25327 # programs in the package would end up linked with that potentially-shared
25328 # library, inducing unnecessary run-time overhead.
25329 LIB_CLOCK_GETTIME=
25331 gl_saved_libs=$LIBS
25332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
25333 printf %s "checking for library containing clock_gettime... " >&6; }
25334 if test ${ac_cv_search_clock_gettime+y}
25335 then :
25336 printf %s "(cached) " >&6
25337 else case e in #(
25338 e) ac_func_search_save_LIBS=$LIBS
25339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25340 /* end confdefs.h. */
25342 /* Override any GCC internal prototype to avoid an error.
25343 Use char because int might match the return type of a GCC
25344 builtin and then its argument prototype would still apply.
25345 The 'extern "C"' is for builds by C++ compilers;
25346 although this is not generally supported in C code, supporting it here
25347 has little cost and some practical benefit (sr 110532). */
25348 #ifdef __cplusplus
25349 extern "C"
25350 #endif
25351 char clock_gettime (void);
25353 main (void)
25355 return clock_gettime ();
25357 return 0;
25359 _ACEOF
25360 for ac_lib in '' rt posix4
25362 if test -z "$ac_lib"; then
25363 ac_res="none required"
25364 else
25365 ac_res=-l$ac_lib
25366 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25368 if ac_fn_c_try_link "$LINENO"
25369 then :
25370 ac_cv_search_clock_gettime=$ac_res
25372 rm -f core conftest.err conftest.$ac_objext conftest.beam \
25373 conftest$ac_exeext
25374 if test ${ac_cv_search_clock_gettime+y}
25375 then :
25376 break
25378 done
25379 if test ${ac_cv_search_clock_gettime+y}
25380 then :
25382 else case e in #(
25383 e) ac_cv_search_clock_gettime=no ;;
25384 esac
25386 rm conftest.$ac_ext
25387 LIBS=$ac_func_search_save_LIBS ;;
25388 esac
25390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
25391 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
25392 ac_res=$ac_cv_search_clock_gettime
25393 if test "$ac_res" != no
25394 then :
25395 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25396 test "$ac_cv_search_clock_gettime" = "none required" ||
25397 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
25400 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
25401 if test "x$ac_cv_func_clock_getres" = xyes
25402 then :
25403 printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
25406 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
25407 if test "x$ac_cv_func_clock_gettime" = xyes
25408 then :
25409 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
25412 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
25413 if test "x$ac_cv_func_clock_settime" = xyes
25414 then :
25415 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
25419 LIBS=$gl_saved_libs
25423 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
25430 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25431 REPLACE_CLOSE=1
25439 if test $ac_cv_header_sys_socket_h != yes; then
25440 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
25441 if test "x$ac_cv_header_winsock2_h" = xyes
25442 then :
25443 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
25448 if test "$ac_cv_header_winsock2_h" = yes; then
25449 HAVE_WINSOCK2_H=1
25450 UNISTD_H_HAVE_WINSOCK2_H=1
25451 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
25452 else
25453 HAVE_WINSOCK2_H=0
25457 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
25458 REPLACE_CLOSE=1
25464 if test $REPLACE_CLOSE = 1; then
25465 GL_COND_OBJ_CLOSE_TRUE=
25466 GL_COND_OBJ_CLOSE_FALSE='#'
25467 else
25468 GL_COND_OBJ_CLOSE_TRUE='#'
25469 GL_COND_OBJ_CLOSE_FALSE=
25472 if test -z "${GL_COND_OBJ_CLOSE_TRUE}" && test -z "${GL_COND_OBJ_CLOSE_FALSE}"; then
25473 GL_COND_OBJ_CLOSE_TRUE='#'
25474 GL_COND_OBJ_CLOSE_FALSE='#'
25486 GL_GNULIB_CLOSE=1
25492 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
25498 printf "%s\n" "#define GNULIB_CLOSE_STREAM 1" >>confdefs.h
25511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
25512 printf %s "checking whether // is distinct from /... " >&6; }
25513 if test ${gl_cv_double_slash_root+y}
25514 then :
25515 printf %s "(cached) " >&6
25516 else case e in #(
25517 e) if test x"$cross_compiling" = xyes ; then
25518 # When cross-compiling, there is no way to tell whether // is special
25519 # short of a list of hosts. However, the only known hosts to date
25520 # that have a distinct // are Apollo DomainOS (too old to port to),
25521 # Cygwin, and z/OS. If anyone knows of another system for which // has
25522 # special semantics and is distinct from /, please report it to
25523 # <bug-gnulib@gnu.org>.
25524 case $host in
25525 *-cygwin | i370-ibm-openedition)
25526 gl_cv_double_slash_root=yes ;;
25528 # Be optimistic and assume that / and // are the same when we
25529 # don't know.
25530 gl_cv_double_slash_root='unknown, assuming no' ;;
25531 esac
25532 else
25533 set x `ls -di / // 2>/dev/null`
25534 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
25535 gl_cv_double_slash_root=no
25536 else
25537 gl_cv_double_slash_root=yes
25539 fi ;;
25540 esac
25542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
25543 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
25544 if test "$gl_cv_double_slash_root" = yes; then
25546 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
25553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
25554 printf %s "checking whether dup2 works... " >&6; }
25555 if test ${gl_cv_func_dup2_works+y}
25556 then :
25557 printf %s "(cached) " >&6
25558 else case e in #(
25559 e) if test "$cross_compiling" = yes
25560 then :
25561 case "$host_os" in
25562 mingw*) # on this platform, dup2 always returns 0 for success
25563 gl_cv_func_dup2_works="guessing no" ;;
25564 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
25565 gl_cv_func_dup2_works="guessing no" ;;
25566 aix* | freebsd*)
25567 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
25568 # not EBADF.
25569 gl_cv_func_dup2_works="guessing no" ;;
25570 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
25571 gl_cv_func_dup2_works="guessing no" ;;
25572 *-android*) # implemented using dup3(), which fails if oldfd == newfd
25573 gl_cv_func_dup2_works="guessing no" ;;
25574 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
25575 gl_cv_func_dup2_works="guessing no" ;;
25576 *) gl_cv_func_dup2_works="guessing yes" ;;
25577 esac
25578 else case e in #(
25579 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25580 /* end confdefs.h. */
25582 #include <errno.h>
25583 #include <fcntl.h>
25584 #include <limits.h>
25585 #include <sys/resource.h>
25586 #include <unistd.h>
25589 $gl_mda_defines
25591 #ifndef RLIM_SAVED_CUR
25592 # define RLIM_SAVED_CUR RLIM_INFINITY
25593 #endif
25594 #ifndef RLIM_SAVED_MAX
25595 # define RLIM_SAVED_MAX RLIM_INFINITY
25596 #endif
25599 main (void)
25601 int result = 0;
25602 int bad_fd = INT_MAX;
25603 struct rlimit rlim;
25604 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
25605 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
25606 && rlim.rlim_cur != RLIM_INFINITY
25607 && rlim.rlim_cur != RLIM_SAVED_MAX
25608 && rlim.rlim_cur != RLIM_SAVED_CUR)
25609 bad_fd = rlim.rlim_cur;
25610 #ifdef FD_CLOEXEC
25611 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
25612 result |= 1;
25613 #endif
25614 if (dup2 (1, 1) != 1)
25615 result |= 2;
25616 #ifdef FD_CLOEXEC
25617 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
25618 result |= 4;
25619 #endif
25620 close (0);
25621 if (dup2 (0, 0) != -1)
25622 result |= 8;
25623 /* Many gnulib modules require POSIX conformance of EBADF. */
25624 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
25625 result |= 16;
25626 /* Flush out some cygwin core dumps. */
25627 if (dup2 (2, -1) != -1 || errno != EBADF)
25628 result |= 32;
25629 dup2 (2, 255);
25630 dup2 (2, 256);
25631 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
25633 int fd = open (".", O_RDONLY);
25634 if (fd == -1)
25635 result |= 64;
25636 else if (dup2 (fd, fd + 1) == -1)
25637 result |= 128;
25638 close (fd);
25640 return result;
25642 return 0;
25645 _ACEOF
25646 if ac_fn_c_try_run "$LINENO"
25647 then :
25648 gl_cv_func_dup2_works=yes
25649 else case e in #(
25650 e) gl_cv_func_dup2_works=no ;;
25651 esac
25653 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25654 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
25655 esac
25659 esac
25661 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
25662 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
25663 case "$gl_cv_func_dup2_works" in
25664 *yes) ;;
25666 REPLACE_DUP2=1
25667 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
25668 if test "x$ac_cv_func_setdtablesize" = xyes
25669 then :
25670 printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
25675 esac
25679 if test $REPLACE_DUP2 = 1; then
25680 GL_COND_OBJ_DUP2_TRUE=
25681 GL_COND_OBJ_DUP2_FALSE='#'
25682 else
25683 GL_COND_OBJ_DUP2_TRUE='#'
25684 GL_COND_OBJ_DUP2_FALSE=
25687 if test -z "${GL_COND_OBJ_DUP2_TRUE}" && test -z "${GL_COND_OBJ_DUP2_FALSE}"; then
25688 GL_COND_OBJ_DUP2_TRUE='#'
25689 GL_COND_OBJ_DUP2_FALSE='#'
25692 if test -z "$GL_COND_OBJ_DUP2_TRUE"; then :
25706 GL_GNULIB_DUP2=1
25712 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
25721 case "$GL_GENERATE_ERRNO_H" in
25722 false) ERRNO_H='' ;;
25723 true)
25724 if test -z "$ERRNO_H"; then
25725 ERRNO_H="${gl_source_base_prefix}errno.h"
25728 *) echo "*** GL_GENERATE_ERRNO_H is not set correctly" 1>&2; exit 1 ;;
25729 esac
25732 if $GL_GENERATE_ERRNO_H; then
25733 GL_GENERATE_ERRNO_H_TRUE=
25734 GL_GENERATE_ERRNO_H_FALSE='#'
25735 else
25736 GL_GENERATE_ERRNO_H_TRUE='#'
25737 GL_GENERATE_ERRNO_H_FALSE=
25740 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
25741 GL_GENERATE_ERRNO_H_TRUE='#'
25742 GL_GENERATE_ERRNO_H_FALSE='#'
25751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
25752 printf %s "checking for error_at_line... " >&6; }
25753 if test ${ac_cv_lib_error_at_line+y}
25754 then :
25755 printf %s "(cached) " >&6
25756 else case e in #(
25757 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25758 /* end confdefs.h. */
25759 #include <error.h>
25761 main (void)
25763 error_at_line (0, 0, "", 0, "an error occurred");
25765 return 0;
25767 _ACEOF
25768 if ac_fn_c_try_link "$LINENO"
25769 then :
25770 ac_cv_lib_error_at_line=yes
25771 else case e in #(
25772 e) ac_cv_lib_error_at_line=no ;;
25773 esac
25775 rm -f core conftest.err conftest.$ac_objext conftest.beam \
25776 conftest$ac_exeext conftest.$ac_ext ;;
25777 esac
25779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
25780 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
25783 if test "$ac_cv_lib_error_at_line" = no; then
25784 GL_COND_OBJ_ERROR_TRUE=
25785 GL_COND_OBJ_ERROR_FALSE='#'
25786 else
25787 GL_COND_OBJ_ERROR_TRUE='#'
25788 GL_COND_OBJ_ERROR_FALSE=
25791 if test -z "${GL_COND_OBJ_ERROR_TRUE}" && test -z "${GL_COND_OBJ_ERROR_FALSE}"; then
25792 GL_COND_OBJ_ERROR_TRUE='#'
25793 GL_COND_OBJ_ERROR_FALSE='#'
25796 if test -z "$GL_COND_OBJ_ERROR_TRUE"; then :
25808 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
25812 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
25820 if test $ac_cv_func_fcntl = no; then
25824 if test $ac_cv_func_fcntl = no; then
25825 HAVE_FCNTL=0
25826 else
25827 REPLACE_FCNTL=1
25830 else
25831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
25832 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
25833 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
25834 then :
25835 printf %s "(cached) " >&6
25836 else case e in #(
25837 e) if test "$cross_compiling" = yes
25838 then :
25839 case $host_os in
25840 aix* | cygwin* | haiku*)
25841 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
25842 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
25843 esac
25844 else case e in #(
25845 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25846 /* end confdefs.h. */
25847 #include <errno.h>
25848 #include <fcntl.h>
25849 #include <limits.h>
25850 #include <sys/resource.h>
25851 #include <unistd.h>
25854 $gl_mda_defines
25856 #ifndef RLIM_SAVED_CUR
25857 # define RLIM_SAVED_CUR RLIM_INFINITY
25858 #endif
25859 #ifndef RLIM_SAVED_MAX
25860 # define RLIM_SAVED_MAX RLIM_INFINITY
25861 #endif
25864 main (void)
25866 int result = 0;
25867 int bad_fd = INT_MAX;
25868 struct rlimit rlim;
25869 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
25870 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
25871 && rlim.rlim_cur != RLIM_INFINITY
25872 && rlim.rlim_cur != RLIM_SAVED_MAX
25873 && rlim.rlim_cur != RLIM_SAVED_CUR)
25874 bad_fd = rlim.rlim_cur;
25875 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
25876 if (errno != EINVAL) result |= 2;
25877 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
25878 if (errno != EINVAL) result |= 8;
25879 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
25881 int fd;
25882 fd = open (".", O_RDONLY);
25883 if (fd == -1)
25884 result |= 16;
25885 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
25886 result |= 32;
25888 close (fd);
25890 return result;
25892 return 0;
25894 _ACEOF
25895 if ac_fn_c_try_run "$LINENO"
25896 then :
25897 gl_cv_func_fcntl_f_dupfd_works=yes
25898 else case e in #(
25899 e) gl_cv_func_fcntl_f_dupfd_works=no ;;
25900 esac
25902 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25903 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
25904 esac
25907 esac
25909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
25910 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
25911 case $gl_cv_func_fcntl_f_dupfd_works in
25912 *yes) ;;
25916 if test $ac_cv_func_fcntl = no; then
25917 HAVE_FCNTL=0
25918 else
25919 REPLACE_FCNTL=1
25923 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
25925 esac
25927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
25928 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
25929 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
25930 then :
25931 printf %s "(cached) " >&6
25932 else case e in #(
25933 e) if test "$cross_compiling" = yes
25934 then :
25935 case "$host_os" in
25936 # Guess no on NetBSD.
25937 netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
25938 *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
25939 esac
25941 else case e in #(
25942 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25943 /* end confdefs.h. */
25944 #include <fcntl.h>
25945 #include <unistd.h>
25946 int main (int argc, char *argv[])
25948 if (argc == 1)
25949 /* parent process */
25951 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
25952 return 1;
25953 return execl ("./conftest", "./conftest", "child", NULL);
25955 else
25956 /* child process */
25957 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
25961 _ACEOF
25962 if ac_fn_c_try_run "$LINENO"
25963 then :
25964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25965 /* end confdefs.h. */
25967 #ifdef __linux__
25968 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
25969 it to support the semantics on older kernels that failed with EINVAL. */
25970 choke me
25971 #endif
25974 main (void)
25978 return 0;
25980 _ACEOF
25981 if ac_fn_c_try_compile "$LINENO"
25982 then :
25983 gl_cv_func_fcntl_f_dupfd_cloexec=yes
25984 else case e in #(
25985 e) gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" ;;
25986 esac
25988 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25990 else case e in #(
25991 e) gl_cv_func_fcntl_f_dupfd_cloexec=no ;;
25992 esac
25994 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25995 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
25996 esac
26000 esac
26002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
26003 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
26004 case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
26005 *yes) ;;
26009 if test $ac_cv_func_fcntl = no; then
26010 HAVE_FCNTL=0
26011 else
26012 REPLACE_FCNTL=1
26016 esac
26021 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
26022 GL_COND_OBJ_FCNTL_TRUE=
26023 GL_COND_OBJ_FCNTL_FALSE='#'
26024 else
26025 GL_COND_OBJ_FCNTL_TRUE='#'
26026 GL_COND_OBJ_FCNTL_FALSE=
26029 if test -z "${GL_COND_OBJ_FCNTL_TRUE}" && test -z "${GL_COND_OBJ_FCNTL_FALSE}"; then
26030 GL_COND_OBJ_FCNTL_TRUE='#'
26031 GL_COND_OBJ_FCNTL_FALSE='#'
26043 GL_GNULIB_FCNTL=1
26049 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
26061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
26062 printf %s "checking for flexible array member... " >&6; }
26063 if test ${ac_cv_c_flexmember+y}
26064 then :
26065 printf %s "(cached) " >&6
26066 else case e in #(
26067 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26068 /* end confdefs.h. */
26069 #include <stdlib.h>
26070 #include <stdio.h>
26071 #include <stddef.h>
26072 struct m { struct m *next, **list; char name[]; };
26073 struct s { struct s *p; struct m *m; int n; double d[]; };
26075 main (void)
26077 int m = getchar ();
26078 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
26079 nbytes += sizeof (struct s) - 1;
26080 nbytes -= nbytes % sizeof (struct s);
26081 struct s *p = malloc (nbytes);
26082 p->p = p;
26083 p->m = NULL;
26084 p->d[0] = 0.0;
26085 return p->d != (double *) NULL;
26087 return 0;
26089 _ACEOF
26090 if ac_fn_c_try_compile "$LINENO"
26091 then :
26092 ac_cv_c_flexmember=yes
26093 else case e in #(
26094 e) ac_cv_c_flexmember=no ;;
26095 esac
26097 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
26098 esac
26100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
26101 printf "%s\n" "$ac_cv_c_flexmember" >&6; }
26102 if test $ac_cv_c_flexmember = yes; then
26104 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
26106 else
26107 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
26113 fp_headers='
26114 #include <stdio.h>
26115 #if HAVE_STDIO_EXT_H
26116 # include <stdio_ext.h>
26117 #endif
26119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
26120 printf %s "checking for __fpending... " >&6; }
26121 if test ${gl_cv_func___fpending+y}
26122 then :
26123 printf %s "(cached) " >&6
26124 else case e in #(
26126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26127 /* end confdefs.h. */
26128 $fp_headers
26130 main (void)
26132 return ! __fpending (stdin);
26134 return 0;
26136 _ACEOF
26137 if ac_fn_c_try_link "$LINENO"
26138 then :
26139 gl_cv_func___fpending=yes
26140 else case e in #(
26141 e) gl_cv_func___fpending=no ;;
26142 esac
26144 rm -f core conftest.err conftest.$ac_objext conftest.beam \
26145 conftest$ac_exeext conftest.$ac_ext
26147 esac
26149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
26150 printf "%s\n" "$gl_cv_func___fpending" >&6; }
26151 if test $gl_cv_func___fpending = yes; then
26152 ac_fn_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
26153 " "$ac_c_undeclared_builtin_options" "CFLAGS"
26154 if test "x$ac_cv_have_decl___fpending" = xyes
26155 then :
26156 ac_have_decl=1
26157 else case e in #(
26158 e) ac_have_decl=0 ;;
26159 esac
26161 printf "%s\n" "#define HAVE_DECL___FPENDING $ac_have_decl" >>confdefs.h
26166 if test $gl_cv_func___fpending = no; then
26167 GL_COND_OBJ_FPENDING_TRUE=
26168 GL_COND_OBJ_FPENDING_FALSE='#'
26169 else
26170 GL_COND_OBJ_FPENDING_TRUE='#'
26171 GL_COND_OBJ_FPENDING_FALSE=
26174 if test -z "${GL_COND_OBJ_FPENDING_TRUE}" && test -z "${GL_COND_OBJ_FPENDING_FALSE}"; then
26175 GL_COND_OBJ_FPENDING_TRUE='#'
26176 GL_COND_OBJ_FPENDING_FALSE='#'
26182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
26183 printf %s "checking whether free is known to preserve errno... " >&6; }
26184 if test ${gl_cv_func_free_preserves_errno+y}
26185 then :
26186 printf %s "(cached) " >&6
26187 else case e in #(
26188 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26189 /* end confdefs.h. */
26190 #include <stdlib.h>
26193 main (void)
26195 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
26196 #elif defined __OpenBSD__
26197 #elif defined __sun
26198 #else
26199 #error "'free' is not known to preserve errno"
26200 #endif
26203 return 0;
26205 _ACEOF
26206 if ac_fn_c_try_compile "$LINENO"
26207 then :
26208 gl_cv_func_free_preserves_errno=yes
26209 else case e in #(
26210 e) gl_cv_func_free_preserves_errno=no ;;
26211 esac
26213 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26215 esac
26217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
26218 printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; }
26220 case $gl_cv_func_free_preserves_errno in
26221 *yes)
26223 printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h
26226 *) REPLACE_FREE=1 ;;
26227 esac
26230 if test $REPLACE_FREE = 1; then
26231 GL_COND_OBJ_FREE_TRUE=
26232 GL_COND_OBJ_FREE_FALSE='#'
26233 else
26234 GL_COND_OBJ_FREE_TRUE='#'
26235 GL_COND_OBJ_FREE_FALSE=
26238 if test -z "${GL_COND_OBJ_FREE_TRUE}" && test -z "${GL_COND_OBJ_FREE_FALSE}"; then
26239 GL_COND_OBJ_FREE_TRUE='#'
26240 GL_COND_OBJ_FREE_FALSE='#'
26243 if test -z "$GL_COND_OBJ_FREE_TRUE"; then :
26257 GL_GNULIB_FREE_POSIX=1
26263 printf "%s\n" "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
26271 case "$host_os" in
26272 mingw* | solaris*)
26273 REPLACE_FSTAT=1
26275 esac
26280 if test $REPLACE_FSTAT = 1; then
26281 GL_COND_OBJ_FSTAT_TRUE=
26282 GL_COND_OBJ_FSTAT_FALSE='#'
26283 else
26284 GL_COND_OBJ_FSTAT_TRUE='#'
26285 GL_COND_OBJ_FSTAT_FALSE=
26288 if test -z "${GL_COND_OBJ_FSTAT_TRUE}" && test -z "${GL_COND_OBJ_FSTAT_FALSE}"; then
26289 GL_COND_OBJ_FSTAT_TRUE='#'
26290 GL_COND_OBJ_FSTAT_FALSE='#'
26293 if test -z "$GL_COND_OBJ_FSTAT_TRUE"; then :
26295 case "$host_os" in
26296 mingw*)
26305 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
26308 esac
26325 GL_GNULIB_FSTAT=1
26331 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
26340 if test $ac_cv_func___fwriting = no; then
26341 GL_COND_OBJ_FWRITING_TRUE=
26342 GL_COND_OBJ_FWRITING_FALSE='#'
26343 else
26344 GL_COND_OBJ_FWRITING_TRUE='#'
26345 GL_COND_OBJ_FWRITING_FALSE=
26348 if test -z "${GL_COND_OBJ_FWRITING_TRUE}" && test -z "${GL_COND_OBJ_FWRITING_FALSE}"; then
26349 GL_COND_OBJ_FWRITING_TRUE='#'
26350 GL_COND_OBJ_FWRITING_FALSE='#'
26362 if test $ac_cv_func_getdelim = yes; then
26363 HAVE_GETDELIM=1
26364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
26365 printf %s "checking for working getdelim function... " >&6; }
26366 if test ${gl_cv_func_working_getdelim+y}
26367 then :
26368 printf %s "(cached) " >&6
26369 else case e in #(
26370 e) case "$host_os" in
26371 darwin*)
26372 gl_cv_func_working_getdelim=no ;;
26374 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
26375 if test "$cross_compiling" = yes
26376 then :
26377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26378 /* end confdefs.h. */
26380 #include <features.h>
26381 #ifdef __GNU_LIBRARY__
26382 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
26383 Lucky GNU user
26384 #endif
26385 #endif
26387 _ACEOF
26388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26389 $EGREP_TRADITIONAL "Lucky GNU user" >/dev/null 2>&1
26390 then :
26391 gl_cv_func_working_getdelim="guessing yes"
26392 else case e in #(
26393 e) case "$host_os" in
26394 *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
26395 *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
26396 esac
26398 esac
26400 rm -rf conftest*
26403 else case e in #(
26404 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26405 /* end confdefs.h. */
26407 # include <stdio.h>
26408 # include <stdlib.h>
26409 # include <string.h>
26410 int main ()
26412 FILE *in = fopen ("./conftest.data", "r");
26413 if (!in)
26414 return 1;
26416 /* Test result for a NULL buffer and a zero size.
26417 Based on a test program from Karl Heuer. */
26418 char *line = NULL;
26419 size_t siz = 0;
26420 int len = getdelim (&line, &siz, '\n', in);
26421 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
26422 { free (line); fclose (in); return 2; }
26423 free (line);
26426 /* Test result for a NULL buffer and a non-zero size.
26427 This crashes on FreeBSD 8.0. */
26428 char *line = NULL;
26429 size_t siz = (size_t)(~0) / 4;
26430 if (getdelim (&line, &siz, '\n', in) == -1)
26431 { fclose (in); return 3; }
26432 free (line);
26434 fclose (in);
26435 return 0;
26438 _ACEOF
26439 if ac_fn_c_try_run "$LINENO"
26440 then :
26441 gl_cv_func_working_getdelim=yes
26442 else case e in #(
26443 e) gl_cv_func_working_getdelim=no ;;
26444 esac
26446 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26447 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
26448 esac
26452 esac
26454 esac
26456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
26457 printf "%s\n" "$gl_cv_func_working_getdelim" >&6; }
26458 case "$gl_cv_func_working_getdelim" in
26459 *yes) ;;
26460 *) REPLACE_GETDELIM=1 ;;
26461 esac
26462 else
26463 HAVE_GETDELIM=0
26466 if test $ac_cv_have_decl_getdelim = no; then
26467 HAVE_DECL_GETDELIM=0
26471 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
26472 GL_COND_OBJ_GETDELIM_TRUE=
26473 GL_COND_OBJ_GETDELIM_FALSE='#'
26474 else
26475 GL_COND_OBJ_GETDELIM_TRUE='#'
26476 GL_COND_OBJ_GETDELIM_FALSE=
26479 if test -z "${GL_COND_OBJ_GETDELIM_TRUE}" && test -z "${GL_COND_OBJ_GETDELIM_FALSE}"; then
26480 GL_COND_OBJ_GETDELIM_TRUE='#'
26481 GL_COND_OBJ_GETDELIM_FALSE='#'
26484 if test -z "$GL_COND_OBJ_GETDELIM_TRUE"; then :
26487 ac_fn_c_check_func "$LINENO" "flockfile" "ac_cv_func_flockfile"
26488 if test "x$ac_cv_func_flockfile" = xyes
26489 then :
26490 printf "%s\n" "#define HAVE_FLOCKFILE 1" >>confdefs.h
26493 ac_fn_c_check_func "$LINENO" "funlockfile" "ac_cv_func_funlockfile"
26494 if test "x$ac_cv_func_funlockfile" = xyes
26495 then :
26496 printf "%s\n" "#define HAVE_FUNLOCKFILE 1" >>confdefs.h
26500 ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
26501 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
26502 then :
26503 ac_have_decl=1
26504 else case e in #(
26505 e) ac_have_decl=0 ;;
26506 esac
26508 printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
26522 GL_GNULIB_GETDELIM=1
26528 printf "%s\n" "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
26537 if test $ac_cv_func_getdtablesize = yes &&
26538 test $ac_cv_have_decl_getdtablesize = yes; then
26539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
26540 printf %s "checking whether getdtablesize works... " >&6; }
26541 if test ${gl_cv_func_getdtablesize_works+y}
26542 then :
26543 printf %s "(cached) " >&6
26544 else case e in #(
26545 e) case "$host_os" in
26546 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
26548 if test "$cross_compiling" = yes
26549 then :
26550 case "$host_os" in
26551 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
26552 gl_cv_func_getdtablesize_works="guessing no" ;;
26553 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
26554 esac
26556 else case e in #(
26557 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26558 /* end confdefs.h. */
26560 #include <unistd.h>
26563 $gl_mda_defines
26567 main (void)
26569 int size = getdtablesize();
26570 if (dup2 (0, getdtablesize()) != -1)
26571 return 1;
26572 if (size != getdtablesize())
26573 return 2;
26576 return 0;
26578 _ACEOF
26579 if ac_fn_c_try_run "$LINENO"
26580 then :
26581 gl_cv_func_getdtablesize_works=yes
26582 else case e in #(
26583 e) gl_cv_func_getdtablesize_works=no ;;
26584 esac
26586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26587 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
26588 esac
26592 esac
26594 esac
26596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
26597 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
26598 case "$gl_cv_func_getdtablesize_works" in
26599 *yes | "no (limitation)") ;;
26600 *) REPLACE_GETDTABLESIZE=1 ;;
26601 esac
26602 else
26603 HAVE_GETDTABLESIZE=0
26607 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
26608 GL_COND_OBJ_GETDTABLESIZE_TRUE=
26609 GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
26610 else
26611 GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
26612 GL_COND_OBJ_GETDTABLESIZE_FALSE=
26615 if test -z "${GL_COND_OBJ_GETDTABLESIZE_TRUE}" && test -z "${GL_COND_OBJ_GETDTABLESIZE_FALSE}"; then
26616 GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
26617 GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
26620 if test -z "$GL_COND_OBJ_GETDTABLESIZE_TRUE"; then :
26634 GL_GNULIB_GETDTABLESIZE=1
26640 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
26647 ac_found=0
26648 ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
26649 " "$ac_c_undeclared_builtin_options" "CFLAGS"
26650 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
26651 then :
26652 ac_have_decl=1
26653 else case e in #(
26654 e) ac_have_decl=0 ;;
26655 esac
26657 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
26658 if test $ac_have_decl = 1
26659 then :
26660 ac_found=1
26663 ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
26664 " "$ac_c_undeclared_builtin_options" "CFLAGS"
26665 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
26666 then :
26667 ac_have_decl=1
26668 else case e in #(
26669 e) ac_have_decl=0 ;;
26670 esac
26672 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
26673 if test $ac_have_decl = 1
26674 then :
26675 ac_found=1
26678 ac_fn_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
26679 " "$ac_c_undeclared_builtin_options" "CFLAGS"
26680 if test "x$ac_cv_have_decl___argv" = xyes
26681 then :
26682 ac_have_decl=1
26683 else case e in #(
26684 e) ac_have_decl=0 ;;
26685 esac
26687 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
26688 if test $ac_have_decl = 1
26689 then :
26690 ac_found=1
26694 # Incur the cost of this test only if none of the above worked.
26695 if test $ac_found = 0; then
26696 # On OpenBSD 5.1, using the global __progname variable appears to be
26697 # the only way to implement getprogname.
26698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
26699 printf %s "checking whether __progname is defined in default libraries... " >&6; }
26700 if test ${gl_cv_var___progname+y}
26701 then :
26702 printf %s "(cached) " >&6
26703 else case e in #(
26705 gl_cv_var___progname=
26706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26707 /* end confdefs.h. */
26708 extern char *__progname;
26710 main (void)
26712 return *__progname;
26715 return 0;
26717 _ACEOF
26718 if ac_fn_c_try_link "$LINENO"
26719 then :
26720 gl_cv_var___progname=yes
26723 rm -f core conftest.err conftest.$ac_objext conftest.beam \
26724 conftest$ac_exeext conftest.$ac_ext
26727 esac
26729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
26730 printf "%s\n" "$gl_cv_var___progname" >&6; }
26731 if test "$gl_cv_var___progname" = yes; then
26733 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
26742 if test "$ac_cv_func_getrandom" != yes; then
26743 HAVE_GETRANDOM=0
26744 else
26745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
26746 printf %s "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
26747 if test ${gl_cv_func_getrandom_ok+y}
26748 then :
26749 printf %s "(cached) " >&6
26750 else case e in #(
26751 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26752 /* end confdefs.h. */
26753 /* Additional includes are needed before <sys/random.h> on uClibc
26754 and Mac OS X. */
26755 #include <sys/types.h>
26756 #include <stdlib.h>
26757 #include <sys/random.h>
26758 ssize_t getrandom (void *, size_t, unsigned int);
26761 main (void)
26765 return 0;
26768 _ACEOF
26769 if ac_fn_c_try_compile "$LINENO"
26770 then :
26771 gl_cv_func_getrandom_ok=yes
26772 else case e in #(
26773 e) gl_cv_func_getrandom_ok=no ;;
26774 esac
26776 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26778 esac
26780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
26781 printf "%s\n" "$gl_cv_func_getrandom_ok" >&6; }
26782 if test $gl_cv_func_getrandom_ok = no; then
26783 REPLACE_GETRANDOM=1
26787 case "$host_os" in
26788 mingw*)
26789 ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
26792 if test "x$ac_cv_header_bcrypt_h" = xyes
26793 then :
26794 printf "%s\n" "#define HAVE_BCRYPT_H 1" >>confdefs.h
26798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
26799 printf %s "checking whether the bcrypt library is guaranteed to be present... " >&6; }
26800 if test ${gl_cv_lib_assume_bcrypt+y}
26801 then :
26802 printf %s "(cached) " >&6
26803 else case e in #(
26804 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26805 /* end confdefs.h. */
26806 #include <windows.h>
26808 main (void)
26810 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
26811 cannot assume it
26812 #endif
26815 return 0;
26818 _ACEOF
26819 if ac_fn_c_try_compile "$LINENO"
26820 then :
26821 gl_cv_lib_assume_bcrypt=yes
26822 else case e in #(
26823 e) gl_cv_lib_assume_bcrypt=no ;;
26824 esac
26826 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26828 esac
26830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
26831 printf "%s\n" "$gl_cv_lib_assume_bcrypt" >&6; }
26832 if test $gl_cv_lib_assume_bcrypt = yes; then
26834 printf "%s\n" "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
26836 LIB_GETRANDOM='-lbcrypt'
26837 else
26838 LIB_GETRANDOM='-ladvapi32'
26842 LIB_GETRANDOM= ;;
26843 esac
26847 if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
26848 GL_COND_OBJ_GETRANDOM_TRUE=
26849 GL_COND_OBJ_GETRANDOM_FALSE='#'
26850 else
26851 GL_COND_OBJ_GETRANDOM_TRUE='#'
26852 GL_COND_OBJ_GETRANDOM_FALSE=
26855 if test -z "${GL_COND_OBJ_GETRANDOM_TRUE}" && test -z "${GL_COND_OBJ_GETRANDOM_FALSE}"; then
26856 GL_COND_OBJ_GETRANDOM_TRUE='#'
26857 GL_COND_OBJ_GETRANDOM_FALSE='#'
26869 GL_GNULIB_GETRANDOM=1
26875 printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
26883 # Autoconf 2.61a.99 and earlier don't support linking a file only
26884 # in VPATH builds. But since GNUmakefile is for maintainer use
26885 # only, it does not matter if we skip the link with older autoconf.
26886 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
26887 # builds, so use a shell variable to bypass this.
26888 GNUmakefile=GNUmakefile
26889 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
26892 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
26910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
26911 printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
26912 if test ${gl_cv_c___inline+y}
26913 then :
26914 printf %s "(cached) " >&6
26915 else case e in #(
26916 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26917 /* end confdefs.h. */
26918 typedef int foo_t;
26919 static __inline foo_t foo (void) { return 0; }
26921 main (void)
26923 return foo ();
26925 return 0;
26927 _ACEOF
26928 if ac_fn_c_try_compile "$LINENO"
26929 then :
26930 gl_cv_c___inline=yes
26931 else case e in #(
26932 e) gl_cv_c___inline=no ;;
26933 esac
26935 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
26936 esac
26938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
26939 printf "%s\n" "$gl_cv_c___inline" >&6; }
26940 if test $gl_cv_c___inline = yes; then
26942 printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
26951 case "$GL_GENERATE_LIMITS_H" in
26952 false) LIMITS_H='' ;;
26953 true)
26954 if test -z "$LIMITS_H"; then
26955 LIMITS_H="${gl_source_base_prefix}limits.h"
26958 *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
26959 esac
26962 if $GL_GENERATE_LIMITS_H; then
26963 GL_GENERATE_LIMITS_H_TRUE=
26964 GL_GENERATE_LIMITS_H_FALSE='#'
26965 else
26966 GL_GENERATE_LIMITS_H_TRUE='#'
26967 GL_GENERATE_LIMITS_H_FALSE=
26970 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
26971 GL_GENERATE_LIMITS_H_TRUE='#'
26972 GL_GENERATE_LIMITS_H_FALSE='#'
26983 LOCALCHARSET_TESTS_ENVIRONMENT=
26996 if test $REPLACE_STRUCT_LCONV = 1; then
26997 REPLACE_LOCALECONV=1
27001 if test $REPLACE_LOCALECONV = 1; then
27002 GL_COND_OBJ_LOCALECONV_TRUE=
27003 GL_COND_OBJ_LOCALECONV_FALSE='#'
27004 else
27005 GL_COND_OBJ_LOCALECONV_TRUE='#'
27006 GL_COND_OBJ_LOCALECONV_FALSE=
27009 if test -z "${GL_COND_OBJ_LOCALECONV_TRUE}" && test -z "${GL_COND_OBJ_LOCALECONV_FALSE}"; then
27010 GL_COND_OBJ_LOCALECONV_TRUE='#'
27011 GL_COND_OBJ_LOCALECONV_FALSE='#'
27014 if test -z "$GL_COND_OBJ_LOCALECONV_TRUE"; then :
27017 ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
27019 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
27020 then :
27022 printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
27039 GL_GNULIB_LOCALECONV=1
27045 printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
27051 if test "$gl_threads_api" = posix; then
27052 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
27053 # pthread_rwlock_* functions.
27054 has_rwlock=false
27055 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
27057 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
27058 then :
27059 has_rwlock=true
27061 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
27065 if $has_rwlock; then
27068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
27069 printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
27070 if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
27071 then :
27072 printf %s "(cached) " >&6
27073 else case e in #(
27074 e) save_LIBS="$LIBS"
27075 LIBS="$LIBS $LIBMULTITHREAD"
27076 if test "$cross_compiling" = yes
27077 then :
27078 case "$host_os" in
27079 # Guess no on glibc systems.
27080 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
27081 # Guess no on musl systems.
27082 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
27083 # Guess no on bionic systems.
27084 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
27085 # Guess yes on native Windows with the mingw-w64 winpthreads library.
27086 # Guess no on native Windows with the gnulib windows-rwlock module.
27087 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
27088 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
27089 else
27090 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
27093 # If we don't know, obey --enable-cross-guesses.
27094 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
27095 esac
27097 else case e in #(
27098 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27099 /* end confdefs.h. */
27101 #include <errno.h>
27102 #include <pthread.h>
27103 #include <stdlib.h>
27104 #include <unistd.h>
27106 #define SUCCEED() exit (0)
27107 #define FAILURE() exit (1)
27108 #define UNEXPECTED(n) (exit (10 + (n)))
27110 /* The main thread creates the waiting writer and the requesting reader threads
27111 in the default way; this guarantees that they have the same priority.
27112 We can reuse the main thread as first reader thread. */
27114 static pthread_rwlock_t lock;
27115 static pthread_t reader1;
27116 static pthread_t writer;
27117 static pthread_t reader2;
27118 static pthread_t timer;
27119 /* Used to pass control from writer to reader2 and from reader2 to timer,
27120 as in a relay race.
27121 Passing control from one running thread to another running thread
27122 is most likely faster than to create the second thread. */
27123 static pthread_mutex_t baton;
27125 static void *
27126 timer_func (void *ignored)
27128 /* Step 13 (can be before or after step 12):
27129 The timer thread takes the baton, then waits a moment to make sure
27130 it can tell whether the second reader thread is blocked at step 12. */
27131 if (pthread_mutex_lock (&baton))
27132 UNEXPECTED (13);
27133 usleep (100000);
27134 /* By the time we get here, it's clear that the second reader thread is
27135 blocked at step 12. This is the desired behaviour. */
27136 SUCCEED ();
27139 static void *
27140 reader2_func (void *ignored)
27142 int err;
27144 /* Step 8 (can be before or after step 7):
27145 The second reader thread takes the baton, then waits a moment to make sure
27146 the writer thread has reached step 7. */
27147 if (pthread_mutex_lock (&baton))
27148 UNEXPECTED (8);
27149 usleep (100000);
27150 /* Step 9: The second reader thread requests the lock. */
27151 err = pthread_rwlock_tryrdlock (&lock);
27152 if (err == 0)
27153 FAILURE ();
27154 else if (err != EBUSY)
27155 UNEXPECTED (9);
27156 /* Step 10: Launch a timer, to test whether the next call blocks. */
27157 if (pthread_create (&timer, NULL, timer_func, NULL))
27158 UNEXPECTED (10);
27159 /* Step 11: Release the baton. */
27160 if (pthread_mutex_unlock (&baton))
27161 UNEXPECTED (11);
27162 /* Step 12: The second reader thread requests the lock. */
27163 err = pthread_rwlock_rdlock (&lock);
27164 if (err == 0)
27165 FAILURE ();
27166 else
27167 UNEXPECTED (12);
27170 static void *
27171 writer_func (void *ignored)
27173 /* Step 4: Take the baton, so that the second reader thread does not go ahead
27174 too early. */
27175 if (pthread_mutex_lock (&baton))
27176 UNEXPECTED (4);
27177 /* Step 5: Create the second reader thread. */
27178 if (pthread_create (&reader2, NULL, reader2_func, NULL))
27179 UNEXPECTED (5);
27180 /* Step 6: Release the baton. */
27181 if (pthread_mutex_unlock (&baton))
27182 UNEXPECTED (6);
27183 /* Step 7: The writer thread requests the lock. */
27184 if (pthread_rwlock_wrlock (&lock))
27185 UNEXPECTED (7);
27186 return NULL;
27190 main ()
27192 reader1 = pthread_self ();
27194 /* Step 1: The main thread initializes the lock and the baton. */
27195 if (pthread_rwlock_init (&lock, NULL))
27196 UNEXPECTED (1);
27197 if (pthread_mutex_init (&baton, NULL))
27198 UNEXPECTED (1);
27199 /* Step 2: The main thread acquires the lock as a reader. */
27200 if (pthread_rwlock_rdlock (&lock))
27201 UNEXPECTED (2);
27202 /* Step 3: Create the writer thread. */
27203 if (pthread_create (&writer, NULL, writer_func, NULL))
27204 UNEXPECTED (3);
27205 /* Job done. Go to sleep. */
27206 for (;;)
27208 sleep (1);
27212 _ACEOF
27213 if ac_fn_c_try_run "$LINENO"
27214 then :
27215 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
27216 else case e in #(
27217 e) gl_cv_pthread_rwlock_rdlock_prefer_writer=no ;;
27218 esac
27220 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27221 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27222 esac
27225 LIBS="$save_LIBS"
27227 esac
27229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
27230 printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
27231 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
27232 *yes)
27234 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
27237 esac
27240 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
27241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27242 /* end confdefs.h. */
27244 #include <pthread.h>
27246 main (void)
27249 #if __FreeBSD__ == 4
27250 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
27251 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
27252 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
27253 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
27254 #else
27255 int x = (int)PTHREAD_MUTEX_RECURSIVE;
27256 return !x;
27257 #endif
27260 return 0;
27262 _ACEOF
27263 if ac_fn_c_try_compile "$LINENO"
27264 then :
27266 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
27269 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27275 printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
27282 if test $ac_cv_func_lstat = yes; then
27284 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
27285 solaris* | *no)
27286 REPLACE_LSTAT=1
27288 esac
27289 else
27290 HAVE_LSTAT=0
27294 if test $REPLACE_LSTAT = 1; then
27295 GL_COND_OBJ_LSTAT_TRUE=
27296 GL_COND_OBJ_LSTAT_FALSE='#'
27297 else
27298 GL_COND_OBJ_LSTAT_TRUE='#'
27299 GL_COND_OBJ_LSTAT_FALSE=
27302 if test -z "${GL_COND_OBJ_LSTAT_TRUE}" && test -z "${GL_COND_OBJ_LSTAT_FALSE}"; then
27303 GL_COND_OBJ_LSTAT_TRUE='#'
27304 GL_COND_OBJ_LSTAT_FALSE='#'
27307 if test -z "$GL_COND_OBJ_LSTAT_TRUE"; then :
27321 GL_GNULIB_LSTAT=1
27327 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
27337 REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX"
27338 if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then
27340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
27341 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
27342 if test ${ac_cv_func_malloc_0_nonnull+y}
27343 then :
27344 printf %s "(cached) " >&6
27345 else case e in #(
27346 e) if test "$cross_compiling" = yes
27347 then :
27348 case "$host_os" in
27349 # Guess yes on platforms where we know the result.
27350 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
27351 | gnu* | *-musl* | midnightbsd* \
27352 | hpux* | solaris* | cygwin* | mingw* | msys* )
27353 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
27354 # If we don't know, obey --enable-cross-guesses.
27355 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
27356 esac
27358 else case e in #(
27359 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27360 /* end confdefs.h. */
27361 #include <stdlib.h>
27364 main (void)
27366 void *p = malloc (0);
27367 int result = !p;
27368 free (p);
27369 return result;
27371 return 0;
27374 _ACEOF
27375 if ac_fn_c_try_run "$LINENO"
27376 then :
27377 ac_cv_func_malloc_0_nonnull=yes
27378 else case e in #(
27379 e) ac_cv_func_malloc_0_nonnull=no ;;
27380 esac
27382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27383 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27384 esac
27388 esac
27390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
27391 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
27392 case $ac_cv_func_malloc_0_nonnull in #(
27393 *yes) :
27394 ;; #(
27395 *) :
27396 REPLACE_MALLOC_FOR_MALLOC_GNU=1 ;;
27397 esac
27401 if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then
27410 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
27422 GL_GNULIB_MALLOC_GNU=1
27428 printf "%s\n" "#define GNULIB_TEST_MALLOC_GNU 1" >>confdefs.h
27433 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
27442 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
27454 GL_GNULIB_MALLOC_POSIX=1
27460 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
27473 if test $ac_cv_func_mbrlen = no; then
27474 HAVE_MBRLEN=0
27475 ac_fn_check_decl "$LINENO" "mbrlen" "ac_cv_have_decl_mbrlen" "
27476 #include <wchar.h>
27478 " "$ac_c_undeclared_builtin_options" "CFLAGS"
27479 if test "x$ac_cv_have_decl_mbrlen" = xyes
27480 then :
27481 ac_have_decl=1
27482 else case e in #(
27483 e) ac_have_decl=0 ;;
27484 esac
27486 printf "%s\n" "#define HAVE_DECL_MBRLEN $ac_have_decl" >>confdefs.h
27488 if test $ac_cv_have_decl_mbrlen = yes; then
27489 REPLACE_MBRLEN=1
27491 else
27492 if test $REPLACE_MBRTOWC = 1; then
27493 REPLACE_MBRLEN=1
27498 if test $HAVE_MBRLEN = 0 || test $REPLACE_MBRLEN = 1; then
27499 GL_COND_OBJ_MBRLEN_TRUE=
27500 GL_COND_OBJ_MBRLEN_FALSE='#'
27501 else
27502 GL_COND_OBJ_MBRLEN_TRUE='#'
27503 GL_COND_OBJ_MBRLEN_FALSE=
27506 if test -z "${GL_COND_OBJ_MBRLEN_TRUE}" && test -z "${GL_COND_OBJ_MBRLEN_FALSE}"; then
27507 GL_COND_OBJ_MBRLEN_TRUE='#'
27508 GL_COND_OBJ_MBRLEN_FALSE='#'
27511 if test -z "$GL_COND_OBJ_MBRLEN_TRUE"; then :
27532 GL_GNULIB_MBRLEN=1
27538 printf "%s\n" "#define GNULIB_TEST_MBRLEN 1" >>confdefs.h
27555 if case "$host_os" in
27556 mingw*) true ;;
27557 *) test $ac_cv_func_mbsinit = yes ;;
27558 esac \
27559 && test $ac_cv_func_mbrtowc = yes; then
27564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
27565 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
27566 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
27567 then :
27568 printf %s "(cached) " >&6
27569 else case e in #(
27571 case "$host_os" in
27572 # Guess no on AIX and OSF/1.
27573 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
27574 # Guess yes otherwise.
27575 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
27576 esac
27577 if test $LOCALE_JA != none; then
27578 if test "$cross_compiling" = yes
27579 then :
27581 else case e in #(
27582 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27583 /* end confdefs.h. */
27585 #include <locale.h>
27586 #include <string.h>
27587 #include <wchar.h>
27588 int main ()
27590 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
27592 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
27593 mbstate_t state;
27594 wchar_t wc;
27596 memset (&state, '\0', sizeof (mbstate_t));
27597 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27598 if (mbsinit (&state))
27599 return 2;
27601 return 0;
27603 _ACEOF
27604 if ac_fn_c_try_run "$LINENO"
27605 then :
27606 gl_cv_func_mbrtowc_incomplete_state=yes
27607 else case e in #(
27608 e) gl_cv_func_mbrtowc_incomplete_state=no ;;
27609 esac
27611 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27612 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27613 esac
27616 else
27617 if test $LOCALE_FR_UTF8 != none; then
27618 if test "$cross_compiling" = yes
27619 then :
27621 else case e in #(
27622 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27623 /* end confdefs.h. */
27625 #include <locale.h>
27626 #include <string.h>
27627 #include <wchar.h>
27628 int main ()
27630 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27632 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
27633 mbstate_t state;
27634 wchar_t wc;
27636 memset (&state, '\0', sizeof (mbstate_t));
27637 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27638 if (mbsinit (&state))
27639 return 2;
27641 return 0;
27643 _ACEOF
27644 if ac_fn_c_try_run "$LINENO"
27645 then :
27646 gl_cv_func_mbrtowc_incomplete_state=yes
27647 else case e in #(
27648 e) gl_cv_func_mbrtowc_incomplete_state=no ;;
27649 esac
27651 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27652 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27653 esac
27659 esac
27661 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
27662 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
27667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
27668 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
27669 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
27670 then :
27671 printf %s "(cached) " >&6
27672 else case e in #(
27674 case "$host_os" in
27675 # Guess no on Solaris 8.
27676 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
27677 # Guess yes otherwise.
27678 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
27679 esac
27680 if test $LOCALE_ZH_CN != none; then
27681 if test "$cross_compiling" = yes
27682 then :
27684 else case e in #(
27685 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27686 /* end confdefs.h. */
27688 #include <locale.h>
27689 #include <stdlib.h>
27690 #include <string.h>
27691 #include <wchar.h>
27692 int main ()
27694 /* This fails on Solaris 8:
27695 mbrtowc returns 2, and sets wc to 0x00F0.
27696 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
27697 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
27699 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
27700 mbstate_t state;
27701 wchar_t wc;
27703 memset (&state, '\0', sizeof (mbstate_t));
27704 if (mbrtowc (&wc, input + 3, 6, &state) != 4
27705 && mbtowc (&wc, input + 3, 6) == 4)
27706 return 2;
27708 return 0;
27710 _ACEOF
27711 if ac_fn_c_try_run "$LINENO"
27712 then :
27713 gl_cv_func_mbrtowc_sanitycheck=yes
27714 else case e in #(
27715 e) gl_cv_func_mbrtowc_sanitycheck=no ;;
27716 esac
27718 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27719 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27720 esac
27725 esac
27727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
27728 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
27730 REPLACE_MBSTATE_T=0
27731 case "$gl_cv_func_mbrtowc_incomplete_state" in
27732 *yes) ;;
27733 *) REPLACE_MBSTATE_T=1 ;;
27734 esac
27735 case "$gl_cv_func_mbrtowc_sanitycheck" in
27736 *yes) ;;
27737 *) REPLACE_MBSTATE_T=1 ;;
27738 esac
27739 else
27740 REPLACE_MBSTATE_T=1
27745 if test $ac_cv_func_mbrtowc = no; then
27746 HAVE_MBRTOWC=0
27747 ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
27748 #include <wchar.h>
27750 " "$ac_c_undeclared_builtin_options" "CFLAGS"
27751 if test "x$ac_cv_have_decl_mbrtowc" = xyes
27752 then :
27753 ac_have_decl=1
27754 else case e in #(
27755 e) ac_have_decl=0 ;;
27756 esac
27758 printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
27760 if test $ac_cv_have_decl_mbrtowc = yes; then
27761 REPLACE_MBRTOWC=1
27763 else
27764 if test $REPLACE_MBSTATE_T = 1; then
27765 REPLACE_MBRTOWC=1
27766 else
27770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
27771 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
27772 if test ${gl_cv_func_mbrtowc_null_arg1+y}
27773 then :
27774 printf %s "(cached) " >&6
27775 else case e in #(
27777 case "$host_os" in
27778 # Guess no on Solaris.
27779 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
27780 # Guess yes otherwise.
27781 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
27782 esac
27783 if test $LOCALE_FR_UTF8 != none; then
27784 if test "$cross_compiling" = yes
27785 then :
27787 else case e in #(
27788 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27789 /* end confdefs.h. */
27791 #include <locale.h>
27792 #include <stdlib.h>
27793 #include <string.h>
27794 #include <wchar.h>
27795 int main ()
27797 int result = 0;
27799 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27801 char input[] = "\303\237er";
27802 mbstate_t state;
27803 wchar_t wc;
27804 size_t ret;
27806 memset (&state, '\0', sizeof (mbstate_t));
27807 wc = (wchar_t) 0xBADFACE;
27808 ret = mbrtowc (&wc, input, 5, &state);
27809 if (ret != 2)
27810 result |= 1;
27811 if (!mbsinit (&state))
27812 result |= 2;
27814 memset (&state, '\0', sizeof (mbstate_t));
27815 ret = mbrtowc (NULL, input, 5, &state);
27816 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
27817 result |= 4;
27818 if (!mbsinit (&state))
27819 result |= 8;
27821 return result;
27823 _ACEOF
27824 if ac_fn_c_try_run "$LINENO"
27825 then :
27826 gl_cv_func_mbrtowc_null_arg1=yes
27827 else case e in #(
27828 e) gl_cv_func_mbrtowc_null_arg1=no ;;
27829 esac
27831 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27832 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27833 esac
27838 esac
27840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
27841 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
27846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
27847 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
27848 if test ${gl_cv_func_mbrtowc_null_arg2+y}
27849 then :
27850 printf %s "(cached) " >&6
27851 else case e in #(
27853 case "$host_os" in
27854 # Guess no on OSF/1.
27855 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
27856 # Guess yes otherwise.
27857 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
27858 esac
27859 if test $LOCALE_FR_UTF8 != none; then
27860 if test "$cross_compiling" = yes
27861 then :
27863 else case e in #(
27864 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27865 /* end confdefs.h. */
27867 #include <locale.h>
27868 #include <string.h>
27869 #include <wchar.h>
27870 int main ()
27872 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27874 mbstate_t state;
27875 wchar_t wc;
27876 int ret;
27878 memset (&state, '\0', sizeof (mbstate_t));
27879 wc = (wchar_t) 0xBADFACE;
27880 mbrtowc (&wc, NULL, 5, &state);
27881 /* Check that wc was not modified. */
27882 if (wc != (wchar_t) 0xBADFACE)
27883 return 2;
27885 return 0;
27887 _ACEOF
27888 if ac_fn_c_try_run "$LINENO"
27889 then :
27890 gl_cv_func_mbrtowc_null_arg2=yes
27891 else case e in #(
27892 e) gl_cv_func_mbrtowc_null_arg2=no ;;
27893 esac
27895 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27896 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
27897 esac
27902 esac
27904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
27905 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
27912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
27913 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
27914 if test ${gl_cv_func_mbrtowc_retval+y}
27915 then :
27916 printf %s "(cached) " >&6
27917 else case e in #(
27919 case "$host_os" in
27920 # Guess no on HP-UX, Solaris, native Windows.
27921 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
27922 # Guess yes otherwise.
27923 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
27924 esac
27925 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
27926 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
27927 if test "$cross_compiling" = yes
27928 then :
27930 else case e in #(
27931 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27932 /* end confdefs.h. */
27934 #include <locale.h>
27935 #include <string.h>
27936 #include <wchar.h>
27937 int main ()
27939 int result = 0;
27940 int found_some_locale = 0;
27941 /* This fails on Solaris. */
27942 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27944 char input[] = "B\303\274\303\237er"; /* "Büßer" */
27945 mbstate_t state;
27946 wchar_t wc;
27948 memset (&state, '\0', sizeof (mbstate_t));
27949 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27951 input[1] = '\0';
27952 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
27953 result |= 1;
27955 found_some_locale = 1;
27957 /* This fails on HP-UX 11.11. */
27958 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
27960 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
27961 mbstate_t state;
27962 wchar_t wc;
27964 memset (&state, '\0', sizeof (mbstate_t));
27965 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27967 input[1] = '\0';
27968 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
27969 result |= 2;
27971 found_some_locale = 1;
27973 /* This fails on native Windows. */
27974 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
27976 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
27977 mbstate_t state;
27978 wchar_t wc;
27980 memset (&state, '\0', sizeof (mbstate_t));
27981 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
27983 input[3] = '\0';
27984 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
27985 result |= 4;
27987 found_some_locale = 1;
27989 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
27991 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
27992 mbstate_t state;
27993 wchar_t wc;
27995 memset (&state, '\0', sizeof (mbstate_t));
27996 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
27998 input[3] = '\0';
27999 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
28000 result |= 8;
28002 found_some_locale = 1;
28004 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
28006 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
28007 mbstate_t state;
28008 wchar_t wc;
28010 memset (&state, '\0', sizeof (mbstate_t));
28011 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
28013 input[3] = '\0';
28014 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
28015 result |= 16;
28017 found_some_locale = 1;
28019 return (found_some_locale ? result : 77);
28021 _ACEOF
28022 if ac_fn_c_try_run "$LINENO"
28023 then :
28024 gl_cv_func_mbrtowc_retval=yes
28025 else case e in #(
28026 e) if test $? != 77; then
28027 gl_cv_func_mbrtowc_retval=no
28030 esac
28032 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28033 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28034 esac
28039 esac
28041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
28042 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
28047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
28048 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
28049 if test ${gl_cv_func_mbrtowc_nul_retval+y}
28050 then :
28051 printf %s "(cached) " >&6
28052 else case e in #(
28054 case "$host_os" in
28055 # Guess no on Solaris 8 and 9.
28056 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
28057 # Guess yes otherwise.
28058 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
28059 esac
28060 if test $LOCALE_ZH_CN != none; then
28061 if test "$cross_compiling" = yes
28062 then :
28064 else case e in #(
28065 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28066 /* end confdefs.h. */
28068 #include <locale.h>
28069 #include <string.h>
28070 #include <wchar.h>
28071 int main ()
28073 /* This fails on Solaris 8 and 9. */
28074 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28076 mbstate_t state;
28077 wchar_t wc;
28079 memset (&state, '\0', sizeof (mbstate_t));
28080 if (mbrtowc (&wc, "", 1, &state) != 0)
28081 return 2;
28083 return 0;
28085 _ACEOF
28086 if ac_fn_c_try_run "$LINENO"
28087 then :
28088 gl_cv_func_mbrtowc_nul_retval=yes
28089 else case e in #(
28090 e) gl_cv_func_mbrtowc_nul_retval=no ;;
28091 esac
28093 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28094 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28095 esac
28100 esac
28102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
28103 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
28107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
28108 printf %s "checking whether mbrtowc stores incomplete characters... " >&6; }
28109 if test ${gl_cv_func_mbrtowc_stores_incomplete+y}
28110 then :
28111 printf %s "(cached) " >&6
28112 else case e in #(
28114 case "$host_os" in
28115 # Guess yes on native Windows.
28116 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
28117 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
28118 esac
28119 case "$host_os" in
28120 mingw*)
28121 if test "$cross_compiling" = yes
28122 then :
28124 else case e in #(
28125 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28126 /* end confdefs.h. */
28128 #include <locale.h>
28129 #include <string.h>
28130 #include <wchar.h>
28131 int main ()
28133 int result = 0;
28134 if (setlocale (LC_ALL, "French_France.65001") != NULL)
28136 wchar_t wc = (wchar_t) 0xBADFACE;
28137 mbstate_t state;
28139 memset (&state, '\0', sizeof (mbstate_t));
28140 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
28141 && wc != (wchar_t) 0xBADFACE)
28142 result |= 1;
28144 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
28146 wchar_t wc = (wchar_t) 0xBADFACE;
28147 mbstate_t state;
28149 memset (&state, '\0', sizeof (mbstate_t));
28150 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
28151 && wc != (wchar_t) 0xBADFACE)
28152 result |= 2;
28154 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
28156 wchar_t wc = (wchar_t) 0xBADFACE;
28157 mbstate_t state;
28159 memset (&state, '\0', sizeof (mbstate_t));
28160 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
28161 && wc != (wchar_t) 0xBADFACE)
28162 result |= 4;
28164 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
28166 wchar_t wc = (wchar_t) 0xBADFACE;
28167 mbstate_t state;
28169 memset (&state, '\0', sizeof (mbstate_t));
28170 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
28171 && wc != (wchar_t) 0xBADFACE)
28172 result |= 8;
28174 return result;
28176 _ACEOF
28177 if ac_fn_c_try_run "$LINENO"
28178 then :
28179 gl_cv_func_mbrtowc_stores_incomplete=no
28180 else case e in #(
28181 e) gl_cv_func_mbrtowc_stores_incomplete=yes ;;
28182 esac
28184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28185 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28186 esac
28192 if test $LOCALE_FR_UTF8 != none; then
28193 if test "$cross_compiling" = yes
28194 then :
28196 else case e in #(
28197 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28198 /* end confdefs.h. */
28200 #include <locale.h>
28201 #include <string.h>
28202 #include <wchar.h>
28203 int main ()
28205 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28207 wchar_t wc = (wchar_t) 0xBADFACE;
28208 mbstate_t state;
28210 memset (&state, '\0', sizeof (mbstate_t));
28211 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
28212 && wc != (wchar_t) 0xBADFACE)
28213 return 1;
28215 return 0;
28217 _ACEOF
28218 if ac_fn_c_try_run "$LINENO"
28219 then :
28220 gl_cv_func_mbrtowc_stores_incomplete=no
28221 else case e in #(
28222 e) gl_cv_func_mbrtowc_stores_incomplete=yes ;;
28223 esac
28225 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28226 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28227 esac
28232 esac
28234 esac
28236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
28237 printf "%s\n" "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
28241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
28242 printf %s "checking whether mbrtowc works on empty input... " >&6; }
28243 if test ${gl_cv_func_mbrtowc_empty_input+y}
28244 then :
28245 printf %s "(cached) " >&6
28246 else case e in #(
28248 case "$host_os" in
28249 # Guess no on AIX and glibc systems.
28250 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
28251 # Guess yes on native Windows.
28252 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
28253 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
28254 esac
28255 if test "$cross_compiling" = yes
28256 then :
28258 else case e in #(
28259 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28260 /* end confdefs.h. */
28262 #include <wchar.h>
28263 static wchar_t wc;
28264 static mbstate_t mbs;
28266 main (void)
28268 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
28270 _ACEOF
28271 if ac_fn_c_try_run "$LINENO"
28272 then :
28273 gl_cv_func_mbrtowc_empty_input=yes
28274 else case e in #(
28275 e) gl_cv_func_mbrtowc_empty_input=no ;;
28276 esac
28278 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28279 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28280 esac
28284 esac
28286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
28287 printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
28290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
28291 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
28292 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
28293 then :
28294 printf %s "(cached) " >&6
28295 else case e in #(
28297 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
28299 if test "$cross_compiling" = yes
28300 then :
28301 case "$host_os" in
28302 # Guess yes on native Windows.
28303 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
28304 esac
28306 else case e in #(
28307 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28308 /* end confdefs.h. */
28309 #include <limits.h>
28310 #include <locale.h>
28311 #include <wchar.h>
28314 main (void)
28317 int i;
28318 char *locale = setlocale (LC_ALL, "C");
28319 if (! locale)
28320 return 2;
28321 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
28323 char c = i;
28324 wchar_t wc;
28325 mbstate_t mbs = { 0, };
28326 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
28327 if (1 < ss)
28328 return 3;
28330 return 0;
28333 return 0;
28335 _ACEOF
28336 if ac_fn_c_try_run "$LINENO"
28337 then :
28338 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
28339 else case e in #(
28340 e) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no ;;
28341 esac
28343 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28344 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28345 esac
28349 esac
28351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
28352 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
28354 case "$gl_cv_func_mbrtowc_null_arg1" in
28355 *yes) ;;
28357 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
28359 REPLACE_MBRTOWC=1
28361 esac
28362 case "$gl_cv_func_mbrtowc_null_arg2" in
28363 *yes) ;;
28365 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
28367 REPLACE_MBRTOWC=1
28369 esac
28370 case "$gl_cv_func_mbrtowc_retval" in
28371 *yes) ;;
28373 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
28375 REPLACE_MBRTOWC=1
28377 esac
28378 case "$gl_cv_func_mbrtowc_nul_retval" in
28379 *yes) ;;
28381 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
28383 REPLACE_MBRTOWC=1
28385 esac
28386 case "$gl_cv_func_mbrtowc_stores_incomplete" in
28387 *no) ;;
28389 printf "%s\n" "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
28391 REPLACE_MBRTOWC=1
28393 esac
28394 case "$gl_cv_func_mbrtowc_empty_input" in
28395 *yes) ;;
28397 printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
28399 REPLACE_MBRTOWC=1
28401 esac
28402 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
28403 *yes) ;;
28405 printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
28407 REPLACE_MBRTOWC=1
28409 esac
28412 if test $REPLACE_MBSTATE_T = 1; then
28413 case "$host_os" in
28414 mingw*) LIB_MBRTOWC= ;;
28418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
28419 printf %s "checking whether imported symbols can be declared weak... " >&6; }
28420 if test ${gl_cv_have_weak+y}
28421 then :
28422 printf %s "(cached) " >&6
28423 else case e in #(
28424 e) case "$host_os" in
28425 cygwin*)
28426 gl_cv_have_weak="guessing no"
28429 gl_cv_have_weak=no
28430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28431 /* end confdefs.h. */
28432 extern void xyzzy ();
28433 #pragma weak xyzzy
28435 main (void)
28437 xyzzy();
28439 return 0;
28441 _ACEOF
28442 if ac_fn_c_try_link "$LINENO"
28443 then :
28444 gl_cv_have_weak=maybe
28446 rm -f core conftest.err conftest.$ac_objext conftest.beam \
28447 conftest$ac_exeext conftest.$ac_ext
28448 if test $gl_cv_have_weak = maybe; then
28449 if test "$cross_compiling" = yes
28450 then :
28451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28452 /* end confdefs.h. */
28453 #ifdef __ELF__
28454 Extensible Linking Format
28455 #endif
28457 _ACEOF
28458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28459 $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
28460 then :
28461 gl_cv_have_weak="guessing yes"
28462 else case e in #(
28463 e) gl_cv_have_weak="guessing no" ;;
28464 esac
28466 rm -rf conftest*
28469 else case e in #(
28470 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28471 /* end confdefs.h. */
28473 #include <stdio.h>
28474 #pragma weak fputs
28475 int main ()
28477 return (fputs == NULL);
28479 _ACEOF
28480 if ac_fn_c_try_run "$LINENO"
28481 then :
28482 gl_cv_have_weak=yes
28483 else case e in #(
28484 e) gl_cv_have_weak=no ;;
28485 esac
28487 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28488 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28489 esac
28494 esac
28495 case " $LDFLAGS " in
28496 *" -static "*) gl_cv_have_weak=no ;;
28497 esac
28498 case "$gl_cv_have_weak" in
28499 *yes)
28500 case "$host_os" in
28501 freebsd* | dragonfly* | midnightbsd*)
28502 : > conftest1.c
28503 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
28504 cat <<EOF > conftest2.c
28505 #include <pthread.h>
28506 #pragma weak pthread_mutexattr_gettype
28507 int main ()
28509 return (pthread_mutexattr_gettype != NULL);
28512 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
28513 || gl_cv_have_weak=no
28514 rm -f conftest1.c libempty.so conftest2.c conftest
28516 esac
28518 esac
28520 esac
28522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
28523 printf "%s\n" "$gl_cv_have_weak" >&6; }
28524 case "$gl_cv_have_weak" in
28525 *yes)
28527 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
28530 esac
28532 case "$gl_cv_have_weak" in
28533 *yes) LIB_MBRTOWC= ;;
28534 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
28535 esac
28537 esac
28538 else
28539 LIB_MBRTOWC=
28544 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
28545 GL_COND_OBJ_MBRTOWC_TRUE=
28546 GL_COND_OBJ_MBRTOWC_FALSE='#'
28547 else
28548 GL_COND_OBJ_MBRTOWC_TRUE='#'
28549 GL_COND_OBJ_MBRTOWC_FALSE=
28552 if test -z "${GL_COND_OBJ_MBRTOWC_TRUE}" && test -z "${GL_COND_OBJ_MBRTOWC_FALSE}"; then
28553 GL_COND_OBJ_MBRTOWC_TRUE='#'
28554 GL_COND_OBJ_MBRTOWC_FALSE='#'
28557 if test -z "$GL_COND_OBJ_MBRTOWC_TRUE"; then :
28559 if test $REPLACE_MBSTATE_T = 1; then
28568 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
28578 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
28583 CFLAG_VISIBILITY=
28584 HAVE_VISIBILITY=0
28585 if test -n "$GCC"; then
28586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
28587 printf %s "checking whether the -Werror option is usable... " >&6; }
28588 if test ${gl_cv_cc_vis_werror+y}
28589 then :
28590 printf %s "(cached) " >&6
28591 else case e in #(
28592 e) gl_save_CFLAGS="$CFLAGS"
28593 CFLAGS="$CFLAGS -Werror"
28594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28595 /* end confdefs.h. */
28598 main (void)
28602 return 0;
28604 _ACEOF
28605 if ac_fn_c_try_compile "$LINENO"
28606 then :
28607 gl_cv_cc_vis_werror=yes
28608 else case e in #(
28609 e) gl_cv_cc_vis_werror=no ;;
28610 esac
28612 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28613 CFLAGS="$gl_save_CFLAGS"
28615 esac
28617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
28618 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
28619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
28620 printf %s "checking for simple visibility declarations... " >&6; }
28621 if test ${gl_cv_cc_visibility+y}
28622 then :
28623 printf %s "(cached) " >&6
28624 else case e in #(
28625 e) gl_save_CFLAGS="$CFLAGS"
28626 CFLAGS="$CFLAGS -fvisibility=hidden"
28627 if test $gl_cv_cc_vis_werror = yes; then
28628 CFLAGS="$CFLAGS -Werror"
28630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28631 /* end confdefs.h. */
28632 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
28633 extern __attribute__((__visibility__("default"))) int exportedvar;
28634 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
28635 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
28636 void dummyfunc (void);
28637 int hiddenvar;
28638 int exportedvar;
28639 int hiddenfunc (void) { return 51; }
28640 int exportedfunc (void) { return 1225736919; }
28641 void dummyfunc (void) {}
28644 main (void)
28648 return 0;
28650 _ACEOF
28651 if ac_fn_c_try_compile "$LINENO"
28652 then :
28653 gl_cv_cc_visibility=yes
28654 else case e in #(
28655 e) gl_cv_cc_visibility=no ;;
28656 esac
28658 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28659 CFLAGS="$gl_save_CFLAGS"
28661 esac
28663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
28664 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
28665 if test $gl_cv_cc_visibility = yes; then
28666 CFLAG_VISIBILITY="-fvisibility=hidden"
28667 HAVE_VISIBILITY=1
28673 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
28698 GL_GNULIB_MBRTOWC=1
28704 printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
28720 if case "$host_os" in
28721 mingw*) true ;;
28722 *) test $ac_cv_func_mbsinit = yes ;;
28723 esac \
28724 && test $ac_cv_func_mbrtowc = yes; then
28729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
28730 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
28731 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
28732 then :
28733 printf %s "(cached) " >&6
28734 else case e in #(
28736 case "$host_os" in
28737 # Guess no on AIX and OSF/1.
28738 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
28739 # Guess yes otherwise.
28740 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
28741 esac
28742 if test $LOCALE_JA != none; then
28743 if test "$cross_compiling" = yes
28744 then :
28746 else case e in #(
28747 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28748 /* end confdefs.h. */
28750 #include <locale.h>
28751 #include <string.h>
28752 #include <wchar.h>
28753 int main ()
28755 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28757 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
28758 mbstate_t state;
28759 wchar_t wc;
28761 memset (&state, '\0', sizeof (mbstate_t));
28762 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28763 if (mbsinit (&state))
28764 return 2;
28766 return 0;
28768 _ACEOF
28769 if ac_fn_c_try_run "$LINENO"
28770 then :
28771 gl_cv_func_mbrtowc_incomplete_state=yes
28772 else case e in #(
28773 e) gl_cv_func_mbrtowc_incomplete_state=no ;;
28774 esac
28776 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28777 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28778 esac
28781 else
28782 if test $LOCALE_FR_UTF8 != none; then
28783 if test "$cross_compiling" = yes
28784 then :
28786 else case e in #(
28787 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28788 /* end confdefs.h. */
28790 #include <locale.h>
28791 #include <string.h>
28792 #include <wchar.h>
28793 int main ()
28795 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28797 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
28798 mbstate_t state;
28799 wchar_t wc;
28801 memset (&state, '\0', sizeof (mbstate_t));
28802 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28803 if (mbsinit (&state))
28804 return 2;
28806 return 0;
28808 _ACEOF
28809 if ac_fn_c_try_run "$LINENO"
28810 then :
28811 gl_cv_func_mbrtowc_incomplete_state=yes
28812 else case e in #(
28813 e) gl_cv_func_mbrtowc_incomplete_state=no ;;
28814 esac
28816 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28817 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28818 esac
28824 esac
28826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
28827 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
28832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
28833 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
28834 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
28835 then :
28836 printf %s "(cached) " >&6
28837 else case e in #(
28839 case "$host_os" in
28840 # Guess no on Solaris 8.
28841 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
28842 # Guess yes otherwise.
28843 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
28844 esac
28845 if test $LOCALE_ZH_CN != none; then
28846 if test "$cross_compiling" = yes
28847 then :
28849 else case e in #(
28850 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28851 /* end confdefs.h. */
28853 #include <locale.h>
28854 #include <stdlib.h>
28855 #include <string.h>
28856 #include <wchar.h>
28857 int main ()
28859 /* This fails on Solaris 8:
28860 mbrtowc returns 2, and sets wc to 0x00F0.
28861 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
28862 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28864 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
28865 mbstate_t state;
28866 wchar_t wc;
28868 memset (&state, '\0', sizeof (mbstate_t));
28869 if (mbrtowc (&wc, input + 3, 6, &state) != 4
28870 && mbtowc (&wc, input + 3, 6) == 4)
28871 return 2;
28873 return 0;
28875 _ACEOF
28876 if ac_fn_c_try_run "$LINENO"
28877 then :
28878 gl_cv_func_mbrtowc_sanitycheck=yes
28879 else case e in #(
28880 e) gl_cv_func_mbrtowc_sanitycheck=no ;;
28881 esac
28883 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28884 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
28885 esac
28890 esac
28892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
28893 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
28895 REPLACE_MBSTATE_T=0
28896 case "$gl_cv_func_mbrtowc_incomplete_state" in
28897 *yes) ;;
28898 *) REPLACE_MBSTATE_T=1 ;;
28899 esac
28900 case "$gl_cv_func_mbrtowc_sanitycheck" in
28901 *yes) ;;
28902 *) REPLACE_MBSTATE_T=1 ;;
28903 esac
28904 else
28905 REPLACE_MBSTATE_T=1
28910 if test $ac_cv_func_mbsinit = no; then
28911 HAVE_MBSINIT=0
28912 ac_fn_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
28913 #include <wchar.h>
28915 " "$ac_c_undeclared_builtin_options" "CFLAGS"
28916 if test "x$ac_cv_have_decl_mbsinit" = xyes
28917 then :
28918 ac_have_decl=1
28919 else case e in #(
28920 e) ac_have_decl=0 ;;
28921 esac
28923 printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
28925 if test $ac_cv_have_decl_mbsinit = yes; then
28926 REPLACE_MBSINIT=1
28928 else
28929 if test $REPLACE_MBSTATE_T = 1; then
28930 REPLACE_MBSINIT=1
28931 else
28932 case "$host_os" in
28933 mingw*) REPLACE_MBSINIT=1 ;;
28934 esac
28939 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
28940 GL_COND_OBJ_MBSINIT_TRUE=
28941 GL_COND_OBJ_MBSINIT_FALSE='#'
28942 else
28943 GL_COND_OBJ_MBSINIT_TRUE='#'
28944 GL_COND_OBJ_MBSINIT_FALSE=
28947 if test -z "${GL_COND_OBJ_MBSINIT_TRUE}" && test -z "${GL_COND_OBJ_MBSINIT_FALSE}"; then
28948 GL_COND_OBJ_MBSINIT_TRUE='#'
28949 GL_COND_OBJ_MBSINIT_FALSE='#'
28952 if test -z "$GL_COND_OBJ_MBSINIT_TRUE"; then :
28973 GL_GNULIB_MBSINIT=1
28979 printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
28986 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
28987 if test "x$ac_cv_func_mbtowc" = xyes
28988 then :
28989 printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
28993 if test $ac_cv_func_mbtowc = no; then
28994 HAVE_MBTOWC=0
28995 else
28996 if false; then
28997 REPLACE_MBTOWC=1
29002 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
29003 GL_COND_OBJ_MBTOWC_TRUE=
29004 GL_COND_OBJ_MBTOWC_FALSE='#'
29005 else
29006 GL_COND_OBJ_MBTOWC_TRUE='#'
29007 GL_COND_OBJ_MBTOWC_FALSE=
29010 if test -z "${GL_COND_OBJ_MBTOWC_TRUE}" && test -z "${GL_COND_OBJ_MBTOWC_FALSE}"; then
29011 GL_COND_OBJ_MBTOWC_TRUE='#'
29012 GL_COND_OBJ_MBTOWC_FALSE='#'
29015 if test -z "$GL_COND_OBJ_MBTOWC_TRUE"; then :
29031 GL_GNULIB_MBTOWC=1
29037 printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
29043 if test $REPLACE_MEMCHR = 1; then
29044 GL_COND_OBJ_MEMCHR_TRUE=
29045 GL_COND_OBJ_MEMCHR_FALSE='#'
29046 else
29047 GL_COND_OBJ_MEMCHR_TRUE='#'
29048 GL_COND_OBJ_MEMCHR_FALSE=
29051 if test -z "${GL_COND_OBJ_MEMCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMCHR_FALSE}"; then
29052 GL_COND_OBJ_MEMCHR_TRUE='#'
29053 GL_COND_OBJ_MEMCHR_FALSE='#'
29056 if test -z "$GL_COND_OBJ_MEMCHR_TRUE"; then :
29059 ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
29060 if test "x$ac_cv_header_bp_sym_h" = xyes
29061 then :
29062 printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
29083 GL_GNULIB_MEMCHR=1
29089 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
29099 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
29100 if test "x$ac_cv_func_mempcpy" = xyes
29101 then :
29102 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
29106 if test $ac_cv_func_mempcpy = no; then
29107 HAVE_MEMPCPY=0
29111 if test $HAVE_MEMPCPY = 0; then
29112 GL_COND_OBJ_MEMPCPY_TRUE=
29113 GL_COND_OBJ_MEMPCPY_FALSE='#'
29114 else
29115 GL_COND_OBJ_MEMPCPY_TRUE='#'
29116 GL_COND_OBJ_MEMPCPY_FALSE=
29119 if test -z "${GL_COND_OBJ_MEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_MEMPCPY_FALSE}"; then
29120 GL_COND_OBJ_MEMPCPY_TRUE='#'
29121 GL_COND_OBJ_MEMPCPY_FALSE='#'
29124 if test -z "$GL_COND_OBJ_MEMPCPY_TRUE"; then :
29145 GL_GNULIB_MEMPCPY=1
29151 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
29160 if test $ac_cv_have_decl_memrchr = no; then
29161 HAVE_DECL_MEMRCHR=0
29164 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
29165 if test "x$ac_cv_func_memrchr" = xyes
29166 then :
29167 printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
29173 if test $ac_cv_func_memrchr = no; then
29174 GL_COND_OBJ_MEMRCHR_TRUE=
29175 GL_COND_OBJ_MEMRCHR_FALSE='#'
29176 else
29177 GL_COND_OBJ_MEMRCHR_TRUE='#'
29178 GL_COND_OBJ_MEMRCHR_FALSE=
29181 if test -z "${GL_COND_OBJ_MEMRCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMRCHR_FALSE}"; then
29182 GL_COND_OBJ_MEMRCHR_TRUE='#'
29183 GL_COND_OBJ_MEMRCHR_FALSE='#'
29186 if test -z "$GL_COND_OBJ_MEMRCHR_TRUE"; then :
29205 GL_GNULIB_MEMRCHR=1
29211 printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
29220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
29221 printf %s "checking whether mkdir handles trailing slash... " >&6; }
29222 if test ${gl_cv_func_mkdir_trailing_slash_works+y}
29223 then :
29224 printf %s "(cached) " >&6
29225 else case e in #(
29226 e) rm -rf conftest.dir
29227 if test "$cross_compiling" = yes
29228 then :
29229 case "$host_os" in
29230 # Guess yes on Linux systems.
29231 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
29232 # Guess yes on glibc systems.
29233 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
29234 # Guess yes on MSVC, no on mingw.
29235 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29236 /* end confdefs.h. */
29238 #ifdef _MSC_VER
29239 Known
29240 #endif
29242 _ACEOF
29243 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29244 $EGREP_TRADITIONAL "Known" >/dev/null 2>&1
29245 then :
29246 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
29247 else case e in #(
29248 e) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
29249 esac
29251 rm -rf conftest*
29254 # If we don't know, obey --enable-cross-guesses.
29255 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
29256 esac
29258 else case e in #(
29259 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29260 /* end confdefs.h. */
29262 #include <sys/types.h>
29263 #include <sys/stat.h>
29266 $gl_mda_defines
29269 main (void)
29271 return mkdir ("conftest.dir/", 0700);
29273 return 0;
29275 _ACEOF
29276 if ac_fn_c_try_run "$LINENO"
29277 then :
29278 gl_cv_func_mkdir_trailing_slash_works=yes
29279 else case e in #(
29280 e) gl_cv_func_mkdir_trailing_slash_works=no ;;
29281 esac
29283 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29284 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
29285 esac
29288 rm -rf conftest.dir
29290 esac
29292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
29293 printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
29294 case "$gl_cv_func_mkdir_trailing_slash_works" in
29295 *yes) ;;
29297 REPLACE_MKDIR=1
29299 esac
29301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
29302 printf %s "checking whether mkdir handles trailing dot... " >&6; }
29303 if test ${gl_cv_func_mkdir_trailing_dot_works+y}
29304 then :
29305 printf %s "(cached) " >&6
29306 else case e in #(
29307 e) rm -rf conftest.dir
29308 if test "$cross_compiling" = yes
29309 then :
29310 case "$host_os" in
29311 # Guess yes on glibc systems.
29312 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
29313 # Guess yes on musl systems.
29314 *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
29315 # Guess no on native Windows.
29316 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
29317 # If we don't know, obey --enable-cross-guesses.
29318 *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
29319 esac
29321 else case e in #(
29322 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29323 /* end confdefs.h. */
29325 #include <sys/types.h>
29326 #include <sys/stat.h>
29329 $gl_mda_defines
29332 main (void)
29334 return !mkdir ("conftest.dir/./", 0700);
29336 return 0;
29338 _ACEOF
29339 if ac_fn_c_try_run "$LINENO"
29340 then :
29341 gl_cv_func_mkdir_trailing_dot_works=yes
29342 else case e in #(
29343 e) gl_cv_func_mkdir_trailing_dot_works=no ;;
29344 esac
29346 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29347 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
29348 esac
29351 rm -rf conftest.dir
29354 esac
29356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
29357 printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
29358 case "$gl_cv_func_mkdir_trailing_dot_works" in
29359 *yes) ;;
29361 REPLACE_MKDIR=1
29363 printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
29366 esac
29369 if test $REPLACE_MKDIR = 1; then
29370 GL_COND_OBJ_MKDIR_TRUE=
29371 GL_COND_OBJ_MKDIR_FALSE='#'
29372 else
29373 GL_COND_OBJ_MKDIR_TRUE='#'
29374 GL_COND_OBJ_MKDIR_FALSE=
29377 if test -z "${GL_COND_OBJ_MKDIR_TRUE}" && test -z "${GL_COND_OBJ_MKDIR_FALSE}"; then
29378 GL_COND_OBJ_MKDIR_TRUE='#'
29379 GL_COND_OBJ_MKDIR_FALSE='#'
29391 GL_GNULIB_MKDIR=1
29397 printf "%s\n" "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
29407 if test $ac_cv_func_mkostemp != yes; then
29408 HAVE_MKOSTEMP=0
29412 if test $HAVE_MKOSTEMP = 0; then
29413 GL_COND_OBJ_MKOSTEMP_TRUE=
29414 GL_COND_OBJ_MKOSTEMP_FALSE='#'
29415 else
29416 GL_COND_OBJ_MKOSTEMP_TRUE='#'
29417 GL_COND_OBJ_MKOSTEMP_FALSE=
29420 if test -z "${GL_COND_OBJ_MKOSTEMP_TRUE}" && test -z "${GL_COND_OBJ_MKOSTEMP_FALSE}"; then
29421 GL_COND_OBJ_MKOSTEMP_TRUE='#'
29422 GL_COND_OBJ_MKOSTEMP_FALSE='#'
29425 if test -z "$GL_COND_OBJ_MKOSTEMP_TRUE"; then :
29433 printf "%s\n" "#define GNULIB_MKOSTEMP 1" >>confdefs.h
29445 GL_GNULIB_MKOSTEMP=1
29451 printf "%s\n" "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
29457 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
29458 GL_COND_OBJ_MSVC_INVAL_TRUE=
29459 GL_COND_OBJ_MSVC_INVAL_FALSE='#'
29460 else
29461 GL_COND_OBJ_MSVC_INVAL_TRUE='#'
29462 GL_COND_OBJ_MSVC_INVAL_FALSE=
29465 if test -z "${GL_COND_OBJ_MSVC_INVAL_TRUE}" && test -z "${GL_COND_OBJ_MSVC_INVAL_FALSE}"; then
29466 GL_COND_OBJ_MSVC_INVAL_TRUE='#'
29467 GL_COND_OBJ_MSVC_INVAL_FALSE='#'
29472 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
29473 GL_COND_OBJ_MSVC_NOTHROW_TRUE=
29474 GL_COND_OBJ_MSVC_NOTHROW_FALSE='#'
29475 else
29476 GL_COND_OBJ_MSVC_NOTHROW_TRUE='#'
29477 GL_COND_OBJ_MSVC_NOTHROW_FALSE=
29480 if test -z "${GL_COND_OBJ_MSVC_NOTHROW_TRUE}" && test -z "${GL_COND_OBJ_MSVC_NOTHROW_FALSE}"; then
29481 GL_COND_OBJ_MSVC_NOTHROW_TRUE='#'
29482 GL_COND_OBJ_MSVC_NOTHROW_FALSE='#'
29487 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
29499 if test $ac_cv_func_nl_langinfo = yes; then
29500 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
29501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
29502 printf %s "checking whether YESEXPR works... " >&6; }
29503 if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
29504 then :
29505 printf %s "(cached) " >&6
29506 else case e in #(
29507 e) if test "$cross_compiling" = yes
29508 then :
29510 case "$host_os" in
29511 # Guess no on irix systems.
29512 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
29513 # Guess yes elsewhere.
29514 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
29515 esac
29517 else case e in #(
29518 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29519 /* end confdefs.h. */
29520 #include <langinfo.h>
29523 main (void)
29525 return !*nl_langinfo(YESEXPR);
29528 return 0;
29530 _ACEOF
29531 if ac_fn_c_try_run "$LINENO"
29532 then :
29533 gl_cv_func_nl_langinfo_yesexpr_works=yes
29534 else case e in #(
29535 e) gl_cv_func_nl_langinfo_yesexpr_works=no ;;
29536 esac
29538 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29539 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
29540 esac
29544 esac
29546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
29547 printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
29548 case $gl_cv_func_nl_langinfo_yesexpr_works in
29549 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
29550 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
29551 esac
29553 printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
29555 # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
29556 case "$host_os" in
29557 solaris*) NL_LANGINFO_MTSAFE=0 ;;
29558 *) NL_LANGINFO_MTSAFE=1 ;;
29559 esac
29561 printf "%s\n" "#define NL_LANGINFO_MTSAFE $NL_LANGINFO_MTSAFE" >>confdefs.h
29563 if test $HAVE_LANGINFO_CODESET = 1 \
29564 && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
29565 && test $HAVE_LANGINFO_ALTMON = 1 \
29566 && test $HAVE_LANGINFO_ERA = 1 \
29567 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
29568 && test $NL_LANGINFO_MTSAFE = 1; then
29570 else
29571 REPLACE_NL_LANGINFO=1
29573 printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
29576 else
29577 HAVE_NL_LANGINFO=0
29579 if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
29580 LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
29581 else
29582 LIB_NL_LANGINFO=
29587 if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
29588 GL_COND_OBJ_NL_LANGINFO_TRUE=
29589 GL_COND_OBJ_NL_LANGINFO_FALSE='#'
29590 else
29591 GL_COND_OBJ_NL_LANGINFO_TRUE='#'
29592 GL_COND_OBJ_NL_LANGINFO_FALSE=
29595 if test -z "${GL_COND_OBJ_NL_LANGINFO_TRUE}" && test -z "${GL_COND_OBJ_NL_LANGINFO_FALSE}"; then
29596 GL_COND_OBJ_NL_LANGINFO_TRUE='#'
29597 GL_COND_OBJ_NL_LANGINFO_FALSE='#'
29601 if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
29602 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE=
29603 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE='#'
29604 else
29605 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE='#'
29606 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE=
29609 if test -z "${GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE}" && test -z "${GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE}"; then
29610 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE='#'
29611 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE='#'
29614 if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
29618 CFLAG_VISIBILITY=
29619 HAVE_VISIBILITY=0
29620 if test -n "$GCC"; then
29621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
29622 printf %s "checking whether the -Werror option is usable... " >&6; }
29623 if test ${gl_cv_cc_vis_werror+y}
29624 then :
29625 printf %s "(cached) " >&6
29626 else case e in #(
29627 e) gl_save_CFLAGS="$CFLAGS"
29628 CFLAGS="$CFLAGS -Werror"
29629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29630 /* end confdefs.h. */
29633 main (void)
29637 return 0;
29639 _ACEOF
29640 if ac_fn_c_try_compile "$LINENO"
29641 then :
29642 gl_cv_cc_vis_werror=yes
29643 else case e in #(
29644 e) gl_cv_cc_vis_werror=no ;;
29645 esac
29647 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29648 CFLAGS="$gl_save_CFLAGS"
29650 esac
29652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
29653 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
29654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
29655 printf %s "checking for simple visibility declarations... " >&6; }
29656 if test ${gl_cv_cc_visibility+y}
29657 then :
29658 printf %s "(cached) " >&6
29659 else case e in #(
29660 e) gl_save_CFLAGS="$CFLAGS"
29661 CFLAGS="$CFLAGS -fvisibility=hidden"
29662 if test $gl_cv_cc_vis_werror = yes; then
29663 CFLAGS="$CFLAGS -Werror"
29665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29666 /* end confdefs.h. */
29667 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
29668 extern __attribute__((__visibility__("default"))) int exportedvar;
29669 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
29670 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
29671 void dummyfunc (void);
29672 int hiddenvar;
29673 int exportedvar;
29674 int hiddenfunc (void) { return 51; }
29675 int exportedfunc (void) { return 1225736919; }
29676 void dummyfunc (void) {}
29679 main (void)
29683 return 0;
29685 _ACEOF
29686 if ac_fn_c_try_compile "$LINENO"
29687 then :
29688 gl_cv_cc_visibility=yes
29689 else case e in #(
29690 e) gl_cv_cc_visibility=no ;;
29691 esac
29693 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29694 CFLAGS="$gl_save_CFLAGS"
29696 esac
29698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
29699 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
29700 if test $gl_cv_cc_visibility = yes; then
29701 CFLAG_VISIBILITY="-fvisibility=hidden"
29702 HAVE_VISIBILITY=1
29708 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
29722 GL_GNULIB_NL_LANGINFO=1
29728 printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
29733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5
29734 printf %s "checking for obstacks that work with any size object... " >&6; }
29735 if test ${gl_cv_func_obstack+y}
29736 then :
29737 printf %s "(cached) " >&6
29738 else case e in #(
29739 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29740 /* end confdefs.h. */
29741 #include "obstack.h"
29742 void *obstack_chunk_alloc (size_t n) { return 0; }
29743 void obstack_chunk_free (void *p) { }
29744 /* Check that an internal function returns size_t, not int. */
29745 size_t _obstack_memory_used (struct obstack *);
29748 main (void)
29750 struct obstack mem;
29751 obstack_init (&mem);
29752 obstack_free (&mem, 0);
29755 return 0;
29757 _ACEOF
29758 if ac_fn_c_try_link "$LINENO"
29759 then :
29760 gl_cv_func_obstack=yes
29761 else case e in #(
29762 e) gl_cv_func_obstack=no ;;
29763 esac
29765 rm -f core conftest.err conftest.$ac_objext conftest.beam \
29766 conftest$ac_exeext conftest.$ac_ext ;;
29767 esac
29769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_obstack" >&5
29770 printf "%s\n" "$gl_cv_func_obstack" >&6; }
29771 if test "$gl_cv_func_obstack" = yes; then
29773 printf "%s\n" "#define HAVE_OBSTACK 1" >>confdefs.h
29778 if test "$gl_cv_func_obstack" != yes; then
29779 GL_COND_OBJ_OBSTACK_TRUE=
29780 GL_COND_OBJ_OBSTACK_FALSE='#'
29781 else
29782 GL_COND_OBJ_OBSTACK_TRUE='#'
29783 GL_COND_OBJ_OBSTACK_FALSE=
29786 if test -z "${GL_COND_OBJ_OBSTACK_TRUE}" && test -z "${GL_COND_OBJ_OBSTACK_FALSE}"; then
29787 GL_COND_OBJ_OBSTACK_TRUE='#'
29788 GL_COND_OBJ_OBSTACK_FALSE='#'
29794 case "$host_os" in
29795 mingw* | pw*)
29796 REPLACE_OPEN=1
29800 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
29801 REPLACE_OPEN=1
29805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
29806 printf %s "checking whether open recognizes a trailing slash... " >&6; }
29807 if test ${gl_cv_func_open_slash+y}
29808 then :
29809 printf %s "(cached) " >&6
29810 else case e in #(
29811 e) # Assume that if we have lstat, we can also check symlinks.
29812 if test $ac_cv_func_lstat = yes; then
29813 touch conftest.tmp
29814 ln -s conftest.tmp conftest.lnk
29816 if test "$cross_compiling" = yes
29817 then :
29819 case "$host_os" in
29820 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
29821 gl_cv_func_open_slash="guessing no" ;;
29823 gl_cv_func_open_slash="guessing yes" ;;
29824 esac
29826 else case e in #(
29827 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29828 /* end confdefs.h. */
29830 #include <fcntl.h>
29831 #if HAVE_UNISTD_H
29832 # include <unistd.h>
29833 #endif
29836 $gl_mda_defines
29838 int main ()
29840 int result = 0;
29841 #if HAVE_LSTAT
29842 if (open ("conftest.lnk/", O_RDONLY) != -1)
29843 result |= 1;
29844 #endif
29845 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
29846 result |= 2;
29847 return result;
29849 _ACEOF
29850 if ac_fn_c_try_run "$LINENO"
29851 then :
29852 gl_cv_func_open_slash=yes
29853 else case e in #(
29854 e) gl_cv_func_open_slash=no ;;
29855 esac
29857 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29858 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
29859 esac
29862 rm -f conftest.sl conftest.tmp conftest.lnk
29864 esac
29866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
29867 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
29868 case "$gl_cv_func_open_slash" in
29869 *no)
29871 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
29874 esac
29876 case "$gl_cv_func_open_slash" in
29877 *no)
29878 REPLACE_OPEN=1
29880 esac
29882 esac
29887 if test $REPLACE_OPEN = 1; then
29888 GL_COND_OBJ_OPEN_TRUE=
29889 GL_COND_OBJ_OPEN_FALSE='#'
29890 else
29891 GL_COND_OBJ_OPEN_TRUE='#'
29892 GL_COND_OBJ_OPEN_FALSE=
29895 if test -z "${GL_COND_OBJ_OPEN_TRUE}" && test -z "${GL_COND_OBJ_OPEN_FALSE}"; then
29896 GL_COND_OBJ_OPEN_TRUE='#'
29897 GL_COND_OBJ_OPEN_FALSE='#'
29900 if test -z "$GL_COND_OBJ_OPEN_TRUE"; then :
29917 GL_GNULIB_OPEN=1
29923 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
29931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Perl 5.005 or newer" >&5
29932 printf %s "checking for Perl 5.005 or newer... " >&6; }
29933 if test ${gl_cv_prog_perl+y}
29934 then :
29935 printf %s "(cached) " >&6
29936 else case e in #(
29938 if test "${PERL+set}" = set; then
29939 # 'PERL' is set in the user's environment.
29940 candidate_perl_names="$PERL"
29941 perl_specified=yes
29942 else
29943 candidate_perl_names='perl perl5'
29944 perl_specified=no
29947 gl_cv_prog_perl=no
29948 for perl in $candidate_perl_names; do
29949 # Run test in a subshell; some versions of sh will print an error if
29950 # an executable is not found, even if stderr is redirected.
29951 if ( $perl -e 'require 5.005; use File::Compare; use warnings;' ) > /dev/null 2>&1; then
29952 gl_cv_prog_perl=$perl
29953 break
29955 done
29957 esac
29959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_perl" >&5
29960 printf "%s\n" "$gl_cv_prog_perl" >&6; }
29962 if test "$gl_cv_prog_perl" != no; then
29963 PERL=$gl_cv_prog_perl
29964 else
29965 PERL="$am_missing_run perl"
29966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:
29967 WARNING: You don't seem to have perl5.005 or newer installed, or you lack
29968 a usable version of the Perl File::Compare module. As a result,
29969 you may be unable to run a few tests or to regenerate certain
29970 files if you modify the sources from which they are derived.
29971 " >&5
29972 printf "%s\n" "$as_me: WARNING:
29973 WARNING: You don't seem to have perl5.005 or newer installed, or you lack
29974 a usable version of the Perl File::Compare module. As a result,
29975 you may be unable to run a few tests or to regenerate certain
29976 files if you modify the sources from which they are derived.
29977 " >&2;}
29983 ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
29984 " "$ac_c_undeclared_builtin_options" "CFLAGS"
29985 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
29986 then :
29987 ac_have_decl=1
29988 else case e in #(
29989 e) ac_have_decl=0 ;;
29990 esac
29992 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
29994 ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
29995 " "$ac_c_undeclared_builtin_options" "CFLAGS"
29996 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
29997 then :
29998 ac_have_decl=1
29999 else case e in #(
30000 e) ac_have_decl=0 ;;
30001 esac
30003 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
30016 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
30017 if test "x$ac_cv_func_rawmemchr" = xyes
30018 then :
30019 printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
30023 if test $ac_cv_func_rawmemchr = no; then
30024 HAVE_RAWMEMCHR=0
30028 if test $HAVE_RAWMEMCHR = 0; then
30029 GL_COND_OBJ_RAWMEMCHR_TRUE=
30030 GL_COND_OBJ_RAWMEMCHR_FALSE='#'
30031 else
30032 GL_COND_OBJ_RAWMEMCHR_TRUE='#'
30033 GL_COND_OBJ_RAWMEMCHR_FALSE=
30036 if test -z "${GL_COND_OBJ_RAWMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_RAWMEMCHR_FALSE}"; then
30037 GL_COND_OBJ_RAWMEMCHR_TRUE='#'
30038 GL_COND_OBJ_RAWMEMCHR_FALSE='#'
30041 if test -z "$GL_COND_OBJ_RAWMEMCHR_TRUE"; then :
30060 GL_GNULIB_RAWMEMCHR=1
30066 printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
30073 if test $ac_cv_func_readlink = no; then
30074 HAVE_READLINK=0
30075 else
30076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
30077 printf %s "checking whether readlink signature is correct... " >&6; }
30078 if test ${gl_cv_decl_readlink_works+y}
30079 then :
30080 printf %s "(cached) " >&6
30081 else case e in #(
30082 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30083 /* end confdefs.h. */
30084 #include <unistd.h>
30085 /* Cause compilation failure if original declaration has wrong type. */
30086 ssize_t readlink (const char *, char *, size_t);
30088 main (void)
30092 return 0;
30094 _ACEOF
30095 if ac_fn_c_try_compile "$LINENO"
30096 then :
30097 gl_cv_decl_readlink_works=yes
30098 else case e in #(
30099 e) gl_cv_decl_readlink_works=no ;;
30100 esac
30102 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30103 esac
30105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
30106 printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
30107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
30108 printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
30109 if test ${gl_cv_func_readlink_trailing_slash+y}
30110 then :
30111 printf %s "(cached) " >&6
30112 else case e in #(
30113 e) # We have readlink, so assume ln -s works.
30114 ln -s conftest.no-such conftest.link
30115 ln -s conftest.link conftest.lnk2
30116 if test "$cross_compiling" = yes
30117 then :
30118 case "$host_os" in
30119 # Guess yes on Linux or glibc systems.
30120 linux-* | linux | *-gnu* | gnu*)
30121 gl_cv_func_readlink_trailing_slash="guessing yes" ;;
30122 # Guess no on AIX or HP-UX.
30123 aix* | hpux*)
30124 gl_cv_func_readlink_trailing_slash="guessing no" ;;
30125 # If we don't know, obey --enable-cross-guesses.
30127 gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
30128 esac
30130 else case e in #(
30131 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30132 /* end confdefs.h. */
30133 #include <unistd.h>
30136 main (void)
30138 char buf[20];
30139 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
30141 return 0;
30143 _ACEOF
30144 if ac_fn_c_try_run "$LINENO"
30145 then :
30146 gl_cv_func_readlink_trailing_slash=yes
30147 else case e in #(
30148 e) gl_cv_func_readlink_trailing_slash=no ;;
30149 esac
30151 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30152 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30153 esac
30156 rm -f conftest.link conftest.lnk2 ;;
30157 esac
30159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
30160 printf "%s\n" "$gl_cv_func_readlink_trailing_slash" >&6; }
30161 case "$gl_cv_func_readlink_trailing_slash" in
30162 *yes)
30163 if test "$gl_cv_decl_readlink_works" != yes; then
30164 REPLACE_READLINK=1
30169 printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
30171 REPLACE_READLINK=1
30173 esac
30175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
30176 printf %s "checking whether readlink truncates results correctly... " >&6; }
30177 if test ${gl_cv_func_readlink_truncate+y}
30178 then :
30179 printf %s "(cached) " >&6
30180 else case e in #(
30181 e) # We have readlink, so assume ln -s works.
30182 ln -s ab conftest.link
30183 if test "$cross_compiling" = yes
30184 then :
30185 case "$host_os" in
30186 # Guess yes on Linux or glibc systems.
30187 linux-* | linux | *-gnu* | gnu*)
30188 gl_cv_func_readlink_truncate="guessing yes" ;;
30189 # Guess no on AIX or HP-UX.
30190 aix* | hpux*)
30191 gl_cv_func_readlink_truncate="guessing no" ;;
30192 # If we don't know, obey --enable-cross-guesses.
30194 gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
30195 esac
30197 else case e in #(
30198 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30199 /* end confdefs.h. */
30200 #include <unistd.h>
30203 main (void)
30205 char c;
30206 return readlink ("conftest.link", &c, 1) != 1;
30208 return 0;
30210 _ACEOF
30211 if ac_fn_c_try_run "$LINENO"
30212 then :
30213 gl_cv_func_readlink_truncate=yes
30214 else case e in #(
30215 e) gl_cv_func_readlink_truncate=no ;;
30216 esac
30218 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30219 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30220 esac
30223 rm -f conftest.link conftest.lnk2 ;;
30224 esac
30226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
30227 printf "%s\n" "$gl_cv_func_readlink_truncate" >&6; }
30228 case $gl_cv_func_readlink_truncate in
30229 *yes)
30230 if test "$gl_cv_decl_readlink_works" != yes; then
30231 REPLACE_READLINK=1
30236 printf "%s\n" "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
30238 REPLACE_READLINK=1
30240 esac
30244 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
30245 GL_COND_OBJ_READLINK_TRUE=
30246 GL_COND_OBJ_READLINK_FALSE='#'
30247 else
30248 GL_COND_OBJ_READLINK_TRUE='#'
30249 GL_COND_OBJ_READLINK_FALSE=
30252 if test -z "${GL_COND_OBJ_READLINK_TRUE}" && test -z "${GL_COND_OBJ_READLINK_FALSE}"; then
30253 GL_COND_OBJ_READLINK_TRUE='#'
30254 GL_COND_OBJ_READLINK_FALSE='#'
30257 if test -z "$GL_COND_OBJ_READLINK_TRUE"; then :
30273 GL_GNULIB_READLINK=1
30279 printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
30286 if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 0; then
30288 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realloc (0, 0) returns nonnull" >&5
30289 printf %s "checking whether realloc (0, 0) returns nonnull... " >&6; }
30290 if test ${ac_cv_func_realloc_0_nonnull+y}
30291 then :
30292 printf %s "(cached) " >&6
30293 else case e in #(
30294 e) if test "$cross_compiling" = yes
30295 then :
30296 case "$host_os" in
30297 # Guess yes on platforms where we know the result.
30298 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
30299 | gnu* | *-musl* | midnightbsd* \
30300 | hpux* | solaris* | cygwin* | mingw* | msys* )
30301 ac_cv_func_realloc_0_nonnull="guessing yes" ;;
30302 # If we don't know, obey --enable-cross-guesses.
30303 *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
30304 esac
30306 else case e in #(
30307 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30308 /* end confdefs.h. */
30309 #include <stdlib.h>
30312 main (void)
30314 void *p = realloc (0, 0);
30315 int result = !p;
30316 free (p);
30317 return result;
30319 return 0;
30322 _ACEOF
30323 if ac_fn_c_try_run "$LINENO"
30324 then :
30325 ac_cv_func_realloc_0_nonnull=yes
30326 else case e in #(
30327 e) ac_cv_func_realloc_0_nonnull=no ;;
30328 esac
30330 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30331 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30332 esac
30336 esac
30338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
30339 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
30340 case $ac_cv_func_realloc_0_nonnull in #(
30341 *yes) :
30342 ;; #(
30343 *) :
30344 REPLACE_REALLOC_FOR_REALLOC_GNU=1 ;;
30345 esac
30349 if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
30358 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
30370 GL_GNULIB_REALLOC_GNU=1
30376 printf "%s\n" "#define GNULIB_TEST_REALLOC_GNU 1" >>confdefs.h
30383 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
30384 REPLACE_REALLOC_FOR_REALLOC_POSIX=1
30387 if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
30396 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
30408 GL_GNULIB_REALLOC_POSIX=1
30414 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
30423 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
30424 if test "x$ac_cv_func_reallocarray" = xyes
30425 then :
30426 printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
30430 if test "$ac_cv_func_reallocarray" = no; then
30431 HAVE_REALLOCARRAY=0
30432 elif test "$gl_cv_malloc_ptrdiff" = no; then
30433 REPLACE_REALLOCARRAY=1
30437 if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then
30438 GL_COND_OBJ_REALLOCARRAY_TRUE=
30439 GL_COND_OBJ_REALLOCARRAY_FALSE='#'
30440 else
30441 GL_COND_OBJ_REALLOCARRAY_TRUE='#'
30442 GL_COND_OBJ_REALLOCARRAY_FALSE=
30445 if test -z "${GL_COND_OBJ_REALLOCARRAY_TRUE}" && test -z "${GL_COND_OBJ_REALLOCARRAY_FALSE}"; then
30446 GL_COND_OBJ_REALLOCARRAY_TRUE='#'
30447 GL_COND_OBJ_REALLOCARRAY_FALSE='#'
30450 if test -z "$GL_COND_OBJ_REALLOCARRAY_TRUE"; then :
30457 printf "%s\n" "#define GNULIB_REALLOCARRAY 1" >>confdefs.h
30469 GL_GNULIB_REALLOCARRAY=1
30475 printf "%s\n" "#define GNULIB_TEST_REALLOCARRAY 1" >>confdefs.h
30481 # Check whether --with-included-regex was given.
30482 if test ${with_included_regex+y}
30483 then :
30484 withval=$with_included_regex;
30488 case $with_included_regex in #(
30489 yes|no) ac_use_included_regex=$with_included_regex
30492 # If the system regex support is good enough that it passes the
30493 # following run test, then default to *not* using the included regex.c.
30494 # If cross compiling, assume the test would fail and use the included
30495 # regex.c.
30498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
30499 printf %s "checking for working re_compile_pattern... " >&6; }
30500 if test ${gl_cv_func_re_compile_pattern_working+y}
30501 then :
30502 printf %s "(cached) " >&6
30503 else case e in #(
30504 e) if test "$cross_compiling" = yes
30505 then :
30506 case "$host_os" in
30507 # Guess no on native Windows.
30508 mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
30509 # Otherwise obey --enable-cross-guesses.
30510 *) gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
30511 esac
30513 else case e in #(
30514 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30515 /* end confdefs.h. */
30516 #include <regex.h>
30518 #include <locale.h>
30519 #include <limits.h>
30520 #include <string.h>
30522 #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
30523 # include <signal.h>
30524 # include <unistd.h>
30525 #endif
30527 #if HAVE_MALLOC_H
30528 # include <malloc.h>
30529 #endif
30531 #ifdef M_CHECK_ACTION
30532 /* Exit with distinguishable exit code. */
30533 static void sigabrt_no_core (int sig) { raise (SIGTERM); }
30534 #endif
30537 main (void)
30539 int result = 0;
30540 static struct re_pattern_buffer regex;
30541 unsigned char folded_chars[UCHAR_MAX + 1];
30542 int i;
30543 const char *s;
30544 struct re_registers regs;
30546 /* Some builds of glibc go into an infinite loop on this
30547 test. Use alarm to force death, and mallopt to avoid
30548 malloc recursion in diagnosing the corrupted heap. */
30549 #if HAVE_DECL_ALARM
30550 signal (SIGALRM, SIG_DFL);
30551 alarm (2);
30552 #endif
30553 #ifdef M_CHECK_ACTION
30554 signal (SIGABRT, sigabrt_no_core);
30555 mallopt (M_CHECK_ACTION, 2);
30556 #endif
30558 if (setlocale (LC_ALL, "en_US.UTF-8"))
30561 /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
30562 This test needs valgrind to catch the bug on Debian
30563 GNU/Linux 3.1 x86, but it might catch the bug better
30564 on other platforms and it shouldn't hurt to try the
30565 test here. */
30566 static char const pat[] = "insert into";
30567 static char const data[] =
30568 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
30569 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
30570 | RE_ICASE);
30571 memset (&regex, 0, sizeof regex);
30572 s = re_compile_pattern (pat, sizeof pat - 1, &regex);
30573 if (s)
30574 result |= 1;
30575 else
30577 if (re_search (&regex, data, sizeof data - 1,
30578 0, sizeof data - 1, &regs)
30579 != -1)
30580 result |= 1;
30581 regfree (&regex);
30586 /* This test is from glibc bug 15078.
30587 The test case is from Andreas Schwab in
30588 <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
30590 static char const pat[] = "[^x]x";
30591 static char const data[] =
30592 /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
30593 "\xe1\x80\x80"
30594 "\xe1\x80\xbb"
30595 "\xe1\x80\xbd"
30596 "\xe1\x80\x94"
30597 "\xe1\x80\xba"
30598 "\xe1\x80\xaf"
30599 "\xe1\x80\x95"
30600 "\xe1\x80\xba"
30601 "x";
30602 re_set_syntax (0);
30603 memset (&regex, 0, sizeof regex);
30604 s = re_compile_pattern (pat, sizeof pat - 1, &regex);
30605 if (s)
30606 result |= 1;
30607 else
30609 i = re_search (&regex, data, sizeof data - 1,
30610 0, sizeof data - 1, 0);
30611 if (i != 0 && i != 21)
30612 result |= 1;
30613 regfree (&regex);
30617 if (! setlocale (LC_ALL, "C"))
30618 return 1;
30621 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
30622 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
30623 memset (&regex, 0, sizeof regex);
30624 s = re_compile_pattern ("a[^x]b", 6, &regex);
30625 if (s)
30626 result |= 2;
30627 else
30629 /* This should fail, but succeeds for glibc-2.5. */
30630 if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
30631 result |= 2;
30632 regfree (&regex);
30635 /* This regular expression is from Spencer ere test number 75
30636 in grep-2.3. */
30637 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
30638 memset (&regex, 0, sizeof regex);
30639 for (i = 0; i <= UCHAR_MAX; i++)
30640 folded_chars[i] = i;
30641 regex.translate = folded_chars;
30642 s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
30643 /* This should fail with _Invalid character class name_ error. */
30644 if (!s)
30646 result |= 4;
30647 regfree (&regex);
30650 /* Ensure that [b-a] is diagnosed as invalid, when
30651 using RE_NO_EMPTY_RANGES. */
30652 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
30653 memset (&regex, 0, sizeof regex);
30654 s = re_compile_pattern ("a[b-a]", 6, &regex);
30655 if (s == 0)
30657 result |= 8;
30658 regfree (&regex);
30661 /* This should succeed, but does not for glibc-2.1.3. */
30662 memset (&regex, 0, sizeof regex);
30663 s = re_compile_pattern ("{1", 2, &regex);
30664 if (s)
30665 result |= 8;
30666 else
30667 regfree (&regex);
30669 /* The following example is derived from a problem report
30670 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
30671 memset (&regex, 0, sizeof regex);
30672 s = re_compile_pattern ("[an\371]*n", 7, &regex);
30673 if (s)
30674 result |= 8;
30675 else
30677 /* This should match, but does not for glibc-2.2.1. */
30678 if (re_match (&regex, "an", 2, 0, &regs) != 2)
30679 result |= 8;
30680 else
30682 free (regs.start);
30683 free (regs.end);
30685 regfree (&regex);
30688 memset (&regex, 0, sizeof regex);
30689 s = re_compile_pattern ("x", 1, &regex);
30690 if (s)
30691 result |= 8;
30692 else
30694 /* glibc-2.2.93 does not work with a negative RANGE argument. */
30695 if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
30696 result |= 8;
30697 else
30699 free (regs.start);
30700 free (regs.end);
30702 regfree (&regex);
30705 /* The version of regex.c in older versions of gnulib
30706 ignored RE_ICASE. Detect that problem too. */
30707 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
30708 memset (&regex, 0, sizeof regex);
30709 s = re_compile_pattern ("x", 1, &regex);
30710 if (s)
30711 result |= 16;
30712 else
30714 if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
30715 result |= 16;
30716 else
30718 free (regs.start);
30719 free (regs.end);
30721 regfree (&regex);
30724 /* Catch a bug reported by Vin Shelton in
30725 https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
30727 re_set_syntax (RE_SYNTAX_POSIX_BASIC
30728 & ~RE_CONTEXT_INVALID_DUP
30729 & ~RE_NO_EMPTY_RANGES);
30730 memset (&regex, 0, sizeof regex);
30731 s = re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, &regex);
30732 if (s)
30733 result |= 32;
30734 else
30735 regfree (&regex);
30737 /* REG_STARTEND was added to glibc on 2004-01-15.
30738 Reject older versions. */
30739 if (! REG_STARTEND)
30740 result |= 64;
30742 /* Matching with the compiled form of this regexp would provoke
30743 an assertion failure prior to glibc-2.28:
30744 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
30745 With glibc-2.28, compilation fails and reports the invalid
30746 back reference. */
30747 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
30748 memset (&regex, 0, sizeof regex);
30749 s = re_compile_pattern ("0|()0|\\\\1|0", 10, &regex);
30750 if (!s)
30752 memset (&regs, 0, sizeof regs);
30753 i = re_search (&regex, "x", 1, 0, 1, &regs);
30754 if (i != -1)
30755 result |= 64;
30756 if (0 <= i)
30758 free (regs.start);
30759 free (regs.end);
30761 regfree (&regex);
30763 else
30765 if (strcmp (s, "Invalid back reference"))
30766 result |= 64;
30769 /* glibc bug 11053. */
30770 re_set_syntax (RE_SYNTAX_POSIX_BASIC);
30771 memset (&regex, 0, sizeof regex);
30772 static char const pat_sub2[] = "\\\\(a*\\\\)*a*\\\\1";
30773 s = re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, &regex);
30774 if (s)
30775 result |= 64;
30776 else
30778 memset (&regs, 0, sizeof regs);
30779 static char const data[] = "a";
30780 int datalen = sizeof data - 1;
30781 i = re_search (&regex, data, datalen, 0, datalen, &regs);
30782 if (i != 0)
30783 result |= 64;
30784 else if (regs.num_regs < 2)
30785 result |= 64;
30786 else if (! (regs.start[0] == 0 && regs.end[0] == 1))
30787 result |= 64;
30788 else if (! (regs.start[1] == 0 && regs.end[1] == 0))
30789 result |= 64;
30790 regfree (&regex);
30791 free (regs.start);
30792 free (regs.end);
30795 #if 0
30796 /* It would be nice to reject hosts whose regoff_t values are too
30797 narrow (including glibc on hosts with 64-bit ptrdiff_t and
30798 32-bit int), but we should wait until glibc implements this
30799 feature. Otherwise, support for equivalence classes and
30800 multibyte collation symbols would always be broken except
30801 when compiling --without-included-regex. */
30802 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
30803 || sizeof (regoff_t) < sizeof (ssize_t))
30804 result |= 64;
30805 #endif
30807 return result;
30810 return 0;
30812 _ACEOF
30813 if ac_fn_c_try_run "$LINENO"
30814 then :
30815 gl_cv_func_re_compile_pattern_working=yes
30816 else case e in #(
30817 e) gl_cv_func_re_compile_pattern_working=no ;;
30818 esac
30820 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30821 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
30822 esac
30826 esac
30828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
30829 printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
30830 case "$gl_cv_func_re_compile_pattern_working" in #(
30831 *yes) ac_use_included_regex=no;; #(
30832 *no) ac_use_included_regex=yes;;
30833 esac
30835 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
30837 esac
30839 if test $ac_use_included_regex = yes; then
30841 printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
30844 printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
30847 printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
30850 printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
30853 printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
30856 printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
30859 printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
30862 printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
30865 printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
30868 printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
30871 printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
30874 printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
30877 printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
30880 printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
30883 printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
30886 printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
30889 printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
30894 if test $ac_use_included_regex = yes; then
30895 GL_COND_OBJ_REGEX_TRUE=
30896 GL_COND_OBJ_REGEX_FALSE='#'
30897 else
30898 GL_COND_OBJ_REGEX_TRUE='#'
30899 GL_COND_OBJ_REGEX_FALSE=
30902 if test -z "${GL_COND_OBJ_REGEX_TRUE}" && test -z "${GL_COND_OBJ_REGEX_FALSE}"; then
30903 GL_COND_OBJ_REGEX_TRUE='#'
30904 GL_COND_OBJ_REGEX_FALSE='#'
30907 if test -z "$GL_COND_OBJ_REGEX_TRUE"; then :
30915 ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
30916 if test "x$ac_cv_header_libintl_h" = xyes
30917 then :
30918 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
30923 ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
30924 " "$ac_c_undeclared_builtin_options" "CFLAGS"
30925 if test "x$ac_cv_have_decl_isblank" = xyes
30926 then :
30927 ac_have_decl=1
30928 else case e in #(
30929 e) ac_have_decl=0 ;;
30930 esac
30932 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
30942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
30943 printf %s "checking whether rename honors trailing slash on destination... " >&6; }
30944 if test ${gl_cv_func_rename_slash_dst_works+y}
30945 then :
30946 printf %s "(cached) " >&6
30947 else case e in #(
30948 e) rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
30949 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
30950 as_fn_error $? "cannot create temporary files" "$LINENO" 5
30951 # Assume that if we have lstat, we can also check symlinks.
30952 if test $ac_cv_func_lstat = yes; then
30953 ln -s conftest.f conftest.lnk
30955 if test "$cross_compiling" = yes
30956 then :
30957 case "$host_os" in
30958 # Guess yes on Linux systems.
30959 linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
30960 # Guess yes on glibc systems.
30961 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
30962 # Guess no on native Windows.
30963 mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
30964 # If we don't know, obey --enable-cross-guesses.
30965 *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
30966 esac
30968 else case e in #(
30969 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30970 /* end confdefs.h. */
30972 # include <stdio.h>
30973 # include <stdlib.h>
30976 main (void)
30978 int result = 0;
30979 if (rename ("conftest.f1", "conftest.f2/") == 0)
30980 result |= 1;
30981 if (rename ("conftest.d1", "conftest.d2/") != 0)
30982 result |= 2;
30983 #if HAVE_LSTAT
30984 if (rename ("conftest.f", "conftest.lnk/") == 0)
30985 result |= 4;
30986 #endif
30987 return result;
30990 return 0;
30992 _ACEOF
30993 if ac_fn_c_try_run "$LINENO"
30994 then :
30995 gl_cv_func_rename_slash_dst_works=yes
30996 else case e in #(
30997 e) gl_cv_func_rename_slash_dst_works=no ;;
30998 esac
31000 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31001 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
31002 esac
31005 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
31007 esac
31009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
31010 printf "%s\n" "$gl_cv_func_rename_slash_dst_works" >&6; }
31011 case "$gl_cv_func_rename_slash_dst_works" in
31012 *yes) ;;
31014 REPLACE_RENAME=1
31016 printf "%s\n" "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
31019 esac
31021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
31022 printf %s "checking whether rename honors trailing slash on source... " >&6; }
31023 if test ${gl_cv_func_rename_slash_src_works+y}
31024 then :
31025 printf %s "(cached) " >&6
31026 else case e in #(
31027 e) rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
31028 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
31029 as_fn_error $? "cannot create temporary files" "$LINENO" 5
31030 # Assume that if we have lstat, we can also check symlinks.
31031 if test $ac_cv_func_lstat = yes; then
31032 ln -s conftest.f conftest.lnk
31034 if test "$cross_compiling" = yes
31035 then :
31036 case "$host_os" in
31037 # Guess yes on Linux systems.
31038 linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
31039 # Guess yes on glibc systems.
31040 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
31041 # Guess yes on native Windows.
31042 mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
31043 # If we don't know, obey --enable-cross-guesses.
31044 *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
31045 esac
31047 else case e in #(
31048 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31049 /* end confdefs.h. */
31051 # include <stdio.h>
31052 # include <stdlib.h>
31055 main (void)
31057 int result = 0;
31058 if (rename ("conftest.f1/", "conftest.d3") == 0)
31059 result |= 1;
31060 if (rename ("conftest.d1/", "conftest.d2") != 0)
31061 result |= 2;
31062 #if HAVE_LSTAT
31063 if (rename ("conftest.lnk/", "conftest.f") == 0)
31064 result |= 4;
31065 #endif
31066 return result;
31069 return 0;
31071 _ACEOF
31072 if ac_fn_c_try_run "$LINENO"
31073 then :
31074 gl_cv_func_rename_slash_src_works=yes
31075 else case e in #(
31076 e) gl_cv_func_rename_slash_src_works=no ;;
31077 esac
31079 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31080 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
31081 esac
31084 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
31086 esac
31088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
31089 printf "%s\n" "$gl_cv_func_rename_slash_src_works" >&6; }
31090 case "$gl_cv_func_rename_slash_src_works" in
31091 *yes) ;;
31093 REPLACE_RENAME=1
31095 printf "%s\n" "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
31098 esac
31101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
31102 printf %s "checking whether rename manages hard links correctly... " >&6; }
31103 if test ${gl_cv_func_rename_link_works+y}
31104 then :
31105 printf %s "(cached) " >&6
31106 else case e in #(
31107 e) if test $ac_cv_func_link = yes; then
31108 if test $cross_compiling != yes; then
31109 rm -rf conftest.f conftest.f1 conftest.f2
31110 if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
31111 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
31112 if test "$cross_compiling" = yes
31113 then :
31116 else case e in #(
31117 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31118 /* end confdefs.h. */
31120 # include <errno.h>
31121 # include <stdio.h>
31122 # include <stdlib.h>
31123 # include <unistd.h>
31126 $gl_mda_defines
31129 main (void)
31131 int result = 0;
31132 if (rename ("conftest.f", "conftest.f1"))
31133 result |= 1;
31134 if (unlink ("conftest.f1"))
31135 result |= 2;
31137 /* Allow either the POSIX-required behavior, where the
31138 previous rename kept conftest.f, or the (better) NetBSD
31139 behavior, where it removed conftest.f. */
31140 if (rename ("conftest.f", "conftest.f") != 0
31141 && errno != ENOENT)
31142 result |= 4;
31144 if (rename ("conftest.f1", "conftest.f1") == 0)
31145 result |= 8;
31146 if (rename ("conftest.f2", "conftest.f2") != 0)
31147 result |= 16;
31148 return result;
31151 return 0;
31153 _ACEOF
31154 if ac_fn_c_try_run "$LINENO"
31155 then :
31156 gl_cv_func_rename_link_works=yes
31157 else case e in #(
31158 e) gl_cv_func_rename_link_works=no ;;
31159 esac
31161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31162 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
31163 esac
31166 else
31167 gl_cv_func_rename_link_works="guessing no"
31169 rm -rf conftest.f conftest.f1 conftest.f2
31170 else
31171 case "$host_os" in
31172 # Guess yes on Linux systems.
31173 linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
31174 # Guess yes on glibc systems.
31175 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
31176 # Guess yes on native Windows.
31177 mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
31178 # If we don't know, obey --enable-cross-guesses.
31179 *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
31180 esac
31182 else
31183 gl_cv_func_rename_link_works=yes
31186 esac
31188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
31189 printf "%s\n" "$gl_cv_func_rename_link_works" >&6; }
31190 case "$gl_cv_func_rename_link_works" in
31191 *yes) ;;
31193 REPLACE_RENAME=1
31195 printf "%s\n" "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
31198 esac
31200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
31201 printf %s "checking whether rename manages existing destinations correctly... " >&6; }
31202 if test ${gl_cv_func_rename_dest_works+y}
31203 then :
31204 printf %s "(cached) " >&6
31205 else case e in #(
31206 e) rm -rf conftest.f conftest.d1 conftest.d2
31207 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
31208 as_fn_error $? "cannot create temporary files" "$LINENO" 5
31209 if test "$cross_compiling" = yes
31210 then :
31211 case "$host_os" in
31212 # Guess yes on Linux systems.
31213 linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
31214 # Guess yes on glibc systems.
31215 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
31216 # Guess no on native Windows.
31217 mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
31218 # If we don't know, obey --enable-cross-guesses.
31219 *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
31220 esac
31222 else case e in #(
31223 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31224 /* end confdefs.h. */
31226 # include <stdio.h>
31227 # include <stdlib.h>
31230 main (void)
31232 int result = 0;
31233 if (rename ("conftest.d1", "conftest.d2") != 0)
31234 result |= 1;
31235 if (rename ("conftest.d2", "conftest.f") == 0)
31236 result |= 2;
31237 return result;
31240 return 0;
31242 _ACEOF
31243 if ac_fn_c_try_run "$LINENO"
31244 then :
31245 gl_cv_func_rename_dest_works=yes
31246 else case e in #(
31247 e) gl_cv_func_rename_dest_works=no ;;
31248 esac
31250 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31251 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
31252 esac
31255 rm -rf conftest.f conftest.d1 conftest.d2
31257 esac
31259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
31260 printf "%s\n" "$gl_cv_func_rename_dest_works" >&6; }
31261 case "$gl_cv_func_rename_dest_works" in
31262 *yes) ;;
31264 REPLACE_RENAME=1
31266 printf "%s\n" "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
31269 esac
31272 if test $REPLACE_RENAME = 1; then
31273 GL_COND_OBJ_RENAME_TRUE=
31274 GL_COND_OBJ_RENAME_FALSE='#'
31275 else
31276 GL_COND_OBJ_RENAME_TRUE='#'
31277 GL_COND_OBJ_RENAME_FALSE=
31280 if test -z "${GL_COND_OBJ_RENAME_TRUE}" && test -z "${GL_COND_OBJ_RENAME_FALSE}"; then
31281 GL_COND_OBJ_RENAME_TRUE='#'
31282 GL_COND_OBJ_RENAME_FALSE='#'
31294 GL_GNULIB_RENAME=1
31300 printf "%s\n" "#define GNULIB_TEST_RENAME 1" >>confdefs.h
31307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
31308 printf %s "checking whether rmdir works... " >&6; }
31309 if test ${gl_cv_func_rmdir_works+y}
31310 then :
31311 printf %s "(cached) " >&6
31312 else case e in #(
31313 e) mkdir conftest.dir
31314 touch conftest.file
31315 if test "$cross_compiling" = yes
31316 then :
31317 case "$host_os" in
31318 # Guess yes on Linux systems.
31319 linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
31320 # Guess yes on glibc systems.
31321 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
31322 # Guess no on native Windows.
31323 mingw*) gl_cv_func_rmdir_works="guessing no" ;;
31324 # If we don't know, obey --enable-cross-guesses.
31325 *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
31326 esac
31328 else case e in #(
31329 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31330 /* end confdefs.h. */
31331 #include <stdio.h>
31332 #include <errno.h>
31333 #if HAVE_UNISTD_H
31334 # include <unistd.h>
31335 #else /* on Windows with MSVC */
31336 # include <direct.h>
31337 #endif
31340 $gl_mda_defines
31343 main (void)
31345 int result = 0;
31346 if (!rmdir ("conftest.file/"))
31347 result |= 1;
31348 else if (errno != ENOTDIR)
31349 result |= 2;
31350 if (!rmdir ("conftest.dir/./"))
31351 result |= 4;
31352 return result;
31355 return 0;
31357 _ACEOF
31358 if ac_fn_c_try_run "$LINENO"
31359 then :
31360 gl_cv_func_rmdir_works=yes
31361 else case e in #(
31362 e) gl_cv_func_rmdir_works=no ;;
31363 esac
31365 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31366 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
31367 esac
31370 rm -rf conftest.dir conftest.file ;;
31371 esac
31373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
31374 printf "%s\n" "$gl_cv_func_rmdir_works" >&6; }
31375 case "$gl_cv_func_rmdir_works" in
31376 *yes) ;;
31378 REPLACE_RMDIR=1
31380 esac
31383 if test $REPLACE_RMDIR = 1; then
31384 GL_COND_OBJ_RMDIR_TRUE=
31385 GL_COND_OBJ_RMDIR_FALSE='#'
31386 else
31387 GL_COND_OBJ_RMDIR_TRUE='#'
31388 GL_COND_OBJ_RMDIR_FALSE=
31391 if test -z "${GL_COND_OBJ_RMDIR_TRUE}" && test -z "${GL_COND_OBJ_RMDIR_FALSE}"; then
31392 GL_COND_OBJ_RMDIR_TRUE='#'
31393 GL_COND_OBJ_RMDIR_FALSE='#'
31405 GL_GNULIB_RMDIR=1
31411 printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
31417 if test "$with_selinux" != no; then
31418 ac_fn_c_check_header_compile "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
31419 if test "x$ac_cv_header_selinux_selinux_h" = xyes
31420 then :
31421 printf "%s\n" "#define HAVE_SELINUX_SELINUX_H 1" >>confdefs.h
31426 if test "$ac_cv_header_selinux_selinux_h" = yes; then
31427 # We do have <selinux/selinux.h>, so do compile getfilecon.c
31428 # and arrange to use its wrappers.
31438 if test $gl_cv_have_include_next = yes; then
31439 gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
31440 else
31441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
31442 printf %s "checking absolute name of <selinux/selinux.h>... " >&6; }
31443 if test ${gl_cv_next_selinux_selinux_h+y}
31444 then :
31445 printf %s "(cached) " >&6
31446 else case e in #(
31448 if test $ac_cv_header_selinux_selinux_h = yes; then
31453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31454 /* end confdefs.h. */
31455 #include <selinux/selinux.h>
31456 _ACEOF
31457 case "$host_os" in
31458 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31459 *) gl_absname_cpp="$ac_cpp" ;;
31460 esac
31462 case "$host_os" in
31463 mingw*)
31464 gl_dirsep_regex='[/\\]'
31467 gl_dirsep_regex='\/'
31469 esac
31470 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31471 gl_header_literal_regex=`echo 'selinux/selinux.h' \
31472 | sed -e "$gl_make_literal_regex_sed"`
31473 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31474 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31475 s|^/[^/]|//&|
31480 gl_cv_absolute_selinux_selinux_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31481 sed -n "$gl_absolute_header_sed"`
31483 gl_header=$gl_cv_absolute_selinux_selinux_h
31484 gl_cv_next_selinux_selinux_h='"'$gl_header'"'
31485 else
31486 gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
31490 esac
31492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
31493 printf "%s\n" "$gl_cv_next_selinux_selinux_h" >&6; }
31495 NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
31497 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31498 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31499 gl_next_as_first_directive='<'selinux/selinux.h'>'
31500 else
31501 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31502 gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h
31504 NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive
31510 printf "%s\n" "#define getfilecon rpl_getfilecon" >>confdefs.h
31513 printf "%s\n" "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
31516 printf "%s\n" "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
31520 case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
31521 no:*) # already warned
31523 *:no)
31524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
31525 printf "%s\n" "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
31526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: GNU sed will be compiled without SELinux support." >&5
31527 printf "%s\n" "$as_me: WARNING: GNU sed will be compiled without SELinux support." >&2;}
31528 esac
31529 else
31530 # Do as if <selinux/selinux.h> does not exist, even if
31531 # AC_CHECK_HEADERS_ONCE has already determined that it exists.
31532 printf "%s\n" "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
31538 if test "$with_selinux" != no; then
31539 for ac_header in selinux/context.h
31540 do :
31541 ac_fn_c_check_header_compile "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
31542 if test "x$ac_cv_header_selinux_context_h" = xyes
31543 then :
31544 printf "%s\n" "#define HAVE_SELINUX_CONTEXT_H 1" >>confdefs.h
31545 GL_GENERATE_SELINUX_CONTEXT_H=false
31546 else case e in #(
31547 e) GL_GENERATE_SELINUX_CONTEXT_H=true ;;
31548 esac
31551 done
31552 else
31553 GL_GENERATE_SELINUX_CONTEXT_H=true
31558 GL_GENERATE_SELINUX_LABEL_H=true
31559 if test "$with_selinux" != no; then
31560 for ac_header in selinux/label.h
31561 do :
31562 ac_fn_c_check_header_compile "$LINENO" "selinux/label.h" "ac_cv_header_selinux_label_h" "$ac_includes_default"
31563 if test "x$ac_cv_header_selinux_label_h" = xyes
31564 then :
31565 printf "%s\n" "#define HAVE_SELINUX_LABEL_H 1" >>confdefs.h
31566 GL_GENERATE_SELINUX_LABEL_H=false
31569 done
31576 case "$GL_GENERATE_SELINUX_CONTEXT_H" in
31577 false) SELINUX_CONTEXT_H='' ;;
31578 true)
31579 if test -z "$SELINUX_CONTEXT_H"; then
31580 SELINUX_CONTEXT_H="${gl_source_base_prefix}selinux/context.h"
31583 *) echo "*** GL_GENERATE_SELINUX_CONTEXT_H is not set correctly" 1>&2; exit 1 ;;
31584 esac
31587 if $GL_GENERATE_SELINUX_CONTEXT_H; then
31588 GL_GENERATE_SELINUX_CONTEXT_H_TRUE=
31589 GL_GENERATE_SELINUX_CONTEXT_H_FALSE='#'
31590 else
31591 GL_GENERATE_SELINUX_CONTEXT_H_TRUE='#'
31592 GL_GENERATE_SELINUX_CONTEXT_H_FALSE=
31595 if test -z "${GL_GENERATE_SELINUX_CONTEXT_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_CONTEXT_H_FALSE}"; then
31596 GL_GENERATE_SELINUX_CONTEXT_H_TRUE='#'
31597 GL_GENERATE_SELINUX_CONTEXT_H_FALSE='#'
31608 case "$GL_GENERATE_SELINUX_LABEL_H" in
31609 false) SELINUX_LABEL_H='' ;;
31610 true)
31611 if test -z "$SELINUX_LABEL_H"; then
31612 SELINUX_LABEL_H="${gl_source_base_prefix}selinux/label.h"
31615 *) echo "*** GL_GENERATE_SELINUX_LABEL_H is not set correctly" 1>&2; exit 1 ;;
31616 esac
31619 if $GL_GENERATE_SELINUX_LABEL_H; then
31620 GL_GENERATE_SELINUX_LABEL_H_TRUE=
31621 GL_GENERATE_SELINUX_LABEL_H_FALSE='#'
31622 else
31623 GL_GENERATE_SELINUX_LABEL_H_TRUE='#'
31624 GL_GENERATE_SELINUX_LABEL_H_FALSE=
31627 if test -z "${GL_GENERATE_SELINUX_LABEL_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_LABEL_H_FALSE}"; then
31628 GL_GENERATE_SELINUX_LABEL_H_TRUE='#'
31629 GL_GENERATE_SELINUX_LABEL_H_FALSE='#'
31638 if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
31639 GL_COND_OBJ_GETFILECON_TRUE=
31640 GL_COND_OBJ_GETFILECON_FALSE='#'
31641 else
31642 GL_COND_OBJ_GETFILECON_TRUE='#'
31643 GL_COND_OBJ_GETFILECON_FALSE=
31646 if test -z "${GL_COND_OBJ_GETFILECON_TRUE}" && test -z "${GL_COND_OBJ_GETFILECON_FALSE}"; then
31647 GL_COND_OBJ_GETFILECON_TRUE='#'
31648 GL_COND_OBJ_GETFILECON_FALSE='#'
31656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
31657 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
31658 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
31659 then :
31660 printf %s "(cached) " >&6
31661 else case e in #(
31662 e) case "$host_os" in
31663 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
31664 *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
31665 gl_cv_func_setlocale_null_all_mtsafe=no ;;
31666 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
31667 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
31668 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
31669 # If we don't know, obey --enable-cross-guesses.
31671 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
31672 esac
31674 esac
31676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
31677 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
31678 case "$host_os" in
31679 mingw*) ;;
31681 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
31682 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
31685 esac
31686 case "$gl_cv_func_setlocale_null_all_mtsafe" in
31687 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
31688 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
31689 esac
31691 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
31694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
31695 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
31696 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
31697 then :
31698 printf %s "(cached) " >&6
31699 else case e in #(
31700 e) case "$host_os" in
31701 # Guess no on OpenBSD, AIX.
31702 openbsd* | aix*)
31703 gl_cv_func_setlocale_null_one_mtsafe=no ;;
31704 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
31705 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
31706 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
31707 # If we don't know, obey --enable-cross-guesses.
31709 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
31710 esac
31712 esac
31714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
31715 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
31716 case "$host_os" in
31717 mingw*) ;;
31719 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
31720 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
31723 esac
31724 case "$gl_cv_func_setlocale_null_one_mtsafe" in
31725 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
31726 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
31727 esac
31729 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
31732 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
31733 case "$host_os" in
31734 mingw*) LIB_SETLOCALE_NULL= ;;
31738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
31739 printf %s "checking whether imported symbols can be declared weak... " >&6; }
31740 if test ${gl_cv_have_weak+y}
31741 then :
31742 printf %s "(cached) " >&6
31743 else case e in #(
31744 e) case "$host_os" in
31745 cygwin*)
31746 gl_cv_have_weak="guessing no"
31749 gl_cv_have_weak=no
31750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31751 /* end confdefs.h. */
31752 extern void xyzzy ();
31753 #pragma weak xyzzy
31755 main (void)
31757 xyzzy();
31759 return 0;
31761 _ACEOF
31762 if ac_fn_c_try_link "$LINENO"
31763 then :
31764 gl_cv_have_weak=maybe
31766 rm -f core conftest.err conftest.$ac_objext conftest.beam \
31767 conftest$ac_exeext conftest.$ac_ext
31768 if test $gl_cv_have_weak = maybe; then
31769 if test "$cross_compiling" = yes
31770 then :
31771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31772 /* end confdefs.h. */
31773 #ifdef __ELF__
31774 Extensible Linking Format
31775 #endif
31777 _ACEOF
31778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31779 $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1
31780 then :
31781 gl_cv_have_weak="guessing yes"
31782 else case e in #(
31783 e) gl_cv_have_weak="guessing no" ;;
31784 esac
31786 rm -rf conftest*
31789 else case e in #(
31790 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31791 /* end confdefs.h. */
31793 #include <stdio.h>
31794 #pragma weak fputs
31795 int main ()
31797 return (fputs == NULL);
31799 _ACEOF
31800 if ac_fn_c_try_run "$LINENO"
31801 then :
31802 gl_cv_have_weak=yes
31803 else case e in #(
31804 e) gl_cv_have_weak=no ;;
31805 esac
31807 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31808 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
31809 esac
31814 esac
31815 case " $LDFLAGS " in
31816 *" -static "*) gl_cv_have_weak=no ;;
31817 esac
31818 case "$gl_cv_have_weak" in
31819 *yes)
31820 case "$host_os" in
31821 freebsd* | dragonfly* | midnightbsd*)
31822 : > conftest1.c
31823 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
31824 cat <<EOF > conftest2.c
31825 #include <pthread.h>
31826 #pragma weak pthread_mutexattr_gettype
31827 int main ()
31829 return (pthread_mutexattr_gettype != NULL);
31832 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
31833 || gl_cv_have_weak=no
31834 rm -f conftest1.c libempty.so conftest2.c conftest
31836 esac
31838 esac
31840 esac
31842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
31843 printf "%s\n" "$gl_cv_have_weak" >&6; }
31844 case "$gl_cv_have_weak" in
31845 *yes)
31847 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
31850 esac
31852 case "$gl_cv_have_weak" in
31853 *yes) LIB_SETLOCALE_NULL= ;;
31854 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
31855 esac
31857 esac
31858 else
31859 LIB_SETLOCALE_NULL=
31864 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
31865 GL_COND_OBJ_SETLOCALE_LOCK_TRUE=
31866 GL_COND_OBJ_SETLOCALE_LOCK_FALSE='#'
31867 else
31868 GL_COND_OBJ_SETLOCALE_LOCK_TRUE='#'
31869 GL_COND_OBJ_SETLOCALE_LOCK_FALSE=
31872 if test -z "${GL_COND_OBJ_SETLOCALE_LOCK_TRUE}" && test -z "${GL_COND_OBJ_SETLOCALE_LOCK_FALSE}"; then
31873 GL_COND_OBJ_SETLOCALE_LOCK_TRUE='#'
31874 GL_COND_OBJ_SETLOCALE_LOCK_FALSE='#'
31877 if test -z "$GL_COND_OBJ_SETLOCALE_LOCK_TRUE"; then :
31882 CFLAG_VISIBILITY=
31883 HAVE_VISIBILITY=0
31884 if test -n "$GCC"; then
31885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
31886 printf %s "checking whether the -Werror option is usable... " >&6; }
31887 if test ${gl_cv_cc_vis_werror+y}
31888 then :
31889 printf %s "(cached) " >&6
31890 else case e in #(
31891 e) gl_save_CFLAGS="$CFLAGS"
31892 CFLAGS="$CFLAGS -Werror"
31893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31894 /* end confdefs.h. */
31897 main (void)
31901 return 0;
31903 _ACEOF
31904 if ac_fn_c_try_compile "$LINENO"
31905 then :
31906 gl_cv_cc_vis_werror=yes
31907 else case e in #(
31908 e) gl_cv_cc_vis_werror=no ;;
31909 esac
31911 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31912 CFLAGS="$gl_save_CFLAGS"
31914 esac
31916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
31917 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
31918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
31919 printf %s "checking for simple visibility declarations... " >&6; }
31920 if test ${gl_cv_cc_visibility+y}
31921 then :
31922 printf %s "(cached) " >&6
31923 else case e in #(
31924 e) gl_save_CFLAGS="$CFLAGS"
31925 CFLAGS="$CFLAGS -fvisibility=hidden"
31926 if test $gl_cv_cc_vis_werror = yes; then
31927 CFLAGS="$CFLAGS -Werror"
31929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31930 /* end confdefs.h. */
31931 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
31932 extern __attribute__((__visibility__("default"))) int exportedvar;
31933 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
31934 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
31935 void dummyfunc (void);
31936 int hiddenvar;
31937 int exportedvar;
31938 int hiddenfunc (void) { return 51; }
31939 int exportedfunc (void) { return 1225736919; }
31940 void dummyfunc (void) {}
31943 main (void)
31947 return 0;
31949 _ACEOF
31950 if ac_fn_c_try_compile "$LINENO"
31951 then :
31952 gl_cv_cc_visibility=yes
31953 else case e in #(
31954 e) gl_cv_cc_visibility=no ;;
31955 esac
31957 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31958 CFLAGS="$gl_save_CFLAGS"
31960 esac
31962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
31963 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
31964 if test $gl_cv_cc_visibility = yes; then
31965 CFLAG_VISIBILITY="-fvisibility=hidden"
31966 HAVE_VISIBILITY=1
31972 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
31987 GL_GNULIB_SETLOCALE_NULL=1
31993 printf "%s\n" "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
31998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
31999 printf %s "checking for ssize_t... " >&6; }
32000 if test ${gt_cv_ssize_t+y}
32001 then :
32002 printf %s "(cached) " >&6
32003 else case e in #(
32004 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32005 /* end confdefs.h. */
32006 #include <sys/types.h>
32008 main (void)
32010 int x = sizeof (ssize_t *) + sizeof (ssize_t);
32011 return !x;
32013 return 0;
32015 _ACEOF
32016 if ac_fn_c_try_compile "$LINENO"
32017 then :
32018 gt_cv_ssize_t=yes
32019 else case e in #(
32020 e) gt_cv_ssize_t=no ;;
32021 esac
32023 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32024 esac
32026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
32027 printf "%s\n" "$gt_cv_ssize_t" >&6; }
32028 if test $gt_cv_ssize_t = no; then
32030 printf "%s\n" "#define ssize_t int" >>confdefs.h
32038 case "$host_os" in
32039 mingw*)
32040 REPLACE_STAT=1
32043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
32044 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
32045 if test ${gl_cv_func_stat_file_slash+y}
32046 then :
32047 printf %s "(cached) " >&6
32048 else case e in #(
32049 e) touch conftest.tmp
32050 # Assume that if we have lstat, we can also check symlinks.
32051 if test $ac_cv_func_lstat = yes; then
32052 ln -s conftest.tmp conftest.lnk
32054 if test "$cross_compiling" = yes
32055 then :
32056 case "$host_os" in
32057 # Guess yes on Linux systems.
32058 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
32059 # Guess yes on glibc systems.
32060 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
32061 # If we don't know, obey --enable-cross-guesses.
32062 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
32063 esac
32065 else case e in #(
32066 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32067 /* end confdefs.h. */
32068 #include <sys/stat.h>
32071 main (void)
32073 int result = 0;
32074 struct stat st;
32075 if (!stat ("conftest.tmp/", &st))
32076 result |= 1;
32077 #if HAVE_LSTAT
32078 if (!stat ("conftest.lnk/", &st))
32079 result |= 2;
32080 #endif
32081 return result;
32084 return 0;
32086 _ACEOF
32087 if ac_fn_c_try_run "$LINENO"
32088 then :
32089 gl_cv_func_stat_file_slash=yes
32090 else case e in #(
32091 e) gl_cv_func_stat_file_slash=no ;;
32092 esac
32094 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32095 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32096 esac
32099 rm -f conftest.tmp conftest.lnk ;;
32100 esac
32102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
32103 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
32104 case $gl_cv_func_stat_file_slash in
32105 *no)
32106 REPLACE_STAT=1
32108 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
32110 esac
32111 case $host_os in
32112 solaris*)
32113 REPLACE_FSTAT=1 ;;
32114 esac
32116 esac
32119 if test $REPLACE_STAT = 1; then
32120 GL_COND_OBJ_STAT_TRUE=
32121 GL_COND_OBJ_STAT_FALSE='#'
32122 else
32123 GL_COND_OBJ_STAT_TRUE='#'
32124 GL_COND_OBJ_STAT_FALSE=
32127 if test -z "${GL_COND_OBJ_STAT_TRUE}" && test -z "${GL_COND_OBJ_STAT_FALSE}"; then
32128 GL_COND_OBJ_STAT_TRUE='#'
32129 GL_COND_OBJ_STAT_FALSE='#'
32132 if test -z "$GL_COND_OBJ_STAT_TRUE"; then :
32134 case "$host_os" in
32135 mingw*)
32144 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
32147 esac
32164 GL_GNULIB_STAT=1
32170 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
32178 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>
32179 #include <sys/stat.h>
32181 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
32182 then :
32184 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
32186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
32187 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
32188 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
32189 then :
32190 printf %s "(cached) " >&6
32191 else case e in #(
32192 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32193 /* end confdefs.h. */
32195 #include <sys/types.h>
32196 #include <sys/stat.h>
32197 #if HAVE_SYS_TIME_H
32198 # include <sys/time.h>
32199 #endif
32200 #include <time.h>
32201 struct timespec ts;
32202 struct stat st;
32205 main (void)
32208 st.st_atim = ts;
32211 return 0;
32213 _ACEOF
32214 if ac_fn_c_try_compile "$LINENO"
32215 then :
32216 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
32217 else case e in #(
32218 e) ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no ;;
32219 esac
32221 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32222 esac
32224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
32225 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
32226 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
32228 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
32231 else case e in #(
32232 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>
32233 #include <sys/stat.h>
32235 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
32236 then :
32238 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
32241 else case e in #(
32242 e) ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
32243 #include <sys/stat.h>
32245 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
32246 then :
32248 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
32251 else case e in #(
32252 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>
32253 #include <sys/stat.h>
32255 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
32256 then :
32258 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
32263 esac
32266 esac
32269 esac
32276 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>
32277 #include <sys/stat.h>
32279 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
32280 then :
32282 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
32285 else case e in #(
32286 e) ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
32287 #include <sys/stat.h>
32289 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
32290 then :
32292 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
32295 else case e in #(
32296 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>
32297 #include <sys/stat.h>
32299 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
32300 then :
32302 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
32307 esac
32310 esac
32315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alignas and alignof" >&5
32316 printf %s "checking for alignas and alignof... " >&6; }
32317 if test ${gl_cv_header_working_stdalign_h+y}
32318 then :
32319 printf %s "(cached) " >&6
32320 else case e in #(
32321 e) gl_save_CFLAGS=$CFLAGS
32322 for gl_working in "yes, keywords" "yes, <stdalign.h> macros"; do
32323 case $gl_working in #(
32324 *stdalign.h*) :
32325 CFLAGS="$gl_save_CFLAGS -DINCLUDE_STDALIGN_H" ;; #(
32326 *) :
32328 esac
32329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32330 /* end confdefs.h. */
32331 #include <stdint.h>
32332 #ifdef INCLUDE_STDALIGN_H
32333 #include <stdalign.h>
32334 #endif
32335 #include <stddef.h>
32337 /* Test that alignof yields a result consistent with offsetof.
32338 This catches GCC bug 52023
32339 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
32340 #ifdef __cplusplus
32341 template <class t> struct alignof_helper { char a; t b; };
32342 # define ao(type) offsetof (alignof_helper<type>, b)
32343 #else
32344 # define ao(type) offsetof (struct { char a; type b; }, b)
32345 #endif
32346 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
32347 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
32348 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
32350 /* Test alignas only on platforms where gnulib can help. */
32351 #if \
32352 ((defined __cplusplus && 201103 <= __cplusplus) \
32353 || (__TINYC__ && defined __attribute__) \
32354 || (defined __APPLE__ && defined __MACH__ \
32355 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
32356 : __GNUC__) \
32357 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
32358 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
32359 || 1300 <= _MSC_VER)
32360 struct alignas_test { char c; char alignas (8) alignas_8; };
32361 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
32362 ? 1 : -1];
32363 #endif
32366 main (void)
32370 return 0;
32372 _ACEOF
32373 if ac_fn_c_try_compile "$LINENO"
32374 then :
32375 gl_cv_header_working_stdalign_h=$gl_working
32376 else case e in #(
32377 e) gl_cv_header_working_stdalign_h=no ;;
32378 esac
32380 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32382 CFLAGS=$gl_save_CFLAGS
32383 test "$gl_cv_header_working_stdalign_h" != no && break
32384 done ;;
32385 esac
32387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
32388 printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
32390 GL_GENERATE_STDALIGN_H=false
32391 case $gl_cv_header_working_stdalign_h in #(
32392 no) :
32393 GL_GENERATE_STDALIGN_H=true ;; #(
32394 yes*keyword*) :
32396 printf "%s\n" "#define HAVE_C_ALIGNASOF 1" >>confdefs.h
32397 ;; #(
32398 *) :
32400 esac
32410 case "$GL_GENERATE_STDALIGN_H" in
32411 false) STDALIGN_H='' ;;
32412 true)
32413 if test -z "$STDALIGN_H"; then
32414 STDALIGN_H="${gl_source_base_prefix}stdalign.h"
32417 *) echo "*** GL_GENERATE_STDALIGN_H is not set correctly" 1>&2; exit 1 ;;
32418 esac
32421 if $GL_GENERATE_STDALIGN_H; then
32422 GL_GENERATE_STDALIGN_H_TRUE=
32423 GL_GENERATE_STDALIGN_H_FALSE='#'
32424 else
32425 GL_GENERATE_STDALIGN_H_TRUE='#'
32426 GL_GENERATE_STDALIGN_H_FALSE=
32429 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
32430 GL_GENERATE_STDALIGN_H_TRUE='#'
32431 GL_GENERATE_STDALIGN_H_FALSE='#'
32440 GL_GENERATE_STDARG_H=false
32441 NEXT_STDARG_H='<stdarg.h>'
32442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
32443 printf %s "checking for va_copy... " >&6; }
32444 if test ${gl_cv_func_va_copy+y}
32445 then :
32446 printf %s "(cached) " >&6
32447 else case e in #(
32448 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32449 /* end confdefs.h. */
32450 #include <stdarg.h>
32452 main (void)
32455 #ifndef va_copy
32456 void (*func) (va_list, va_list) = va_copy;
32457 #endif
32460 return 0;
32462 _ACEOF
32463 if ac_fn_c_try_compile "$LINENO"
32464 then :
32465 gl_cv_func_va_copy=yes
32466 else case e in #(
32467 e) gl_cv_func_va_copy=no ;;
32468 esac
32470 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32472 esac
32474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
32475 printf "%s\n" "$gl_cv_func_va_copy" >&6; }
32476 if test $gl_cv_func_va_copy = no; then
32477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32478 /* end confdefs.h. */
32479 #if defined _AIX && !defined __GNUC__
32480 AIX vaccine
32481 #endif
32483 _ACEOF
32484 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32485 $EGREP_TRADITIONAL "vaccine" >/dev/null 2>&1
32486 then :
32487 gl_aixcc=yes
32488 else case e in #(
32489 e) gl_aixcc=no ;;
32490 esac
32492 rm -rf conftest*
32494 if test $gl_aixcc = yes; then
32495 GL_GENERATE_STDARG_H=true
32504 if test $gl_cv_have_include_next = yes; then
32505 gl_cv_next_stdarg_h='<'stdarg.h'>'
32506 else
32507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
32508 printf %s "checking absolute name of <stdarg.h>... " >&6; }
32509 if test ${gl_cv_next_stdarg_h+y}
32510 then :
32511 printf %s "(cached) " >&6
32512 else case e in #(
32516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32517 /* end confdefs.h. */
32518 #include <stdarg.h>
32519 _ACEOF
32520 case "$host_os" in
32521 aix*) gl_absname_cpp="$ac_cpp -C" ;;
32522 *) gl_absname_cpp="$ac_cpp" ;;
32523 esac
32525 case "$host_os" in
32526 mingw*)
32527 gl_dirsep_regex='[/\\]'
32530 gl_dirsep_regex='\/'
32532 esac
32533 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32534 gl_header_literal_regex=`echo 'stdarg.h' \
32535 | sed -e "$gl_make_literal_regex_sed"`
32536 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32537 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32538 s|^/[^/]|//&|
32543 gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32544 sed -n "$gl_absolute_header_sed"`
32546 gl_header=$gl_cv_absolute_stdarg_h
32547 gl_cv_next_stdarg_h='"'$gl_header'"'
32550 esac
32552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
32553 printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
32555 NEXT_STDARG_H=$gl_cv_next_stdarg_h
32557 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32558 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32559 gl_next_as_first_directive='<'stdarg.h'>'
32560 else
32561 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32562 gl_next_as_first_directive=$gl_cv_next_stdarg_h
32564 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
32569 if test "$gl_cv_next_stdarg_h" = '""'; then
32570 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
32571 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
32573 else
32576 exec 9>&6 6>/dev/null
32578 if test ${gl_cv_func___va_copy+y}
32579 then :
32580 printf %s "(cached) " >&6
32581 else case e in #(
32583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32584 /* end confdefs.h. */
32585 #include <stdarg.h>
32587 main (void)
32590 #ifndef __va_copy
32591 error, bail out
32592 #endif
32595 return 0;
32597 _ACEOF
32598 if ac_fn_c_try_compile "$LINENO"
32599 then :
32600 gl_cv_func___va_copy=yes
32601 else case e in #(
32602 e) gl_cv_func___va_copy=no ;;
32603 esac
32605 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32606 esac
32610 exec 6>&9 9>&-
32613 if test $gl_cv_func___va_copy = yes; then
32615 printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
32617 else
32620 printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
32631 case "$GL_GENERATE_STDARG_H" in
32632 false) STDARG_H='' ;;
32633 true)
32634 if test -z "$STDARG_H"; then
32635 STDARG_H="${gl_source_base_prefix}stdarg.h"
32638 *) echo "*** GL_GENERATE_STDARG_H is not set correctly" 1>&2; exit 1 ;;
32639 esac
32642 if $GL_GENERATE_STDARG_H; then
32643 GL_GENERATE_STDARG_H_TRUE=
32644 GL_GENERATE_STDARG_H_FALSE='#'
32645 else
32646 GL_GENERATE_STDARG_H_TRUE='#'
32647 GL_GENERATE_STDARG_H_FALSE=
32650 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
32651 GL_GENERATE_STDARG_H_TRUE='#'
32652 GL_GENERATE_STDARG_H_FALSE='#'
32661 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bool, true, false" >&5
32662 printf %s "checking for bool, true, false... " >&6; }
32663 if test ${gl_cv_c_bool+y}
32664 then :
32665 printf %s "(cached) " >&6
32666 else case e in #(
32667 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32668 /* end confdefs.h. */
32670 #if true == false
32671 #error "true == false"
32672 #endif
32673 extern bool b;
32674 bool b = true == false;
32675 _ACEOF
32676 if ac_fn_c_try_compile "$LINENO"
32677 then :
32678 gl_cv_c_bool=yes
32679 else case e in #(
32680 e) gl_cv_c_bool=no ;;
32681 esac
32683 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
32684 esac
32686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_bool" >&5
32687 printf "%s\n" "$gl_cv_c_bool" >&6; }
32688 if test "$gl_cv_c_bool" = yes; then
32690 printf "%s\n" "#define HAVE_C_BOOL 1" >>confdefs.h
32699 if test $ac_cv_header_stdckdint_h = yes; then
32700 GL_GENERATE_STDCKDINT_H=false
32701 else
32702 GL_GENERATE_STDCKDINT_H=true
32708 case "$GL_GENERATE_STDCKDINT_H" in
32709 false) STDCKDINT_H='' ;;
32710 true)
32711 if test -z "$STDCKDINT_H"; then
32712 STDCKDINT_H="${gl_source_base_prefix}stdckdint.h"
32715 *) echo "*** GL_GENERATE_STDCKDINT_H is not set correctly" 1>&2; exit 1 ;;
32716 esac
32719 if $GL_GENERATE_STDCKDINT_H; then
32720 GL_GENERATE_STDCKDINT_H_TRUE=
32721 GL_GENERATE_STDCKDINT_H_FALSE='#'
32722 else
32723 GL_GENERATE_STDCKDINT_H_TRUE='#'
32724 GL_GENERATE_STDCKDINT_H_FALSE=
32727 if test -z "${GL_GENERATE_STDCKDINT_H_TRUE}" && test -z "${GL_GENERATE_STDCKDINT_H_FALSE}"; then
32728 GL_GENERATE_STDCKDINT_H_TRUE='#'
32729 GL_GENERATE_STDCKDINT_H_FALSE='#'
32747 case "$GL_GENERATE_STDDEF_H" in
32748 false) STDDEF_H='' ;;
32749 true)
32750 if test -z "$STDDEF_H"; then
32751 STDDEF_H="${gl_source_base_prefix}stddef.h"
32754 *) echo "*** GL_GENERATE_STDDEF_H is not set correctly" 1>&2; exit 1 ;;
32755 esac
32758 if $GL_GENERATE_STDDEF_H; then
32759 GL_GENERATE_STDDEF_H_TRUE=
32760 GL_GENERATE_STDDEF_H_FALSE='#'
32761 else
32762 GL_GENERATE_STDDEF_H_TRUE='#'
32763 GL_GENERATE_STDDEF_H_FALSE=
32766 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
32767 GL_GENERATE_STDDEF_H_TRUE='#'
32768 GL_GENERATE_STDDEF_H_FALSE='#'
32781 case "$GL_GENERATE_STDINT_H" in
32782 false) STDINT_H='' ;;
32783 true)
32784 if test -z "$STDINT_H"; then
32785 STDINT_H="${gl_source_base_prefix}stdint.h"
32788 *) echo "*** GL_GENERATE_STDINT_H is not set correctly" 1>&2; exit 1 ;;
32789 esac
32792 if $GL_GENERATE_STDINT_H; then
32793 GL_GENERATE_STDINT_H_TRUE=
32794 GL_GENERATE_STDINT_H_FALSE='#'
32795 else
32796 GL_GENERATE_STDINT_H_TRUE='#'
32797 GL_GENERATE_STDINT_H_FALSE=
32800 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
32801 GL_GENERATE_STDINT_H_TRUE='#'
32802 GL_GENERATE_STDINT_H_FALSE='#'
32813 case "$GL_GENERATE_LIMITS_H" in
32814 false) LIMITS_H='' ;;
32815 true)
32816 if test -z "$LIMITS_H"; then
32817 LIMITS_H="${gl_source_base_prefix}limits.h"
32820 *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
32821 esac
32824 if $GL_GENERATE_LIMITS_H; then
32825 GL_GENERATE_LIMITS_H_TRUE=
32826 GL_GENERATE_LIMITS_H_FALSE='#'
32827 else
32828 GL_GENERATE_LIMITS_H_TRUE='#'
32829 GL_GENERATE_LIMITS_H_FALSE=
32832 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32833 GL_GENERATE_LIMITS_H_TRUE='#'
32834 GL_GENERATE_LIMITS_H_FALSE='#'
32850 if test $REPLACE_STDIO_READ_FUNCS = 1; then
32851 GL_COND_OBJ_STDIO_READ_TRUE=
32852 GL_COND_OBJ_STDIO_READ_FALSE='#'
32853 else
32854 GL_COND_OBJ_STDIO_READ_TRUE='#'
32855 GL_COND_OBJ_STDIO_READ_FALSE=
32858 if test -z "${GL_COND_OBJ_STDIO_READ_TRUE}" && test -z "${GL_COND_OBJ_STDIO_READ_FALSE}"; then
32859 GL_COND_OBJ_STDIO_READ_TRUE='#'
32860 GL_COND_OBJ_STDIO_READ_FALSE='#'
32864 if test $REPLACE_STDIO_WRITE_FUNCS = 1; then
32865 GL_COND_OBJ_STDIO_WRITE_TRUE=
32866 GL_COND_OBJ_STDIO_WRITE_FALSE='#'
32867 else
32868 GL_COND_OBJ_STDIO_WRITE_TRUE='#'
32869 GL_COND_OBJ_STDIO_WRITE_FALSE=
32872 if test -z "${GL_COND_OBJ_STDIO_WRITE_TRUE}" && test -z "${GL_COND_OBJ_STDIO_WRITE_FALSE}"; then
32873 GL_COND_OBJ_STDIO_WRITE_TRUE='#'
32874 GL_COND_OBJ_STDIO_WRITE_FALSE='#'
32886 GL_GNULIB_FSCANF=1
32892 printf "%s\n" "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
32898 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
32910 GL_GNULIB_SCANF=1
32916 printf "%s\n" "#define GNULIB_TEST_SCANF 1" >>confdefs.h
32922 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
32934 GL_GNULIB_FGETC=1
32940 printf "%s\n" "#define GNULIB_TEST_FGETC 1" >>confdefs.h
32953 GL_GNULIB_GETC=1
32959 printf "%s\n" "#define GNULIB_TEST_GETC 1" >>confdefs.h
32972 GL_GNULIB_GETCHAR=1
32978 printf "%s\n" "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
32991 GL_GNULIB_FGETS=1
32997 printf "%s\n" "#define GNULIB_TEST_FGETS 1" >>confdefs.h
33010 GL_GNULIB_FREAD=1
33016 printf "%s\n" "#define GNULIB_TEST_FREAD 1" >>confdefs.h
33029 GL_GNULIB_FPRINTF=1
33035 printf "%s\n" "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
33048 GL_GNULIB_PRINTF=1
33054 printf "%s\n" "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
33067 GL_GNULIB_VFPRINTF=1
33073 printf "%s\n" "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
33086 GL_GNULIB_VPRINTF=1
33092 printf "%s\n" "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
33105 GL_GNULIB_FPUTC=1
33111 printf "%s\n" "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
33124 GL_GNULIB_PUTC=1
33130 printf "%s\n" "#define GNULIB_TEST_PUTC 1" >>confdefs.h
33143 GL_GNULIB_PUTCHAR=1
33149 printf "%s\n" "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
33162 GL_GNULIB_FPUTS=1
33168 printf "%s\n" "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
33181 GL_GNULIB_PUTS=1
33187 printf "%s\n" "#define GNULIB_TEST_PUTS 1" >>confdefs.h
33200 GL_GNULIB_FWRITE=1
33206 printf "%s\n" "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
33224 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
33225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
33226 printf %s "checking for working strerror function... " >&6; }
33227 if test ${gl_cv_func_working_strerror+y}
33228 then :
33229 printf %s "(cached) " >&6
33230 else case e in #(
33231 e) if test "$cross_compiling" = yes
33232 then :
33233 case "$host_os" in
33234 # Guess yes on glibc systems.
33235 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
33236 # Guess yes on musl systems.
33237 *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
33238 # If we don't know, obey --enable-cross-guesses.
33239 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
33240 esac
33242 else case e in #(
33243 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33244 /* end confdefs.h. */
33245 #include <string.h>
33248 main (void)
33250 if (!*strerror (-2)) return 1;
33252 return 0;
33254 _ACEOF
33255 if ac_fn_c_try_run "$LINENO"
33256 then :
33257 gl_cv_func_working_strerror=yes
33258 else case e in #(
33259 e) gl_cv_func_working_strerror=no ;;
33260 esac
33262 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33263 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33264 esac
33268 esac
33270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
33271 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
33272 case "$gl_cv_func_working_strerror" in
33273 *yes) ;;
33275 REPLACE_STRERROR=1
33277 esac
33279 case "$gl_cv_func_strerror_r_works" in
33280 *no) REPLACE_STRERROR=1 ;;
33281 esac
33283 else
33284 REPLACE_STRERROR=1
33288 if test $REPLACE_STRERROR = 1; then
33289 GL_COND_OBJ_STRERROR_TRUE=
33290 GL_COND_OBJ_STRERROR_FALSE='#'
33291 else
33292 GL_COND_OBJ_STRERROR_TRUE='#'
33293 GL_COND_OBJ_STRERROR_FALSE=
33296 if test -z "${GL_COND_OBJ_STRERROR_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_FALSE}"; then
33297 GL_COND_OBJ_STRERROR_TRUE='#'
33298 GL_COND_OBJ_STRERROR_FALSE='#'
33303 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
33320 GL_GNULIB_STRERROR=1
33326 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
33333 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
33334 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE=
33335 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#'
33336 else
33337 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#'
33338 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE=
33341 if test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_FALSE}"; then
33342 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#'
33343 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#'
33346 if test -z "$GL_COND_OBJ_STRERROR_OVERRIDE_TRUE"; then :
33352 if test $ac_cv_header_sys_socket_h != yes; then
33353 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
33354 if test "x$ac_cv_header_winsock2_h" = xyes
33355 then :
33356 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
33361 if test "$ac_cv_header_winsock2_h" = yes; then
33362 HAVE_WINSOCK2_H=1
33363 UNISTD_H_HAVE_WINSOCK2_H=1
33364 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
33365 else
33366 HAVE_WINSOCK2_H=0
33388 ac_fn_c_check_func "$LINENO" "strverscmp" "ac_cv_func_strverscmp"
33389 if test "x$ac_cv_func_strverscmp" = xyes
33390 then :
33391 printf "%s\n" "#define HAVE_STRVERSCMP 1" >>confdefs.h
33395 if test $ac_cv_func_strverscmp = no; then
33396 HAVE_STRVERSCMP=0
33400 if test $HAVE_STRVERSCMP = 0; then
33401 GL_COND_OBJ_STRVERSCMP_TRUE=
33402 GL_COND_OBJ_STRVERSCMP_FALSE='#'
33403 else
33404 GL_COND_OBJ_STRVERSCMP_TRUE='#'
33405 GL_COND_OBJ_STRVERSCMP_FALSE=
33408 if test -z "${GL_COND_OBJ_STRVERSCMP_TRUE}" && test -z "${GL_COND_OBJ_STRVERSCMP_FALSE}"; then
33409 GL_COND_OBJ_STRVERSCMP_TRUE='#'
33410 GL_COND_OBJ_STRVERSCMP_FALSE='#'
33413 if test -z "$GL_COND_OBJ_STRVERSCMP_TRUE"; then :
33434 GL_GNULIB_STRVERSCMP=1
33440 printf "%s\n" "#define GNULIB_TEST_STRVERSCMP 1" >>confdefs.h
33472 printf "%s\n" "#define GNULIB_TEMPNAME 1" >>confdefs.h
33491 printf "%s\n" "#define GNULIB_STDIO_SINGLE_THREAD 1" >>confdefs.h
33494 printf "%s\n" "#define USE_UNLOCKED_IO GNULIB_STDIO_SINGLE_THREAD" >>confdefs.h
33514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
33515 printf %s "checking for variable-length arrays... " >&6; }
33516 if test ${ac_cv_c_vararrays+y}
33517 then :
33518 printf %s "(cached) " >&6
33519 else case e in #(
33520 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33521 /* end confdefs.h. */
33522 #ifdef __STDC_NO_VLA__
33523 defined
33524 #endif
33526 _ACEOF
33527 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33528 $EGREP_TRADITIONAL "defined" >/dev/null 2>&1
33529 then :
33530 ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
33531 else case e in #(
33532 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33533 /* end confdefs.h. */
33534 /* Test for VLA support. This test is partly inspired
33535 from examples in the C standard. Use at least two VLA
33536 functions to detect the GCC 3.4.3 bug described in:
33537 https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html
33539 #ifdef __STDC_NO_VLA__
33540 syntax error;
33541 #else
33542 extern int n;
33543 int B[100];
33544 int fvla (int m, int C[m][m]);
33547 simple (int count, int all[static count])
33549 return all[count - 1];
33553 fvla (int m, int C[m][m])
33555 typedef int VLA[m][m];
33556 VLA x;
33557 int D[m];
33558 static int (*q)[m] = &B;
33559 int (*s)[n] = q;
33560 return C && &x[0][0] == &D[0] && &D[0] == s[0];
33562 #endif
33565 main (void)
33569 return 0;
33571 _ACEOF
33572 if ac_fn_c_try_compile "$LINENO"
33573 then :
33574 ac_cv_c_vararrays=yes
33575 else case e in #(
33576 e) ac_cv_c_vararrays=no ;;
33577 esac
33579 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33580 esac
33582 rm -rf conftest*
33584 esac
33586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
33587 printf "%s\n" "$ac_cv_c_vararrays" >&6; }
33588 if test "$ac_cv_c_vararrays" = yes; then
33590 printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h
33592 elif test "$ac_cv_c_vararrays" = no; then
33594 printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h
33599 # Check whether --with-packager was given.
33600 if test ${with_packager+y}
33601 then :
33602 withval=$with_packager; case $withval in
33603 yes|no) ;;
33605 printf "%s\n" "#define PACKAGE_PACKAGER \"$withval\"" >>confdefs.h
33607 esac
33613 # Check whether --with-packager-version was given.
33614 if test ${with_packager_version+y}
33615 then :
33616 withval=$with_packager_version; case $withval in
33617 yes|no) ;;
33619 printf "%s\n" "#define PACKAGE_PACKAGER_VERSION \"$withval\"" >>confdefs.h
33621 esac
33627 # Check whether --with-packager-bug-reports was given.
33628 if test ${with_packager_bug_reports+y}
33629 then :
33630 withval=$with_packager_bug_reports; case $withval in
33631 yes|no) ;;
33633 printf "%s\n" "#define PACKAGE_PACKAGER_BUG_REPORTS \"$withval\"" >>confdefs.h
33635 esac
33640 if test "X$with_packager" = "X" && \
33641 test "X$with_packager_version$with_packager_bug_reports" != "X"
33642 then
33643 as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
33669 if case "$host_os" in
33670 mingw*) true ;;
33671 *) test $ac_cv_func_mbsinit = yes ;;
33672 esac \
33673 && test $ac_cv_func_mbrtowc = yes; then
33678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
33679 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
33680 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
33681 then :
33682 printf %s "(cached) " >&6
33683 else case e in #(
33685 case "$host_os" in
33686 # Guess no on AIX and OSF/1.
33687 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
33688 # Guess yes otherwise.
33689 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
33690 esac
33691 if test $LOCALE_JA != none; then
33692 if test "$cross_compiling" = yes
33693 then :
33695 else case e in #(
33696 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33697 /* end confdefs.h. */
33699 #include <locale.h>
33700 #include <string.h>
33701 #include <wchar.h>
33702 int main ()
33704 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
33706 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
33707 mbstate_t state;
33708 wchar_t wc;
33710 memset (&state, '\0', sizeof (mbstate_t));
33711 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
33712 if (mbsinit (&state))
33713 return 2;
33715 return 0;
33717 _ACEOF
33718 if ac_fn_c_try_run "$LINENO"
33719 then :
33720 gl_cv_func_mbrtowc_incomplete_state=yes
33721 else case e in #(
33722 e) gl_cv_func_mbrtowc_incomplete_state=no ;;
33723 esac
33725 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33726 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33727 esac
33730 else
33731 if test $LOCALE_FR_UTF8 != none; then
33732 if test "$cross_compiling" = yes
33733 then :
33735 else case e in #(
33736 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33737 /* end confdefs.h. */
33739 #include <locale.h>
33740 #include <string.h>
33741 #include <wchar.h>
33742 int main ()
33744 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33746 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
33747 mbstate_t state;
33748 wchar_t wc;
33750 memset (&state, '\0', sizeof (mbstate_t));
33751 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
33752 if (mbsinit (&state))
33753 return 2;
33755 return 0;
33757 _ACEOF
33758 if ac_fn_c_try_run "$LINENO"
33759 then :
33760 gl_cv_func_mbrtowc_incomplete_state=yes
33761 else case e in #(
33762 e) gl_cv_func_mbrtowc_incomplete_state=no ;;
33763 esac
33765 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33766 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33767 esac
33773 esac
33775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
33776 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
33781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
33782 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
33783 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
33784 then :
33785 printf %s "(cached) " >&6
33786 else case e in #(
33788 case "$host_os" in
33789 # Guess no on Solaris 8.
33790 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
33791 # Guess yes otherwise.
33792 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
33793 esac
33794 if test $LOCALE_ZH_CN != none; then
33795 if test "$cross_compiling" = yes
33796 then :
33798 else case e in #(
33799 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33800 /* end confdefs.h. */
33802 #include <locale.h>
33803 #include <stdlib.h>
33804 #include <string.h>
33805 #include <wchar.h>
33806 int main ()
33808 /* This fails on Solaris 8:
33809 mbrtowc returns 2, and sets wc to 0x00F0.
33810 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
33811 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
33813 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
33814 mbstate_t state;
33815 wchar_t wc;
33817 memset (&state, '\0', sizeof (mbstate_t));
33818 if (mbrtowc (&wc, input + 3, 6, &state) != 4
33819 && mbtowc (&wc, input + 3, 6) == 4)
33820 return 2;
33822 return 0;
33824 _ACEOF
33825 if ac_fn_c_try_run "$LINENO"
33826 then :
33827 gl_cv_func_mbrtowc_sanitycheck=yes
33828 else case e in #(
33829 e) gl_cv_func_mbrtowc_sanitycheck=no ;;
33830 esac
33832 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33833 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33834 esac
33839 esac
33841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
33842 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
33844 REPLACE_MBSTATE_T=0
33845 case "$gl_cv_func_mbrtowc_incomplete_state" in
33846 *yes) ;;
33847 *) REPLACE_MBSTATE_T=1 ;;
33848 esac
33849 case "$gl_cv_func_mbrtowc_sanitycheck" in
33850 *yes) ;;
33851 *) REPLACE_MBSTATE_T=1 ;;
33852 esac
33853 else
33854 REPLACE_MBSTATE_T=1
33859 if test $ac_cv_func_wcrtomb = no; then
33860 HAVE_WCRTOMB=0
33861 ac_fn_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
33862 #include <wchar.h>
33864 " "$ac_c_undeclared_builtin_options" "CFLAGS"
33865 if test "x$ac_cv_have_decl_wcrtomb" = xyes
33866 then :
33867 ac_have_decl=1
33868 else case e in #(
33869 e) ac_have_decl=0 ;;
33870 esac
33872 printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
33874 if test $ac_cv_have_decl_wcrtomb = yes; then
33875 REPLACE_WCRTOMB=1
33877 else
33878 if test $REPLACE_WCRTOMB = 0; then
33884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
33885 printf %s "checking whether wcrtomb works in the C locale... " >&6; }
33886 if test ${gl_cv_func_wcrtomb_works+y}
33887 then :
33888 printf %s "(cached) " >&6
33889 else case e in #(
33890 e) if test "$cross_compiling" = yes
33891 then :
33892 case "$host_os" in
33893 # Guess no on Android.
33894 linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
33895 # Guess yes otherwise.
33896 *) gl_cv_func_wcrtomb_works="guessing yes";;
33897 esac
33899 else case e in #(
33900 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33901 /* end confdefs.h. */
33903 #include <string.h>
33904 #include <stdlib.h>
33905 #include <wchar.h>
33906 int main ()
33908 mbstate_t state;
33909 char out[64];
33910 int count;
33911 memset (&state, 0, sizeof (state));
33912 out[0] = 'x';
33913 count = wcrtomb (out, L'a', &state);
33914 return !(count == 1 && out[0] == 'a');
33916 _ACEOF
33917 if ac_fn_c_try_run "$LINENO"
33918 then :
33919 gl_cv_func_wcrtomb_works=yes
33920 else case e in #(
33921 e) gl_cv_func_wcrtomb_works=no ;;
33922 esac
33924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33925 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
33926 esac
33930 esac
33932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
33933 printf "%s\n" "$gl_cv_func_wcrtomb_works" >&6; }
33934 case "$gl_cv_func_wcrtomb_works" in
33935 *yes) ;;
33937 printf "%s\n" "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
33939 REPLACE_WCRTOMB=1 ;;
33940 esac
33942 if test $REPLACE_WCRTOMB = 0; then
33943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
33944 printf %s "checking whether wcrtomb return value is correct... " >&6; }
33945 if test ${gl_cv_func_wcrtomb_retval+y}
33946 then :
33947 printf %s "(cached) " >&6
33948 else case e in #(
33950 case "$host_os" in
33951 # Guess no on AIX 4, OSF/1, Solaris, native Windows.
33952 aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
33953 # Guess yes otherwise.
33954 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
33955 esac
33956 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
33957 if test "$cross_compiling" = yes
33958 then :
33960 else case e in #(
33961 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33962 /* end confdefs.h. */
33964 #include <locale.h>
33965 #include <string.h>
33966 #include <wchar.h>
33967 #include <stdlib.h>
33968 int main ()
33970 int result = 0;
33971 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
33973 if (wcrtomb (NULL, 0, NULL) != 1)
33974 result |= 1;
33976 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33978 if (wcrtomb (NULL, 0, NULL) != 1)
33979 result |= 2;
33981 wchar_t wc = (wchar_t) 0xBADFACE;
33982 if (mbtowc (&wc, "\303\274", 2) == 2)
33983 if (wcrtomb (NULL, wc, NULL) != 1)
33984 result |= 2;
33987 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
33989 if (wcrtomb (NULL, 0, NULL) != 1)
33990 result |= 4;
33992 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
33994 if (wcrtomb (NULL, 0, NULL) != 1)
33995 result |= 8;
33997 return result;
33999 _ACEOF
34000 if ac_fn_c_try_run "$LINENO"
34001 then :
34002 gl_cv_func_wcrtomb_retval=yes
34003 else case e in #(
34004 e) gl_cv_func_wcrtomb_retval=no ;;
34005 esac
34007 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34008 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
34009 esac
34014 esac
34016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
34017 printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
34018 case "$gl_cv_func_wcrtomb_retval" in
34019 *yes) ;;
34021 printf "%s\n" "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
34023 REPLACE_WCRTOMB=1 ;;
34024 esac
34029 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
34030 GL_COND_OBJ_WCRTOMB_TRUE=
34031 GL_COND_OBJ_WCRTOMB_FALSE='#'
34032 else
34033 GL_COND_OBJ_WCRTOMB_TRUE='#'
34034 GL_COND_OBJ_WCRTOMB_FALSE=
34037 if test -z "${GL_COND_OBJ_WCRTOMB_TRUE}" && test -z "${GL_COND_OBJ_WCRTOMB_FALSE}"; then
34038 GL_COND_OBJ_WCRTOMB_TRUE='#'
34039 GL_COND_OBJ_WCRTOMB_FALSE='#'
34042 if test -z "$GL_COND_OBJ_WCRTOMB_TRUE"; then :
34063 GL_GNULIB_WCRTOMB=1
34069 printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
34077 if test $ac_cv_func_wctob = no; then
34078 HAVE_WCTOB=0
34079 HAVE_DECL_WCTOB=0
34080 else
34081 HAVE_WCTOB=1
34085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
34086 printf %s "checking whether wctob works... " >&6; }
34087 if test ${gl_cv_func_wctob_works+y}
34088 then :
34089 printf %s "(cached) " >&6
34090 else case e in #(
34092 case "$host_os" in
34093 # Guess no on Solaris <= 9 and Cygwin.
34094 solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
34095 gl_cv_func_wctob_works="guessing no" ;;
34096 # Guess no on native Windows.
34097 mingw*)
34098 gl_cv_func_wctob_works="guessing no" ;;
34099 # Guess yes otherwise.
34100 *) gl_cv_func_wctob_works="guessing yes" ;;
34101 esac
34102 case "$host_os" in
34103 cygwin*)
34104 if test "$cross_compiling" = yes
34105 then :
34107 else case e in #(
34108 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34109 /* end confdefs.h. */
34111 #include <locale.h>
34112 #include <wchar.h>
34114 register long global __asm__ ("%ebx");
34116 int main ()
34118 setlocale (LC_ALL, "en_US.UTF-8");
34120 global = 0x12345678;
34121 if (wctob (0x00FC) != -1)
34122 return 1;
34123 if (global != 0x12345678)
34124 return 2;
34125 return 0;
34127 _ACEOF
34128 if ac_fn_c_try_run "$LINENO"
34129 then :
34131 else case e in #(
34132 e) gl_cv_func_wctob_works=no ;;
34133 esac
34135 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34136 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
34137 esac
34141 esac
34142 if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
34143 if test "$cross_compiling" = yes
34144 then :
34146 else case e in #(
34147 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34148 /* end confdefs.h. */
34150 #include <locale.h>
34151 #include <stdlib.h>
34152 #include <wchar.h>
34153 int main ()
34155 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
34157 wchar_t wc;
34159 if (mbtowc (&wc, "\374", 1) == 1)
34160 if (wctob (wc) != (unsigned char) '\374')
34161 return 1;
34163 return 0;
34165 _ACEOF
34166 if ac_fn_c_try_run "$LINENO"
34167 then :
34168 gl_cv_func_wctob_works=yes
34169 else case e in #(
34170 e) gl_cv_func_wctob_works=no ;;
34171 esac
34173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34174 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
34175 esac
34180 esac
34182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
34183 printf "%s\n" "$gl_cv_func_wctob_works" >&6; }
34184 case "$gl_cv_func_wctob_works" in
34185 *yes) ;;
34186 *) REPLACE_WCTOB=1 ;;
34187 esac
34188 if test $REPLACE_WCTOB = 0; then
34190 ac_fn_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
34191 #include <wchar.h>
34193 " "$ac_c_undeclared_builtin_options" "CFLAGS"
34194 if test "x$ac_cv_have_decl_wctob" = xyes
34195 then :
34196 ac_have_decl=1
34197 else case e in #(
34198 e) ac_have_decl=0 ;;
34199 esac
34201 printf "%s\n" "#define HAVE_DECL_WCTOB $ac_have_decl" >>confdefs.h
34203 if test $ac_cv_have_decl_wctob != yes; then
34204 HAVE_DECL_WCTOB=0
34210 if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
34211 GL_COND_OBJ_WCTOB_TRUE=
34212 GL_COND_OBJ_WCTOB_FALSE='#'
34213 else
34214 GL_COND_OBJ_WCTOB_TRUE='#'
34215 GL_COND_OBJ_WCTOB_FALSE=
34218 if test -z "${GL_COND_OBJ_WCTOB_TRUE}" && test -z "${GL_COND_OBJ_WCTOB_FALSE}"; then
34219 GL_COND_OBJ_WCTOB_TRUE='#'
34220 GL_COND_OBJ_WCTOB_FALSE='#'
34223 if test -z "$GL_COND_OBJ_WCTOB_TRUE"; then :
34244 GL_GNULIB_WCTOB=1
34250 printf "%s\n" "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
34257 if false; then
34258 REPLACE_WCTOMB=1
34262 if test $REPLACE_WCTOMB = 1; then
34263 GL_COND_OBJ_WCTOMB_TRUE=
34264 GL_COND_OBJ_WCTOMB_FALSE='#'
34265 else
34266 GL_COND_OBJ_WCTOMB_TRUE='#'
34267 GL_COND_OBJ_WCTOMB_FALSE=
34270 if test -z "${GL_COND_OBJ_WCTOMB_TRUE}" && test -z "${GL_COND_OBJ_WCTOMB_FALSE}"; then
34271 GL_COND_OBJ_WCTOMB_TRUE='#'
34272 GL_COND_OBJ_WCTOMB_FALSE='#'
34275 if test -z "$GL_COND_OBJ_WCTOMB_TRUE"; then :
34291 GL_GNULIB_WCTOMB=1
34297 printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
34310 if case "$host_os" in mingw*) true;; *) false;; esac; then
34311 GL_COND_OBJ_WINDOWS_MUTEX_TRUE=
34312 GL_COND_OBJ_WINDOWS_MUTEX_FALSE='#'
34313 else
34314 GL_COND_OBJ_WINDOWS_MUTEX_TRUE='#'
34315 GL_COND_OBJ_WINDOWS_MUTEX_FALSE=
34318 if test -z "${GL_COND_OBJ_WINDOWS_MUTEX_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_MUTEX_FALSE}"; then
34319 GL_COND_OBJ_WINDOWS_MUTEX_TRUE='#'
34320 GL_COND_OBJ_WINDOWS_MUTEX_FALSE='#'
34325 if case "$host_os" in mingw*) true;; *) false;; esac; then
34326 GL_COND_OBJ_WINDOWS_ONCE_TRUE=
34327 GL_COND_OBJ_WINDOWS_ONCE_FALSE='#'
34328 else
34329 GL_COND_OBJ_WINDOWS_ONCE_TRUE='#'
34330 GL_COND_OBJ_WINDOWS_ONCE_FALSE=
34333 if test -z "${GL_COND_OBJ_WINDOWS_ONCE_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_ONCE_FALSE}"; then
34334 GL_COND_OBJ_WINDOWS_ONCE_TRUE='#'
34335 GL_COND_OBJ_WINDOWS_ONCE_FALSE='#'
34340 if case "$host_os" in mingw*) true;; *) false;; esac; then
34341 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE=
34342 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE='#'
34343 else
34344 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE='#'
34345 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE=
34348 if test -z "${GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE}"; then
34349 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE='#'
34350 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE='#'
34355 if case "$host_os" in mingw*) true;; *) false;; esac; then
34356 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE=
34357 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE='#'
34358 else
34359 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE='#'
34360 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE=
34363 if test -z "${GL_COND_OBJ_WINDOWS_RWLOCK_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_RWLOCK_FALSE}"; then
34364 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE='#'
34365 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE='#'
34371 printf "%s\n" "#define GNULIB_XALLOC 1" >>confdefs.h
34376 printf "%s\n" "#define GNULIB_XALLOC_DIE 1" >>confdefs.h
34379 # End of code from modules
34391 gltests_libdeps=
34392 gltests_ltlibdeps=
34407 gl_source_base='gnulib-tests'
34408 gl_source_base_prefix=
34409 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
34411 gl_module_indicator_condition=$gltests_WITNESS
34415 if test "$ac_cv_header_winsock2_h" = yes; then
34416 GL_COND_OBJ_ACCEPT_TRUE=
34417 GL_COND_OBJ_ACCEPT_FALSE='#'
34418 else
34419 GL_COND_OBJ_ACCEPT_TRUE='#'
34420 GL_COND_OBJ_ACCEPT_FALSE=
34423 if test -z "${GL_COND_OBJ_ACCEPT_TRUE}" && test -z "${GL_COND_OBJ_ACCEPT_FALSE}"; then
34424 GL_COND_OBJ_ACCEPT_TRUE='#'
34425 GL_COND_OBJ_ACCEPT_FALSE='#'
34437 if test "$GL_GNULIB_ACCEPT" != 1; then
34438 if test "$GL_GNULIB_ACCEPT" = 0; then
34439 GL_GNULIB_ACCEPT=$gl_module_indicator_condition
34440 else
34441 GL_GNULIB_ACCEPT="($GL_GNULIB_ACCEPT || $gl_module_indicator_condition)"
34449 printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
34462 if test "$ac_cv_header_winsock2_h" = yes; then
34463 GL_COND_OBJ_BIND_TRUE=
34464 GL_COND_OBJ_BIND_FALSE='#'
34465 else
34466 GL_COND_OBJ_BIND_TRUE='#'
34467 GL_COND_OBJ_BIND_FALSE=
34470 if test -z "${GL_COND_OBJ_BIND_TRUE}" && test -z "${GL_COND_OBJ_BIND_FALSE}"; then
34471 GL_COND_OBJ_BIND_TRUE='#'
34472 GL_COND_OBJ_BIND_FALSE='#'
34484 if test "$GL_GNULIB_BIND" != 1; then
34485 if test "$GL_GNULIB_BIND" = 0; then
34486 GL_GNULIB_BIND=$gl_module_indicator_condition
34487 else
34488 GL_GNULIB_BIND="($GL_GNULIB_BIND || $gl_module_indicator_condition)"
34496 printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
34503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
34504 printf %s "checking for a traditional french locale... " >&6; }
34505 if test ${gt_cv_locale_fr+y}
34506 then :
34507 printf %s "(cached) " >&6
34508 else case e in #(
34510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34511 /* end confdefs.h. */
34513 #include <locale.h>
34514 #include <time.h>
34515 #if HAVE_LANGINFO_CODESET
34516 # include <langinfo.h>
34517 #endif
34518 #include <stdlib.h>
34519 #include <string.h>
34520 struct tm t;
34521 char buf[16];
34522 int main () {
34523 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
34524 imitates locale dependent behaviour by looking at the environment
34525 variables, and all locales use the UTF-8 encoding. */
34526 #if defined __BEOS__ || defined __HAIKU__
34527 return 1;
34528 #else
34529 /* Check whether the given locale name is recognized by the system. */
34530 # if defined _WIN32 && !defined __CYGWIN__
34531 /* On native Windows, setlocale(category, "") looks at the system settings,
34532 not at the environment variables. Also, when an encoding suffix such
34533 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34534 category of the locale to "C". */
34535 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34536 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34537 return 1;
34538 # else
34539 if (setlocale (LC_ALL, "") == NULL) return 1;
34540 # endif
34541 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34542 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
34543 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34544 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34545 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34546 some unit tests fail.
34547 On MirBSD 10, when an unsupported locale is specified, setlocale()
34548 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
34549 # if HAVE_LANGINFO_CODESET
34551 const char *cs = nl_langinfo (CODESET);
34552 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
34553 || strcmp (cs, "UTF-8") == 0)
34554 return 1;
34556 # endif
34557 # ifdef __CYGWIN__
34558 /* On Cygwin, avoid locale names without encoding suffix, because the
34559 locale_charset() function relies on the encoding suffix. Note that
34560 LC_ALL is set on the command line. */
34561 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34562 # endif
34563 /* Check whether in the abbreviation of the second month, the second
34564 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
34565 one byte long. This excludes the UTF-8 encoding. */
34566 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34567 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
34568 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
34569 /* Check whether the decimal separator is a comma.
34570 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34571 are nl_langinfo(RADIXCHAR) are both ".". */
34572 if (localeconv () ->decimal_point[0] != ',') return 1;
34573 # endif
34574 return 0;
34575 #endif
34578 _ACEOF
34579 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34580 (eval $ac_link) 2>&5
34581 ac_status=$?
34582 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34583 test $ac_status = 0; } && test -s conftest$ac_exeext; then
34584 case "$host_os" in
34585 # Handle native Windows specially, because there setlocale() interprets
34586 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34587 # "fr" or "fra" as "French" or "French_France.1252",
34588 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34589 # "ja" as "Japanese" or "Japanese_Japan.932",
34590 # and similar.
34591 mingw*)
34592 # Test for the native Windows locale name.
34593 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34594 gt_cv_locale_fr=French_France.1252
34595 else
34596 # None found.
34597 gt_cv_locale_fr=none
34601 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34602 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34603 # configure script would override the LC_ALL setting. Likewise for
34604 # LC_CTYPE, which is also set at the beginning of the configure script.
34605 # Test for the usual locale name.
34606 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34607 gt_cv_locale_fr=fr_FR
34608 else
34609 # Test for the locale name with explicit encoding suffix.
34610 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34611 gt_cv_locale_fr=fr_FR.ISO-8859-1
34612 else
34613 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
34614 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34615 gt_cv_locale_fr=fr_FR.ISO8859-1
34616 else
34617 # Test for the HP-UX locale name.
34618 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34619 gt_cv_locale_fr=fr_FR.iso88591
34620 else
34621 # Test for the Solaris 7 locale name.
34622 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34623 gt_cv_locale_fr=fr
34624 else
34625 # None found.
34626 gt_cv_locale_fr=none
34633 esac
34635 rm -fr conftest*
34637 esac
34639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
34640 printf "%s\n" "$gt_cv_locale_fr" >&6; }
34641 LOCALE_FR=$gt_cv_locale_fr
34646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
34647 printf %s "checking for a french Unicode locale... " >&6; }
34648 if test ${gt_cv_locale_fr_utf8+y}
34649 then :
34650 printf %s "(cached) " >&6
34651 else case e in #(
34653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34654 /* end confdefs.h. */
34656 #include <locale.h>
34657 #include <time.h>
34658 #if HAVE_LANGINFO_CODESET
34659 # include <langinfo.h>
34660 #endif
34661 #include <stdlib.h>
34662 #include <string.h>
34663 struct tm t;
34664 char buf[16];
34665 int main () {
34666 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
34667 imitates locale dependent behaviour by looking at the environment
34668 variables, and all locales use the UTF-8 encoding. */
34669 #if !(defined __BEOS__ || defined __HAIKU__)
34670 /* Check whether the given locale name is recognized by the system. */
34671 # if defined _WIN32 && !defined __CYGWIN__
34672 /* On native Windows, setlocale(category, "") looks at the system settings,
34673 not at the environment variables. Also, when an encoding suffix such
34674 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34675 category of the locale to "C". */
34676 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34677 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34678 return 1;
34679 # else
34680 if (setlocale (LC_ALL, "") == NULL) return 1;
34681 # endif
34682 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34683 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
34684 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34685 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34686 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34687 some unit tests fail. */
34688 # if HAVE_LANGINFO_CODESET
34690 const char *cs = nl_langinfo (CODESET);
34691 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
34692 return 1;
34694 # endif
34695 # ifdef __CYGWIN__
34696 /* On Cygwin, avoid locale names without encoding suffix, because the
34697 locale_charset() function relies on the encoding suffix. Note that
34698 LC_ALL is set on the command line. */
34699 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34700 # endif
34701 /* Check whether in the abbreviation of the second month, the second
34702 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
34703 two bytes long, with UTF-8 encoding. */
34704 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34705 if (strftime (buf, sizeof (buf), "%b", &t) < 4
34706 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
34707 return 1;
34708 #endif
34709 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
34710 /* Check whether the decimal separator is a comma.
34711 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34712 are nl_langinfo(RADIXCHAR) are both ".". */
34713 if (localeconv () ->decimal_point[0] != ',') return 1;
34714 #endif
34715 return 0;
34718 _ACEOF
34719 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34720 (eval $ac_link) 2>&5
34721 ac_status=$?
34722 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34723 test $ac_status = 0; } && test -s conftest$ac_exeext; then
34724 case "$host_os" in
34725 # Handle native Windows specially, because there setlocale() interprets
34726 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34727 # "fr" or "fra" as "French" or "French_France.1252",
34728 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34729 # "ja" as "Japanese" or "Japanese_Japan.932",
34730 # and similar.
34731 mingw*)
34732 # Test for the hypothetical native Windows locale name.
34733 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34734 gt_cv_locale_fr_utf8=French_France.65001
34735 else
34736 # None found.
34737 gt_cv_locale_fr_utf8=none
34741 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34742 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34743 # configure script would override the LC_ALL setting. Likewise for
34744 # LC_CTYPE, which is also set at the beginning of the configure script.
34745 # Test for the usual locale name.
34746 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34747 gt_cv_locale_fr_utf8=fr_FR
34748 else
34749 # Test for the locale name with explicit encoding suffix.
34750 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34751 gt_cv_locale_fr_utf8=fr_FR.UTF-8
34752 else
34753 # Test for the Solaris 7 locale name.
34754 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34755 gt_cv_locale_fr_utf8=fr.UTF-8
34756 else
34757 # None found.
34758 gt_cv_locale_fr_utf8=none
34763 esac
34765 rm -fr conftest*
34767 esac
34769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
34770 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
34771 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
34777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
34778 printf %s "checking for a traditional french locale... " >&6; }
34779 if test ${gt_cv_locale_fr+y}
34780 then :
34781 printf %s "(cached) " >&6
34782 else case e in #(
34784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34785 /* end confdefs.h. */
34787 #include <locale.h>
34788 #include <time.h>
34789 #if HAVE_LANGINFO_CODESET
34790 # include <langinfo.h>
34791 #endif
34792 #include <stdlib.h>
34793 #include <string.h>
34794 struct tm t;
34795 char buf[16];
34796 int main () {
34797 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
34798 imitates locale dependent behaviour by looking at the environment
34799 variables, and all locales use the UTF-8 encoding. */
34800 #if defined __BEOS__ || defined __HAIKU__
34801 return 1;
34802 #else
34803 /* Check whether the given locale name is recognized by the system. */
34804 # if defined _WIN32 && !defined __CYGWIN__
34805 /* On native Windows, setlocale(category, "") looks at the system settings,
34806 not at the environment variables. Also, when an encoding suffix such
34807 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34808 category of the locale to "C". */
34809 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34810 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34811 return 1;
34812 # else
34813 if (setlocale (LC_ALL, "") == NULL) return 1;
34814 # endif
34815 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34816 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
34817 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34818 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34819 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34820 some unit tests fail.
34821 On MirBSD 10, when an unsupported locale is specified, setlocale()
34822 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
34823 # if HAVE_LANGINFO_CODESET
34825 const char *cs = nl_langinfo (CODESET);
34826 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
34827 || strcmp (cs, "UTF-8") == 0)
34828 return 1;
34830 # endif
34831 # ifdef __CYGWIN__
34832 /* On Cygwin, avoid locale names without encoding suffix, because the
34833 locale_charset() function relies on the encoding suffix. Note that
34834 LC_ALL is set on the command line. */
34835 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34836 # endif
34837 /* Check whether in the abbreviation of the second month, the second
34838 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
34839 one byte long. This excludes the UTF-8 encoding. */
34840 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34841 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
34842 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
34843 /* Check whether the decimal separator is a comma.
34844 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34845 are nl_langinfo(RADIXCHAR) are both ".". */
34846 if (localeconv () ->decimal_point[0] != ',') return 1;
34847 # endif
34848 return 0;
34849 #endif
34852 _ACEOF
34853 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34854 (eval $ac_link) 2>&5
34855 ac_status=$?
34856 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34857 test $ac_status = 0; } && test -s conftest$ac_exeext; then
34858 case "$host_os" in
34859 # Handle native Windows specially, because there setlocale() interprets
34860 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34861 # "fr" or "fra" as "French" or "French_France.1252",
34862 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34863 # "ja" as "Japanese" or "Japanese_Japan.932",
34864 # and similar.
34865 mingw*)
34866 # Test for the native Windows locale name.
34867 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34868 gt_cv_locale_fr=French_France.1252
34869 else
34870 # None found.
34871 gt_cv_locale_fr=none
34875 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34876 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34877 # configure script would override the LC_ALL setting. Likewise for
34878 # LC_CTYPE, which is also set at the beginning of the configure script.
34879 # Test for the usual locale name.
34880 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34881 gt_cv_locale_fr=fr_FR
34882 else
34883 # Test for the locale name with explicit encoding suffix.
34884 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34885 gt_cv_locale_fr=fr_FR.ISO-8859-1
34886 else
34887 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
34888 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34889 gt_cv_locale_fr=fr_FR.ISO8859-1
34890 else
34891 # Test for the HP-UX locale name.
34892 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34893 gt_cv_locale_fr=fr_FR.iso88591
34894 else
34895 # Test for the Solaris 7 locale name.
34896 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34897 gt_cv_locale_fr=fr
34898 else
34899 # None found.
34900 gt_cv_locale_fr=none
34907 esac
34909 rm -fr conftest*
34911 esac
34913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
34914 printf "%s\n" "$gt_cv_locale_fr" >&6; }
34915 LOCALE_FR=$gt_cv_locale_fr
34921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
34922 printf %s "checking for a turkish Unicode locale... " >&6; }
34923 if test ${gt_cv_locale_tr_utf8+y}
34924 then :
34925 printf %s "(cached) " >&6
34926 else case e in #(
34928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34929 /* end confdefs.h. */
34931 #include <locale.h>
34932 #include <time.h>
34933 #if HAVE_LANGINFO_CODESET
34934 # include <langinfo.h>
34935 #endif
34936 #include <stdlib.h>
34937 #include <string.h>
34938 #include <wctype.h>
34939 struct tm t;
34940 char buf[16];
34941 int main () {
34942 /* On BeOS, locales are not implemented in libc. Rather, libintl
34943 imitates locale dependent behaviour by looking at the environment
34944 variables, and all locales use the UTF-8 encoding. But BeOS does not
34945 implement the Turkish upper-/lowercase mappings. Therefore, let this
34946 program return 1 on BeOS. */
34947 /* Check whether the given locale name is recognized by the system. */
34948 #if defined _WIN32 && !defined __CYGWIN__
34949 /* On native Windows, setlocale(category, "") looks at the system settings,
34950 not at the environment variables. Also, when an encoding suffix such
34951 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34952 category of the locale to "C". */
34953 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34954 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34955 return 1;
34956 #else
34957 if (setlocale (LC_ALL, "") == NULL) return 1;
34958 #endif
34959 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34960 On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
34961 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34962 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34963 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34964 some unit tests fail. */
34965 #if HAVE_LANGINFO_CODESET
34967 const char *cs = nl_langinfo (CODESET);
34968 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
34969 return 1;
34971 #endif
34972 #ifdef __CYGWIN__
34973 /* On Cygwin, avoid locale names without encoding suffix, because the
34974 locale_charset() function relies on the encoding suffix. Note that
34975 LC_ALL is set on the command line. */
34976 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34977 #endif
34978 /* Check whether in the abbreviation of the eighth month, the second
34979 character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
34980 two bytes long, with UTF-8 encoding. */
34981 t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
34982 if (strftime (buf, sizeof (buf), "%b", &t) < 4
34983 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
34984 return 1;
34985 /* Check whether the upper-/lowercase mappings are as expected for
34986 Turkish. */
34987 if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
34988 || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
34989 return 1;
34990 return 0;
34993 _ACEOF
34994 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34995 (eval $ac_link) 2>&5
34996 ac_status=$?
34997 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34998 test $ac_status = 0; } && test -s conftest$ac_exeext; then
34999 case "$host_os" in
35000 # Handle native Windows specially, because there setlocale() interprets
35001 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
35002 # "fr" or "fra" as "French" or "French_France.1252",
35003 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
35004 # "ja" as "Japanese" or "Japanese_Japan.932",
35005 # and similar.
35006 mingw*)
35007 # Test for the hypothetical native Windows locale name.
35008 if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35009 gt_cv_locale_tr_utf8=Turkish_Turkey.65001
35010 else
35011 # None found.
35012 gt_cv_locale_tr_utf8=none
35016 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
35017 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
35018 # configure script would override the LC_ALL setting. Likewise for
35019 # LC_CTYPE, which is also set at the beginning of the configure script.
35020 # Test for the usual locale name.
35021 if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35022 gt_cv_locale_tr_utf8=tr_TR
35023 else
35024 # Test for the locale name with explicit encoding suffix.
35025 if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35026 gt_cv_locale_tr_utf8=tr_TR.UTF-8
35027 else
35028 # Test for the Solaris 7 locale name.
35029 if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35030 gt_cv_locale_tr_utf8=tr.UTF-8
35031 else
35032 # None found.
35033 gt_cv_locale_tr_utf8=none
35038 esac
35039 else
35040 gt_cv_locale_tr_utf8=none
35042 rm -fr conftest*
35044 esac
35046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
35047 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
35048 LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
35054 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
35055 if test "x$ac_cv_func_closedir" = xyes
35056 then :
35057 printf "%s\n" "#define HAVE_CLOSEDIR 1" >>confdefs.h
35061 if test $ac_cv_func_closedir = no; then
35062 HAVE_CLOSEDIR=0
35065 case $host_os,$HAVE_CLOSEDIR in
35066 os2*,1)
35067 REPLACE_CLOSEDIR=1;;
35068 esac
35071 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
35072 GL_COND_OBJ_CLOSEDIR_TRUE=
35073 GL_COND_OBJ_CLOSEDIR_FALSE='#'
35074 else
35075 GL_COND_OBJ_CLOSEDIR_TRUE='#'
35076 GL_COND_OBJ_CLOSEDIR_FALSE=
35079 if test -z "${GL_COND_OBJ_CLOSEDIR_TRUE}" && test -z "${GL_COND_OBJ_CLOSEDIR_FALSE}"; then
35080 GL_COND_OBJ_CLOSEDIR_TRUE='#'
35081 GL_COND_OBJ_CLOSEDIR_FALSE='#'
35093 if test "$GL_GNULIB_CLOSEDIR" != 1; then
35094 if test "$GL_GNULIB_CLOSEDIR" = 0; then
35095 GL_GNULIB_CLOSEDIR=$gl_module_indicator_condition
35096 else
35097 GL_GNULIB_CLOSEDIR="($GL_GNULIB_CLOSEDIR || $gl_module_indicator_condition)"
35105 printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
35111 if test "$ac_cv_header_winsock2_h" = yes; then
35112 GL_COND_OBJ_CONNECT_TRUE=
35113 GL_COND_OBJ_CONNECT_FALSE='#'
35114 else
35115 GL_COND_OBJ_CONNECT_TRUE='#'
35116 GL_COND_OBJ_CONNECT_FALSE=
35119 if test -z "${GL_COND_OBJ_CONNECT_TRUE}" && test -z "${GL_COND_OBJ_CONNECT_FALSE}"; then
35120 GL_COND_OBJ_CONNECT_TRUE='#'
35121 GL_COND_OBJ_CONNECT_FALSE='#'
35133 if test "$GL_GNULIB_CONNECT" != 1; then
35134 if test "$GL_GNULIB_CONNECT" = 0; then
35135 GL_GNULIB_CONNECT=$gl_module_indicator_condition
35136 else
35137 GL_GNULIB_CONNECT="($GL_GNULIB_CONNECT || $gl_module_indicator_condition)"
35145 printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
35161 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
35162 if test "x$ac_cv_func_dirfd" = xyes
35163 then :
35164 printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
35168 ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
35169 #include <dirent.h>
35170 " "$ac_c_undeclared_builtin_options" "CFLAGS"
35171 if test "x$ac_cv_have_decl_dirfd" = xyes
35172 then :
35173 ac_have_decl=1
35174 else case e in #(
35175 e) ac_have_decl=0 ;;
35176 esac
35178 printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h
35180 if test $ac_cv_have_decl_dirfd = no; then
35181 HAVE_DECL_DIRFD=0
35184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
35185 printf %s "checking whether dirfd is a macro... " >&6; }
35186 if test ${gl_cv_func_dirfd_macro+y}
35187 then :
35188 printf %s "(cached) " >&6
35189 else case e in #(
35190 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35191 /* end confdefs.h. */
35193 #include <sys/types.h>
35194 #include <dirent.h>
35195 #ifdef dirfd
35196 dirent_header_defines_dirfd
35197 #endif
35198 _ACEOF
35199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35200 $EGREP_TRADITIONAL "dirent_header_defines_dirfd" >/dev/null 2>&1
35201 then :
35202 gl_cv_func_dirfd_macro=yes
35203 else case e in #(
35204 e) gl_cv_func_dirfd_macro=no ;;
35205 esac
35207 rm -rf conftest*
35209 esac
35211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
35212 printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
35214 # Use the replacement if we have no function or macro with that name,
35215 # or if OS/2 kLIBC whose dirfd() does not work.
35216 # Replace only if the system declares dirfd already.
35217 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
35218 no,no,*,yes | *,*,os2*,yes)
35219 REPLACE_DIRFD=1
35221 printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
35223 esac
35226 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no || test $REPLACE_DIRFD = 1; then
35227 GL_COND_OBJ_DIRFD_TRUE=
35228 GL_COND_OBJ_DIRFD_FALSE='#'
35229 else
35230 GL_COND_OBJ_DIRFD_TRUE='#'
35231 GL_COND_OBJ_DIRFD_FALSE=
35234 if test -z "${GL_COND_OBJ_DIRFD_TRUE}" && test -z "${GL_COND_OBJ_DIRFD_FALSE}"; then
35235 GL_COND_OBJ_DIRFD_TRUE='#'
35236 GL_COND_OBJ_DIRFD_FALSE='#'
35239 if test -z "$GL_COND_OBJ_DIRFD_TRUE"; then :
35242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
35243 printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
35244 if test ${gl_cv_sys_dir_fd_member_name+y}
35245 then :
35246 printf %s "(cached) " >&6
35247 else case e in #(
35249 dirfd_save_CFLAGS=$CFLAGS
35250 for ac_expr in d_fd dd_fd; do
35252 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
35253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35254 /* end confdefs.h. */
35256 #include <sys/types.h>
35257 #include <dirent.h>
35259 main (void)
35261 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
35263 return 0;
35265 _ACEOF
35266 if ac_fn_c_try_compile "$LINENO"
35267 then :
35268 dir_fd_found=yes
35271 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35272 CFLAGS=$dirfd_save_CFLAGS
35273 test "$dir_fd_found" = yes && break
35274 done
35275 test "$dir_fd_found" = yes || ac_expr=no_such_member
35277 gl_cv_sys_dir_fd_member_name=$ac_expr
35280 esac
35282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
35283 printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
35284 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
35286 printf "%s\n" "#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name" >>confdefs.h
35302 if test "$GL_GNULIB_DIRFD" != 1; then
35303 if test "$GL_GNULIB_DIRFD" = 0; then
35304 GL_GNULIB_DIRFD=$gl_module_indicator_condition
35305 else
35306 GL_GNULIB_DIRFD="($GL_GNULIB_DIRFD || $gl_module_indicator_condition)"
35314 printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
35328 if test "$GL_GNULIB_ENVIRON" != 1; then
35329 if test "$GL_GNULIB_ENVIRON" = 0; then
35330 GL_GNULIB_ENVIRON=$gl_module_indicator_condition
35331 else
35332 GL_GNULIB_ENVIRON="($GL_GNULIB_ENVIRON || $gl_module_indicator_condition)"
35340 printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
35350 if test $ac_cv_func_explicit_bzero = no; then
35351 HAVE_EXPLICIT_BZERO=0
35355 if test $HAVE_EXPLICIT_BZERO = 0; then
35356 GL_COND_OBJ_EXPLICIT_BZERO_TRUE=
35357 GL_COND_OBJ_EXPLICIT_BZERO_FALSE='#'
35358 else
35359 GL_COND_OBJ_EXPLICIT_BZERO_TRUE='#'
35360 GL_COND_OBJ_EXPLICIT_BZERO_FALSE=
35363 if test -z "${GL_COND_OBJ_EXPLICIT_BZERO_TRUE}" && test -z "${GL_COND_OBJ_EXPLICIT_BZERO_FALSE}"; then
35364 GL_COND_OBJ_EXPLICIT_BZERO_TRUE='#'
35365 GL_COND_OBJ_EXPLICIT_BZERO_FALSE='#'
35368 if test -z "$GL_COND_OBJ_EXPLICIT_BZERO_TRUE"; then :
35371 ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset"
35372 if test "x$ac_cv_func_explicit_memset" = xyes
35373 then :
35374 printf "%s\n" "#define HAVE_EXPLICIT_MEMSET 1" >>confdefs.h
35396 if test "$GL_GNULIB_EXPLICIT_BZERO" != 1; then
35397 if test "$GL_GNULIB_EXPLICIT_BZERO" = 0; then
35398 GL_GNULIB_EXPLICIT_BZERO=$gl_module_indicator_condition
35399 else
35400 GL_GNULIB_EXPLICIT_BZERO="($GL_GNULIB_EXPLICIT_BZERO || $gl_module_indicator_condition)"
35408 printf "%s\n" "#define GNULIB_TEST_EXPLICIT_BZERO 1" >>confdefs.h
35416 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
35417 REPLACE_FDOPEN=1
35420 if test $REPLACE_FDOPEN = 0; then
35421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
35422 printf %s "checking whether fdopen sets errno... " >&6; }
35423 if test ${gl_cv_func_fdopen_works+y}
35424 then :
35425 printf %s "(cached) " >&6
35426 else case e in #(
35428 if test "$cross_compiling" = yes
35429 then :
35430 case "$host_os" in
35431 mingw*) gl_cv_func_fdopen_works="guessing no" ;;
35432 *) gl_cv_func_fdopen_works="guessing yes" ;;
35433 esac
35435 else case e in #(
35436 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35437 /* end confdefs.h. */
35439 #include <stdio.h>
35440 #include <errno.h>
35443 $gl_mda_defines
35446 main (void)
35448 FILE *fp;
35449 errno = 0;
35450 fp = fdopen (-1, "r");
35451 if (fp == NULL && errno == 0)
35452 return 1;
35453 return 0;
35455 _ACEOF
35456 if ac_fn_c_try_run "$LINENO"
35457 then :
35458 gl_cv_func_fdopen_works=yes
35459 else case e in #(
35460 e) gl_cv_func_fdopen_works=no ;;
35461 esac
35463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35464 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35465 esac
35469 esac
35471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
35472 printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
35473 case "$gl_cv_func_fdopen_works" in
35474 *no) REPLACE_FDOPEN=1 ;;
35475 esac
35479 if test $REPLACE_FDOPEN = 1; then
35480 GL_COND_OBJ_FDOPEN_TRUE=
35481 GL_COND_OBJ_FDOPEN_FALSE='#'
35482 else
35483 GL_COND_OBJ_FDOPEN_TRUE='#'
35484 GL_COND_OBJ_FDOPEN_FALSE=
35487 if test -z "${GL_COND_OBJ_FDOPEN_TRUE}" && test -z "${GL_COND_OBJ_FDOPEN_FALSE}"; then
35488 GL_COND_OBJ_FDOPEN_TRUE='#'
35489 GL_COND_OBJ_FDOPEN_FALSE='#'
35492 if test -z "$GL_COND_OBJ_FDOPEN_TRUE"; then :
35506 if test "$GL_GNULIB_FDOPEN" != 1; then
35507 if test "$GL_GNULIB_FDOPEN" = 0; then
35508 GL_GNULIB_FDOPEN=$gl_module_indicator_condition
35509 else
35510 GL_GNULIB_FDOPEN="($GL_GNULIB_FDOPEN || $gl_module_indicator_condition)"
35518 printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
35526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
35527 printf %s "checking whether fflush works on input streams... " >&6; }
35528 if test ${gl_cv_func_fflush_stdin+y}
35529 then :
35530 printf %s "(cached) " >&6
35531 else case e in #(
35532 e) echo hello world > conftest.txt
35533 if test "$cross_compiling" = yes
35534 then :
35535 case "$host_os" in
35536 # Guess no on native Windows.
35537 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
35538 *) gl_cv_func_fflush_stdin=cross ;;
35539 esac
35541 else case e in #(
35542 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35543 /* end confdefs.h. */
35545 #include <stdio.h>
35546 #if HAVE_UNISTD_H
35547 # include <unistd.h>
35548 #else /* on Windows with MSVC */
35549 # include <io.h>
35550 #endif
35553 $gl_mda_defines
35556 main (void)
35558 FILE *f = fopen ("conftest.txt", "r");
35559 char buffer[10];
35560 int fd;
35561 int c;
35562 if (f == NULL)
35563 return 1;
35564 fd = fileno (f);
35565 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
35566 { fclose (f); return 2; }
35567 /* For deterministic results, ensure f read a bigger buffer. */
35568 if (lseek (fd, 0, SEEK_CUR) == 5)
35569 { fclose (f); return 3; }
35570 /* POSIX requires fflush-fseek to set file offset of fd. This fails
35571 on BSD systems and on mingw. */
35572 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
35573 { fclose (f); return 4; }
35574 if (lseek (fd, 0, SEEK_CUR) != 5)
35575 { fclose (f); return 5; }
35576 /* Verify behaviour of fflush after ungetc. See
35577 <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
35578 /* Verify behaviour of fflush after a backup ungetc. This fails on
35579 mingw. */
35580 c = fgetc (f);
35581 ungetc (c, f);
35582 fflush (f);
35583 if (fgetc (f) != c)
35584 { fclose (f); return 6; }
35585 /* Verify behaviour of fflush after a non-backup ungetc. This fails
35586 on glibc 2.8 and on BSD systems. */
35587 c = fgetc (f);
35588 ungetc ('@', f);
35589 fflush (f);
35590 if (fgetc (f) != c)
35591 { fclose (f); return 7; }
35592 fclose (f);
35593 return 0;
35596 return 0;
35598 _ACEOF
35599 if ac_fn_c_try_run "$LINENO"
35600 then :
35601 gl_cv_func_fflush_stdin=yes
35602 else case e in #(
35603 e) gl_cv_func_fflush_stdin=no ;;
35604 esac
35606 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35607 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35608 esac
35611 rm conftest.txt
35613 esac
35615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
35616 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
35617 case "$gl_cv_func_fflush_stdin" in
35618 *yes) gl_func_fflush_stdin=1 ;;
35619 *no) gl_func_fflush_stdin=0 ;;
35620 *) gl_func_fflush_stdin='(-1)' ;;
35621 esac
35623 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
35626 case "$gl_cv_func_fflush_stdin" in
35627 *yes) ;;
35628 *) REPLACE_FFLUSH=1 ;;
35629 esac
35632 if test $REPLACE_FFLUSH = 1; then
35633 GL_COND_OBJ_FFLUSH_TRUE=
35634 GL_COND_OBJ_FFLUSH_FALSE='#'
35635 else
35636 GL_COND_OBJ_FFLUSH_TRUE='#'
35637 GL_COND_OBJ_FFLUSH_FALSE=
35640 if test -z "${GL_COND_OBJ_FFLUSH_TRUE}" && test -z "${GL_COND_OBJ_FFLUSH_FALSE}"; then
35641 GL_COND_OBJ_FFLUSH_TRUE='#'
35642 GL_COND_OBJ_FFLUSH_FALSE='#'
35645 if test -z "$GL_COND_OBJ_FFLUSH_TRUE"; then :
35652 printf "%s\n" "#define GNULIB_FFLUSH $gl_module_indicator_condition" >>confdefs.h
35664 if test "$GL_GNULIB_FFLUSH" != 1; then
35665 if test "$GL_GNULIB_FFLUSH" = 0; then
35666 GL_GNULIB_FFLUSH=$gl_module_indicator_condition
35667 else
35668 GL_GNULIB_FFLUSH="($GL_GNULIB_FFLUSH || $gl_module_indicator_condition)"
35676 printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
35682 if test "$enable_acl" != no; then
35683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getxattr with XATTR_NAME_POSIX_ACL macros" >&5
35684 printf %s "checking for getxattr with XATTR_NAME_POSIX_ACL macros... " >&6; }
35685 if test ${gl_cv_getxattr_with_posix_acls+y}
35686 then :
35687 printf %s "(cached) " >&6
35688 else case e in #(
35689 e) gl_cv_getxattr_with_posix_acls=no
35690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35691 /* end confdefs.h. */
35692 #include <sys/types.h>
35693 #include <sys/xattr.h>
35694 #include <linux/xattr.h>
35697 main (void)
35699 ssize_t a = getxattr (".", XATTR_NAME_POSIX_ACL_ACCESS, 0, 0);
35700 ssize_t b = getxattr (".", XATTR_NAME_POSIX_ACL_DEFAULT, 0, 0);
35701 return a < 0 || b < 0;
35704 return 0;
35706 _ACEOF
35707 if ac_fn_c_try_link "$LINENO"
35708 then :
35709 gl_cv_getxattr_with_posix_acls=yes
35711 rm -f core conftest.err conftest.$ac_objext conftest.beam \
35712 conftest$ac_exeext conftest.$ac_ext ;;
35713 esac
35715 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_getxattr_with_posix_acls" >&5
35716 printf "%s\n" "$gl_cv_getxattr_with_posix_acls" >&6; }
35718 if test "$gl_cv_getxattr_with_posix_acls" = yes; then
35719 LIB_HAS_ACL=
35721 printf "%s\n" "#define GETXATTR_WITH_POSIX_ACLS 1" >>confdefs.h
35723 else
35724 gl_need_lib_has_acl=1
35725 LIB_HAS_ACL=$LIB_ACL
35733 case "$host_os" in
35734 mingw* | pw*)
35735 REPLACE_FOPEN=1
35736 gl_cv_func_fopen_slash="guessing no"
35739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
35740 printf %s "checking whether fopen recognizes a trailing slash... " >&6; }
35741 if test ${gl_cv_func_fopen_slash+y}
35742 then :
35743 printf %s "(cached) " >&6
35744 else case e in #(
35746 if test "$cross_compiling" = yes
35747 then :
35749 case "$host_os" in
35750 aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
35751 gl_cv_func_fopen_slash="guessing no" ;;
35753 gl_cv_func_fopen_slash="guessing yes" ;;
35754 esac
35756 else case e in #(
35757 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35758 /* end confdefs.h. */
35760 #include <stddef.h>
35761 #include <stdio.h>
35762 int main ()
35764 FILE *fp = fopen ("conftest.sl/", "w");
35765 int result = (fp != NULL);
35766 if (fp != NULL)
35767 fclose (fp);
35768 return result;
35770 _ACEOF
35771 if ac_fn_c_try_run "$LINENO"
35772 then :
35773 gl_cv_func_fopen_slash=yes
35774 else case e in #(
35775 e) gl_cv_func_fopen_slash=no ;;
35776 esac
35778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35779 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35780 esac
35783 rm -f conftest.sl
35785 esac
35787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
35788 printf "%s\n" "$gl_cv_func_fopen_slash" >&6; }
35790 esac
35791 case "$gl_cv_func_fopen_slash" in
35792 *no)
35794 printf "%s\n" "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
35796 REPLACE_FOPEN=1
35798 esac
35800 if test $REPLACE_FOPEN = 1; then
35809 gltests_LIBOBJS="$gltests_LIBOBJS fopen.$ac_objext"
35822 if test "$GL_GNULIB_FOPEN" != 1; then
35823 if test "$GL_GNULIB_FOPEN" = 0; then
35824 GL_GNULIB_FOPEN=$gl_module_indicator_condition
35825 else
35826 GL_GNULIB_FOPEN="($GL_GNULIB_FOPEN || $gl_module_indicator_condition)"
35834 printf "%s\n" "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
35840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'x'" >&5
35841 printf %s "checking whether fopen supports the mode character 'x'... " >&6; }
35842 if test ${gl_cv_func_fopen_mode_x+y}
35843 then :
35844 printf %s "(cached) " >&6
35845 else case e in #(
35846 e) rm -f conftest.x
35847 if test "$cross_compiling" = yes
35848 then :
35849 case "$host_os" in
35850 # Guess yes on glibc and musl systems.
35851 linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
35852 gl_cv_func_fopen_mode_x="guessing yes" ;;
35853 # If we don't know, obey --enable-cross-guesses.
35855 gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
35856 esac
35858 else case e in #(
35859 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35860 /* end confdefs.h. */
35862 #include <stdio.h>
35863 #include <errno.h>
35864 int main ()
35866 FILE *fp;
35867 fp = fopen ("conftest.x", "w");
35868 fclose (fp);
35869 fp = fopen ("conftest.x", "wx");
35870 if (fp != NULL)
35871 /* 'x' ignored */
35872 return 1;
35873 else if (errno == EEXIST)
35874 return 0;
35875 else
35876 /* 'x' rejected */
35877 return 2;
35879 _ACEOF
35880 if ac_fn_c_try_run "$LINENO"
35881 then :
35882 gl_cv_func_fopen_mode_x=yes
35883 else case e in #(
35884 e) gl_cv_func_fopen_mode_x=no ;;
35885 esac
35887 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35888 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35889 esac
35892 rm -f conftest.x
35894 esac
35896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_x" >&5
35897 printf "%s\n" "$gl_cv_func_fopen_mode_x" >&6; }
35898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'e'" >&5
35899 printf %s "checking whether fopen supports the mode character 'e'... " >&6; }
35900 if test ${gl_cv_func_fopen_mode_e+y}
35901 then :
35902 printf %s "(cached) " >&6
35903 else case e in #(
35904 e) echo foo > conftest.x
35905 if test "$cross_compiling" = yes
35906 then :
35907 case "$host_os" in
35908 # Guess yes on glibc and musl systems.
35909 linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
35910 gl_cv_func_fopen_mode_e="guessing yes" ;;
35911 # Guess no on native Windows.
35912 mingw*)
35913 gl_cv_func_fopen_mode_e="guessing no" ;;
35914 # If we don't know, obey --enable-cross-guesses.
35916 gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
35917 esac
35919 else case e in #(
35920 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35921 /* end confdefs.h. */
35923 #include <stdio.h>
35924 #include <errno.h>
35925 #include <fcntl.h>
35928 $gl_mda_defines
35930 int main ()
35932 FILE *fp = fopen ("conftest.x", "re");
35933 if (fp != NULL)
35935 if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
35936 return 0;
35937 else
35938 /* 'e' ignored */
35939 return 1;
35941 else
35942 /* 'e' rejected */
35943 return 2;
35945 _ACEOF
35946 if ac_fn_c_try_run "$LINENO"
35947 then :
35948 gl_cv_func_fopen_mode_e=yes
35949 else case e in #(
35950 e) gl_cv_func_fopen_mode_e=no ;;
35951 esac
35953 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35954 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
35955 esac
35958 rm -f conftest.x
35960 esac
35962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_e" >&5
35963 printf "%s\n" "$gl_cv_func_fopen_mode_e" >&6; }
35964 REPLACE_FOPEN_FOR_FOPEN_GNU="$REPLACE_FOPEN"
35965 case "$gl_cv_func_fopen_mode_x" in
35966 *no) REPLACE_FOPEN_FOR_FOPEN_GNU=1 ;;
35967 esac
35968 case "$gl_cv_func_fopen_mode_e" in
35969 *no) REPLACE_FOPEN_FOR_FOPEN_GNU=1 ;;
35970 esac
35972 if test $REPLACE_FOPEN_FOR_FOPEN_GNU = 1; then
35981 gltests_LIBOBJS="$gltests_LIBOBJS fopen.$ac_objext"
35987 printf "%s\n" "#define GNULIB_FOPEN_GNU $gl_module_indicator_condition" >>confdefs.h
35999 if test "$GL_GNULIB_FOPEN_GNU" != 1; then
36000 if test "$GL_GNULIB_FOPEN_GNU" = 0; then
36001 GL_GNULIB_FOPEN_GNU=$gl_module_indicator_condition
36002 else
36003 GL_GNULIB_FOPEN_GNU="($GL_GNULIB_FOPEN_GNU || $gl_module_indicator_condition)"
36011 printf "%s\n" "#define GNULIB_TEST_FOPEN_GNU 1" >>confdefs.h
36020 ac_fn_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
36021 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36022 if test "x$ac_cv_have_decl_fpurge" = xyes
36023 then :
36024 ac_have_decl=1
36025 else case e in #(
36026 e) ac_have_decl=0 ;;
36027 esac
36029 printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h
36031 if test "x$ac_cv_func_fpurge" = xyes; then
36032 HAVE_FPURGE=1
36033 # Detect BSD bug. Only cygwin 1.7 and musl are known to be immune.
36034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
36035 printf %s "checking whether fpurge works... " >&6; }
36036 if test ${gl_cv_func_fpurge_works+y}
36037 then :
36038 printf %s "(cached) " >&6
36039 else case e in #(
36040 e) if test "$cross_compiling" = yes
36041 then :
36042 case "$host_os" in
36043 # Guess yes on musl systems.
36044 *-musl*) gl_cv_func_fpurge_works="guessing yes" ;;
36045 # Otherwise obey --enable-cross-guesses.
36046 *) gl_cv_func_fpurge_works="$gl_cross_guess_normal" ;;
36047 esac
36049 else case e in #(
36050 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36051 /* end confdefs.h. */
36052 #include <stdio.h>
36055 main (void)
36057 FILE *f = fopen ("conftest.txt", "w+");
36058 if (!f)
36059 return 1;
36060 if (fputc ('a', f) != 'a')
36061 { fclose (f); return 2; }
36062 rewind (f);
36063 if (fgetc (f) != 'a')
36064 { fclose (f); return 3; }
36065 if (fgetc (f) != EOF)
36066 { fclose (f); return 4; }
36067 if (fpurge (f) != 0)
36068 { fclose (f); return 5; }
36069 if (putc ('b', f) != 'b')
36070 { fclose (f); return 6; }
36071 if (fclose (f) != 0)
36072 return 7;
36073 if ((f = fopen ("conftest.txt", "r")) == NULL)
36074 return 8;
36075 if (fgetc (f) != 'a')
36076 { fclose (f); return 9; }
36077 if (fgetc (f) != 'b')
36078 { fclose (f); return 10; }
36079 if (fgetc (f) != EOF)
36080 { fclose (f); return 11; }
36081 if (fclose (f) != 0)
36082 return 12;
36083 if (remove ("conftest.txt") != 0)
36084 return 13;
36085 return 0;
36088 return 0;
36090 _ACEOF
36091 if ac_fn_c_try_run "$LINENO"
36092 then :
36093 gl_cv_func_fpurge_works=yes
36094 else case e in #(
36095 e) gl_cv_func_fpurge_works=no ;;
36096 esac
36098 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36099 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
36100 esac
36104 esac
36106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
36107 printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
36108 case "$gl_cv_func_fpurge_works" in
36109 *yes) ;;
36110 *) REPLACE_FPURGE=1 ;;
36111 esac
36112 else
36113 HAVE_FPURGE=0
36115 if test "x$ac_cv_have_decl_fpurge" = xno; then
36116 HAVE_DECL_FPURGE=0
36120 if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
36121 GL_COND_OBJ_FPURGE_TRUE=
36122 GL_COND_OBJ_FPURGE_FALSE='#'
36123 else
36124 GL_COND_OBJ_FPURGE_TRUE='#'
36125 GL_COND_OBJ_FPURGE_FALSE=
36128 if test -z "${GL_COND_OBJ_FPURGE_TRUE}" && test -z "${GL_COND_OBJ_FPURGE_FALSE}"; then
36129 GL_COND_OBJ_FPURGE_TRUE='#'
36130 GL_COND_OBJ_FPURGE_FALSE='#'
36142 if test "$GL_GNULIB_FPURGE" != 1; then
36143 if test "$GL_GNULIB_FPURGE" = 0; then
36144 GL_GNULIB_FPURGE=$gl_module_indicator_condition
36145 else
36146 GL_GNULIB_FPURGE="($GL_GNULIB_FPURGE || $gl_module_indicator_condition)"
36154 printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
36165 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
36166 REPLACE_FSEEK=1
36170 if test $REPLACE_FSEEK = 1; then
36171 GL_COND_OBJ_FSEEK_TRUE=
36172 GL_COND_OBJ_FSEEK_FALSE='#'
36173 else
36174 GL_COND_OBJ_FSEEK_TRUE='#'
36175 GL_COND_OBJ_FSEEK_FALSE=
36178 if test -z "${GL_COND_OBJ_FSEEK_TRUE}" && test -z "${GL_COND_OBJ_FSEEK_FALSE}"; then
36179 GL_COND_OBJ_FSEEK_TRUE='#'
36180 GL_COND_OBJ_FSEEK_FALSE='#'
36192 if test "$GL_GNULIB_FSEEK" != 1; then
36193 if test "$GL_GNULIB_FSEEK" = 0; then
36194 GL_GNULIB_FSEEK=$gl_module_indicator_condition
36195 else
36196 GL_GNULIB_FSEEK="($GL_GNULIB_FSEEK || $gl_module_indicator_condition)"
36204 printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
36217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
36218 printf %s "checking for fseeko... " >&6; }
36219 if test ${gl_cv_func_fseeko+y}
36220 then :
36221 printf %s "(cached) " >&6
36222 else case e in #(
36224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36225 /* end confdefs.h. */
36226 #include <stdio.h>
36229 main (void)
36231 fseeko (stdin, 0, 0);
36233 return 0;
36235 _ACEOF
36236 if ac_fn_c_try_link "$LINENO"
36237 then :
36238 gl_cv_func_fseeko=yes
36239 else case e in #(
36240 e) gl_cv_func_fseeko=no ;;
36241 esac
36243 rm -f core conftest.err conftest.$ac_objext conftest.beam \
36244 conftest$ac_exeext conftest.$ac_ext
36246 esac
36248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
36249 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
36252 if test $ac_cv_have_decl_fseeko = no; then
36253 HAVE_DECL_FSEEKO=0
36256 if test $gl_cv_func_fseeko = no; then
36257 HAVE_FSEEKO=0
36258 else
36259 if test $WINDOWS_64_BIT_OFF_T = 1; then
36260 REPLACE_FSEEKO=1
36262 if test $gl_cv_var_stdin_large_offset = no; then
36263 REPLACE_FSEEKO=1
36268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
36269 printf %s "checking whether fflush works on input streams... " >&6; }
36270 if test ${gl_cv_func_fflush_stdin+y}
36271 then :
36272 printf %s "(cached) " >&6
36273 else case e in #(
36274 e) echo hello world > conftest.txt
36275 if test "$cross_compiling" = yes
36276 then :
36277 case "$host_os" in
36278 # Guess no on native Windows.
36279 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
36280 *) gl_cv_func_fflush_stdin=cross ;;
36281 esac
36283 else case e in #(
36284 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36285 /* end confdefs.h. */
36287 #include <stdio.h>
36288 #if HAVE_UNISTD_H
36289 # include <unistd.h>
36290 #else /* on Windows with MSVC */
36291 # include <io.h>
36292 #endif
36295 $gl_mda_defines
36298 main (void)
36300 FILE *f = fopen ("conftest.txt", "r");
36301 char buffer[10];
36302 int fd;
36303 int c;
36304 if (f == NULL)
36305 return 1;
36306 fd = fileno (f);
36307 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
36308 { fclose (f); return 2; }
36309 /* For deterministic results, ensure f read a bigger buffer. */
36310 if (lseek (fd, 0, SEEK_CUR) == 5)
36311 { fclose (f); return 3; }
36312 /* POSIX requires fflush-fseek to set file offset of fd. This fails
36313 on BSD systems and on mingw. */
36314 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
36315 { fclose (f); return 4; }
36316 if (lseek (fd, 0, SEEK_CUR) != 5)
36317 { fclose (f); return 5; }
36318 /* Verify behaviour of fflush after ungetc. See
36319 <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
36320 /* Verify behaviour of fflush after a backup ungetc. This fails on
36321 mingw. */
36322 c = fgetc (f);
36323 ungetc (c, f);
36324 fflush (f);
36325 if (fgetc (f) != c)
36326 { fclose (f); return 6; }
36327 /* Verify behaviour of fflush after a non-backup ungetc. This fails
36328 on glibc 2.8 and on BSD systems. */
36329 c = fgetc (f);
36330 ungetc ('@', f);
36331 fflush (f);
36332 if (fgetc (f) != c)
36333 { fclose (f); return 7; }
36334 fclose (f);
36335 return 0;
36338 return 0;
36340 _ACEOF
36341 if ac_fn_c_try_run "$LINENO"
36342 then :
36343 gl_cv_func_fflush_stdin=yes
36344 else case e in #(
36345 e) gl_cv_func_fflush_stdin=no ;;
36346 esac
36348 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36349 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
36350 esac
36353 rm conftest.txt
36355 esac
36357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
36358 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
36359 case "$gl_cv_func_fflush_stdin" in
36360 *yes) gl_func_fflush_stdin=1 ;;
36361 *no) gl_func_fflush_stdin=0 ;;
36362 *) gl_func_fflush_stdin='(-1)' ;;
36363 esac
36365 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
36368 case "$gl_cv_func_fflush_stdin" in
36369 *yes) ;;
36370 *) REPLACE_FSEEKO=1 ;;
36371 esac
36376 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
36377 GL_COND_OBJ_FSEEKO_TRUE=
36378 GL_COND_OBJ_FSEEKO_FALSE='#'
36379 else
36380 GL_COND_OBJ_FSEEKO_TRUE='#'
36381 GL_COND_OBJ_FSEEKO_FALSE=
36384 if test -z "${GL_COND_OBJ_FSEEKO_TRUE}" && test -z "${GL_COND_OBJ_FSEEKO_FALSE}"; then
36385 GL_COND_OBJ_FSEEKO_TRUE='#'
36386 GL_COND_OBJ_FSEEKO_FALSE='#'
36389 if test -z "$GL_COND_OBJ_FSEEKO_TRUE"; then :
36392 ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
36393 if test "x$ac_cv_func__fseeki64" = xyes
36394 then :
36395 printf "%s\n" "#define HAVE__FSEEKI64 1" >>confdefs.h
36399 if test $ac_cv_func__fseeki64 = yes; then
36400 ac_fn_check_decl "$LINENO" "_fseeki64" "ac_cv_have_decl__fseeki64" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
36401 if test "x$ac_cv_have_decl__fseeki64" = xyes
36402 then :
36403 ac_have_decl=1
36404 else case e in #(
36405 e) ac_have_decl=0 ;;
36406 esac
36408 printf "%s\n" "#define HAVE_DECL__FSEEKI64 $ac_have_decl" >>confdefs.h
36423 if test "$GL_GNULIB_FSEEKO" != 1; then
36424 if test "$GL_GNULIB_FSEEKO" = 0; then
36425 GL_GNULIB_FSEEKO=$gl_module_indicator_condition
36426 else
36427 GL_GNULIB_FSEEKO="($GL_GNULIB_FSEEKO || $gl_module_indicator_condition)"
36435 printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
36443 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
36444 REPLACE_FTELL=1
36448 if test $REPLACE_FTELL = 1; then
36449 GL_COND_OBJ_FTELL_TRUE=
36450 GL_COND_OBJ_FTELL_FALSE='#'
36451 else
36452 GL_COND_OBJ_FTELL_TRUE='#'
36453 GL_COND_OBJ_FTELL_FALSE=
36456 if test -z "${GL_COND_OBJ_FTELL_TRUE}" && test -z "${GL_COND_OBJ_FTELL_FALSE}"; then
36457 GL_COND_OBJ_FTELL_TRUE='#'
36458 GL_COND_OBJ_FTELL_FALSE='#'
36470 if test "$GL_GNULIB_FTELL" != 1; then
36471 if test "$GL_GNULIB_FTELL" = 0; then
36472 GL_GNULIB_FTELL=$gl_module_indicator_condition
36473 else
36474 GL_GNULIB_FTELL="($GL_GNULIB_FTELL || $gl_module_indicator_condition)"
36482 printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
36496 if test $ac_cv_have_decl_ftello = no; then
36497 HAVE_DECL_FTELLO=0
36500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
36501 printf %s "checking for ftello... " >&6; }
36502 if test ${gl_cv_func_ftello+y}
36503 then :
36504 printf %s "(cached) " >&6
36505 else case e in #(
36507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36508 /* end confdefs.h. */
36509 #include <stdio.h>
36511 main (void)
36513 ftello (stdin);
36515 return 0;
36517 _ACEOF
36518 if ac_fn_c_try_link "$LINENO"
36519 then :
36520 gl_cv_func_ftello=yes
36521 else case e in #(
36522 e) gl_cv_func_ftello=no ;;
36523 esac
36525 rm -f core conftest.err conftest.$ac_objext conftest.beam \
36526 conftest$ac_exeext conftest.$ac_ext
36528 esac
36530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
36531 printf "%s\n" "$gl_cv_func_ftello" >&6; }
36532 if test $gl_cv_func_ftello = no; then
36533 HAVE_FTELLO=0
36534 else
36535 if test $WINDOWS_64_BIT_OFF_T = 1; then
36536 REPLACE_FTELLO=1
36538 if test $gl_cv_var_stdin_large_offset = no; then
36539 REPLACE_FTELLO=1
36541 if test $REPLACE_FTELLO = 0; then
36543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
36544 printf %s "checking whether ftello works... " >&6; }
36545 if test ${gl_cv_func_ftello_works+y}
36546 then :
36547 printf %s "(cached) " >&6
36548 else case e in #(
36550 case "$host_os" in
36551 # Guess no on Solaris.
36552 solaris*) gl_cv_func_ftello_works="guessing no" ;;
36553 # Guess yes on native Windows.
36554 mingw*) gl_cv_func_ftello_works="guessing yes" ;;
36555 # Guess yes otherwise.
36556 *) gl_cv_func_ftello_works="guessing yes" ;;
36557 esac
36558 if test "$cross_compiling" = yes
36559 then :
36561 else case e in #(
36562 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36563 /* end confdefs.h. */
36565 #include <stdio.h>
36566 #include <stdlib.h>
36567 #include <string.h>
36568 #define TESTFILE "conftest.tmp"
36570 main (void)
36572 FILE *fp;
36574 /* Create a file with some contents. */
36575 fp = fopen (TESTFILE, "w");
36576 if (fp == NULL)
36577 return 70;
36578 if (fwrite ("foogarsh", 1, 8, fp) < 8)
36579 { fclose (fp); return 71; }
36580 if (fclose (fp))
36581 return 72;
36583 /* The file's contents is now "foogarsh". */
36585 /* Try writing after reading to EOF. */
36586 fp = fopen (TESTFILE, "r+");
36587 if (fp == NULL)
36588 return 73;
36589 if (fseek (fp, -1, SEEK_END))
36590 { fclose (fp); return 74; }
36591 if (!(getc (fp) == 'h'))
36592 { fclose (fp); return 1; }
36593 if (!(getc (fp) == EOF))
36594 { fclose (fp); return 2; }
36595 if (!(ftell (fp) == 8))
36596 { fclose (fp); return 3; }
36597 if (!(ftell (fp) == 8))
36598 { fclose (fp); return 4; }
36599 if (!(putc ('!', fp) == '!'))
36600 { fclose (fp); return 5; }
36601 if (!(ftell (fp) == 9))
36602 { fclose (fp); return 6; }
36603 if (!(fclose (fp) == 0))
36604 return 7;
36605 fp = fopen (TESTFILE, "r");
36606 if (fp == NULL)
36607 return 75;
36609 char buf[10];
36610 if (!(fread (buf, 1, 10, fp) == 9))
36611 { fclose (fp); return 10; }
36612 if (!(memcmp (buf, "foogarsh!", 9) == 0))
36613 { fclose (fp); return 11; }
36615 if (!(fclose (fp) == 0))
36616 return 12;
36618 /* The file's contents is now "foogarsh!". */
36620 return 0;
36622 _ACEOF
36623 if ac_fn_c_try_run "$LINENO"
36624 then :
36625 gl_cv_func_ftello_works=yes
36626 else case e in #(
36627 e) gl_cv_func_ftello_works=no ;;
36628 esac
36630 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36631 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
36632 esac
36636 esac
36638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
36639 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
36640 case "$gl_cv_func_ftello_works" in
36641 *yes) ;;
36643 REPLACE_FTELLO=1
36645 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
36648 esac
36650 if test $REPLACE_FTELLO = 0; then
36652 if test $gl_ftello_broken_after_ungetc = yes; then
36653 REPLACE_FTELLO=1
36655 printf "%s\n" "#define FTELLO_BROKEN_AFTER_UNGETC 1" >>confdefs.h
36662 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
36663 GL_COND_OBJ_FTELLO_TRUE=
36664 GL_COND_OBJ_FTELLO_FALSE='#'
36665 else
36666 GL_COND_OBJ_FTELLO_TRUE='#'
36667 GL_COND_OBJ_FTELLO_FALSE=
36670 if test -z "${GL_COND_OBJ_FTELLO_TRUE}" && test -z "${GL_COND_OBJ_FTELLO_FALSE}"; then
36671 GL_COND_OBJ_FTELLO_TRUE='#'
36672 GL_COND_OBJ_FTELLO_FALSE='#'
36675 if test -z "$GL_COND_OBJ_FTELLO_TRUE"; then :
36678 ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
36679 if test "x$ac_cv_func__ftelli64" = xyes
36680 then :
36681 printf "%s\n" "#define HAVE__FTELLI64 1" >>confdefs.h
36697 if test "$GL_GNULIB_FTELLO" != 1; then
36698 if test "$GL_GNULIB_FTELLO" = 0; then
36699 GL_GNULIB_FTELLO=$gl_module_indicator_condition
36700 else
36701 GL_GNULIB_FTELLO="($GL_GNULIB_FTELLO || $gl_module_indicator_condition)"
36709 printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
36717 if test $ac_cv_func_ftruncate = yes; then
36720 case "$host_os" in
36721 mingw*)
36722 REPLACE_FTRUNCATE=1
36724 esac
36726 else
36727 HAVE_FTRUNCATE=0
36731 if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
36732 GL_COND_OBJ_FTRUNCATE_TRUE=
36733 GL_COND_OBJ_FTRUNCATE_FALSE='#'
36734 else
36735 GL_COND_OBJ_FTRUNCATE_TRUE='#'
36736 GL_COND_OBJ_FTRUNCATE_FALSE=
36739 if test -z "${GL_COND_OBJ_FTRUNCATE_TRUE}" && test -z "${GL_COND_OBJ_FTRUNCATE_FALSE}"; then
36740 GL_COND_OBJ_FTRUNCATE_TRUE='#'
36741 GL_COND_OBJ_FTRUNCATE_FALSE='#'
36744 if test -z "$GL_COND_OBJ_FTRUNCATE_TRUE"; then :
36747 ac_fn_c_check_func "$LINENO" "_chsize" "ac_cv_func__chsize"
36748 if test "x$ac_cv_func__chsize" = xyes
36749 then :
36750 printf "%s\n" "#define HAVE__CHSIZE 1" >>confdefs.h
36766 if test "$GL_GNULIB_FTRUNCATE" != 1; then
36767 if test "$GL_GNULIB_FTRUNCATE" = 0; then
36768 GL_GNULIB_FTRUNCATE=$gl_module_indicator_condition
36769 else
36770 GL_GNULIB_FTRUNCATE="($GL_GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
36778 printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
36787 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
36788 *yes,yes) ;;
36790 REPLACE_GETCWD=1
36792 esac
36795 if test $REPLACE_GETCWD = 1; then
36796 GL_COND_OBJ_GETCWD_LGPL_TRUE=
36797 GL_COND_OBJ_GETCWD_LGPL_FALSE='#'
36798 else
36799 GL_COND_OBJ_GETCWD_LGPL_TRUE='#'
36800 GL_COND_OBJ_GETCWD_LGPL_FALSE=
36803 if test -z "${GL_COND_OBJ_GETCWD_LGPL_TRUE}" && test -z "${GL_COND_OBJ_GETCWD_LGPL_FALSE}"; then
36804 GL_COND_OBJ_GETCWD_LGPL_TRUE='#'
36805 GL_COND_OBJ_GETCWD_LGPL_FALSE='#'
36817 if test "$GL_GNULIB_GETCWD" != 1; then
36818 if test "$GL_GNULIB_GETCWD" = 0; then
36819 GL_GNULIB_GETCWD=$gl_module_indicator_condition
36820 else
36821 GL_GNULIB_GETCWD="($GL_GNULIB_GETCWD || $gl_module_indicator_condition)"
36829 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
36837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
36838 printf %s "checking for getpagesize... " >&6; }
36839 if test ${gl_cv_func_getpagesize+y}
36840 then :
36841 printf %s "(cached) " >&6
36842 else case e in #(
36843 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36844 /* end confdefs.h. */
36845 #include <unistd.h>
36847 main (void)
36849 return getpagesize();
36851 return 0;
36854 _ACEOF
36855 if ac_fn_c_try_link "$LINENO"
36856 then :
36857 gl_cv_func_getpagesize=yes
36858 else case e in #(
36859 e) gl_cv_func_getpagesize=no ;;
36860 esac
36862 rm -f core conftest.err conftest.$ac_objext conftest.beam \
36863 conftest$ac_exeext conftest.$ac_ext
36865 esac
36867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
36868 printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
36870 if test $gl_cv_func_getpagesize = no; then
36871 HAVE_GETPAGESIZE=0
36872 ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
36873 if test "x$ac_cv_header_OS_h" = xyes
36874 then :
36875 printf "%s\n" "#define HAVE_OS_H 1" >>confdefs.h
36879 if test $ac_cv_header_OS_h = yes; then
36880 HAVE_OS_H=1
36882 ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
36883 if test "x$ac_cv_header_sys_param_h" = xyes
36884 then :
36885 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
36889 if test $ac_cv_header_sys_param_h = yes; then
36890 HAVE_SYS_PARAM_H=1
36893 case "$host_os" in
36894 mingw*)
36895 REPLACE_GETPAGESIZE=1
36897 esac
36898 ac_fn_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
36899 if test "x$ac_cv_have_decl_getpagesize" = xyes
36900 then :
36902 else case e in #(
36903 e) HAVE_DECL_GETPAGESIZE=0 ;;
36904 esac
36908 if test $REPLACE_GETPAGESIZE = 1; then
36909 GL_COND_OBJ_GETPAGESIZE_TRUE=
36910 GL_COND_OBJ_GETPAGESIZE_FALSE='#'
36911 else
36912 GL_COND_OBJ_GETPAGESIZE_TRUE='#'
36913 GL_COND_OBJ_GETPAGESIZE_FALSE=
36916 if test -z "${GL_COND_OBJ_GETPAGESIZE_TRUE}" && test -z "${GL_COND_OBJ_GETPAGESIZE_FALSE}"; then
36917 GL_COND_OBJ_GETPAGESIZE_TRUE='#'
36918 GL_COND_OBJ_GETPAGESIZE_FALSE='#'
36930 if test "$GL_GNULIB_GETPAGESIZE" != 1; then
36931 if test "$GL_GNULIB_GETPAGESIZE" = 0; then
36932 GL_GNULIB_GETPAGESIZE=$gl_module_indicator_condition
36933 else
36934 GL_GNULIB_GETPAGESIZE="($GL_GNULIB_GETPAGESIZE || $gl_module_indicator_condition)"
36942 printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
36953 gl_gettimeofday_timezone=void
36954 if test $ac_cv_func_gettimeofday != yes; then
36955 HAVE_GETTIMEOFDAY=0
36956 else
36957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
36958 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
36959 if test ${gl_cv_func_gettimeofday_posix_signature+y}
36960 then :
36961 printf %s "(cached) " >&6
36962 else case e in #(
36963 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36964 /* end confdefs.h. */
36965 #include <sys/time.h>
36966 struct timeval c;
36967 int gettimeofday (struct timeval *restrict, void *restrict);
36970 main (void)
36972 /* glibc uses struct timezone * rather than the POSIX void *
36973 if _GNU_SOURCE is defined. However, since the only portable
36974 use of gettimeofday uses NULL as the second parameter, and
36975 since the glibc definition is actually more typesafe, it is
36976 not worth wrapping this to get a compliant signature. */
36977 int (*f) (struct timeval *restrict, void *restrict)
36978 = gettimeofday;
36979 int x = f (&c, 0);
36980 return !(x | c.tv_sec | c.tv_usec);
36983 return 0;
36985 _ACEOF
36986 if ac_fn_c_try_compile "$LINENO"
36987 then :
36988 gl_cv_func_gettimeofday_posix_signature=yes
36989 else case e in #(
36990 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36991 /* end confdefs.h. */
36992 #include <sys/time.h>
36993 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
36996 main (void)
37000 return 0;
37002 _ACEOF
37003 if ac_fn_c_try_compile "$LINENO"
37004 then :
37005 gl_cv_func_gettimeofday_posix_signature=almost
37006 else case e in #(
37007 e) gl_cv_func_gettimeofday_posix_signature=no ;;
37008 esac
37010 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
37011 esac
37013 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
37014 esac
37016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
37017 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
37018 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
37019 gl_gettimeofday_timezone='struct timezone'
37020 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
37021 REPLACE_GETTIMEOFDAY=1
37023 if test $REPLACE_STRUCT_TIMEVAL = 1; then
37024 REPLACE_GETTIMEOFDAY=1
37026 case "$host_os" in
37027 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
37028 esac
37031 printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
37035 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
37036 GL_COND_OBJ_GETTIMEOFDAY_TRUE=
37037 GL_COND_OBJ_GETTIMEOFDAY_FALSE='#'
37038 else
37039 GL_COND_OBJ_GETTIMEOFDAY_TRUE='#'
37040 GL_COND_OBJ_GETTIMEOFDAY_FALSE=
37043 if test -z "${GL_COND_OBJ_GETTIMEOFDAY_TRUE}" && test -z "${GL_COND_OBJ_GETTIMEOFDAY_FALSE}"; then
37044 GL_COND_OBJ_GETTIMEOFDAY_TRUE='#'
37045 GL_COND_OBJ_GETTIMEOFDAY_FALSE='#'
37048 if test -z "$GL_COND_OBJ_GETTIMEOFDAY_TRUE"; then :
37062 if test "$GL_GNULIB_GETTIMEOFDAY" != 1; then
37063 if test "$GL_GNULIB_GETTIMEOFDAY" = 0; then
37064 GL_GNULIB_GETTIMEOFDAY=$gl_module_indicator_condition
37065 else
37066 GL_GNULIB_GETTIMEOFDAY="($GL_GNULIB_GETTIMEOFDAY || $gl_module_indicator_condition)"
37074 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
37087 HAVE_INET_PTON=1
37088 INET_PTON_LIB=
37093 if test $ac_cv_header_sys_socket_h != yes; then
37094 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
37095 if test "x$ac_cv_header_winsock2_h" = xyes
37096 then :
37097 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
37102 if test "$ac_cv_header_winsock2_h" = yes; then
37103 HAVE_WINSOCK2_H=1
37104 UNISTD_H_HAVE_WINSOCK2_H=1
37105 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
37106 else
37107 HAVE_WINSOCK2_H=0
37111 if test $HAVE_WINSOCK2_H = 1; then
37112 REPLACE_INET_PTON=1
37113 ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
37114 " "$ac_c_undeclared_builtin_options" "CFLAGS"
37115 if test "x$ac_cv_have_decl_inet_pton" = xyes
37116 then :
37117 ac_have_decl=1
37118 else case e in #(
37119 e) ac_have_decl=0 ;;
37120 esac
37122 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
37124 if test $ac_cv_have_decl_inet_pton = yes; then
37125 INET_PTON_LIB="-lws2_32"
37126 else
37127 HAVE_DECL_INET_PTON=0
37129 else
37130 gl_save_LIBS=$LIBS
37131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
37132 printf %s "checking for library containing inet_pton... " >&6; }
37133 if test ${ac_cv_search_inet_pton+y}
37134 then :
37135 printf %s "(cached) " >&6
37136 else case e in #(
37137 e) ac_func_search_save_LIBS=$LIBS
37138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37139 /* end confdefs.h. */
37141 /* Override any GCC internal prototype to avoid an error.
37142 Use char because int might match the return type of a GCC
37143 builtin and then its argument prototype would still apply.
37144 The 'extern "C"' is for builds by C++ compilers;
37145 although this is not generally supported in C code, supporting it here
37146 has little cost and some practical benefit (sr 110532). */
37147 #ifdef __cplusplus
37148 extern "C"
37149 #endif
37150 char inet_pton (void);
37152 main (void)
37154 return inet_pton ();
37156 return 0;
37158 _ACEOF
37159 for ac_lib in '' nsl resolv network
37161 if test -z "$ac_lib"; then
37162 ac_res="none required"
37163 else
37164 ac_res=-l$ac_lib
37165 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
37167 if ac_fn_c_try_link "$LINENO"
37168 then :
37169 ac_cv_search_inet_pton=$ac_res
37171 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37172 conftest$ac_exeext
37173 if test ${ac_cv_search_inet_pton+y}
37174 then :
37175 break
37177 done
37178 if test ${ac_cv_search_inet_pton+y}
37179 then :
37181 else case e in #(
37182 e) ac_cv_search_inet_pton=no ;;
37183 esac
37185 rm conftest.$ac_ext
37186 LIBS=$ac_func_search_save_LIBS ;;
37187 esac
37189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
37190 printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
37191 ac_res=$ac_cv_search_inet_pton
37192 if test "$ac_res" != no
37193 then :
37194 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
37196 else case e in #(
37197 e) ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
37198 if test "x$ac_cv_func_inet_pton" = xyes
37199 then :
37200 printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
37204 if test $ac_cv_func_inet_pton = no; then
37205 HAVE_INET_PTON=0
37208 esac
37211 LIBS=$gl_save_LIBS
37213 if test "$ac_cv_search_inet_pton" != "no" \
37214 && test "$ac_cv_search_inet_pton" != "none required"; then
37215 INET_PTON_LIB="$ac_cv_search_inet_pton"
37219 ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
37220 #if HAVE_NETDB_H
37221 # include <netdb.h>
37222 #endif
37224 " "$ac_c_undeclared_builtin_options" "CFLAGS"
37225 if test "x$ac_cv_have_decl_inet_pton" = xyes
37226 then :
37227 ac_have_decl=1
37228 else case e in #(
37229 e) ac_have_decl=0 ;;
37230 esac
37232 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
37234 if test $ac_cv_have_decl_inet_pton = no; then
37235 HAVE_DECL_INET_PTON=0
37241 if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1; then
37242 GL_COND_OBJ_INET_PTON_TRUE=
37243 GL_COND_OBJ_INET_PTON_FALSE='#'
37244 else
37245 GL_COND_OBJ_INET_PTON_TRUE='#'
37246 GL_COND_OBJ_INET_PTON_FALSE=
37249 if test -z "${GL_COND_OBJ_INET_PTON_TRUE}" && test -z "${GL_COND_OBJ_INET_PTON_FALSE}"; then
37250 GL_COND_OBJ_INET_PTON_TRUE='#'
37251 GL_COND_OBJ_INET_PTON_FALSE='#'
37254 if test -z "$GL_COND_OBJ_INET_PTON_TRUE"; then :
37270 if test "$GL_GNULIB_INET_PTON" != 1; then
37271 if test "$GL_GNULIB_INET_PTON" = 0; then
37272 GL_GNULIB_INET_PTON=$gl_module_indicator_condition
37273 else
37274 GL_GNULIB_INET_PTON="($GL_GNULIB_INET_PTON || $gl_module_indicator_condition)"
37281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
37282 printf %s "checking whether byte ordering is bigendian... " >&6; }
37283 if test ${ac_cv_c_bigendian+y}
37284 then :
37285 printf %s "(cached) " >&6
37286 else case e in #(
37287 e) ac_cv_c_bigendian=unknown
37288 # See if we're dealing with a universal compiler.
37289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37290 /* end confdefs.h. */
37291 #ifndef __APPLE_CC__
37292 not a universal capable compiler
37293 #endif
37294 typedef int dummy;
37296 _ACEOF
37297 if ac_fn_c_try_compile "$LINENO"
37298 then :
37300 # Check for potential -arch flags. It is not universal unless
37301 # there are at least two -arch flags with different values.
37302 ac_arch=
37303 ac_prev=
37304 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
37305 if test -n "$ac_prev"; then
37306 case $ac_word in
37307 i?86 | x86_64 | ppc | ppc64)
37308 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
37309 ac_arch=$ac_word
37310 else
37311 ac_cv_c_bigendian=universal
37312 break
37315 esac
37316 ac_prev=
37317 elif test "x$ac_word" = "x-arch"; then
37318 ac_prev=arch
37320 done
37322 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37323 if test $ac_cv_c_bigendian = unknown; then
37324 # See if sys/param.h defines the BYTE_ORDER macro.
37325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37326 /* end confdefs.h. */
37327 #include <sys/types.h>
37328 #include <sys/param.h>
37331 main (void)
37333 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
37334 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
37335 && LITTLE_ENDIAN)
37336 bogus endian macros
37337 #endif
37340 return 0;
37342 _ACEOF
37343 if ac_fn_c_try_compile "$LINENO"
37344 then :
37345 # It does; now see whether it defined to BIG_ENDIAN or not.
37346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37347 /* end confdefs.h. */
37348 #include <sys/types.h>
37349 #include <sys/param.h>
37352 main (void)
37354 #if BYTE_ORDER != BIG_ENDIAN
37355 not big endian
37356 #endif
37359 return 0;
37361 _ACEOF
37362 if ac_fn_c_try_compile "$LINENO"
37363 then :
37364 ac_cv_c_bigendian=yes
37365 else case e in #(
37366 e) ac_cv_c_bigendian=no ;;
37367 esac
37369 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37371 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37373 if test $ac_cv_c_bigendian = unknown; then
37374 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
37375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37376 /* end confdefs.h. */
37377 #include <limits.h>
37380 main (void)
37382 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
37383 bogus endian macros
37384 #endif
37387 return 0;
37389 _ACEOF
37390 if ac_fn_c_try_compile "$LINENO"
37391 then :
37392 # It does; now see whether it defined to _BIG_ENDIAN or not.
37393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37394 /* end confdefs.h. */
37395 #include <limits.h>
37398 main (void)
37400 #ifndef _BIG_ENDIAN
37401 not big endian
37402 #endif
37405 return 0;
37407 _ACEOF
37408 if ac_fn_c_try_compile "$LINENO"
37409 then :
37410 ac_cv_c_bigendian=yes
37411 else case e in #(
37412 e) ac_cv_c_bigendian=no ;;
37413 esac
37415 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37417 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37419 if test $ac_cv_c_bigendian = unknown; then
37420 # Compile a test program.
37421 if test "$cross_compiling" = yes
37422 then :
37423 # Try to guess by grepping values from an object file.
37424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37425 /* end confdefs.h. */
37426 unsigned short int ascii_mm[] =
37427 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
37428 unsigned short int ascii_ii[] =
37429 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
37430 int use_ascii (int i) {
37431 return ascii_mm[i] + ascii_ii[i];
37433 unsigned short int ebcdic_ii[] =
37434 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
37435 unsigned short int ebcdic_mm[] =
37436 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
37437 int use_ebcdic (int i) {
37438 return ebcdic_mm[i] + ebcdic_ii[i];
37441 main (int argc, char **argv)
37443 /* Intimidate the compiler so that it does not
37444 optimize the arrays away. */
37445 char *p = argv[0];
37446 ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
37447 ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
37448 return use_ascii (argc) == use_ebcdic (*p);
37450 _ACEOF
37451 if ac_fn_c_try_link "$LINENO"
37452 then :
37453 if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
37454 ac_cv_c_bigendian=yes
37456 if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
37457 if test "$ac_cv_c_bigendian" = unknown; then
37458 ac_cv_c_bigendian=no
37459 else
37460 # finding both strings is unlikely to happen, but who knows?
37461 ac_cv_c_bigendian=unknown
37465 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37466 conftest$ac_exeext conftest.$ac_ext
37467 else case e in #(
37468 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37469 /* end confdefs.h. */
37470 $ac_includes_default
37472 main (void)
37475 /* Are we little or big endian? From Harbison&Steele. */
37476 union
37478 long int l;
37479 char c[sizeof (long int)];
37480 } u;
37481 u.l = 1;
37482 return u.c[sizeof (long int) - 1] == 1;
37485 return 0;
37487 _ACEOF
37488 if ac_fn_c_try_run "$LINENO"
37489 then :
37490 ac_cv_c_bigendian=no
37491 else case e in #(
37492 e) ac_cv_c_bigendian=yes ;;
37493 esac
37495 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37496 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
37497 esac
37500 fi ;;
37501 esac
37503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
37504 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
37505 case $ac_cv_c_bigendian in #(
37506 yes)
37507 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
37508 ;; #(
37510 ;; #(
37511 universal)
37513 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
37515 ;; #(
37517 as_fn_error $? "unknown endianness
37518 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
37519 esac
37525 HAVE_IOCTL=1
37526 if test "$ac_cv_header_winsock2_h" = yes; then
37527 HAVE_IOCTL=0
37528 else
37529 ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
37530 if test "x$ac_cv_func_ioctl" = xyes
37531 then :
37532 printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
37536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
37537 printf %s "checking for ioctl with POSIX signature... " >&6; }
37538 if test ${gl_cv_func_ioctl_posix_signature+y}
37539 then :
37540 printf %s "(cached) " >&6
37541 else case e in #(
37542 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37543 /* end confdefs.h. */
37544 #include <sys/ioctl.h>
37545 /* On some platforms, ioctl() is declared in <unistd.h>. */
37546 #include <unistd.h>
37549 main (void)
37551 extern
37552 #ifdef __cplusplus
37554 #endif
37555 int ioctl (int, int, ...);
37558 return 0;
37561 _ACEOF
37562 if ac_fn_c_try_compile "$LINENO"
37563 then :
37564 gl_cv_func_ioctl_posix_signature=yes
37565 else case e in #(
37566 e) gl_cv_func_ioctl_posix_signature=no ;;
37567 esac
37569 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37571 esac
37573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
37574 printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
37575 if test $gl_cv_func_ioctl_posix_signature != yes; then
37576 REPLACE_IOCTL=1
37581 if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
37582 GL_COND_OBJ_IOCTL_TRUE=
37583 GL_COND_OBJ_IOCTL_FALSE='#'
37584 else
37585 GL_COND_OBJ_IOCTL_TRUE='#'
37586 GL_COND_OBJ_IOCTL_FALSE=
37589 if test -z "${GL_COND_OBJ_IOCTL_TRUE}" && test -z "${GL_COND_OBJ_IOCTL_FALSE}"; then
37590 GL_COND_OBJ_IOCTL_TRUE='#'
37591 GL_COND_OBJ_IOCTL_FALSE='#'
37603 if test "$GL_GNULIB_IOCTL" != 1; then
37604 if test "$GL_GNULIB_IOCTL" = 0; then
37605 GL_GNULIB_IOCTL=$gl_module_indicator_condition
37606 else
37607 GL_GNULIB_IOCTL="($GL_GNULIB_IOCTL || $gl_module_indicator_condition)"
37615 printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
37624 if test $ac_cv_func_isblank = no; then
37625 HAVE_ISBLANK=0
37629 if test $HAVE_ISBLANK = 0; then
37630 GL_COND_OBJ_ISBLANK_TRUE=
37631 GL_COND_OBJ_ISBLANK_FALSE='#'
37632 else
37633 GL_COND_OBJ_ISBLANK_TRUE='#'
37634 GL_COND_OBJ_ISBLANK_FALSE=
37637 if test -z "${GL_COND_OBJ_ISBLANK_TRUE}" && test -z "${GL_COND_OBJ_ISBLANK_FALSE}"; then
37638 GL_COND_OBJ_ISBLANK_TRUE='#'
37639 GL_COND_OBJ_ISBLANK_FALSE='#'
37644 printf "%s\n" "#define GNULIB_ISBLANK $gl_module_indicator_condition" >>confdefs.h
37656 if test "$GL_GNULIB_ISBLANK" != 1; then
37657 if test "$GL_GNULIB_ISBLANK" = 0; then
37658 GL_GNULIB_ISBLANK=$gl_module_indicator_condition
37659 else
37660 GL_GNULIB_ISBLANK="($GL_GNULIB_ISBLANK || $gl_module_indicator_condition)"
37670 if test $ac_cv_func_link = no; then
37671 HAVE_LINK=0
37672 else
37673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
37674 printf %s "checking whether link obeys POSIX... " >&6; }
37675 if test ${gl_cv_func_link_works+y}
37676 then :
37677 printf %s "(cached) " >&6
37678 else case e in #(
37679 e) touch conftest.a
37680 # Assume that if we have lstat, we can also check symlinks.
37681 if test $ac_cv_func_lstat = yes; then
37682 ln -s conftest.a conftest.lnk
37684 if test "$cross_compiling" = yes
37685 then :
37686 case "$host_os" in
37687 # Guess yes on Linux systems.
37688 linux-* | linux) gl_cv_func_link_works="guessing yes" ;;
37689 # Guess yes on glibc systems.
37690 *-gnu* | gnu*) gl_cv_func_link_works="guessing yes" ;;
37691 # If we don't know, obey --enable-cross-guesses.
37692 *) gl_cv_func_link_works="$gl_cross_guess_normal" ;;
37693 esac
37695 else case e in #(
37696 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37697 /* end confdefs.h. */
37698 #include <unistd.h>
37699 #include <stdio.h>
37702 main (void)
37704 int result = 0;
37705 if (!link ("conftest.a", "conftest.b/"))
37706 result |= 1;
37707 #if HAVE_LSTAT
37708 if (!link ("conftest.lnk/", "conftest.b"))
37709 result |= 2;
37710 if (rename ("conftest.a", "conftest.b"))
37711 result |= 4;
37712 if (!link ("conftest.b", "conftest.lnk"))
37713 result |= 8;
37714 #endif
37715 return result;
37718 return 0;
37720 _ACEOF
37721 if ac_fn_c_try_run "$LINENO"
37722 then :
37723 gl_cv_func_link_works=yes
37724 else case e in #(
37725 e) gl_cv_func_link_works=no ;;
37726 esac
37728 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37729 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
37730 esac
37733 rm -f conftest.a conftest.b conftest.lnk ;;
37734 esac
37736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
37737 printf "%s\n" "$gl_cv_func_link_works" >&6; }
37738 case "$gl_cv_func_link_works" in
37739 *yes) ;;
37741 REPLACE_LINK=1
37743 esac
37747 if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
37748 GL_COND_OBJ_LINK_TRUE=
37749 GL_COND_OBJ_LINK_FALSE='#'
37750 else
37751 GL_COND_OBJ_LINK_TRUE='#'
37752 GL_COND_OBJ_LINK_FALSE=
37755 if test -z "${GL_COND_OBJ_LINK_TRUE}" && test -z "${GL_COND_OBJ_LINK_FALSE}"; then
37756 GL_COND_OBJ_LINK_TRUE='#'
37757 GL_COND_OBJ_LINK_FALSE='#'
37769 if test "$GL_GNULIB_LINK" != 1; then
37770 if test "$GL_GNULIB_LINK" = 0; then
37771 GL_GNULIB_LINK=$gl_module_indicator_condition
37772 else
37773 GL_GNULIB_LINK="($GL_GNULIB_LINK || $gl_module_indicator_condition)"
37781 printf "%s\n" "#define GNULIB_TEST_LINK 1" >>confdefs.h
37787 if test "$ac_cv_header_winsock2_h" = yes; then
37788 GL_COND_OBJ_LISTEN_TRUE=
37789 GL_COND_OBJ_LISTEN_FALSE='#'
37790 else
37791 GL_COND_OBJ_LISTEN_TRUE='#'
37792 GL_COND_OBJ_LISTEN_FALSE=
37795 if test -z "${GL_COND_OBJ_LISTEN_TRUE}" && test -z "${GL_COND_OBJ_LISTEN_FALSE}"; then
37796 GL_COND_OBJ_LISTEN_TRUE='#'
37797 GL_COND_OBJ_LISTEN_FALSE='#'
37809 if test "$GL_GNULIB_LISTEN" != 1; then
37810 if test "$GL_GNULIB_LISTEN" = 0; then
37811 GL_GNULIB_LISTEN=$gl_module_indicator_condition
37812 else
37813 GL_GNULIB_LISTEN="($GL_GNULIB_LISTEN || $gl_module_indicator_condition)"
37821 printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
37833 if test $HAVE_LOCALE_T = 1; then
37835 gl_func_newlocale="$ac_cv_func_newlocale"
37836 gl_func_duplocale="$ac_cv_func_duplocale"
37837 gl_func_freelocale="$ac_cv_func_freelocale"
37838 else
37839 gl_func_newlocale=no
37840 gl_func_duplocale=no
37841 gl_func_freelocale=no
37843 if test $gl_func_newlocale != yes; then
37844 HAVE_NEWLOCALE=0
37846 if test $gl_func_duplocale != yes; then
37847 HAVE_DUPLOCALE=0
37849 if test $gl_func_freelocale != yes; then
37850 HAVE_FREELOCALE=0
37852 if test $gt_localename_enhances_locale_funcs = yes; then
37853 REPLACE_NEWLOCALE=1
37854 REPLACE_DUPLOCALE=1
37855 REPLACE_FREELOCALE=1
37867 if test "$GL_GNULIB_LOCALENAME" != 1; then
37868 if test "$GL_GNULIB_LOCALENAME" = 0; then
37869 GL_GNULIB_LOCALENAME=$gl_module_indicator_condition
37870 else
37871 GL_GNULIB_LOCALENAME="($GL_GNULIB_LOCALENAME || $gl_module_indicator_condition)"
37879 printf "%s\n" "#define GNULIB_TEST_LOCALENAME 1" >>confdefs.h
37890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
37891 printf %s "checking whether lseek detects pipes... " >&6; }
37892 if test ${gl_cv_func_lseek_pipe+y}
37893 then :
37894 printf %s "(cached) " >&6
37895 else case e in #(
37896 e) case "$host_os" in
37897 mingw*)
37898 gl_cv_func_lseek_pipe=no
37901 if test $cross_compiling = no; then
37902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37903 /* end confdefs.h. */
37905 #include <sys/types.h> /* for off_t */
37906 #include <stdio.h> /* for SEEK_CUR */
37907 #if HAVE_UNISTD_H
37908 # include <unistd.h>
37909 #else /* on Windows with MSVC */
37910 # include <io.h>
37911 #endif
37914 $gl_mda_defines
37917 main (void)
37920 /* Exit with success only if stdin is seekable. */
37921 return lseek (0, (off_t)0, SEEK_CUR) < 0;
37924 return 0;
37926 _ACEOF
37927 if ac_fn_c_try_link "$LINENO"
37928 then :
37929 if test -s conftest$ac_exeext \
37930 && ./conftest$ac_exeext < conftest.$ac_ext \
37931 && test 1 = "`echo hi \
37932 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
37933 gl_cv_func_lseek_pipe=yes
37934 else
37935 gl_cv_func_lseek_pipe=no
37938 else case e in #(
37939 e) gl_cv_func_lseek_pipe=no ;;
37940 esac
37942 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37943 conftest$ac_exeext conftest.$ac_ext
37944 else
37945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37946 /* end confdefs.h. */
37948 #if defined __BEOS__
37949 /* BeOS mistakenly return 0 when trying to seek on pipes. */
37950 Choke me.
37951 #endif
37952 _ACEOF
37953 if ac_fn_c_try_compile "$LINENO"
37954 then :
37955 gl_cv_func_lseek_pipe=yes
37956 else case e in #(
37957 e) gl_cv_func_lseek_pipe=no ;;
37958 esac
37960 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
37963 esac
37965 esac
37967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
37968 printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
37969 if test "$gl_cv_func_lseek_pipe" = no; then
37970 REPLACE_LSEEK=1
37972 printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
37977 if test $WINDOWS_64_BIT_OFF_T = 1; then
37978 REPLACE_LSEEK=1
37981 case $host_os in
37982 darwin*)
37983 REPLACE_LSEEK=1;;
37984 esac
37987 if test $REPLACE_LSEEK = 1; then
37988 GL_COND_OBJ_LSEEK_TRUE=
37989 GL_COND_OBJ_LSEEK_FALSE='#'
37990 else
37991 GL_COND_OBJ_LSEEK_TRUE='#'
37992 GL_COND_OBJ_LSEEK_FALSE=
37995 if test -z "${GL_COND_OBJ_LSEEK_TRUE}" && test -z "${GL_COND_OBJ_LSEEK_FALSE}"; then
37996 GL_COND_OBJ_LSEEK_TRUE='#'
37997 GL_COND_OBJ_LSEEK_FALSE='#'
38009 if test "$GL_GNULIB_LSEEK" != 1; then
38010 if test "$GL_GNULIB_LSEEK" = 0; then
38011 GL_GNULIB_LSEEK=$gl_module_indicator_condition
38012 else
38013 GL_GNULIB_LSEEK="($GL_GNULIB_LSEEK || $gl_module_indicator_condition)"
38021 printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
38028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
38029 printf %s "checking for a traditional french locale... " >&6; }
38030 if test ${gt_cv_locale_fr+y}
38031 then :
38032 printf %s "(cached) " >&6
38033 else case e in #(
38035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38036 /* end confdefs.h. */
38038 #include <locale.h>
38039 #include <time.h>
38040 #if HAVE_LANGINFO_CODESET
38041 # include <langinfo.h>
38042 #endif
38043 #include <stdlib.h>
38044 #include <string.h>
38045 struct tm t;
38046 char buf[16];
38047 int main () {
38048 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
38049 imitates locale dependent behaviour by looking at the environment
38050 variables, and all locales use the UTF-8 encoding. */
38051 #if defined __BEOS__ || defined __HAIKU__
38052 return 1;
38053 #else
38054 /* Check whether the given locale name is recognized by the system. */
38055 # if defined _WIN32 && !defined __CYGWIN__
38056 /* On native Windows, setlocale(category, "") looks at the system settings,
38057 not at the environment variables. Also, when an encoding suffix such
38058 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38059 category of the locale to "C". */
38060 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38061 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38062 return 1;
38063 # else
38064 if (setlocale (LC_ALL, "") == NULL) return 1;
38065 # endif
38066 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38067 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38068 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38069 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38070 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38071 some unit tests fail.
38072 On MirBSD 10, when an unsupported locale is specified, setlocale()
38073 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
38074 # if HAVE_LANGINFO_CODESET
38076 const char *cs = nl_langinfo (CODESET);
38077 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38078 || strcmp (cs, "UTF-8") == 0)
38079 return 1;
38081 # endif
38082 # ifdef __CYGWIN__
38083 /* On Cygwin, avoid locale names without encoding suffix, because the
38084 locale_charset() function relies on the encoding suffix. Note that
38085 LC_ALL is set on the command line. */
38086 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38087 # endif
38088 /* Check whether in the abbreviation of the second month, the second
38089 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
38090 one byte long. This excludes the UTF-8 encoding. */
38091 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38092 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
38093 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
38094 /* Check whether the decimal separator is a comma.
38095 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38096 are nl_langinfo(RADIXCHAR) are both ".". */
38097 if (localeconv () ->decimal_point[0] != ',') return 1;
38098 # endif
38099 return 0;
38100 #endif
38103 _ACEOF
38104 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38105 (eval $ac_link) 2>&5
38106 ac_status=$?
38107 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38108 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38109 case "$host_os" in
38110 # Handle native Windows specially, because there setlocale() interprets
38111 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38112 # "fr" or "fra" as "French" or "French_France.1252",
38113 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38114 # "ja" as "Japanese" or "Japanese_Japan.932",
38115 # and similar.
38116 mingw*)
38117 # Test for the native Windows locale name.
38118 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38119 gt_cv_locale_fr=French_France.1252
38120 else
38121 # None found.
38122 gt_cv_locale_fr=none
38126 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38127 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38128 # configure script would override the LC_ALL setting. Likewise for
38129 # LC_CTYPE, which is also set at the beginning of the configure script.
38130 # Test for the usual locale name.
38131 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38132 gt_cv_locale_fr=fr_FR
38133 else
38134 # Test for the locale name with explicit encoding suffix.
38135 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38136 gt_cv_locale_fr=fr_FR.ISO-8859-1
38137 else
38138 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
38139 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38140 gt_cv_locale_fr=fr_FR.ISO8859-1
38141 else
38142 # Test for the HP-UX locale name.
38143 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38144 gt_cv_locale_fr=fr_FR.iso88591
38145 else
38146 # Test for the Solaris 7 locale name.
38147 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38148 gt_cv_locale_fr=fr
38149 else
38150 # None found.
38151 gt_cv_locale_fr=none
38158 esac
38160 rm -fr conftest*
38162 esac
38164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
38165 printf "%s\n" "$gt_cv_locale_fr" >&6; }
38166 LOCALE_FR=$gt_cv_locale_fr
38171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
38172 printf %s "checking for a french Unicode locale... " >&6; }
38173 if test ${gt_cv_locale_fr_utf8+y}
38174 then :
38175 printf %s "(cached) " >&6
38176 else case e in #(
38178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38179 /* end confdefs.h. */
38181 #include <locale.h>
38182 #include <time.h>
38183 #if HAVE_LANGINFO_CODESET
38184 # include <langinfo.h>
38185 #endif
38186 #include <stdlib.h>
38187 #include <string.h>
38188 struct tm t;
38189 char buf[16];
38190 int main () {
38191 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
38192 imitates locale dependent behaviour by looking at the environment
38193 variables, and all locales use the UTF-8 encoding. */
38194 #if !(defined __BEOS__ || defined __HAIKU__)
38195 /* Check whether the given locale name is recognized by the system. */
38196 # if defined _WIN32 && !defined __CYGWIN__
38197 /* On native Windows, setlocale(category, "") looks at the system settings,
38198 not at the environment variables. Also, when an encoding suffix such
38199 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38200 category of the locale to "C". */
38201 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38202 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38203 return 1;
38204 # else
38205 if (setlocale (LC_ALL, "") == NULL) return 1;
38206 # endif
38207 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38208 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38209 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38210 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38211 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38212 some unit tests fail. */
38213 # if HAVE_LANGINFO_CODESET
38215 const char *cs = nl_langinfo (CODESET);
38216 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
38217 return 1;
38219 # endif
38220 # ifdef __CYGWIN__
38221 /* On Cygwin, avoid locale names without encoding suffix, because the
38222 locale_charset() function relies on the encoding suffix. Note that
38223 LC_ALL is set on the command line. */
38224 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38225 # endif
38226 /* Check whether in the abbreviation of the second month, the second
38227 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
38228 two bytes long, with UTF-8 encoding. */
38229 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38230 if (strftime (buf, sizeof (buf), "%b", &t) < 4
38231 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
38232 return 1;
38233 #endif
38234 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
38235 /* Check whether the decimal separator is a comma.
38236 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38237 are nl_langinfo(RADIXCHAR) are both ".". */
38238 if (localeconv () ->decimal_point[0] != ',') return 1;
38239 #endif
38240 return 0;
38243 _ACEOF
38244 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38245 (eval $ac_link) 2>&5
38246 ac_status=$?
38247 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38248 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38249 case "$host_os" in
38250 # Handle native Windows specially, because there setlocale() interprets
38251 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38252 # "fr" or "fra" as "French" or "French_France.1252",
38253 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38254 # "ja" as "Japanese" or "Japanese_Japan.932",
38255 # and similar.
38256 mingw*)
38257 # Test for the hypothetical native Windows locale name.
38258 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38259 gt_cv_locale_fr_utf8=French_France.65001
38260 else
38261 # None found.
38262 gt_cv_locale_fr_utf8=none
38266 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38267 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38268 # configure script would override the LC_ALL setting. Likewise for
38269 # LC_CTYPE, which is also set at the beginning of the configure script.
38270 # Test for the usual locale name.
38271 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38272 gt_cv_locale_fr_utf8=fr_FR
38273 else
38274 # Test for the locale name with explicit encoding suffix.
38275 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38276 gt_cv_locale_fr_utf8=fr_FR.UTF-8
38277 else
38278 # Test for the Solaris 7 locale name.
38279 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38280 gt_cv_locale_fr_utf8=fr.UTF-8
38281 else
38282 # None found.
38283 gt_cv_locale_fr_utf8=none
38288 esac
38290 rm -fr conftest*
38292 esac
38294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
38295 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
38296 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
38302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
38303 printf %s "checking for a traditional japanese locale... " >&6; }
38304 if test ${gt_cv_locale_ja+y}
38305 then :
38306 printf %s "(cached) " >&6
38307 else case e in #(
38309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38310 /* end confdefs.h. */
38312 #include <locale.h>
38313 #include <time.h>
38314 #if HAVE_LANGINFO_CODESET
38315 # include <langinfo.h>
38316 #endif
38317 #include <stdlib.h>
38318 #include <string.h>
38319 struct tm t;
38320 char buf[16];
38321 int main ()
38323 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
38324 imitates locale dependent behaviour by looking at the environment
38325 variables, and all locales use the UTF-8 encoding. */
38326 #if defined __BEOS__ || defined __HAIKU__
38327 return 1;
38328 #else
38329 /* Check whether the given locale name is recognized by the system. */
38330 # if defined _WIN32 && !defined __CYGWIN__
38331 /* On native Windows, setlocale(category, "") looks at the system settings,
38332 not at the environment variables. Also, when an encoding suffix such
38333 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38334 category of the locale to "C". */
38335 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38336 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38337 return 1;
38338 # else
38339 if (setlocale (LC_ALL, "") == NULL) return 1;
38340 # endif
38341 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38342 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38343 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38344 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38345 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38346 some unit tests fail.
38347 On MirBSD 10, when an unsupported locale is specified, setlocale()
38348 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
38349 # if HAVE_LANGINFO_CODESET
38351 const char *cs = nl_langinfo (CODESET);
38352 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38353 || strcmp (cs, "UTF-8") == 0)
38354 return 1;
38356 # endif
38357 # ifdef __CYGWIN__
38358 /* On Cygwin, avoid locale names without encoding suffix, because the
38359 locale_charset() function relies on the encoding suffix. Note that
38360 LC_ALL is set on the command line. */
38361 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38362 # endif
38363 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
38364 on Cygwin 1.5.x. */
38365 if (MB_CUR_MAX == 1)
38366 return 1;
38367 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
38368 This excludes the UTF-8 encoding (except on MirBSD). */
38370 const char *p;
38371 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38372 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
38373 for (p = buf; *p != '\0'; p++)
38374 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
38375 return 1;
38377 return 0;
38378 #endif
38381 _ACEOF
38382 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38383 (eval $ac_link) 2>&5
38384 ac_status=$?
38385 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38386 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38387 case "$host_os" in
38388 # Handle native Windows specially, because there setlocale() interprets
38389 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38390 # "fr" or "fra" as "French" or "French_France.1252",
38391 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38392 # "ja" as "Japanese" or "Japanese_Japan.932",
38393 # and similar.
38394 mingw*)
38395 # Note that on native Windows, the Japanese locale is
38396 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
38397 # cannot use it here.
38398 gt_cv_locale_ja=none
38401 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38402 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38403 # configure script would override the LC_ALL setting. Likewise for
38404 # LC_CTYPE, which is also set at the beginning of the configure script.
38405 # Test for the AIX locale name.
38406 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38407 gt_cv_locale_ja=ja_JP
38408 else
38409 # Test for the locale name with explicit encoding suffix.
38410 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38411 gt_cv_locale_ja=ja_JP.EUC-JP
38412 else
38413 # Test for the HP-UX, OSF/1, NetBSD locale name.
38414 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38415 gt_cv_locale_ja=ja_JP.eucJP
38416 else
38417 # Test for the IRIX, FreeBSD locale name.
38418 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38419 gt_cv_locale_ja=ja_JP.EUC
38420 else
38421 # Test for the Solaris 7 locale name.
38422 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38423 gt_cv_locale_ja=ja
38424 else
38425 # Special test for NetBSD 1.6.
38426 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
38427 gt_cv_locale_ja=ja_JP.eucJP
38428 else
38429 # None found.
38430 gt_cv_locale_ja=none
38438 esac
38440 rm -fr conftest*
38442 esac
38444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
38445 printf "%s\n" "$gt_cv_locale_ja" >&6; }
38446 LOCALE_JA=$gt_cv_locale_ja
38452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
38453 printf %s "checking for a transitional chinese locale... " >&6; }
38454 if test ${gt_cv_locale_zh_CN+y}
38455 then :
38456 printf %s "(cached) " >&6
38457 else case e in #(
38459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38460 /* end confdefs.h. */
38462 #include <locale.h>
38463 #include <stdlib.h>
38464 #include <time.h>
38465 #if HAVE_LANGINFO_CODESET
38466 # include <langinfo.h>
38467 #endif
38468 #include <stdlib.h>
38469 #include <string.h>
38470 struct tm t;
38471 char buf[16];
38472 int main ()
38474 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
38475 imitates locale dependent behaviour by looking at the environment
38476 variables, and all locales use the UTF-8 encoding. */
38477 #if defined __BEOS__ || defined __HAIKU__
38478 return 1;
38479 #else
38480 /* Check whether the given locale name is recognized by the system. */
38481 # if defined _WIN32 && !defined __CYGWIN__
38482 /* On native Windows, setlocale(category, "") looks at the system settings,
38483 not at the environment variables. Also, when an encoding suffix such
38484 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38485 category of the locale to "C". */
38486 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38487 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38488 return 1;
38489 # else
38490 if (setlocale (LC_ALL, "") == NULL) return 1;
38491 # endif
38492 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38493 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38494 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38495 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38496 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38497 some unit tests fail.
38498 On MirBSD 10, when an unsupported locale is specified, setlocale()
38499 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
38500 # if HAVE_LANGINFO_CODESET
38502 const char *cs = nl_langinfo (CODESET);
38503 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38504 || strcmp (cs, "UTF-8") == 0)
38505 return 1;
38507 # endif
38508 # ifdef __CYGWIN__
38509 /* On Cygwin, avoid locale names without encoding suffix, because the
38510 locale_charset() function relies on the encoding suffix. Note that
38511 LC_ALL is set on the command line. */
38512 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38513 # endif
38514 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
38515 This excludes the UTF-8 encoding (except on MirBSD). */
38517 const char *p;
38518 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38519 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
38520 for (p = buf; *p != '\0'; p++)
38521 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
38522 return 1;
38524 /* Check whether a typical GB18030 multibyte sequence is recognized as a
38525 single wide character. This excludes the GB2312 and GBK encodings. */
38526 if (mblen ("\203\062\332\066", 5) != 4)
38527 return 1;
38528 return 0;
38529 #endif
38532 _ACEOF
38533 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38534 (eval $ac_link) 2>&5
38535 ac_status=$?
38536 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38537 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38538 case "$host_os" in
38539 # Handle native Windows specially, because there setlocale() interprets
38540 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38541 # "fr" or "fra" as "French" or "French_France.1252",
38542 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38543 # "ja" as "Japanese" or "Japanese_Japan.932",
38544 # and similar.
38545 mingw*)
38546 # Test for the hypothetical native Windows locale name.
38547 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38548 gt_cv_locale_zh_CN=Chinese_China.54936
38549 else
38550 # None found.
38551 gt_cv_locale_zh_CN=none
38554 solaris2.8)
38555 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
38556 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
38557 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
38558 gt_cv_locale_zh_CN=none
38561 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38562 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38563 # configure script would override the LC_ALL setting. Likewise for
38564 # LC_CTYPE, which is also set at the beginning of the configure script.
38565 # Test for the locale name without encoding suffix.
38566 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38567 gt_cv_locale_zh_CN=zh_CN
38568 else
38569 # Test for the locale name with explicit encoding suffix.
38570 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38571 gt_cv_locale_zh_CN=zh_CN.GB18030
38572 else
38573 # None found.
38574 gt_cv_locale_zh_CN=none
38578 esac
38579 else
38580 # If there was a link error, due to mblen(), the system is so old that
38581 # it certainly doesn't have a chinese locale.
38582 gt_cv_locale_zh_CN=none
38584 rm -fr conftest*
38586 esac
38588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
38589 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
38590 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
38595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
38596 printf %s "checking for a french Unicode locale... " >&6; }
38597 if test ${gt_cv_locale_fr_utf8+y}
38598 then :
38599 printf %s "(cached) " >&6
38600 else case e in #(
38602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38603 /* end confdefs.h. */
38605 #include <locale.h>
38606 #include <time.h>
38607 #if HAVE_LANGINFO_CODESET
38608 # include <langinfo.h>
38609 #endif
38610 #include <stdlib.h>
38611 #include <string.h>
38612 struct tm t;
38613 char buf[16];
38614 int main () {
38615 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
38616 imitates locale dependent behaviour by looking at the environment
38617 variables, and all locales use the UTF-8 encoding. */
38618 #if !(defined __BEOS__ || defined __HAIKU__)
38619 /* Check whether the given locale name is recognized by the system. */
38620 # if defined _WIN32 && !defined __CYGWIN__
38621 /* On native Windows, setlocale(category, "") looks at the system settings,
38622 not at the environment variables. Also, when an encoding suffix such
38623 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38624 category of the locale to "C". */
38625 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38626 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38627 return 1;
38628 # else
38629 if (setlocale (LC_ALL, "") == NULL) return 1;
38630 # endif
38631 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38632 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38633 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38634 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38635 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38636 some unit tests fail. */
38637 # if HAVE_LANGINFO_CODESET
38639 const char *cs = nl_langinfo (CODESET);
38640 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
38641 return 1;
38643 # endif
38644 # ifdef __CYGWIN__
38645 /* On Cygwin, avoid locale names without encoding suffix, because the
38646 locale_charset() function relies on the encoding suffix. Note that
38647 LC_ALL is set on the command line. */
38648 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38649 # endif
38650 /* Check whether in the abbreviation of the second month, the second
38651 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
38652 two bytes long, with UTF-8 encoding. */
38653 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38654 if (strftime (buf, sizeof (buf), "%b", &t) < 4
38655 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
38656 return 1;
38657 #endif
38658 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
38659 /* Check whether the decimal separator is a comma.
38660 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38661 are nl_langinfo(RADIXCHAR) are both ".". */
38662 if (localeconv () ->decimal_point[0] != ',') return 1;
38663 #endif
38664 return 0;
38667 _ACEOF
38668 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38669 (eval $ac_link) 2>&5
38670 ac_status=$?
38671 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38672 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38673 case "$host_os" in
38674 # Handle native Windows specially, because there setlocale() interprets
38675 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38676 # "fr" or "fra" as "French" or "French_France.1252",
38677 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38678 # "ja" as "Japanese" or "Japanese_Japan.932",
38679 # and similar.
38680 mingw*)
38681 # Test for the hypothetical native Windows locale name.
38682 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38683 gt_cv_locale_fr_utf8=French_France.65001
38684 else
38685 # None found.
38686 gt_cv_locale_fr_utf8=none
38690 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38691 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38692 # configure script would override the LC_ALL setting. Likewise for
38693 # LC_CTYPE, which is also set at the beginning of the configure script.
38694 # Test for the usual locale name.
38695 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38696 gt_cv_locale_fr_utf8=fr_FR
38697 else
38698 # Test for the locale name with explicit encoding suffix.
38699 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38700 gt_cv_locale_fr_utf8=fr_FR.UTF-8
38701 else
38702 # Test for the Solaris 7 locale name.
38703 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38704 gt_cv_locale_fr_utf8=fr.UTF-8
38705 else
38706 # None found.
38707 gt_cv_locale_fr_utf8=none
38712 esac
38714 rm -fr conftest*
38716 esac
38718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
38719 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
38720 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
38736 nanosleep_save_libs=$LIBS
38738 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
38739 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
38740 LIB_NANOSLEEP=
38742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
38743 printf %s "checking for library containing nanosleep... " >&6; }
38744 if test ${ac_cv_search_nanosleep+y}
38745 then :
38746 printf %s "(cached) " >&6
38747 else case e in #(
38748 e) ac_func_search_save_LIBS=$LIBS
38749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38750 /* end confdefs.h. */
38752 /* Override any GCC internal prototype to avoid an error.
38753 Use char because int might match the return type of a GCC
38754 builtin and then its argument prototype would still apply.
38755 The 'extern "C"' is for builds by C++ compilers;
38756 although this is not generally supported in C code, supporting it here
38757 has little cost and some practical benefit (sr 110532). */
38758 #ifdef __cplusplus
38759 extern "C"
38760 #endif
38761 char nanosleep (void);
38763 main (void)
38765 return nanosleep ();
38767 return 0;
38769 _ACEOF
38770 for ac_lib in '' rt posix4
38772 if test -z "$ac_lib"; then
38773 ac_res="none required"
38774 else
38775 ac_res=-l$ac_lib
38776 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
38778 if ac_fn_c_try_link "$LINENO"
38779 then :
38780 ac_cv_search_nanosleep=$ac_res
38782 rm -f core conftest.err conftest.$ac_objext conftest.beam \
38783 conftest$ac_exeext
38784 if test ${ac_cv_search_nanosleep+y}
38785 then :
38786 break
38788 done
38789 if test ${ac_cv_search_nanosleep+y}
38790 then :
38792 else case e in #(
38793 e) ac_cv_search_nanosleep=no ;;
38794 esac
38796 rm conftest.$ac_ext
38797 LIBS=$ac_func_search_save_LIBS ;;
38798 esac
38800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
38801 printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
38802 ac_res=$ac_cv_search_nanosleep
38803 if test "$ac_res" != no
38804 then :
38805 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
38806 test "$ac_cv_search_nanosleep" = "none required" ||
38807 LIB_NANOSLEEP=$ac_cv_search_nanosleep
38810 if test "x$ac_cv_search_nanosleep" != xno; then
38813 if test $APPLE_UNIVERSAL_BUILD = 1; then
38814 # A universal build on Apple Mac OS X platforms.
38815 # The test result would be 'no (mishandles large arguments)' in 64-bit
38816 # mode but 'yes' in 32-bit mode. But we need a configuration result that
38817 # is valid in both modes.
38818 gl_cv_func_nanosleep='no (mishandles large arguments)'
38821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
38822 printf %s "checking for working nanosleep... " >&6; }
38823 if test ${gl_cv_func_nanosleep+y}
38824 then :
38825 printf %s "(cached) " >&6
38826 else case e in #(
38828 if test "$cross_compiling" = yes
38829 then :
38830 case "$host_os" in
38831 linux*) # Guess it halfway works when the kernel is Linux.
38832 gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
38833 mingw*) # Guess no on native Windows.
38834 gl_cv_func_nanosleep='guessing no' ;;
38835 *) # If we don't know, obey --enable-cross-guesses.
38836 gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
38837 esac
38839 else case e in #(
38840 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38841 /* end confdefs.h. */
38843 #include <errno.h>
38844 #include <limits.h>
38845 #include <signal.h>
38846 #include <time.h>
38847 #include <unistd.h>
38848 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
38849 #define TYPE_MAXIMUM(t) \
38850 ((t) (! TYPE_SIGNED (t) \
38851 ? (t) -1 \
38852 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
38854 #if HAVE_DECL_ALARM
38855 static void
38856 check_for_SIGALRM (int sig)
38858 if (sig != SIGALRM)
38859 _exit (1);
38861 #endif
38864 main ()
38866 static struct timespec ts_sleep;
38867 static struct timespec ts_remaining;
38868 /* Test for major problems first. */
38869 if (! nanosleep)
38870 return 2;
38871 ts_sleep.tv_sec = 0;
38872 ts_sleep.tv_nsec = 1;
38873 #if HAVE_DECL_ALARM
38875 static struct sigaction act;
38876 act.sa_handler = check_for_SIGALRM;
38877 sigemptyset (&act.sa_mask);
38878 sigaction (SIGALRM, &act, NULL);
38879 alarm (1);
38880 if (nanosleep (&ts_sleep, NULL) != 0)
38881 return 3;
38882 /* Test for a minor problem: the handling of large arguments. */
38883 ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
38884 ts_sleep.tv_nsec = 999999999;
38885 alarm (1);
38886 if (nanosleep (&ts_sleep, &ts_remaining) != -1)
38887 return 4;
38888 if (errno != EINTR)
38889 return 5;
38890 if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
38891 return 6;
38893 #else /* A simpler test for native Windows. */
38894 if (nanosleep (&ts_sleep, &ts_remaining) < 0)
38895 return 3;
38896 /* Test for 32-bit mingw bug: negative nanosecond values do not
38897 cause failure. */
38898 ts_sleep.tv_sec = 1;
38899 ts_sleep.tv_nsec = -1;
38900 if (nanosleep (&ts_sleep, &ts_remaining) != -1)
38901 return 7;
38902 #endif
38903 return 0;
38905 _ACEOF
38906 if ac_fn_c_try_run "$LINENO"
38907 then :
38908 gl_cv_func_nanosleep=yes
38909 else case e in #(
38910 e) case $? in
38911 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)' ;;
38912 7) gl_cv_func_nanosleep='no (mishandles negative tv_nsec)' ;;
38913 *) gl_cv_func_nanosleep=no ;;
38914 esac ;;
38915 esac
38917 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38918 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
38919 esac
38923 esac
38925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
38926 printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
38927 case "$gl_cv_func_nanosleep" in
38928 *yes)
38929 REPLACE_NANOSLEEP=0
38932 REPLACE_NANOSLEEP=1
38933 case "$gl_cv_func_nanosleep" in
38934 *"mishandles large arguments"*)
38936 printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
38939 esac
38941 esac
38942 else
38943 HAVE_NANOSLEEP=0
38945 LIBS=$nanosleep_save_libs
38948 if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
38949 GL_COND_OBJ_NANOSLEEP_TRUE=
38950 GL_COND_OBJ_NANOSLEEP_FALSE='#'
38951 else
38952 GL_COND_OBJ_NANOSLEEP_TRUE='#'
38953 GL_COND_OBJ_NANOSLEEP_FALSE=
38956 if test -z "${GL_COND_OBJ_NANOSLEEP_TRUE}" && test -z "${GL_COND_OBJ_NANOSLEEP_FALSE}"; then
38957 GL_COND_OBJ_NANOSLEEP_TRUE='#'
38958 GL_COND_OBJ_NANOSLEEP_FALSE='#'
38970 if test "$GL_GNULIB_NANOSLEEP" != 1; then
38971 if test "$GL_GNULIB_NANOSLEEP" = 0; then
38972 GL_GNULIB_NANOSLEEP=$gl_module_indicator_condition
38973 else
38974 GL_GNULIB_NANOSLEEP="($GL_GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
38982 printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
38988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
38989 printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
38990 if test ${gl_cv_header_netinet_in_h_selfcontained+y}
38991 then :
38992 printf %s "(cached) " >&6
38993 else case e in #(
38995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38996 /* end confdefs.h. */
38997 #include <netinet/in.h>
38999 main (void)
39003 return 0;
39005 _ACEOF
39006 if ac_fn_c_try_compile "$LINENO"
39007 then :
39008 gl_cv_header_netinet_in_h_selfcontained=yes
39009 else case e in #(
39010 e) gl_cv_header_netinet_in_h_selfcontained=no ;;
39011 esac
39013 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39015 esac
39017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
39018 printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
39019 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
39020 GL_GENERATE_NETINET_IN_H=false
39021 else
39022 GL_GENERATE_NETINET_IN_H=true
39023 ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
39024 if test "x$ac_cv_header_netinet_in_h" = xyes
39025 then :
39026 printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
39039 if test $gl_cv_have_include_next = yes; then
39040 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
39041 else
39042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
39043 printf %s "checking absolute name of <netinet/in.h>... " >&6; }
39044 if test ${gl_cv_next_netinet_in_h+y}
39045 then :
39046 printf %s "(cached) " >&6
39047 else case e in #(
39049 if test $ac_cv_header_netinet_in_h = yes; then
39054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39055 /* end confdefs.h. */
39056 #include <netinet/in.h>
39057 _ACEOF
39058 case "$host_os" in
39059 aix*) gl_absname_cpp="$ac_cpp -C" ;;
39060 *) gl_absname_cpp="$ac_cpp" ;;
39061 esac
39063 case "$host_os" in
39064 mingw*)
39065 gl_dirsep_regex='[/\\]'
39068 gl_dirsep_regex='\/'
39070 esac
39071 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
39072 gl_header_literal_regex=`echo 'netinet/in.h' \
39073 | sed -e "$gl_make_literal_regex_sed"`
39074 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
39075 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
39076 s|^/[^/]|//&|
39081 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
39082 sed -n "$gl_absolute_header_sed"`
39084 gl_header=$gl_cv_absolute_netinet_in_h
39085 gl_cv_next_netinet_in_h='"'$gl_header'"'
39086 else
39087 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
39091 esac
39093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
39094 printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; }
39096 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
39098 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
39099 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
39100 gl_next_as_first_directive='<'netinet/in.h'>'
39101 else
39102 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
39103 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
39105 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
39110 if test $ac_cv_header_netinet_in_h = yes; then
39111 HAVE_NETINET_IN_H=1
39112 else
39113 HAVE_NETINET_IN_H=0
39122 case "$GL_GENERATE_NETINET_IN_H" in
39123 false) NETINET_IN_H='' ;;
39124 true)
39125 if test -z "$NETINET_IN_H"; then
39126 NETINET_IN_H="${gl_source_base_prefix}netinet/in.h"
39129 *) echo "*** GL_GENERATE_NETINET_IN_H is not set correctly" 1>&2; exit 1 ;;
39130 esac
39133 if $GL_GENERATE_NETINET_IN_H; then
39134 GL_GENERATE_NETINET_IN_H_TRUE=
39135 GL_GENERATE_NETINET_IN_H_FALSE='#'
39136 else
39137 GL_GENERATE_NETINET_IN_H_TRUE='#'
39138 GL_GENERATE_NETINET_IN_H_FALSE=
39141 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
39142 GL_GENERATE_NETINET_IN_H_TRUE='#'
39143 GL_GENERATE_NETINET_IN_H_FALSE='#'
39154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
39155 printf %s "checking for a traditional french locale... " >&6; }
39156 if test ${gt_cv_locale_fr+y}
39157 then :
39158 printf %s "(cached) " >&6
39159 else case e in #(
39161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39162 /* end confdefs.h. */
39164 #include <locale.h>
39165 #include <time.h>
39166 #if HAVE_LANGINFO_CODESET
39167 # include <langinfo.h>
39168 #endif
39169 #include <stdlib.h>
39170 #include <string.h>
39171 struct tm t;
39172 char buf[16];
39173 int main () {
39174 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
39175 imitates locale dependent behaviour by looking at the environment
39176 variables, and all locales use the UTF-8 encoding. */
39177 #if defined __BEOS__ || defined __HAIKU__
39178 return 1;
39179 #else
39180 /* Check whether the given locale name is recognized by the system. */
39181 # if defined _WIN32 && !defined __CYGWIN__
39182 /* On native Windows, setlocale(category, "") looks at the system settings,
39183 not at the environment variables. Also, when an encoding suffix such
39184 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39185 category of the locale to "C". */
39186 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39187 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39188 return 1;
39189 # else
39190 if (setlocale (LC_ALL, "") == NULL) return 1;
39191 # endif
39192 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39193 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39194 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39195 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39196 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39197 some unit tests fail.
39198 On MirBSD 10, when an unsupported locale is specified, setlocale()
39199 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
39200 # if HAVE_LANGINFO_CODESET
39202 const char *cs = nl_langinfo (CODESET);
39203 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
39204 || strcmp (cs, "UTF-8") == 0)
39205 return 1;
39207 # endif
39208 # ifdef __CYGWIN__
39209 /* On Cygwin, avoid locale names without encoding suffix, because the
39210 locale_charset() function relies on the encoding suffix. Note that
39211 LC_ALL is set on the command line. */
39212 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39213 # endif
39214 /* Check whether in the abbreviation of the second month, the second
39215 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
39216 one byte long. This excludes the UTF-8 encoding. */
39217 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39218 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
39219 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
39220 /* Check whether the decimal separator is a comma.
39221 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
39222 are nl_langinfo(RADIXCHAR) are both ".". */
39223 if (localeconv () ->decimal_point[0] != ',') return 1;
39224 # endif
39225 return 0;
39226 #endif
39229 _ACEOF
39230 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39231 (eval $ac_link) 2>&5
39232 ac_status=$?
39233 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39234 test $ac_status = 0; } && test -s conftest$ac_exeext; then
39235 case "$host_os" in
39236 # Handle native Windows specially, because there setlocale() interprets
39237 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39238 # "fr" or "fra" as "French" or "French_France.1252",
39239 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39240 # "ja" as "Japanese" or "Japanese_Japan.932",
39241 # and similar.
39242 mingw*)
39243 # Test for the native Windows locale name.
39244 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39245 gt_cv_locale_fr=French_France.1252
39246 else
39247 # None found.
39248 gt_cv_locale_fr=none
39252 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39253 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39254 # configure script would override the LC_ALL setting. Likewise for
39255 # LC_CTYPE, which is also set at the beginning of the configure script.
39256 # Test for the usual locale name.
39257 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39258 gt_cv_locale_fr=fr_FR
39259 else
39260 # Test for the locale name with explicit encoding suffix.
39261 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39262 gt_cv_locale_fr=fr_FR.ISO-8859-1
39263 else
39264 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
39265 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39266 gt_cv_locale_fr=fr_FR.ISO8859-1
39267 else
39268 # Test for the HP-UX locale name.
39269 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39270 gt_cv_locale_fr=fr_FR.iso88591
39271 else
39272 # Test for the Solaris 7 locale name.
39273 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39274 gt_cv_locale_fr=fr
39275 else
39276 # None found.
39277 gt_cv_locale_fr=none
39284 esac
39286 rm -fr conftest*
39288 esac
39290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
39291 printf "%s\n" "$gt_cv_locale_fr" >&6; }
39292 LOCALE_FR=$gt_cv_locale_fr
39297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
39298 printf %s "checking for a french Unicode locale... " >&6; }
39299 if test ${gt_cv_locale_fr_utf8+y}
39300 then :
39301 printf %s "(cached) " >&6
39302 else case e in #(
39304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39305 /* end confdefs.h. */
39307 #include <locale.h>
39308 #include <time.h>
39309 #if HAVE_LANGINFO_CODESET
39310 # include <langinfo.h>
39311 #endif
39312 #include <stdlib.h>
39313 #include <string.h>
39314 struct tm t;
39315 char buf[16];
39316 int main () {
39317 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
39318 imitates locale dependent behaviour by looking at the environment
39319 variables, and all locales use the UTF-8 encoding. */
39320 #if !(defined __BEOS__ || defined __HAIKU__)
39321 /* Check whether the given locale name is recognized by the system. */
39322 # if defined _WIN32 && !defined __CYGWIN__
39323 /* On native Windows, setlocale(category, "") looks at the system settings,
39324 not at the environment variables. Also, when an encoding suffix such
39325 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39326 category of the locale to "C". */
39327 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39328 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39329 return 1;
39330 # else
39331 if (setlocale (LC_ALL, "") == NULL) return 1;
39332 # endif
39333 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39334 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39335 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39336 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39337 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39338 some unit tests fail. */
39339 # if HAVE_LANGINFO_CODESET
39341 const char *cs = nl_langinfo (CODESET);
39342 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
39343 return 1;
39345 # endif
39346 # ifdef __CYGWIN__
39347 /* On Cygwin, avoid locale names without encoding suffix, because the
39348 locale_charset() function relies on the encoding suffix. Note that
39349 LC_ALL is set on the command line. */
39350 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39351 # endif
39352 /* Check whether in the abbreviation of the second month, the second
39353 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
39354 two bytes long, with UTF-8 encoding. */
39355 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39356 if (strftime (buf, sizeof (buf), "%b", &t) < 4
39357 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
39358 return 1;
39359 #endif
39360 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
39361 /* Check whether the decimal separator is a comma.
39362 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
39363 are nl_langinfo(RADIXCHAR) are both ".". */
39364 if (localeconv () ->decimal_point[0] != ',') return 1;
39365 #endif
39366 return 0;
39369 _ACEOF
39370 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39371 (eval $ac_link) 2>&5
39372 ac_status=$?
39373 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39374 test $ac_status = 0; } && test -s conftest$ac_exeext; then
39375 case "$host_os" in
39376 # Handle native Windows specially, because there setlocale() interprets
39377 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39378 # "fr" or "fra" as "French" or "French_France.1252",
39379 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39380 # "ja" as "Japanese" or "Japanese_Japan.932",
39381 # and similar.
39382 mingw*)
39383 # Test for the hypothetical native Windows locale name.
39384 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39385 gt_cv_locale_fr_utf8=French_France.65001
39386 else
39387 # None found.
39388 gt_cv_locale_fr_utf8=none
39392 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39393 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39394 # configure script would override the LC_ALL setting. Likewise for
39395 # LC_CTYPE, which is also set at the beginning of the configure script.
39396 # Test for the usual locale name.
39397 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39398 gt_cv_locale_fr_utf8=fr_FR
39399 else
39400 # Test for the locale name with explicit encoding suffix.
39401 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39402 gt_cv_locale_fr_utf8=fr_FR.UTF-8
39403 else
39404 # Test for the Solaris 7 locale name.
39405 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39406 gt_cv_locale_fr_utf8=fr.UTF-8
39407 else
39408 # None found.
39409 gt_cv_locale_fr_utf8=none
39414 esac
39416 rm -fr conftest*
39418 esac
39420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
39421 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
39422 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
39428 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
39429 if test "x$ac_cv_func_opendir" = xyes
39430 then :
39431 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
39435 if test $ac_cv_func_opendir = no; then
39436 HAVE_OPENDIR=0
39439 case $host_os,$HAVE_OPENDIR in
39440 os2*,1)
39441 REPLACE_OPENDIR=1;;
39442 esac
39445 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
39446 GL_COND_OBJ_OPENDIR_TRUE=
39447 GL_COND_OBJ_OPENDIR_FALSE='#'
39448 else
39449 GL_COND_OBJ_OPENDIR_TRUE='#'
39450 GL_COND_OBJ_OPENDIR_FALSE=
39453 if test -z "${GL_COND_OBJ_OPENDIR_TRUE}" && test -z "${GL_COND_OBJ_OPENDIR_FALSE}"; then
39454 GL_COND_OBJ_OPENDIR_TRUE='#'
39455 GL_COND_OBJ_OPENDIR_FALSE='#'
39467 if test "$GL_GNULIB_OPENDIR" != 1; then
39468 if test "$GL_GNULIB_OPENDIR" = 0; then
39469 GL_GNULIB_OPENDIR=$gl_module_indicator_condition
39470 else
39471 GL_GNULIB_OPENDIR="($GL_GNULIB_OPENDIR || $gl_module_indicator_condition)"
39479 printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
39488 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" != false:0; then
39489 REPLACE_PERROR=1
39491 case ${gl_cv_func_strerror_r_works-unset} in
39492 unset|*yes)
39493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
39494 printf %s "checking whether perror matches strerror... " >&6; }
39495 if test ${gl_cv_func_perror_works+y}
39496 then :
39497 printf %s "(cached) " >&6
39498 else case e in #(
39499 e) if test "$cross_compiling" = yes
39500 then :
39501 case "$host_os" in
39502 # Guess yes on musl systems.
39503 *-musl*) gl_cv_func_perror_works="guessing yes" ;;
39504 # Guess yes on native Windows.
39505 mingw*) gl_cv_func_perror_works="guessing yes" ;;
39506 # Otherwise obey --enable-cross-guesses.
39507 *) gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
39508 esac
39510 else case e in #(
39511 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39512 /* end confdefs.h. */
39513 #include <errno.h>
39514 #include <stdio.h>
39515 #include <stdlib.h>
39516 #include <string.h>
39519 main (void)
39521 char *str = strerror (-1);
39522 if (!getenv("CONFTEST_OUTPUT")) return 0;
39523 if (!str) str = "";
39524 puts (str);
39525 errno = -1;
39526 perror ("");
39527 return 0;
39530 return 0;
39532 _ACEOF
39533 if ac_fn_c_try_run "$LINENO"
39534 then :
39535 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
39536 && cmp conftest.txt1 conftest.txt2 >/dev/null; then
39537 gl_cv_func_perror_works=yes
39538 else
39539 gl_cv_func_perror_works=no
39541 rm -rf conftest.txt1 conftest.txt2
39542 else case e in #(
39543 e) gl_cv_func_perror_works=no ;;
39544 esac
39546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39547 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
39548 esac
39552 esac
39554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
39555 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
39556 case "$gl_cv_func_perror_works" in
39557 *yes) ;;
39558 *) REPLACE_PERROR=1 ;;
39559 esac
39562 REPLACE_PERROR=1
39564 esac
39567 if test $REPLACE_PERROR = 1; then
39568 GL_COND_OBJ_PERROR_TRUE=
39569 GL_COND_OBJ_PERROR_FALSE='#'
39570 else
39571 GL_COND_OBJ_PERROR_TRUE='#'
39572 GL_COND_OBJ_PERROR_FALSE=
39575 if test -z "${GL_COND_OBJ_PERROR_TRUE}" && test -z "${GL_COND_OBJ_PERROR_FALSE}"; then
39576 GL_COND_OBJ_PERROR_TRUE='#'
39577 GL_COND_OBJ_PERROR_FALSE='#'
39594 if test "$GL_GNULIB_PERROR" != 1; then
39595 if test "$GL_GNULIB_PERROR" = 0; then
39596 GL_GNULIB_PERROR=$gl_module_indicator_condition
39597 else
39598 GL_GNULIB_PERROR="($GL_GNULIB_PERROR || $gl_module_indicator_condition)"
39606 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
39614 if test $ac_cv_func_pipe != yes; then
39615 HAVE_PIPE=0
39619 if test $HAVE_PIPE = 0; then
39620 GL_COND_OBJ_PIPE_TRUE=
39621 GL_COND_OBJ_PIPE_FALSE='#'
39622 else
39623 GL_COND_OBJ_PIPE_TRUE='#'
39624 GL_COND_OBJ_PIPE_FALSE=
39627 if test -z "${GL_COND_OBJ_PIPE_TRUE}" && test -z "${GL_COND_OBJ_PIPE_FALSE}"; then
39628 GL_COND_OBJ_PIPE_TRUE='#'
39629 GL_COND_OBJ_PIPE_FALSE='#'
39641 if test "$GL_GNULIB_PIPE" != 1; then
39642 if test "$GL_GNULIB_PIPE" = 0; then
39643 GL_GNULIB_PIPE=$gl_module_indicator_condition
39644 else
39645 GL_GNULIB_PIPE="($GL_GNULIB_PIPE || $gl_module_indicator_condition)"
39653 printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
39662 if test $ac_cv_func_pselect = yes; then
39663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
39664 printf %s "checking whether signature of pselect conforms to POSIX... " >&6; }
39665 if test ${gl_cv_sig_pselect+y}
39666 then :
39667 printf %s "(cached) " >&6
39668 else case e in #(
39669 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39670 /* end confdefs.h. */
39671 #include <sys/select.h>
39674 main (void)
39676 int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
39677 struct timespec const *restrict,
39678 sigset_t const *restrict) = pselect;
39679 return !p;
39681 return 0;
39683 _ACEOF
39684 if ac_fn_c_try_link "$LINENO"
39685 then :
39686 gl_cv_sig_pselect=yes
39687 else case e in #(
39688 e) gl_cv_sig_pselect=no ;;
39689 esac
39691 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39692 conftest$ac_exeext conftest.$ac_ext ;;
39693 esac
39695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
39696 printf "%s\n" "$gl_cv_sig_pselect" >&6; }
39698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
39699 printf %s "checking whether pselect detects invalid fds... " >&6; }
39700 if test ${gl_cv_func_pselect_detects_ebadf+y}
39701 then :
39702 printf %s "(cached) " >&6
39703 else case e in #(
39705 if test "$cross_compiling" = yes
39706 then :
39708 case "$host_os" in
39709 # Guess yes on Linux systems.
39710 linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
39711 # Guess yes on glibc systems.
39712 *-gnu* | gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
39713 # If we don't know, obey --enable-cross-guesses.
39714 *) gl_cv_func_pselect_detects_ebadf="$gl_cross_guess_normal" ;;
39715 esac
39717 else case e in #(
39718 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39719 /* end confdefs.h. */
39721 #include <sys/types.h>
39722 #include <sys/time.h>
39723 #if HAVE_SYS_SELECT_H
39724 # include <sys/select.h>
39725 #endif
39726 #include <unistd.h>
39727 #include <errno.h>
39730 $gl_mda_defines
39733 main (void)
39736 fd_set set;
39737 dup2(0, 16);
39738 FD_ZERO(&set);
39739 FD_SET(16, &set);
39740 close(16);
39741 struct timespec timeout;
39742 timeout.tv_sec = 0;
39743 timeout.tv_nsec = 5000;
39744 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
39747 return 0;
39749 _ACEOF
39750 if ac_fn_c_try_run "$LINENO"
39751 then :
39752 gl_cv_func_pselect_detects_ebadf=yes
39753 else case e in #(
39754 e) gl_cv_func_pselect_detects_ebadf=no ;;
39755 esac
39757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39758 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
39759 esac
39763 esac
39765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
39766 printf "%s\n" "$gl_cv_func_pselect_detects_ebadf" >&6; }
39767 case $gl_cv_func_pselect_detects_ebadf in
39768 *yes) ;;
39769 *) REPLACE_PSELECT=1 ;;
39770 esac
39773 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
39774 REPLACE_PSELECT=1
39778 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
39779 GL_COND_OBJ_PSELECT_TRUE=
39780 GL_COND_OBJ_PSELECT_FALSE='#'
39781 else
39782 GL_COND_OBJ_PSELECT_TRUE='#'
39783 GL_COND_OBJ_PSELECT_FALSE=
39786 if test -z "${GL_COND_OBJ_PSELECT_TRUE}" && test -z "${GL_COND_OBJ_PSELECT_FALSE}"; then
39787 GL_COND_OBJ_PSELECT_TRUE='#'
39788 GL_COND_OBJ_PSELECT_FALSE='#'
39800 if test "$GL_GNULIB_PSELECT" != 1; then
39801 if test "$GL_GNULIB_PSELECT" = 0; then
39802 GL_GNULIB_PSELECT=$gl_module_indicator_condition
39803 else
39804 GL_GNULIB_PSELECT="($GL_GNULIB_PSELECT || $gl_module_indicator_condition)"
39812 printf "%s\n" "#define GNULIB_TEST_PSELECT 1" >>confdefs.h
39828 if { case "$host_os" in mingw*) true;; *) false;; esac; } \
39829 && test $gl_threads_api = windows; then
39830 REPLACE_PTHREAD_CREATE=1
39831 REPLACE_PTHREAD_ATTR_INIT=1
39832 REPLACE_PTHREAD_ATTR_GETDETACHSTATE=1
39833 REPLACE_PTHREAD_ATTR_SETDETACHSTATE=1
39834 REPLACE_PTHREAD_ATTR_DESTROY=1
39835 REPLACE_PTHREAD_SELF=1
39836 REPLACE_PTHREAD_EQUAL=1
39837 REPLACE_PTHREAD_DETACH=1
39838 REPLACE_PTHREAD_JOIN=1
39839 REPLACE_PTHREAD_EXIT=1
39840 else
39841 if test $HAVE_PTHREAD_H = 0; then
39842 HAVE_PTHREAD_CREATE=0
39843 HAVE_PTHREAD_ATTR_INIT=0
39844 HAVE_PTHREAD_ATTR_GETDETACHSTATE=0
39845 HAVE_PTHREAD_ATTR_SETDETACHSTATE=0
39846 HAVE_PTHREAD_ATTR_DESTROY=0
39847 HAVE_PTHREAD_SELF=0
39848 HAVE_PTHREAD_EQUAL=0
39849 HAVE_PTHREAD_DETACH=0
39850 HAVE_PTHREAD_JOIN=0
39851 HAVE_PTHREAD_EXIT=0
39852 else
39853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_create exists as a global function" >&5
39854 printf %s "checking whether pthread_create exists as a global function... " >&6; }
39855 if test ${gl_cv_func_pthread_create+y}
39856 then :
39857 printf %s "(cached) " >&6
39858 else case e in #(
39859 e) saved_LIBS="$LIBS"
39860 LIBS="$LIBS $LIBPMULTITHREAD"
39861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39862 /* end confdefs.h. */
39863 extern
39864 #ifdef __cplusplus
39866 #endif
39867 int pthread_create (void);
39868 int main ()
39870 return pthread_create ();
39873 _ACEOF
39874 if ac_fn_c_try_link "$LINENO"
39875 then :
39876 gl_cv_func_pthread_create=yes
39877 else case e in #(
39878 e) gl_cv_func_pthread_create=no ;;
39879 esac
39881 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39882 conftest$ac_exeext conftest.$ac_ext
39883 LIBS="$saved_LIBS"
39885 esac
39887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_create" >&5
39888 printf "%s\n" "$gl_cv_func_pthread_create" >&6; }
39889 if test $gl_cv_func_pthread_create = no; then
39890 REPLACE_PTHREAD_CREATE=1
39891 REPLACE_PTHREAD_ATTR_INIT=1
39893 printf "%s\n" "#define PTHREAD_CREATE_IS_INLINE 1" >>confdefs.h
39900 if test $HAVE_PTHREAD_CREATE = 0 || test $REPLACE_PTHREAD_CREATE = 1; then
39901 GL_COND_OBJ_PTHREAD_THREAD_TRUE=
39902 GL_COND_OBJ_PTHREAD_THREAD_FALSE='#'
39903 else
39904 GL_COND_OBJ_PTHREAD_THREAD_TRUE='#'
39905 GL_COND_OBJ_PTHREAD_THREAD_FALSE=
39908 if test -z "${GL_COND_OBJ_PTHREAD_THREAD_TRUE}" && test -z "${GL_COND_OBJ_PTHREAD_THREAD_FALSE}"; then
39909 GL_COND_OBJ_PTHREAD_THREAD_TRUE='#'
39910 GL_COND_OBJ_PTHREAD_THREAD_FALSE='#'
39922 if test "$GL_GNULIB_PTHREAD_THREAD" != 1; then
39923 if test "$GL_GNULIB_PTHREAD_THREAD" = 0; then
39924 GL_GNULIB_PTHREAD_THREAD=$gl_module_indicator_condition
39925 else
39926 GL_GNULIB_PTHREAD_THREAD="($GL_GNULIB_PTHREAD_THREAD || $gl_module_indicator_condition)"
39934 printf "%s\n" "#define GNULIB_TEST_PTHREAD_THREAD 1" >>confdefs.h
39943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is a macro" >&5
39944 printf %s "checking whether pthread_sigmask is a macro... " >&6; }
39945 if test ${gl_cv_func_pthread_sigmask_macro+y}
39946 then :
39947 printf %s "(cached) " >&6
39948 else case e in #(
39949 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39950 /* end confdefs.h. */
39952 #include <pthread.h>
39953 #include <signal.h>
39954 #ifdef pthread_sigmask
39955 headers_define_pthread_sigmask
39956 #endif
39957 _ACEOF
39958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39959 $EGREP_TRADITIONAL "headers_define_pthread_sigmask" >/dev/null 2>&1
39960 then :
39961 gl_cv_func_pthread_sigmask_macro=yes
39962 else case e in #(
39963 e) gl_cv_func_pthread_sigmask_macro=no ;;
39964 esac
39966 rm -rf conftest*
39969 esac
39971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_macro" >&5
39972 printf "%s\n" "$gl_cv_func_pthread_sigmask_macro" >&6; }
39974 LIB_PTHREAD_SIGMASK=
39976 if test $gl_cv_func_pthread_sigmask_macro = yes; then
39977 HAVE_PTHREAD_SIGMASK=0
39978 REPLACE_PTHREAD_SIGMASK=1
39979 else
39983 if test "$gl_threads_api" = posix; then
39984 if test $ac_cv_func_pthread_sigmask = yes; then
39986 else
39987 if test -n "$LIBMULTITHREAD"; then
39988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
39989 printf %s "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
39990 if test ${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+y}
39991 then :
39992 printf %s "(cached) " >&6
39993 else case e in #(
39994 e) gl_save_LIBS="$LIBS"
39995 LIBS="$LIBS $LIBMULTITHREAD"
39996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39997 /* end confdefs.h. */
39998 #include <pthread.h>
39999 #include <signal.h>
40002 main (void)
40004 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
40006 return 0;
40009 _ACEOF
40010 if ac_fn_c_try_link "$LINENO"
40011 then :
40012 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
40013 else case e in #(
40014 e) gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no ;;
40015 esac
40017 rm -f core conftest.err conftest.$ac_objext conftest.beam \
40018 conftest$ac_exeext conftest.$ac_ext
40019 LIBS="$gl_save_LIBS"
40021 esac
40023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
40024 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
40025 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
40026 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
40027 else
40028 HAVE_PTHREAD_SIGMASK=0
40030 else
40031 HAVE_PTHREAD_SIGMASK=0
40034 else
40035 if test $ac_cv_func_pthread_sigmask = yes; then
40036 REPLACE_PTHREAD_SIGMASK=1
40037 else
40038 HAVE_PTHREAD_SIGMASK=0
40046 if test $HAVE_PTHREAD_SIGMASK = 1; then
40049 if test -z "$LIB_PTHREAD_SIGMASK"; then
40050 case " $LIBS " in
40051 *' -pthread '*) ;;
40052 *' -lpthread '*) ;;
40054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
40055 printf %s "checking whether pthread_sigmask works without -lpthread... " >&6; }
40056 if test ${gl_cv_func_pthread_sigmask_in_libc_works+y}
40057 then :
40058 printf %s "(cached) " >&6
40059 else case e in #(
40061 if test "$cross_compiling" = yes
40062 then :
40064 case "$host_os" in
40065 freebsd* | midnightbsd* | hpux* | solaris | solaris2.[2-9]*)
40066 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
40068 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
40069 esac
40071 else case e in #(
40072 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40073 /* end confdefs.h. */
40075 #include <pthread.h>
40076 #include <signal.h>
40077 #include <stddef.h>
40078 int main ()
40080 sigset_t set;
40081 sigemptyset (&set);
40082 return pthread_sigmask (1729, &set, NULL) != 0;
40084 _ACEOF
40085 if ac_fn_c_try_run "$LINENO"
40086 then :
40087 gl_cv_func_pthread_sigmask_in_libc_works=no
40088 else case e in #(
40089 e) gl_cv_func_pthread_sigmask_in_libc_works=yes ;;
40090 esac
40092 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40093 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40094 esac
40098 esac
40100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
40101 printf "%s\n" "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
40102 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
40103 *no)
40104 REPLACE_PTHREAD_SIGMASK=1
40106 printf "%s\n" "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
40109 esac;;
40110 esac
40113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
40114 printf %s "checking whether pthread_sigmask returns error numbers... " >&6; }
40115 if test ${gl_cv_func_pthread_sigmask_return_works+y}
40116 then :
40117 printf %s "(cached) " >&6
40118 else case e in #(
40120 gl_save_LIBS="$LIBS"
40121 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
40122 if test "$cross_compiling" = yes
40123 then :
40124 case "$host_os" in
40125 cygwin*)
40126 gl_cv_func_pthread_sigmask_return_works="guessing no";;
40128 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
40129 esac
40131 else case e in #(
40132 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40133 /* end confdefs.h. */
40135 #include <pthread.h>
40136 #include <signal.h>
40137 #include <stddef.h>
40138 int main ()
40140 sigset_t set;
40141 sigemptyset (&set);
40142 if (pthread_sigmask (1729, &set, NULL) == -1)
40143 return 1;
40144 return 0;
40146 _ACEOF
40147 if ac_fn_c_try_run "$LINENO"
40148 then :
40149 gl_cv_func_pthread_sigmask_return_works=yes
40150 else case e in #(
40151 e) gl_cv_func_pthread_sigmask_return_works=no ;;
40152 esac
40154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40155 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40156 esac
40159 LIBS="$gl_save_LIBS"
40161 esac
40163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
40164 printf "%s\n" "$gl_cv_func_pthread_sigmask_return_works" >&6; }
40165 case "$gl_cv_func_pthread_sigmask_return_works" in
40166 *no)
40167 REPLACE_PTHREAD_SIGMASK=1
40169 printf "%s\n" "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
40172 esac
40174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
40175 printf %s "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
40176 if test ${gl_cv_func_pthread_sigmask_unblock_works+y}
40177 then :
40178 printf %s "(cached) " >&6
40179 else case e in #(
40181 case "$host_os" in
40182 irix*)
40183 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
40185 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
40186 esac
40187 gl_save_LIBS=$LIBS
40188 LIBS="$LIBS $LIBMULTITHREAD"
40189 if test "$cross_compiling" = yes
40190 then :
40192 else case e in #(
40193 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40194 /* end confdefs.h. */
40196 #include <pthread.h>
40197 #include <signal.h>
40198 #include <stdio.h>
40199 #include <stdlib.h>
40200 #include <unistd.h>
40203 $gl_mda_defines
40205 static volatile int sigint_occurred;
40206 static void
40207 sigint_handler (int sig)
40209 sigint_occurred++;
40211 int main ()
40213 sigset_t set;
40214 int pid = getpid ();
40215 char command[80];
40216 signal (SIGINT, sigint_handler);
40217 sigemptyset (&set);
40218 sigaddset (&set, SIGINT);
40219 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
40220 return 1;
40221 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
40222 if (!(system (command) == 0))
40223 return 2;
40224 sleep (2);
40225 if (!(sigint_occurred == 0))
40226 return 3;
40227 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
40228 return 4;
40229 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
40230 return 5;
40231 return 0;
40233 _ACEOF
40234 if ac_fn_c_try_run "$LINENO"
40235 then :
40237 else case e in #(
40238 e) gl_cv_func_pthread_sigmask_unblock_works=no ;;
40239 esac
40241 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40242 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40243 esac
40246 LIBS=$gl_save_LIBS
40248 esac
40250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
40251 printf "%s\n" "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
40252 case "$gl_cv_func_pthread_sigmask_unblock_works" in
40253 *no)
40254 REPLACE_PTHREAD_SIGMASK=1
40256 printf "%s\n" "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
40259 esac
40263 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
40264 GL_COND_OBJ_PTHREAD_SIGMASK_TRUE=
40265 GL_COND_OBJ_PTHREAD_SIGMASK_FALSE='#'
40266 else
40267 GL_COND_OBJ_PTHREAD_SIGMASK_TRUE='#'
40268 GL_COND_OBJ_PTHREAD_SIGMASK_FALSE=
40271 if test -z "${GL_COND_OBJ_PTHREAD_SIGMASK_TRUE}" && test -z "${GL_COND_OBJ_PTHREAD_SIGMASK_FALSE}"; then
40272 GL_COND_OBJ_PTHREAD_SIGMASK_TRUE='#'
40273 GL_COND_OBJ_PTHREAD_SIGMASK_FALSE='#'
40276 if test -z "$GL_COND_OBJ_PTHREAD_SIGMASK_TRUE"; then :
40279 if test $HAVE_PTHREAD_SIGMASK = 1; then
40281 printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
40296 if test "$GL_GNULIB_PTHREAD_SIGMASK" != 1; then
40297 if test "$GL_GNULIB_PTHREAD_SIGMASK" = 0; then
40298 GL_GNULIB_PTHREAD_SIGMASK=$gl_module_indicator_condition
40299 else
40300 GL_GNULIB_PTHREAD_SIGMASK="($GL_GNULIB_PTHREAD_SIGMASK || $gl_module_indicator_condition)"
40308 printf "%s\n" "#define GNULIB_TEST_PTHREAD_SIGMASK 1" >>confdefs.h
40314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
40315 printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
40316 if test ${gl_cv_func_svid_putenv+y}
40317 then :
40318 printf %s "(cached) " >&6
40319 else case e in #(
40320 e) if test "$cross_compiling" = yes
40321 then :
40322 case "$host_os" in
40323 # Guess yes on glibc systems.
40324 *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
40325 # Guess yes on musl systems.
40326 *-musl*) gl_cv_func_svid_putenv="guessing yes" ;;
40327 # Guess no on native Windows.
40328 mingw*) gl_cv_func_svid_putenv="guessing no" ;;
40329 # If we don't know, obey --enable-cross-guesses.
40330 *) gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
40331 esac
40333 else case e in #(
40334 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40335 /* end confdefs.h. */
40336 $ac_includes_default
40339 $gl_mda_defines
40342 main (void)
40345 /* Put it in env. */
40346 if (putenv ("CONFTEST_putenv=val"))
40347 return 1;
40349 /* Try to remove it. */
40350 if (putenv ("CONFTEST_putenv"))
40351 return 2;
40353 /* Make sure it was deleted. */
40354 if (getenv ("CONFTEST_putenv") != 0)
40355 return 3;
40357 return 0;
40360 return 0;
40362 _ACEOF
40363 if ac_fn_c_try_run "$LINENO"
40364 then :
40365 gl_cv_func_svid_putenv=yes
40366 else case e in #(
40367 e) gl_cv_func_svid_putenv=no ;;
40368 esac
40370 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40371 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40372 esac
40376 esac
40378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
40379 printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
40380 case "$gl_cv_func_svid_putenv" in
40381 *yes) ;;
40383 REPLACE_PUTENV=1
40385 esac
40388 if test $REPLACE_PUTENV = 1; then
40389 GL_COND_OBJ_PUTENV_TRUE=
40390 GL_COND_OBJ_PUTENV_FALSE='#'
40391 else
40392 GL_COND_OBJ_PUTENV_TRUE='#'
40393 GL_COND_OBJ_PUTENV_FALSE=
40396 if test -z "${GL_COND_OBJ_PUTENV_TRUE}" && test -z "${GL_COND_OBJ_PUTENV_FALSE}"; then
40397 GL_COND_OBJ_PUTENV_TRUE='#'
40398 GL_COND_OBJ_PUTENV_FALSE='#'
40401 if test -z "$GL_COND_OBJ_PUTENV_TRUE"; then :
40404 ac_fn_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
40405 if test "x$ac_cv_have_decl__putenv" = xyes
40406 then :
40407 ac_have_decl=1
40408 else case e in #(
40409 e) ac_have_decl=0 ;;
40410 esac
40412 printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
40426 if test "$GL_GNULIB_PUTENV" != 1; then
40427 if test "$GL_GNULIB_PUTENV" = 0; then
40428 GL_GNULIB_PUTENV=$gl_module_indicator_condition
40429 else
40430 GL_GNULIB_PUTENV="($GL_GNULIB_PUTENV || $gl_module_indicator_condition)"
40438 printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
40448 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
40449 if test "x$ac_cv_func_raise" = xyes
40450 then :
40451 printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
40455 if test $ac_cv_func_raise = no; then
40456 HAVE_RAISE=0
40457 else
40460 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
40461 REPLACE_RAISE=1
40468 HAVE_POSIX_SIGNALBLOCKING=0
40469 if test "$gl_cv_type_sigset_t" = yes; then
40470 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
40471 if test "x$ac_cv_func_sigprocmask" = xyes
40472 then :
40473 HAVE_POSIX_SIGNALBLOCKING=1
40478 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
40485 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
40486 GL_COND_OBJ_RAISE_TRUE=
40487 GL_COND_OBJ_RAISE_FALSE='#'
40488 else
40489 GL_COND_OBJ_RAISE_TRUE='#'
40490 GL_COND_OBJ_RAISE_FALSE=
40493 if test -z "${GL_COND_OBJ_RAISE_TRUE}" && test -z "${GL_COND_OBJ_RAISE_FALSE}"; then
40494 GL_COND_OBJ_RAISE_TRUE='#'
40495 GL_COND_OBJ_RAISE_FALSE='#'
40498 if test -z "$GL_COND_OBJ_RAISE_TRUE"; then :
40512 if test "$GL_GNULIB_RAISE" != 1; then
40513 if test "$GL_GNULIB_RAISE" = 0; then
40514 GL_GNULIB_RAISE=$gl_module_indicator_condition
40515 else
40516 GL_GNULIB_RAISE="($GL_GNULIB_RAISE || $gl_module_indicator_condition)"
40524 printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
40535 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
40536 if test "x$ac_cv_func_readdir" = xyes
40537 then :
40538 printf "%s\n" "#define HAVE_READDIR 1" >>confdefs.h
40542 if test $ac_cv_func_readdir = no; then
40543 HAVE_READDIR=0
40547 if test $HAVE_READDIR = 0; then
40548 GL_COND_OBJ_READDIR_TRUE=
40549 GL_COND_OBJ_READDIR_FALSE='#'
40550 else
40551 GL_COND_OBJ_READDIR_TRUE='#'
40552 GL_COND_OBJ_READDIR_FALSE=
40555 if test -z "${GL_COND_OBJ_READDIR_TRUE}" && test -z "${GL_COND_OBJ_READDIR_FALSE}"; then
40556 GL_COND_OBJ_READDIR_TRUE='#'
40557 GL_COND_OBJ_READDIR_FALSE='#'
40569 if test "$GL_GNULIB_READDIR" != 1; then
40570 if test "$GL_GNULIB_READDIR" = 0; then
40571 GL_GNULIB_READDIR=$gl_module_indicator_condition
40572 else
40573 GL_GNULIB_READDIR="($GL_GNULIB_READDIR || $gl_module_indicator_condition)"
40581 printf "%s\n" "#define GNULIB_TEST_READDIR 1" >>confdefs.h
40596 if test "$ac_cv_header_winsock2_h" = yes; then
40597 REPLACE_SELECT=1
40598 else
40600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
40601 printf %s "checking whether select supports a 0 argument... " >&6; }
40602 if test ${gl_cv_func_select_supports0+y}
40603 then :
40604 printf %s "(cached) " >&6
40605 else case e in #(
40607 if test "$cross_compiling" = yes
40608 then :
40610 case "$host_os" in
40611 # Guess no on Interix.
40612 interix*) gl_cv_func_select_supports0="guessing no";;
40613 # Guess yes otherwise.
40614 *) gl_cv_func_select_supports0="guessing yes";;
40615 esac
40617 else case e in #(
40618 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40619 /* end confdefs.h. */
40621 #include <sys/types.h>
40622 #include <sys/time.h>
40623 #if HAVE_SYS_SELECT_H
40624 #include <sys/select.h>
40625 #endif
40626 int main ()
40628 struct timeval timeout;
40629 timeout.tv_sec = 0;
40630 timeout.tv_usec = 5;
40631 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
40633 _ACEOF
40634 if ac_fn_c_try_run "$LINENO"
40635 then :
40636 gl_cv_func_select_supports0=yes
40637 else case e in #(
40638 e) gl_cv_func_select_supports0=no ;;
40639 esac
40641 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40642 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40643 esac
40647 esac
40649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
40650 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
40651 case "$gl_cv_func_select_supports0" in
40652 *yes) ;;
40653 *) REPLACE_SELECT=1 ;;
40654 esac
40656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
40657 printf %s "checking whether select detects invalid fds... " >&6; }
40658 if test ${gl_cv_func_select_detects_ebadf+y}
40659 then :
40660 printf %s "(cached) " >&6
40661 else case e in #(
40663 if test "$cross_compiling" = yes
40664 then :
40666 case "$host_os" in
40667 # Guess yes on Linux systems.
40668 linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
40669 # Guess yes on glibc systems.
40670 *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
40671 # If we don't know, obey --enable-cross-guesses.
40672 *) gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
40673 esac
40675 else case e in #(
40676 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40677 /* end confdefs.h. */
40679 #include <sys/types.h>
40680 #include <sys/time.h>
40681 #if HAVE_SYS_SELECT_H
40682 # include <sys/select.h>
40683 #endif
40684 #include <unistd.h>
40685 #include <errno.h>
40688 $gl_mda_defines
40691 main (void)
40694 fd_set set;
40695 dup2(0, 16);
40696 FD_ZERO(&set);
40697 FD_SET(16, &set);
40698 close(16);
40699 struct timeval timeout;
40700 timeout.tv_sec = 0;
40701 timeout.tv_usec = 5;
40702 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
40705 return 0;
40707 _ACEOF
40708 if ac_fn_c_try_run "$LINENO"
40709 then :
40710 gl_cv_func_select_detects_ebadf=yes
40711 else case e in #(
40712 e) gl_cv_func_select_detects_ebadf=no ;;
40713 esac
40715 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40716 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40717 esac
40721 esac
40723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
40724 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
40725 case $gl_cv_func_select_detects_ebadf in
40726 *yes) ;;
40727 *) REPLACE_SELECT=1 ;;
40728 esac
40731 LIB_SELECT="$LIBSOCKET"
40732 if test $REPLACE_SELECT = 1; then
40733 case "$host_os" in
40734 mingw*)
40735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40736 /* end confdefs.h. */
40738 #define WIN32_LEAN_AND_MEAN
40739 #include <windows.h>
40741 main ()
40743 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
40744 return 0;
40746 _ACEOF
40747 if ac_fn_c_try_link "$LINENO"
40748 then :
40750 else case e in #(
40751 e) LIB_SELECT="$LIB_SELECT -luser32" ;;
40752 esac
40754 rm -f core conftest.err conftest.$ac_objext conftest.beam \
40755 conftest$ac_exeext conftest.$ac_ext
40757 esac
40762 if test $REPLACE_SELECT = 1; then
40763 GL_COND_OBJ_SELECT_TRUE=
40764 GL_COND_OBJ_SELECT_FALSE='#'
40765 else
40766 GL_COND_OBJ_SELECT_TRUE='#'
40767 GL_COND_OBJ_SELECT_FALSE=
40770 if test -z "${GL_COND_OBJ_SELECT_TRUE}" && test -z "${GL_COND_OBJ_SELECT_FALSE}"; then
40771 GL_COND_OBJ_SELECT_TRUE='#'
40772 GL_COND_OBJ_SELECT_FALSE='#'
40784 if test "$GL_GNULIB_SELECT" != 1; then
40785 if test "$GL_GNULIB_SELECT" = 0; then
40786 GL_GNULIB_SELECT=$gl_module_indicator_condition
40787 else
40788 GL_GNULIB_SELECT="($GL_GNULIB_SELECT || $gl_module_indicator_condition)"
40796 printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
40803 if test $ac_cv_func_setenv = no; then
40804 HAVE_SETENV=0
40805 else
40806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
40807 printf %s "checking whether setenv validates arguments... " >&6; }
40808 if test ${gl_cv_func_setenv_works+y}
40809 then :
40810 printf %s "(cached) " >&6
40811 else case e in #(
40812 e) if test "$cross_compiling" = yes
40813 then :
40814 case "$host_os" in
40815 # Guess yes on glibc systems.
40816 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
40817 # Guess yes on musl systems.
40818 *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
40819 # If we don't know, obey --enable-cross-guesses.
40820 *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
40821 esac
40823 else case e in #(
40824 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40825 /* end confdefs.h. */
40827 #include <stdlib.h>
40828 #include <errno.h>
40829 #include <string.h>
40832 main (void)
40835 int result = 0;
40837 if (setenv ("", "", 0) != -1)
40838 result |= 1;
40839 else if (errno != EINVAL)
40840 result |= 2;
40843 if (setenv ("a", "=", 1) != 0)
40844 result |= 4;
40845 else if (strcmp (getenv ("a"), "=") != 0)
40846 result |= 8;
40848 return result;
40851 return 0;
40853 _ACEOF
40854 if ac_fn_c_try_run "$LINENO"
40855 then :
40856 gl_cv_func_setenv_works=yes
40857 else case e in #(
40858 e) gl_cv_func_setenv_works=no ;;
40859 esac
40861 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40862 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40863 esac
40866 esac
40868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
40869 printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
40870 case "$gl_cv_func_setenv_works" in
40871 *yes) ;;
40873 REPLACE_SETENV=1
40875 esac
40879 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
40880 GL_COND_OBJ_SETENV_TRUE=
40881 GL_COND_OBJ_SETENV_FALSE='#'
40882 else
40883 GL_COND_OBJ_SETENV_TRUE='#'
40884 GL_COND_OBJ_SETENV_FALSE=
40887 if test -z "${GL_COND_OBJ_SETENV_TRUE}" && test -z "${GL_COND_OBJ_SETENV_FALSE}"; then
40888 GL_COND_OBJ_SETENV_TRUE='#'
40889 GL_COND_OBJ_SETENV_FALSE='#'
40901 if test "$GL_GNULIB_SETENV" != 1; then
40902 if test "$GL_GNULIB_SETENV" = 0; then
40903 GL_GNULIB_SETENV=$gl_module_indicator_condition
40904 else
40905 GL_GNULIB_SETENV="($GL_GNULIB_SETENV || $gl_module_indicator_condition)"
40913 printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
40922 NEED_SETLOCALE_IMPROVED=0
40923 case "$host_os" in
40924 mingw*) NEED_SETLOCALE_IMPROVED=1 ;;
40925 cygwin*)
40926 case `uname -r` in
40927 1.5.*) NEED_SETLOCALE_IMPROVED=1 ;;
40928 esac
40931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale supports the C locale" >&5
40932 printf %s "checking whether setlocale supports the C locale... " >&6; }
40933 if test ${gl_cv_func_setlocale_works+y}
40934 then :
40935 printf %s "(cached) " >&6
40936 else case e in #(
40937 e) if test "$cross_compiling" = yes
40938 then :
40939 case "$host_os" in
40940 # Guess no on Android.
40941 linux*-android*) gl_cv_func_setlocale_works="guessing no";;
40942 # Guess yes otherwise.
40943 *) gl_cv_func_setlocale_works="guessing yes";;
40944 esac
40946 else case e in #(
40947 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40948 /* end confdefs.h. */
40950 #include <locale.h>
40951 int main ()
40953 return setlocale (LC_ALL, "C") == NULL;
40955 _ACEOF
40956 if ac_fn_c_try_run "$LINENO"
40957 then :
40958 gl_cv_func_setlocale_works=yes
40959 else case e in #(
40960 e) gl_cv_func_setlocale_works=no ;;
40961 esac
40963 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40964 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
40965 esac
40969 esac
40971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_works" >&5
40972 printf "%s\n" "$gl_cv_func_setlocale_works" >&6; }
40973 case "$gl_cv_func_setlocale_works" in
40974 *yes) ;;
40975 *) NEED_SETLOCALE_IMPROVED=1 ;;
40976 esac
40978 esac
40980 printf "%s\n" "#define NEED_SETLOCALE_IMPROVED $NEED_SETLOCALE_IMPROVED" >>confdefs.h
40983 NEED_SETLOCALE_MTSAFE=0
40984 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
40985 NEED_SETLOCALE_MTSAFE=1
40988 printf "%s\n" "#define NEED_SETLOCALE_MTSAFE $NEED_SETLOCALE_MTSAFE" >>confdefs.h
40991 if test $NEED_SETLOCALE_IMPROVED = 1 || test $NEED_SETLOCALE_MTSAFE = 1; then
40992 REPLACE_SETLOCALE=1
40995 if test $NEED_SETLOCALE_MTSAFE = 1; then
40996 LIB_SETLOCALE="$LIB_SETLOCALE_NULL"
40997 else
40998 LIB_SETLOCALE=
41003 if test $REPLACE_SETLOCALE = 1; then
41004 GL_COND_OBJ_SETLOCALE_TRUE=
41005 GL_COND_OBJ_SETLOCALE_FALSE='#'
41006 else
41007 GL_COND_OBJ_SETLOCALE_TRUE='#'
41008 GL_COND_OBJ_SETLOCALE_FALSE=
41011 if test -z "${GL_COND_OBJ_SETLOCALE_TRUE}" && test -z "${GL_COND_OBJ_SETLOCALE_FALSE}"; then
41012 GL_COND_OBJ_SETLOCALE_TRUE='#'
41013 GL_COND_OBJ_SETLOCALE_FALSE='#'
41016 if test -z "$GL_COND_OBJ_SETLOCALE_TRUE"; then :
41032 if test "$GL_GNULIB_SETLOCALE" != 1; then
41033 if test "$GL_GNULIB_SETLOCALE" = 0; then
41034 GL_GNULIB_SETLOCALE=$gl_module_indicator_condition
41035 else
41036 GL_GNULIB_SETLOCALE="($GL_GNULIB_SETLOCALE || $gl_module_indicator_condition)"
41044 printf "%s\n" "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
41051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
41052 printf %s "checking for a traditional french locale... " >&6; }
41053 if test ${gt_cv_locale_fr+y}
41054 then :
41055 printf %s "(cached) " >&6
41056 else case e in #(
41058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41059 /* end confdefs.h. */
41061 #include <locale.h>
41062 #include <time.h>
41063 #if HAVE_LANGINFO_CODESET
41064 # include <langinfo.h>
41065 #endif
41066 #include <stdlib.h>
41067 #include <string.h>
41068 struct tm t;
41069 char buf[16];
41070 int main () {
41071 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
41072 imitates locale dependent behaviour by looking at the environment
41073 variables, and all locales use the UTF-8 encoding. */
41074 #if defined __BEOS__ || defined __HAIKU__
41075 return 1;
41076 #else
41077 /* Check whether the given locale name is recognized by the system. */
41078 # if defined _WIN32 && !defined __CYGWIN__
41079 /* On native Windows, setlocale(category, "") looks at the system settings,
41080 not at the environment variables. Also, when an encoding suffix such
41081 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41082 category of the locale to "C". */
41083 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41084 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41085 return 1;
41086 # else
41087 if (setlocale (LC_ALL, "") == NULL) return 1;
41088 # endif
41089 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41090 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41091 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41092 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41093 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41094 some unit tests fail.
41095 On MirBSD 10, when an unsupported locale is specified, setlocale()
41096 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
41097 # if HAVE_LANGINFO_CODESET
41099 const char *cs = nl_langinfo (CODESET);
41100 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
41101 || strcmp (cs, "UTF-8") == 0)
41102 return 1;
41104 # endif
41105 # ifdef __CYGWIN__
41106 /* On Cygwin, avoid locale names without encoding suffix, because the
41107 locale_charset() function relies on the encoding suffix. Note that
41108 LC_ALL is set on the command line. */
41109 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41110 # endif
41111 /* Check whether in the abbreviation of the second month, the second
41112 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
41113 one byte long. This excludes the UTF-8 encoding. */
41114 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41115 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
41116 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
41117 /* Check whether the decimal separator is a comma.
41118 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
41119 are nl_langinfo(RADIXCHAR) are both ".". */
41120 if (localeconv () ->decimal_point[0] != ',') return 1;
41121 # endif
41122 return 0;
41123 #endif
41126 _ACEOF
41127 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41128 (eval $ac_link) 2>&5
41129 ac_status=$?
41130 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41131 test $ac_status = 0; } && test -s conftest$ac_exeext; then
41132 case "$host_os" in
41133 # Handle native Windows specially, because there setlocale() interprets
41134 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41135 # "fr" or "fra" as "French" or "French_France.1252",
41136 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41137 # "ja" as "Japanese" or "Japanese_Japan.932",
41138 # and similar.
41139 mingw*)
41140 # Test for the native Windows locale name.
41141 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41142 gt_cv_locale_fr=French_France.1252
41143 else
41144 # None found.
41145 gt_cv_locale_fr=none
41149 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41150 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41151 # configure script would override the LC_ALL setting. Likewise for
41152 # LC_CTYPE, which is also set at the beginning of the configure script.
41153 # Test for the usual locale name.
41154 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41155 gt_cv_locale_fr=fr_FR
41156 else
41157 # Test for the locale name with explicit encoding suffix.
41158 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41159 gt_cv_locale_fr=fr_FR.ISO-8859-1
41160 else
41161 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
41162 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41163 gt_cv_locale_fr=fr_FR.ISO8859-1
41164 else
41165 # Test for the HP-UX locale name.
41166 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41167 gt_cv_locale_fr=fr_FR.iso88591
41168 else
41169 # Test for the Solaris 7 locale name.
41170 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41171 gt_cv_locale_fr=fr
41172 else
41173 # None found.
41174 gt_cv_locale_fr=none
41181 esac
41183 rm -fr conftest*
41185 esac
41187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
41188 printf "%s\n" "$gt_cv_locale_fr" >&6; }
41189 LOCALE_FR=$gt_cv_locale_fr
41194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
41195 printf %s "checking for a french Unicode locale... " >&6; }
41196 if test ${gt_cv_locale_fr_utf8+y}
41197 then :
41198 printf %s "(cached) " >&6
41199 else case e in #(
41201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41202 /* end confdefs.h. */
41204 #include <locale.h>
41205 #include <time.h>
41206 #if HAVE_LANGINFO_CODESET
41207 # include <langinfo.h>
41208 #endif
41209 #include <stdlib.h>
41210 #include <string.h>
41211 struct tm t;
41212 char buf[16];
41213 int main () {
41214 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
41215 imitates locale dependent behaviour by looking at the environment
41216 variables, and all locales use the UTF-8 encoding. */
41217 #if !(defined __BEOS__ || defined __HAIKU__)
41218 /* Check whether the given locale name is recognized by the system. */
41219 # if defined _WIN32 && !defined __CYGWIN__
41220 /* On native Windows, setlocale(category, "") looks at the system settings,
41221 not at the environment variables. Also, when an encoding suffix such
41222 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41223 category of the locale to "C". */
41224 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41225 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41226 return 1;
41227 # else
41228 if (setlocale (LC_ALL, "") == NULL) return 1;
41229 # endif
41230 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41231 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41232 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41233 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41234 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41235 some unit tests fail. */
41236 # if HAVE_LANGINFO_CODESET
41238 const char *cs = nl_langinfo (CODESET);
41239 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
41240 return 1;
41242 # endif
41243 # ifdef __CYGWIN__
41244 /* On Cygwin, avoid locale names without encoding suffix, because the
41245 locale_charset() function relies on the encoding suffix. Note that
41246 LC_ALL is set on the command line. */
41247 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41248 # endif
41249 /* Check whether in the abbreviation of the second month, the second
41250 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
41251 two bytes long, with UTF-8 encoding. */
41252 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41253 if (strftime (buf, sizeof (buf), "%b", &t) < 4
41254 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
41255 return 1;
41256 #endif
41257 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
41258 /* Check whether the decimal separator is a comma.
41259 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
41260 are nl_langinfo(RADIXCHAR) are both ".". */
41261 if (localeconv () ->decimal_point[0] != ',') return 1;
41262 #endif
41263 return 0;
41266 _ACEOF
41267 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41268 (eval $ac_link) 2>&5
41269 ac_status=$?
41270 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41271 test $ac_status = 0; } && test -s conftest$ac_exeext; then
41272 case "$host_os" in
41273 # Handle native Windows specially, because there setlocale() interprets
41274 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41275 # "fr" or "fra" as "French" or "French_France.1252",
41276 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41277 # "ja" as "Japanese" or "Japanese_Japan.932",
41278 # and similar.
41279 mingw*)
41280 # Test for the hypothetical native Windows locale name.
41281 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41282 gt_cv_locale_fr_utf8=French_France.65001
41283 else
41284 # None found.
41285 gt_cv_locale_fr_utf8=none
41289 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41290 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41291 # configure script would override the LC_ALL setting. Likewise for
41292 # LC_CTYPE, which is also set at the beginning of the configure script.
41293 # Test for the usual locale name.
41294 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41295 gt_cv_locale_fr_utf8=fr_FR
41296 else
41297 # Test for the locale name with explicit encoding suffix.
41298 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41299 gt_cv_locale_fr_utf8=fr_FR.UTF-8
41300 else
41301 # Test for the Solaris 7 locale name.
41302 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41303 gt_cv_locale_fr_utf8=fr.UTF-8
41304 else
41305 # None found.
41306 gt_cv_locale_fr_utf8=none
41311 esac
41313 rm -fr conftest*
41315 esac
41317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
41318 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
41319 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
41325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
41326 printf %s "checking for a traditional japanese locale... " >&6; }
41327 if test ${gt_cv_locale_ja+y}
41328 then :
41329 printf %s "(cached) " >&6
41330 else case e in #(
41332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41333 /* end confdefs.h. */
41335 #include <locale.h>
41336 #include <time.h>
41337 #if HAVE_LANGINFO_CODESET
41338 # include <langinfo.h>
41339 #endif
41340 #include <stdlib.h>
41341 #include <string.h>
41342 struct tm t;
41343 char buf[16];
41344 int main ()
41346 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
41347 imitates locale dependent behaviour by looking at the environment
41348 variables, and all locales use the UTF-8 encoding. */
41349 #if defined __BEOS__ || defined __HAIKU__
41350 return 1;
41351 #else
41352 /* Check whether the given locale name is recognized by the system. */
41353 # if defined _WIN32 && !defined __CYGWIN__
41354 /* On native Windows, setlocale(category, "") looks at the system settings,
41355 not at the environment variables. Also, when an encoding suffix such
41356 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41357 category of the locale to "C". */
41358 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41359 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41360 return 1;
41361 # else
41362 if (setlocale (LC_ALL, "") == NULL) return 1;
41363 # endif
41364 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41365 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41366 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41367 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41368 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41369 some unit tests fail.
41370 On MirBSD 10, when an unsupported locale is specified, setlocale()
41371 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
41372 # if HAVE_LANGINFO_CODESET
41374 const char *cs = nl_langinfo (CODESET);
41375 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
41376 || strcmp (cs, "UTF-8") == 0)
41377 return 1;
41379 # endif
41380 # ifdef __CYGWIN__
41381 /* On Cygwin, avoid locale names without encoding suffix, because the
41382 locale_charset() function relies on the encoding suffix. Note that
41383 LC_ALL is set on the command line. */
41384 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41385 # endif
41386 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
41387 on Cygwin 1.5.x. */
41388 if (MB_CUR_MAX == 1)
41389 return 1;
41390 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
41391 This excludes the UTF-8 encoding (except on MirBSD). */
41393 const char *p;
41394 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41395 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
41396 for (p = buf; *p != '\0'; p++)
41397 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
41398 return 1;
41400 return 0;
41401 #endif
41404 _ACEOF
41405 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41406 (eval $ac_link) 2>&5
41407 ac_status=$?
41408 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41409 test $ac_status = 0; } && test -s conftest$ac_exeext; then
41410 case "$host_os" in
41411 # Handle native Windows specially, because there setlocale() interprets
41412 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41413 # "fr" or "fra" as "French" or "French_France.1252",
41414 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41415 # "ja" as "Japanese" or "Japanese_Japan.932",
41416 # and similar.
41417 mingw*)
41418 # Note that on native Windows, the Japanese locale is
41419 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
41420 # cannot use it here.
41421 gt_cv_locale_ja=none
41424 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41425 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41426 # configure script would override the LC_ALL setting. Likewise for
41427 # LC_CTYPE, which is also set at the beginning of the configure script.
41428 # Test for the AIX locale name.
41429 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41430 gt_cv_locale_ja=ja_JP
41431 else
41432 # Test for the locale name with explicit encoding suffix.
41433 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41434 gt_cv_locale_ja=ja_JP.EUC-JP
41435 else
41436 # Test for the HP-UX, OSF/1, NetBSD locale name.
41437 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41438 gt_cv_locale_ja=ja_JP.eucJP
41439 else
41440 # Test for the IRIX, FreeBSD locale name.
41441 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41442 gt_cv_locale_ja=ja_JP.EUC
41443 else
41444 # Test for the Solaris 7 locale name.
41445 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41446 gt_cv_locale_ja=ja
41447 else
41448 # Special test for NetBSD 1.6.
41449 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
41450 gt_cv_locale_ja=ja_JP.eucJP
41451 else
41452 # None found.
41453 gt_cv_locale_ja=none
41461 esac
41463 rm -fr conftest*
41465 esac
41467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
41468 printf "%s\n" "$gt_cv_locale_ja" >&6; }
41469 LOCALE_JA=$gt_cv_locale_ja
41475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
41476 printf %s "checking for a transitional chinese locale... " >&6; }
41477 if test ${gt_cv_locale_zh_CN+y}
41478 then :
41479 printf %s "(cached) " >&6
41480 else case e in #(
41482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41483 /* end confdefs.h. */
41485 #include <locale.h>
41486 #include <stdlib.h>
41487 #include <time.h>
41488 #if HAVE_LANGINFO_CODESET
41489 # include <langinfo.h>
41490 #endif
41491 #include <stdlib.h>
41492 #include <string.h>
41493 struct tm t;
41494 char buf[16];
41495 int main ()
41497 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
41498 imitates locale dependent behaviour by looking at the environment
41499 variables, and all locales use the UTF-8 encoding. */
41500 #if defined __BEOS__ || defined __HAIKU__
41501 return 1;
41502 #else
41503 /* Check whether the given locale name is recognized by the system. */
41504 # if defined _WIN32 && !defined __CYGWIN__
41505 /* On native Windows, setlocale(category, "") looks at the system settings,
41506 not at the environment variables. Also, when an encoding suffix such
41507 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
41508 category of the locale to "C". */
41509 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
41510 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
41511 return 1;
41512 # else
41513 if (setlocale (LC_ALL, "") == NULL) return 1;
41514 # endif
41515 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
41516 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41517 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
41518 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
41519 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
41520 some unit tests fail.
41521 On MirBSD 10, when an unsupported locale is specified, setlocale()
41522 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
41523 # if HAVE_LANGINFO_CODESET
41525 const char *cs = nl_langinfo (CODESET);
41526 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
41527 || strcmp (cs, "UTF-8") == 0)
41528 return 1;
41530 # endif
41531 # ifdef __CYGWIN__
41532 /* On Cygwin, avoid locale names without encoding suffix, because the
41533 locale_charset() function relies on the encoding suffix. Note that
41534 LC_ALL is set on the command line. */
41535 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
41536 # endif
41537 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
41538 This excludes the UTF-8 encoding (except on MirBSD). */
41540 const char *p;
41541 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
41542 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
41543 for (p = buf; *p != '\0'; p++)
41544 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
41545 return 1;
41547 /* Check whether a typical GB18030 multibyte sequence is recognized as a
41548 single wide character. This excludes the GB2312 and GBK encodings. */
41549 if (mblen ("\203\062\332\066", 5) != 4)
41550 return 1;
41551 return 0;
41552 #endif
41555 _ACEOF
41556 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
41557 (eval $ac_link) 2>&5
41558 ac_status=$?
41559 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41560 test $ac_status = 0; } && test -s conftest$ac_exeext; then
41561 case "$host_os" in
41562 # Handle native Windows specially, because there setlocale() interprets
41563 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
41564 # "fr" or "fra" as "French" or "French_France.1252",
41565 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
41566 # "ja" as "Japanese" or "Japanese_Japan.932",
41567 # and similar.
41568 mingw*)
41569 # Test for the hypothetical native Windows locale name.
41570 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41571 gt_cv_locale_zh_CN=Chinese_China.54936
41572 else
41573 # None found.
41574 gt_cv_locale_zh_CN=none
41577 solaris2.8)
41578 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
41579 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
41580 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
41581 gt_cv_locale_zh_CN=none
41584 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
41585 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
41586 # configure script would override the LC_ALL setting. Likewise for
41587 # LC_CTYPE, which is also set at the beginning of the configure script.
41588 # Test for the locale name without encoding suffix.
41589 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41590 gt_cv_locale_zh_CN=zh_CN
41591 else
41592 # Test for the locale name with explicit encoding suffix.
41593 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
41594 gt_cv_locale_zh_CN=zh_CN.GB18030
41595 else
41596 # None found.
41597 gt_cv_locale_zh_CN=none
41601 esac
41602 else
41603 # If there was a link error, due to mblen(), the system is so old that
41604 # it certainly doesn't have a chinese locale.
41605 gt_cv_locale_zh_CN=none
41607 rm -fr conftest*
41609 esac
41611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
41612 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
41613 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
41618 if test "$ac_cv_header_winsock2_h" = yes; then
41619 GL_COND_OBJ_SETSOCKOPT_TRUE=
41620 GL_COND_OBJ_SETSOCKOPT_FALSE='#'
41621 else
41622 GL_COND_OBJ_SETSOCKOPT_TRUE='#'
41623 GL_COND_OBJ_SETSOCKOPT_FALSE=
41626 if test -z "${GL_COND_OBJ_SETSOCKOPT_TRUE}" && test -z "${GL_COND_OBJ_SETSOCKOPT_FALSE}"; then
41627 GL_COND_OBJ_SETSOCKOPT_TRUE='#'
41628 GL_COND_OBJ_SETSOCKOPT_FALSE='#'
41640 if test "$GL_GNULIB_SETSOCKOPT" != 1; then
41641 if test "$GL_GNULIB_SETSOCKOPT" = 0; then
41642 GL_GNULIB_SETSOCKOPT=$gl_module_indicator_condition
41643 else
41644 GL_GNULIB_SETSOCKOPT="($GL_GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
41652 printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
41666 HAVE_POSIX_SIGNALBLOCKING=0
41667 if test "$gl_cv_type_sigset_t" = yes; then
41668 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
41669 if test "x$ac_cv_func_sigprocmask" = xyes
41670 then :
41671 HAVE_POSIX_SIGNALBLOCKING=1
41677 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
41678 GL_COND_OBJ_SIGPROCMASK_TRUE=
41679 GL_COND_OBJ_SIGPROCMASK_FALSE='#'
41680 else
41681 GL_COND_OBJ_SIGPROCMASK_TRUE='#'
41682 GL_COND_OBJ_SIGPROCMASK_FALSE=
41685 if test -z "${GL_COND_OBJ_SIGPROCMASK_TRUE}" && test -z "${GL_COND_OBJ_SIGPROCMASK_FALSE}"; then
41686 GL_COND_OBJ_SIGPROCMASK_TRUE='#'
41687 GL_COND_OBJ_SIGPROCMASK_FALSE='#'
41690 if test -z "$GL_COND_OBJ_SIGPROCMASK_TRUE"; then :
41704 if test "$GL_GNULIB_SIGPROCMASK" != 1; then
41705 if test "$GL_GNULIB_SIGPROCMASK" = 0; then
41706 GL_GNULIB_SIGPROCMASK=$gl_module_indicator_condition
41707 else
41708 GL_GNULIB_SIGPROCMASK="($GL_GNULIB_SIGPROCMASK || $gl_module_indicator_condition)"
41716 printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
41722 ac_fn_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
41723 " "$ac_c_undeclared_builtin_options" "CFLAGS"
41724 if test "x$ac_cv_have_decl_sleep" = xyes
41725 then :
41726 ac_have_decl=1
41727 else case e in #(
41728 e) ac_have_decl=0 ;;
41729 esac
41731 printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h
41734 if test $ac_cv_have_decl_sleep != yes; then
41735 HAVE_SLEEP=0
41736 else
41737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
41738 printf %s "checking for working sleep... " >&6; }
41739 if test ${gl_cv_func_sleep_works+y}
41740 then :
41741 printf %s "(cached) " >&6
41742 else case e in #(
41743 e) if test "$cross_compiling" = yes
41744 then :
41745 case "$host_os" in
41746 # Guess yes on glibc systems.
41747 *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
41748 # Guess yes on musl systems.
41749 *-musl*) gl_cv_func_sleep_works="guessing yes" ;;
41750 # Guess no on native Windows.
41751 mingw*) gl_cv_func_sleep_works="guessing no" ;;
41752 # If we don't know, obey --enable-cross-guesses.
41753 *) gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
41754 esac
41756 else case e in #(
41757 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41758 /* end confdefs.h. */
41760 #include <errno.h>
41761 #include <unistd.h>
41762 #include <signal.h>
41763 static void
41764 handle_alarm (int sig)
41766 if (sig != SIGALRM)
41767 _exit (2);
41771 main (void)
41774 /* Failure to compile this test due to missing alarm is okay,
41775 since all such platforms (mingw) also lack sleep. */
41776 unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
41777 unsigned int remaining;
41778 signal (SIGALRM, handle_alarm);
41779 alarm (1);
41780 remaining = sleep (pentecost);
41781 if (remaining > pentecost)
41782 return 3;
41783 if (remaining <= pentecost - 10)
41784 return 4;
41785 return 0;
41788 return 0;
41790 _ACEOF
41791 if ac_fn_c_try_run "$LINENO"
41792 then :
41793 gl_cv_func_sleep_works=yes
41794 else case e in #(
41795 e) gl_cv_func_sleep_works=no ;;
41796 esac
41798 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41799 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
41800 esac
41803 esac
41805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
41806 printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
41807 case "$gl_cv_func_sleep_works" in
41808 *yes) ;;
41810 REPLACE_SLEEP=1
41812 esac
41816 if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
41817 GL_COND_OBJ_SLEEP_TRUE=
41818 GL_COND_OBJ_SLEEP_FALSE='#'
41819 else
41820 GL_COND_OBJ_SLEEP_TRUE='#'
41821 GL_COND_OBJ_SLEEP_FALSE=
41824 if test -z "${GL_COND_OBJ_SLEEP_TRUE}" && test -z "${GL_COND_OBJ_SLEEP_FALSE}"; then
41825 GL_COND_OBJ_SLEEP_TRUE='#'
41826 GL_COND_OBJ_SLEEP_FALSE='#'
41838 if test "$GL_GNULIB_SLEEP" != 1; then
41839 if test "$GL_GNULIB_SLEEP" = 0; then
41840 GL_GNULIB_SLEEP=$gl_module_indicator_condition
41841 else
41842 GL_GNULIB_SLEEP="($GL_GNULIB_SLEEP || $gl_module_indicator_condition)"
41850 printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
41857 if test "$ac_cv_header_winsock2_h" = yes; then
41858 GL_COND_OBJ_SOCKET_TRUE=
41859 GL_COND_OBJ_SOCKET_FALSE='#'
41860 else
41861 GL_COND_OBJ_SOCKET_TRUE='#'
41862 GL_COND_OBJ_SOCKET_FALSE=
41865 if test -z "${GL_COND_OBJ_SOCKET_TRUE}" && test -z "${GL_COND_OBJ_SOCKET_FALSE}"; then
41866 GL_COND_OBJ_SOCKET_TRUE='#'
41867 GL_COND_OBJ_SOCKET_FALSE='#'
41870 # When this module is used, sockets may actually occur as file descriptors,
41871 # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
41883 if test "$ac_cv_header_winsock2_h" = yes; then
41884 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
41885 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
41896 if test "$GL_GNULIB_SOCKET" != 1; then
41897 if test "$GL_GNULIB_SOCKET" = 0; then
41898 GL_GNULIB_SOCKET=$gl_module_indicator_condition
41899 else
41900 GL_GNULIB_SOCKET="($GL_GNULIB_SOCKET || $gl_module_indicator_condition)"
41908 printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
41914 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
41915 /* <sys/types.h> is not needed according to POSIX, but the
41916 <sys/socket.h> in i386-unknown-freebsd4.10 and
41917 powerpc-apple-darwin5.5 required it. */
41918 #include <sys/types.h>
41919 #if HAVE_SYS_SOCKET_H
41920 # include <sys/socket.h>
41921 #elif HAVE_WS2TCPIP_H
41922 # include <ws2tcpip.h>
41923 #endif
41926 if test "x$ac_cv_type_socklen_t" = xyes
41927 then :
41929 else case e in #(
41930 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
41931 printf %s "checking for socklen_t equivalent... " >&6; }
41932 if test ${gl_cv_socklen_t_equiv+y}
41933 then :
41934 printf %s "(cached) " >&6
41935 else case e in #(
41936 e) # Systems have either "struct sockaddr *" or
41937 # "void *" as the second argument to getpeername
41938 gl_cv_socklen_t_equiv=
41939 for arg2 in "struct sockaddr" void; do
41940 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
41941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41942 /* end confdefs.h. */
41943 #include <sys/types.h>
41944 #include <sys/socket.h>
41946 int getpeername (int, $arg2 *, $t *);
41948 main (void)
41950 $t len;
41951 getpeername (0, 0, &len);
41953 return 0;
41955 _ACEOF
41956 if ac_fn_c_try_compile "$LINENO"
41957 then :
41958 gl_cv_socklen_t_equiv="$t"
41960 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41961 test "$gl_cv_socklen_t_equiv" != "" && break
41962 done
41963 test "$gl_cv_socklen_t_equiv" != "" && break
41964 done
41965 if test "$gl_cv_socklen_t_equiv" = ""; then
41966 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
41969 esac
41971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
41972 printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
41974 printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
41976 esac
41984 if test $gl_cv_func_malloc_posix != yes; then
41985 REPLACE_STRDUP=1
41988 if test $ac_cv_have_decl_strdup = no; then
41989 HAVE_DECL_STRDUP=0
41993 if test $REPLACE_STRDUP = 1; then
41994 GL_COND_OBJ_STRDUP_TRUE=
41995 GL_COND_OBJ_STRDUP_FALSE='#'
41996 else
41997 GL_COND_OBJ_STRDUP_TRUE='#'
41998 GL_COND_OBJ_STRDUP_FALSE=
42001 if test -z "${GL_COND_OBJ_STRDUP_TRUE}" && test -z "${GL_COND_OBJ_STRDUP_FALSE}"; then
42002 GL_COND_OBJ_STRDUP_TRUE='#'
42003 GL_COND_OBJ_STRDUP_FALSE='#'
42006 if test -z "$GL_COND_OBJ_STRDUP_TRUE"; then :
42025 if test "$GL_GNULIB_STRDUP" != 1; then
42026 if test "$GL_GNULIB_STRDUP" = 0; then
42027 GL_GNULIB_STRDUP=$gl_module_indicator_condition
42028 else
42029 GL_GNULIB_STRDUP="($GL_GNULIB_STRDUP || $gl_module_indicator_condition)"
42037 printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
42046 if test $ac_cv_have_decl_strerror_r = no; then
42047 HAVE_DECL_STRERROR_R=0
42050 if test $ac_cv_func_strerror_r = yes; then
42051 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
42052 if test $gl_cv_func_strerror_r_posix_signature = yes; then
42053 case "$gl_cv_func_strerror_r_works" in
42054 *no) REPLACE_STRERROR_R=1 ;;
42055 esac
42056 else
42057 REPLACE_STRERROR_R=1
42059 else
42060 REPLACE_STRERROR_R=1
42064 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1
42065 then :
42075 gltests_LIBOBJS="$gltests_LIBOBJS strerror_r.$ac_objext"
42099 if test "$GL_GNULIB_STRERROR_R" != 1; then
42100 if test "$GL_GNULIB_STRERROR_R" = 0; then
42101 GL_GNULIB_STRERROR_R=$gl_module_indicator_condition
42102 else
42103 GL_GNULIB_STRERROR_R="($GL_GNULIB_STRERROR_R || $gl_module_indicator_condition)"
42111 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
42117 printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h
42123 if test $ac_cv_func_symlink = no; then
42124 HAVE_SYMLINK=0
42125 else
42126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
42127 printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
42128 if test ${gl_cv_func_symlink_works+y}
42129 then :
42130 printf %s "(cached) " >&6
42131 else case e in #(
42132 e) if test "$cross_compiling" = yes
42133 then :
42134 case "$host_os" in
42135 # Guess yes on Linux systems.
42136 linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
42137 # Guess yes on glibc systems.
42138 *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
42139 # If we don't know, obey --enable-cross-guesses.
42140 *) gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
42141 esac
42143 else case e in #(
42144 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42145 /* end confdefs.h. */
42146 #include <unistd.h>
42149 main (void)
42151 int result = 0;
42152 if (!symlink ("a", "conftest.link/"))
42153 result |= 1;
42154 if (symlink ("conftest.f", "conftest.lnk2"))
42155 result |= 2;
42156 else if (!symlink ("a", "conftest.lnk2/"))
42157 result |= 4;
42158 return result;
42161 return 0;
42163 _ACEOF
42164 if ac_fn_c_try_run "$LINENO"
42165 then :
42166 gl_cv_func_symlink_works=yes
42167 else case e in #(
42168 e) gl_cv_func_symlink_works=no ;;
42169 esac
42171 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42172 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
42173 esac
42176 rm -f conftest.f conftest.link conftest.lnk2 ;;
42177 esac
42179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
42180 printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
42181 case "$gl_cv_func_symlink_works" in
42182 *yes) ;;
42184 REPLACE_SYMLINK=1
42186 esac
42190 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
42191 GL_COND_OBJ_SYMLINK_TRUE=
42192 GL_COND_OBJ_SYMLINK_FALSE='#'
42193 else
42194 GL_COND_OBJ_SYMLINK_TRUE='#'
42195 GL_COND_OBJ_SYMLINK_FALSE=
42198 if test -z "${GL_COND_OBJ_SYMLINK_TRUE}" && test -z "${GL_COND_OBJ_SYMLINK_FALSE}"; then
42199 GL_COND_OBJ_SYMLINK_TRUE='#'
42200 GL_COND_OBJ_SYMLINK_FALSE='#'
42212 if test "$GL_GNULIB_SYMLINK" != 1; then
42213 if test "$GL_GNULIB_SYMLINK" = 0; then
42214 GL_GNULIB_SYMLINK=$gl_module_indicator_condition
42215 else
42216 GL_GNULIB_SYMLINK="($GL_GNULIB_SYMLINK || $gl_module_indicator_condition)"
42224 printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
42267 if test $gl_threads_api = posix; then
42268 gl_save_LIBS="$LIBS"
42269 LIBS="$LIBS $LIBMULTITHREAD"
42270 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
42271 if test "x$ac_cv_func_pthread_atfork" = xyes
42272 then :
42273 printf "%s\n" "#define HAVE_PTHREAD_ATFORK 1" >>confdefs.h
42277 LIBS="$gl_save_LIBS"
42280 ac_fn_c_check_header_compile "$LINENO" "sys/single_threaded.h" "ac_cv_header_sys_single_threaded_h" "$ac_includes_default"
42281 if test "x$ac_cv_header_sys_single_threaded_h" = xyes
42282 then :
42283 printf "%s\n" "#define HAVE_SYS_SINGLE_THREADED_H 1" >>confdefs.h
42290 if test $ac_cv_have_decl_unsetenv = no; then
42291 HAVE_DECL_UNSETENV=0
42293 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
42294 if test "x$ac_cv_func_unsetenv" = xyes
42295 then :
42296 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
42300 if test $ac_cv_func_unsetenv = no; then
42301 HAVE_UNSETENV=0
42302 else
42303 HAVE_UNSETENV=1
42304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
42305 printf %s "checking for unsetenv() return type... " >&6; }
42306 if test ${gt_cv_func_unsetenv_ret+y}
42307 then :
42308 printf %s "(cached) " >&6
42309 else case e in #(
42310 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42311 /* end confdefs.h. */
42313 #undef _BSD
42314 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
42315 #include <stdlib.h>
42316 extern
42317 #ifdef __cplusplus
42319 #endif
42320 int unsetenv (const char *name);
42323 main (void)
42327 return 0;
42329 _ACEOF
42330 if ac_fn_c_try_compile "$LINENO"
42331 then :
42332 gt_cv_func_unsetenv_ret='int'
42333 else case e in #(
42334 e) gt_cv_func_unsetenv_ret='void' ;;
42335 esac
42337 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
42338 esac
42340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
42341 printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
42342 if test $gt_cv_func_unsetenv_ret = 'void'; then
42344 printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
42346 REPLACE_UNSETENV=1
42349 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
42350 printf %s "checking whether unsetenv obeys POSIX... " >&6; }
42351 if test ${gl_cv_func_unsetenv_works+y}
42352 then :
42353 printf %s "(cached) " >&6
42354 else case e in #(
42355 e) if test "$cross_compiling" = yes
42356 then :
42357 case "$host_os" in
42358 # Guess yes on glibc systems.
42359 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
42360 # If we don't know, obey --enable-cross-guesses.
42361 *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
42362 esac
42364 else case e in #(
42365 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42366 /* end confdefs.h. */
42368 #include <stdlib.h>
42369 #include <errno.h>
42370 extern char **environ;
42373 $gl_mda_defines
42376 main (void)
42379 char entry1[] = "a=1";
42380 char entry2[] = "b=2";
42381 char *env[] = { entry1, entry2, NULL };
42382 if (putenv ((char *) "a=1")) return 1;
42383 if (putenv (entry2)) return 2;
42384 entry2[0] = 'a';
42385 unsetenv ("a");
42386 if (getenv ("a")) return 3;
42387 if (!unsetenv ("") || errno != EINVAL) return 4;
42388 entry2[0] = 'b';
42389 environ = env;
42390 if (!getenv ("a")) return 5;
42391 entry2[0] = 'a';
42392 unsetenv ("a");
42393 if (getenv ("a")) return 6;
42396 return 0;
42398 _ACEOF
42399 if ac_fn_c_try_run "$LINENO"
42400 then :
42401 gl_cv_func_unsetenv_works=yes
42402 else case e in #(
42403 e) gl_cv_func_unsetenv_works=no ;;
42404 esac
42406 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42407 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
42408 esac
42412 esac
42414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
42415 printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
42416 case "$gl_cv_func_unsetenv_works" in
42417 *yes) ;;
42419 REPLACE_UNSETENV=1
42421 esac
42425 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
42426 GL_COND_OBJ_UNSETENV_TRUE=
42427 GL_COND_OBJ_UNSETENV_FALSE='#'
42428 else
42429 GL_COND_OBJ_UNSETENV_TRUE='#'
42430 GL_COND_OBJ_UNSETENV_FALSE=
42433 if test -z "${GL_COND_OBJ_UNSETENV_TRUE}" && test -z "${GL_COND_OBJ_UNSETENV_FALSE}"; then
42434 GL_COND_OBJ_UNSETENV_TRUE='#'
42435 GL_COND_OBJ_UNSETENV_FALSE='#'
42438 if test -z "$GL_COND_OBJ_UNSETENV_TRUE"; then :
42455 if test "$GL_GNULIB_UNSETENV" != 1; then
42456 if test "$GL_GNULIB_UNSETENV" = 0; then
42457 GL_GNULIB_UNSETENV=$gl_module_indicator_condition
42458 else
42459 GL_GNULIB_UNSETENV="($GL_GNULIB_UNSETENV || $gl_module_indicator_condition)"
42467 printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
42471 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
42473 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
42481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
42482 printf %s "checking for a traditional french locale... " >&6; }
42483 if test ${gt_cv_locale_fr+y}
42484 then :
42485 printf %s "(cached) " >&6
42486 else case e in #(
42488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42489 /* end confdefs.h. */
42491 #include <locale.h>
42492 #include <time.h>
42493 #if HAVE_LANGINFO_CODESET
42494 # include <langinfo.h>
42495 #endif
42496 #include <stdlib.h>
42497 #include <string.h>
42498 struct tm t;
42499 char buf[16];
42500 int main () {
42501 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
42502 imitates locale dependent behaviour by looking at the environment
42503 variables, and all locales use the UTF-8 encoding. */
42504 #if defined __BEOS__ || defined __HAIKU__
42505 return 1;
42506 #else
42507 /* Check whether the given locale name is recognized by the system. */
42508 # if defined _WIN32 && !defined __CYGWIN__
42509 /* On native Windows, setlocale(category, "") looks at the system settings,
42510 not at the environment variables. Also, when an encoding suffix such
42511 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
42512 category of the locale to "C". */
42513 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
42514 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
42515 return 1;
42516 # else
42517 if (setlocale (LC_ALL, "") == NULL) return 1;
42518 # endif
42519 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42520 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42521 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42522 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42523 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42524 some unit tests fail.
42525 On MirBSD 10, when an unsupported locale is specified, setlocale()
42526 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
42527 # if HAVE_LANGINFO_CODESET
42529 const char *cs = nl_langinfo (CODESET);
42530 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
42531 || strcmp (cs, "UTF-8") == 0)
42532 return 1;
42534 # endif
42535 # ifdef __CYGWIN__
42536 /* On Cygwin, avoid locale names without encoding suffix, because the
42537 locale_charset() function relies on the encoding suffix. Note that
42538 LC_ALL is set on the command line. */
42539 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42540 # endif
42541 /* Check whether in the abbreviation of the second month, the second
42542 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
42543 one byte long. This excludes the UTF-8 encoding. */
42544 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42545 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
42546 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
42547 /* Check whether the decimal separator is a comma.
42548 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
42549 are nl_langinfo(RADIXCHAR) are both ".". */
42550 if (localeconv () ->decimal_point[0] != ',') return 1;
42551 # endif
42552 return 0;
42553 #endif
42556 _ACEOF
42557 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42558 (eval $ac_link) 2>&5
42559 ac_status=$?
42560 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42561 test $ac_status = 0; } && test -s conftest$ac_exeext; then
42562 case "$host_os" in
42563 # Handle native Windows specially, because there setlocale() interprets
42564 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
42565 # "fr" or "fra" as "French" or "French_France.1252",
42566 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
42567 # "ja" as "Japanese" or "Japanese_Japan.932",
42568 # and similar.
42569 mingw*)
42570 # Test for the native Windows locale name.
42571 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42572 gt_cv_locale_fr=French_France.1252
42573 else
42574 # None found.
42575 gt_cv_locale_fr=none
42579 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42580 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
42581 # configure script would override the LC_ALL setting. Likewise for
42582 # LC_CTYPE, which is also set at the beginning of the configure script.
42583 # Test for the usual locale name.
42584 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42585 gt_cv_locale_fr=fr_FR
42586 else
42587 # Test for the locale name with explicit encoding suffix.
42588 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42589 gt_cv_locale_fr=fr_FR.ISO-8859-1
42590 else
42591 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
42592 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42593 gt_cv_locale_fr=fr_FR.ISO8859-1
42594 else
42595 # Test for the HP-UX locale name.
42596 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42597 gt_cv_locale_fr=fr_FR.iso88591
42598 else
42599 # Test for the Solaris 7 locale name.
42600 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42601 gt_cv_locale_fr=fr
42602 else
42603 # None found.
42604 gt_cv_locale_fr=none
42611 esac
42613 rm -fr conftest*
42615 esac
42617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
42618 printf "%s\n" "$gt_cv_locale_fr" >&6; }
42619 LOCALE_FR=$gt_cv_locale_fr
42624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
42625 printf %s "checking for a french Unicode locale... " >&6; }
42626 if test ${gt_cv_locale_fr_utf8+y}
42627 then :
42628 printf %s "(cached) " >&6
42629 else case e in #(
42631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42632 /* end confdefs.h. */
42634 #include <locale.h>
42635 #include <time.h>
42636 #if HAVE_LANGINFO_CODESET
42637 # include <langinfo.h>
42638 #endif
42639 #include <stdlib.h>
42640 #include <string.h>
42641 struct tm t;
42642 char buf[16];
42643 int main () {
42644 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
42645 imitates locale dependent behaviour by looking at the environment
42646 variables, and all locales use the UTF-8 encoding. */
42647 #if !(defined __BEOS__ || defined __HAIKU__)
42648 /* Check whether the given locale name is recognized by the system. */
42649 # if defined _WIN32 && !defined __CYGWIN__
42650 /* On native Windows, setlocale(category, "") looks at the system settings,
42651 not at the environment variables. Also, when an encoding suffix such
42652 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
42653 category of the locale to "C". */
42654 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
42655 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
42656 return 1;
42657 # else
42658 if (setlocale (LC_ALL, "") == NULL) return 1;
42659 # endif
42660 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42661 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42662 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42663 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42664 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42665 some unit tests fail. */
42666 # if HAVE_LANGINFO_CODESET
42668 const char *cs = nl_langinfo (CODESET);
42669 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
42670 return 1;
42672 # endif
42673 # ifdef __CYGWIN__
42674 /* On Cygwin, avoid locale names without encoding suffix, because the
42675 locale_charset() function relies on the encoding suffix. Note that
42676 LC_ALL is set on the command line. */
42677 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42678 # endif
42679 /* Check whether in the abbreviation of the second month, the second
42680 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
42681 two bytes long, with UTF-8 encoding. */
42682 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42683 if (strftime (buf, sizeof (buf), "%b", &t) < 4
42684 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
42685 return 1;
42686 #endif
42687 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
42688 /* Check whether the decimal separator is a comma.
42689 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
42690 are nl_langinfo(RADIXCHAR) are both ".". */
42691 if (localeconv () ->decimal_point[0] != ',') return 1;
42692 #endif
42693 return 0;
42696 _ACEOF
42697 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42698 (eval $ac_link) 2>&5
42699 ac_status=$?
42700 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42701 test $ac_status = 0; } && test -s conftest$ac_exeext; then
42702 case "$host_os" in
42703 # Handle native Windows specially, because there setlocale() interprets
42704 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
42705 # "fr" or "fra" as "French" or "French_France.1252",
42706 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
42707 # "ja" as "Japanese" or "Japanese_Japan.932",
42708 # and similar.
42709 mingw*)
42710 # Test for the hypothetical native Windows locale name.
42711 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42712 gt_cv_locale_fr_utf8=French_France.65001
42713 else
42714 # None found.
42715 gt_cv_locale_fr_utf8=none
42719 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42720 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
42721 # configure script would override the LC_ALL setting. Likewise for
42722 # LC_CTYPE, which is also set at the beginning of the configure script.
42723 # Test for the usual locale name.
42724 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42725 gt_cv_locale_fr_utf8=fr_FR
42726 else
42727 # Test for the locale name with explicit encoding suffix.
42728 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42729 gt_cv_locale_fr_utf8=fr_FR.UTF-8
42730 else
42731 # Test for the Solaris 7 locale name.
42732 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42733 gt_cv_locale_fr_utf8=fr.UTF-8
42734 else
42735 # None found.
42736 gt_cv_locale_fr_utf8=none
42741 esac
42743 rm -fr conftest*
42745 esac
42747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
42748 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
42749 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
42755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
42756 printf %s "checking for a traditional japanese locale... " >&6; }
42757 if test ${gt_cv_locale_ja+y}
42758 then :
42759 printf %s "(cached) " >&6
42760 else case e in #(
42762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42763 /* end confdefs.h. */
42765 #include <locale.h>
42766 #include <time.h>
42767 #if HAVE_LANGINFO_CODESET
42768 # include <langinfo.h>
42769 #endif
42770 #include <stdlib.h>
42771 #include <string.h>
42772 struct tm t;
42773 char buf[16];
42774 int main ()
42776 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
42777 imitates locale dependent behaviour by looking at the environment
42778 variables, and all locales use the UTF-8 encoding. */
42779 #if defined __BEOS__ || defined __HAIKU__
42780 return 1;
42781 #else
42782 /* Check whether the given locale name is recognized by the system. */
42783 # if defined _WIN32 && !defined __CYGWIN__
42784 /* On native Windows, setlocale(category, "") looks at the system settings,
42785 not at the environment variables. Also, when an encoding suffix such
42786 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
42787 category of the locale to "C". */
42788 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
42789 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
42790 return 1;
42791 # else
42792 if (setlocale (LC_ALL, "") == NULL) return 1;
42793 # endif
42794 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42795 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42796 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42797 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42798 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42799 some unit tests fail.
42800 On MirBSD 10, when an unsupported locale is specified, setlocale()
42801 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
42802 # if HAVE_LANGINFO_CODESET
42804 const char *cs = nl_langinfo (CODESET);
42805 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
42806 || strcmp (cs, "UTF-8") == 0)
42807 return 1;
42809 # endif
42810 # ifdef __CYGWIN__
42811 /* On Cygwin, avoid locale names without encoding suffix, because the
42812 locale_charset() function relies on the encoding suffix. Note that
42813 LC_ALL is set on the command line. */
42814 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42815 # endif
42816 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
42817 on Cygwin 1.5.x. */
42818 if (MB_CUR_MAX == 1)
42819 return 1;
42820 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
42821 This excludes the UTF-8 encoding (except on MirBSD). */
42823 const char *p;
42824 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42825 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
42826 for (p = buf; *p != '\0'; p++)
42827 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
42828 return 1;
42830 return 0;
42831 #endif
42834 _ACEOF
42835 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42836 (eval $ac_link) 2>&5
42837 ac_status=$?
42838 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42839 test $ac_status = 0; } && test -s conftest$ac_exeext; then
42840 case "$host_os" in
42841 # Handle native Windows specially, because there setlocale() interprets
42842 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
42843 # "fr" or "fra" as "French" or "French_France.1252",
42844 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
42845 # "ja" as "Japanese" or "Japanese_Japan.932",
42846 # and similar.
42847 mingw*)
42848 # Note that on native Windows, the Japanese locale is
42849 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
42850 # cannot use it here.
42851 gt_cv_locale_ja=none
42854 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42855 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
42856 # configure script would override the LC_ALL setting. Likewise for
42857 # LC_CTYPE, which is also set at the beginning of the configure script.
42858 # Test for the AIX locale name.
42859 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42860 gt_cv_locale_ja=ja_JP
42861 else
42862 # Test for the locale name with explicit encoding suffix.
42863 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42864 gt_cv_locale_ja=ja_JP.EUC-JP
42865 else
42866 # Test for the HP-UX, OSF/1, NetBSD locale name.
42867 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42868 gt_cv_locale_ja=ja_JP.eucJP
42869 else
42870 # Test for the IRIX, FreeBSD locale name.
42871 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42872 gt_cv_locale_ja=ja_JP.EUC
42873 else
42874 # Test for the Solaris 7 locale name.
42875 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42876 gt_cv_locale_ja=ja
42877 else
42878 # Special test for NetBSD 1.6.
42879 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
42880 gt_cv_locale_ja=ja_JP.eucJP
42881 else
42882 # None found.
42883 gt_cv_locale_ja=none
42891 esac
42893 rm -fr conftest*
42895 esac
42897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
42898 printf "%s\n" "$gt_cv_locale_ja" >&6; }
42899 LOCALE_JA=$gt_cv_locale_ja
42905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
42906 printf %s "checking for a transitional chinese locale... " >&6; }
42907 if test ${gt_cv_locale_zh_CN+y}
42908 then :
42909 printf %s "(cached) " >&6
42910 else case e in #(
42912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42913 /* end confdefs.h. */
42915 #include <locale.h>
42916 #include <stdlib.h>
42917 #include <time.h>
42918 #if HAVE_LANGINFO_CODESET
42919 # include <langinfo.h>
42920 #endif
42921 #include <stdlib.h>
42922 #include <string.h>
42923 struct tm t;
42924 char buf[16];
42925 int main ()
42927 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
42928 imitates locale dependent behaviour by looking at the environment
42929 variables, and all locales use the UTF-8 encoding. */
42930 #if defined __BEOS__ || defined __HAIKU__
42931 return 1;
42932 #else
42933 /* Check whether the given locale name is recognized by the system. */
42934 # if defined _WIN32 && !defined __CYGWIN__
42935 /* On native Windows, setlocale(category, "") looks at the system settings,
42936 not at the environment variables. Also, when an encoding suffix such
42937 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
42938 category of the locale to "C". */
42939 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
42940 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
42941 return 1;
42942 # else
42943 if (setlocale (LC_ALL, "") == NULL) return 1;
42944 # endif
42945 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42946 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42947 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42948 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42949 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42950 some unit tests fail.
42951 On MirBSD 10, when an unsupported locale is specified, setlocale()
42952 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
42953 # if HAVE_LANGINFO_CODESET
42955 const char *cs = nl_langinfo (CODESET);
42956 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
42957 || strcmp (cs, "UTF-8") == 0)
42958 return 1;
42960 # endif
42961 # ifdef __CYGWIN__
42962 /* On Cygwin, avoid locale names without encoding suffix, because the
42963 locale_charset() function relies on the encoding suffix. Note that
42964 LC_ALL is set on the command line. */
42965 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42966 # endif
42967 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
42968 This excludes the UTF-8 encoding (except on MirBSD). */
42970 const char *p;
42971 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42972 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
42973 for (p = buf; *p != '\0'; p++)
42974 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
42975 return 1;
42977 /* Check whether a typical GB18030 multibyte sequence is recognized as a
42978 single wide character. This excludes the GB2312 and GBK encodings. */
42979 if (mblen ("\203\062\332\066", 5) != 4)
42980 return 1;
42981 return 0;
42982 #endif
42985 _ACEOF
42986 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42987 (eval $ac_link) 2>&5
42988 ac_status=$?
42989 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42990 test $ac_status = 0; } && test -s conftest$ac_exeext; then
42991 case "$host_os" in
42992 # Handle native Windows specially, because there setlocale() interprets
42993 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
42994 # "fr" or "fra" as "French" or "French_France.1252",
42995 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
42996 # "ja" as "Japanese" or "Japanese_Japan.932",
42997 # and similar.
42998 mingw*)
42999 # Test for the hypothetical native Windows locale name.
43000 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43001 gt_cv_locale_zh_CN=Chinese_China.54936
43002 else
43003 # None found.
43004 gt_cv_locale_zh_CN=none
43007 solaris2.8)
43008 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
43009 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
43010 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
43011 gt_cv_locale_zh_CN=none
43014 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43015 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43016 # configure script would override the LC_ALL setting. Likewise for
43017 # LC_CTYPE, which is also set at the beginning of the configure script.
43018 # Test for the locale name without encoding suffix.
43019 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43020 gt_cv_locale_zh_CN=zh_CN
43021 else
43022 # Test for the locale name with explicit encoding suffix.
43023 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43024 gt_cv_locale_zh_CN=zh_CN.GB18030
43025 else
43026 # None found.
43027 gt_cv_locale_zh_CN=none
43031 esac
43032 else
43033 # If there was a link error, due to mblen(), the system is so old that
43034 # it certainly doesn't have a chinese locale.
43035 gt_cv_locale_zh_CN=none
43037 rm -fr conftest*
43039 esac
43041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
43042 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
43043 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
43048 if case "$host_os" in mingw*) true;; *) false;; esac; then
43049 GL_COND_OBJ_WINDOWS_THREAD_TRUE=
43050 GL_COND_OBJ_WINDOWS_THREAD_FALSE='#'
43051 else
43052 GL_COND_OBJ_WINDOWS_THREAD_TRUE='#'
43053 GL_COND_OBJ_WINDOWS_THREAD_FALSE=
43056 if test -z "${GL_COND_OBJ_WINDOWS_THREAD_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_THREAD_FALSE}"; then
43057 GL_COND_OBJ_WINDOWS_THREAD_TRUE='#'
43058 GL_COND_OBJ_WINDOWS_THREAD_FALSE='#'
43063 if case "$host_os" in mingw*) true;; *) false;; esac; then
43064 GL_COND_OBJ_WINDOWS_TLS_TRUE=
43065 GL_COND_OBJ_WINDOWS_TLS_FALSE='#'
43066 else
43067 GL_COND_OBJ_WINDOWS_TLS_TRUE='#'
43068 GL_COND_OBJ_WINDOWS_TLS_FALSE=
43071 if test -z "${GL_COND_OBJ_WINDOWS_TLS_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_TLS_FALSE}"; then
43072 GL_COND_OBJ_WINDOWS_TLS_TRUE='#'
43073 GL_COND_OBJ_WINDOWS_TLS_FALSE='#'
43089 LIBSED_LIBDEPS="$gl_libdeps"
43091 LIBSED_LTLIBDEPS="$gl_ltlibdeps"
43093 LIBTESTS_LIBDEPS="$gltests_libdeps"
43100 # Ensure VLAs are not used.
43101 # Note -Wvla is implicitly added by gl_MANYWARN_ALL_GCC
43103 printf "%s\n" "#define GNULIB_NO_VLA 1" >>confdefs.h
43106 # The test suite needs to know if we have a working perl.
43107 if test "$gl_cv_prog_perl" != no; then
43108 HAVE_PERL_TRUE=
43109 HAVE_PERL_FALSE='#'
43110 else
43111 HAVE_PERL_TRUE='#'
43112 HAVE_PERL_FALSE=
43116 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
43117 # ------------------------------------------------
43118 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
43119 # Otherwise, run RUN-IF-NOT-FOUND.
43122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \"rt\" can be used with fopen" >&5
43123 printf %s "checking whether \"rt\" can be used with fopen... " >&6; }
43124 if test ${sed_cv_fopen_rt+y}
43125 then :
43126 printf %s "(cached) " >&6
43127 else case e in #(
43129 if test "$cross_compiling" = yes
43130 then :
43131 case $host in
43132 *cygwin* | *mingw*) sed_cv_fopen_rt=yes ;;
43133 *) sed_cv_fopen_rt='assuming no' ;;
43134 esac
43135 else case e in #(
43136 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43137 /* end confdefs.h. */
43139 #include <stdio.h>
43140 #include <errno.h>
43142 int main()
43144 FILE *fp;
43145 int result;
43146 errno = 0;
43147 fp = fopen ("conftest.c", "rt");
43148 if (fp) fclose (fp);
43149 return fp ? 0 : 1;
43151 _ACEOF
43152 if ac_fn_c_try_run "$LINENO"
43153 then :
43154 sed_cv_fopen_rt=yes
43155 else case e in #(
43156 e) sed_cv_fopen_rt=no ;;
43157 esac
43159 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43160 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
43161 esac
43164 esac
43166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sed_cv_fopen_rt" >&5
43167 printf "%s\n" "$sed_cv_fopen_rt" >&6; }
43168 if test "$sed_cv_fopen_rt" = yes; then
43170 printf "%s\n" "#define HAVE_FOPEN_RT 1" >>confdefs.h
43174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lcP is needed" >&5
43175 printf %s "checking whether -lcP is needed... " >&6; }
43176 if test ${sed_cv_libcp_needed+y}
43177 then :
43178 printf %s "(cached) " >&6
43179 else case e in #(
43181 if test "$cross_compiling" = yes
43182 then :
43183 sed_cv_libcp_needed="assuming no"
43184 else case e in #(
43185 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43186 /* end confdefs.h. */
43188 #include <stdio.h>
43189 #include <errno.h>
43191 int main()
43193 FILE *fp;
43194 int result;
43195 errno = 0;
43196 fp = fopen ("conftest.c", "r");
43197 if (!fp) return 0; /* error, assume not needed */
43198 result = fflush (fp) == EOF && errno == 0;
43199 fclose (fp);
43200 return result;
43202 _ACEOF
43203 if ac_fn_c_try_run "$LINENO"
43204 then :
43205 sed_cv_libcp_needed=no
43206 else case e in #(
43207 e) sed_cv_libcp_needed=yes ;;
43208 esac
43210 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43211 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
43212 esac
43216 esac
43218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sed_cv_libcp_needed" >&5
43219 printf "%s\n" "$sed_cv_libcp_needed" >&6; }
43220 if test "$sed_cv_libcp_needed" = yes; then
43221 LIBS="-lcP $LIBS"
43228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
43229 printf %s "checking for an ANSI C-conforming const... " >&6; }
43230 if test ${ac_cv_c_const+y}
43231 then :
43232 printf %s "(cached) " >&6
43233 else case e in #(
43234 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43235 /* end confdefs.h. */
43238 main (void)
43241 #ifndef __cplusplus
43242 /* Ultrix mips cc rejects this sort of thing. */
43243 typedef int charset[2];
43244 const charset cs = { 0, 0 };
43245 /* SunOS 4.1.1 cc rejects this. */
43246 char const *const *pcpcc;
43247 char **ppc;
43248 /* NEC SVR4.0.2 mips cc rejects this. */
43249 struct point {int x, y;};
43250 static struct point const zero = {0,0};
43251 /* IBM XL C 1.02.0.0 rejects this.
43252 It does not let you subtract one const X* pointer from another in
43253 an arm of an if-expression whose if-part is not a constant
43254 expression */
43255 const char *g = "string";
43256 pcpcc = &g + (g ? g-g : 0);
43257 /* HPUX 7.0 cc rejects these. */
43258 ++pcpcc;
43259 ppc = (char**) pcpcc;
43260 pcpcc = (char const *const *) ppc;
43261 { /* SCO 3.2v4 cc rejects this sort of thing. */
43262 char tx;
43263 char *t = &tx;
43264 char const *s = 0 ? (char *) 0 : (char const *) 0;
43266 *t++ = 0;
43267 if (s) return 0;
43269 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
43270 int x[] = {25, 17};
43271 const int *foo = &x[0];
43272 ++foo;
43274 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
43275 typedef const int *iptr;
43276 iptr p = 0;
43277 ++p;
43279 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
43280 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
43281 struct s { int j; const int *ap[3]; } bx;
43282 struct s *b = &bx; b->j = 5;
43284 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
43285 const int foo = 10;
43286 if (!foo) return 0;
43288 return !cs[0] && !zero.x;
43289 #endif
43292 return 0;
43294 _ACEOF
43295 if ac_fn_c_try_compile "$LINENO"
43296 then :
43297 ac_cv_c_const=yes
43298 else case e in #(
43299 e) ac_cv_c_const=no ;;
43300 esac
43302 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
43303 esac
43305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
43306 printf "%s\n" "$ac_cv_c_const" >&6; }
43307 if test $ac_cv_c_const = no; then
43309 printf "%s\n" "#define const /**/" >>confdefs.h
43313 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
43314 if test "x$ac_cv_type_size_t" = xyes
43315 then :
43317 else case e in #(
43319 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
43321 esac
43327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
43328 printf %s "checking whether NLS is requested... " >&6; }
43329 # Check whether --enable-nls was given.
43330 if test ${enable_nls+y}
43331 then :
43332 enableval=$enable_nls; USE_NLS=$enableval
43333 else case e in #(
43334 e) USE_NLS=yes ;;
43335 esac
43338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
43339 printf "%s\n" "$USE_NLS" >&6; }
43344 GETTEXT_MACRO_VERSION=0.19
43349 # Prepare PATH_SEPARATOR.
43350 # The user is always right.
43351 if test "${PATH_SEPARATOR+set}" != set; then
43352 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
43353 # contains only /bin. Note that ksh looks also at the FPATH variable,
43354 # so we have to set that as well for the test.
43355 PATH_SEPARATOR=:
43356 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
43357 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
43358 || PATH_SEPARATOR=';'
43362 # Find out how to test for executable files. Don't use a zero-byte file,
43363 # as systems may use methods other than mode bits to determine executability.
43364 cat >conf$$.file <<_ASEOF
43365 #! /bin/sh
43366 exit 0
43367 _ASEOF
43368 chmod +x conf$$.file
43369 if test -x conf$$.file >/dev/null 2>&1; then
43370 ac_executable_p="test -x"
43371 else
43372 ac_executable_p="test -f"
43374 rm -f conf$$.file
43376 # Extract the first word of "msgfmt", so it can be a program name with args.
43377 set dummy msgfmt; ac_word=$2
43378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43379 printf %s "checking for $ac_word... " >&6; }
43380 if test ${ac_cv_path_MSGFMT+y}
43381 then :
43382 printf %s "(cached) " >&6
43383 else case e in #(
43384 e) case "$MSGFMT" in
43385 [\\/]* | ?:[\\/]*)
43386 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
43389 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
43390 for ac_dir in $PATH; do
43391 IFS="$ac_save_IFS"
43392 test -z "$ac_dir" && ac_dir=.
43393 for ac_exec_ext in '' $ac_executable_extensions; do
43394 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
43395 echo "$as_me: trying $ac_dir/$ac_word..." >&5
43396 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
43397 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
43398 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
43399 break 2
43402 done
43403 done
43404 IFS="$ac_save_IFS"
43405 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
43407 esac ;;
43408 esac
43410 MSGFMT="$ac_cv_path_MSGFMT"
43411 if test "$MSGFMT" != ":"; then
43412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
43413 printf "%s\n" "$MSGFMT" >&6; }
43414 else
43415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43416 printf "%s\n" "no" >&6; }
43419 # Extract the first word of "gmsgfmt", so it can be a program name with args.
43420 set dummy gmsgfmt; ac_word=$2
43421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43422 printf %s "checking for $ac_word... " >&6; }
43423 if test ${ac_cv_path_GMSGFMT+y}
43424 then :
43425 printf %s "(cached) " >&6
43426 else case e in #(
43427 e) case $GMSGFMT in
43428 [\\/]* | ?:[\\/]*)
43429 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
43432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43433 for as_dir in $PATH
43435 IFS=$as_save_IFS
43436 case $as_dir in #(((
43437 '') as_dir=./ ;;
43438 */) ;;
43439 *) as_dir=$as_dir/ ;;
43440 esac
43441 for ac_exec_ext in '' $ac_executable_extensions; do
43442 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
43443 ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
43444 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
43445 break 2
43447 done
43448 done
43449 IFS=$as_save_IFS
43451 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
43453 esac ;;
43454 esac
43456 GMSGFMT=$ac_cv_path_GMSGFMT
43457 if test -n "$GMSGFMT"; then
43458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
43459 printf "%s\n" "$GMSGFMT" >&6; }
43460 else
43461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43462 printf "%s\n" "no" >&6; }
43467 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
43468 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
43469 *) MSGFMT_015=$MSGFMT ;;
43470 esac
43472 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
43473 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
43474 *) GMSGFMT_015=$GMSGFMT ;;
43475 esac
43479 # Prepare PATH_SEPARATOR.
43480 # The user is always right.
43481 if test "${PATH_SEPARATOR+set}" != set; then
43482 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
43483 # contains only /bin. Note that ksh looks also at the FPATH variable,
43484 # so we have to set that as well for the test.
43485 PATH_SEPARATOR=:
43486 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
43487 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
43488 || PATH_SEPARATOR=';'
43492 # Find out how to test for executable files. Don't use a zero-byte file,
43493 # as systems may use methods other than mode bits to determine executability.
43494 cat >conf$$.file <<_ASEOF
43495 #! /bin/sh
43496 exit 0
43497 _ASEOF
43498 chmod +x conf$$.file
43499 if test -x conf$$.file >/dev/null 2>&1; then
43500 ac_executable_p="test -x"
43501 else
43502 ac_executable_p="test -f"
43504 rm -f conf$$.file
43506 # Extract the first word of "xgettext", so it can be a program name with args.
43507 set dummy xgettext; ac_word=$2
43508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43509 printf %s "checking for $ac_word... " >&6; }
43510 if test ${ac_cv_path_XGETTEXT+y}
43511 then :
43512 printf %s "(cached) " >&6
43513 else case e in #(
43514 e) case "$XGETTEXT" in
43515 [\\/]* | ?:[\\/]*)
43516 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
43519 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
43520 for ac_dir in $PATH; do
43521 IFS="$ac_save_IFS"
43522 test -z "$ac_dir" && ac_dir=.
43523 for ac_exec_ext in '' $ac_executable_extensions; do
43524 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
43525 echo "$as_me: trying $ac_dir/$ac_word..." >&5
43526 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
43527 (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
43528 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
43529 break 2
43532 done
43533 done
43534 IFS="$ac_save_IFS"
43535 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
43537 esac ;;
43538 esac
43540 XGETTEXT="$ac_cv_path_XGETTEXT"
43541 if test "$XGETTEXT" != ":"; then
43542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
43543 printf "%s\n" "$XGETTEXT" >&6; }
43544 else
43545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43546 printf "%s\n" "no" >&6; }
43549 rm -f messages.po
43551 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
43552 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
43553 *) XGETTEXT_015=$XGETTEXT ;;
43554 esac
43558 # Prepare PATH_SEPARATOR.
43559 # The user is always right.
43560 if test "${PATH_SEPARATOR+set}" != set; then
43561 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
43562 # contains only /bin. Note that ksh looks also at the FPATH variable,
43563 # so we have to set that as well for the test.
43564 PATH_SEPARATOR=:
43565 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
43566 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
43567 || PATH_SEPARATOR=';'
43571 # Find out how to test for executable files. Don't use a zero-byte file,
43572 # as systems may use methods other than mode bits to determine executability.
43573 cat >conf$$.file <<_ASEOF
43574 #! /bin/sh
43575 exit 0
43576 _ASEOF
43577 chmod +x conf$$.file
43578 if test -x conf$$.file >/dev/null 2>&1; then
43579 ac_executable_p="test -x"
43580 else
43581 ac_executable_p="test -f"
43583 rm -f conf$$.file
43585 # Extract the first word of "msgmerge", so it can be a program name with args.
43586 set dummy msgmerge; ac_word=$2
43587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43588 printf %s "checking for $ac_word... " >&6; }
43589 if test ${ac_cv_path_MSGMERGE+y}
43590 then :
43591 printf %s "(cached) " >&6
43592 else case e in #(
43593 e) case "$MSGMERGE" in
43594 [\\/]* | ?:[\\/]*)
43595 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
43598 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
43599 for ac_dir in $PATH; do
43600 IFS="$ac_save_IFS"
43601 test -z "$ac_dir" && ac_dir=.
43602 for ac_exec_ext in '' $ac_executable_extensions; do
43603 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
43604 echo "$as_me: trying $ac_dir/$ac_word..." >&5
43605 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
43606 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
43607 break 2
43610 done
43611 done
43612 IFS="$ac_save_IFS"
43613 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
43615 esac ;;
43616 esac
43618 MSGMERGE="$ac_cv_path_MSGMERGE"
43619 if test "$MSGMERGE" != ":"; then
43620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
43621 printf "%s\n" "$MSGMERGE" >&6; }
43622 else
43623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43624 printf "%s\n" "no" >&6; }
43628 test -n "$localedir" || localedir='${datadir}/locale'
43631 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
43634 ac_config_commands="$ac_config_commands po-directories"
43638 if test "X$prefix" = "XNONE"; then
43639 acl_final_prefix="$ac_default_prefix"
43640 else
43641 acl_final_prefix="$prefix"
43643 if test "X$exec_prefix" = "XNONE"; then
43644 acl_final_exec_prefix='${prefix}'
43645 else
43646 acl_final_exec_prefix="$exec_prefix"
43648 acl_save_prefix="$prefix"
43649 prefix="$acl_final_prefix"
43650 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
43651 prefix="$acl_save_prefix"
43655 # Check whether --with-gnu-ld was given.
43656 if test ${with_gnu_ld+y}
43657 then :
43658 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
43659 else case e in #(
43660 e) with_gnu_ld=no ;;
43661 esac
43664 # Prepare PATH_SEPARATOR.
43665 # The user is always right.
43666 if test "${PATH_SEPARATOR+set}" != set; then
43667 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
43668 # contains only /bin. Note that ksh looks also at the FPATH variable,
43669 # so we have to set that as well for the test.
43670 PATH_SEPARATOR=:
43671 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
43672 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
43673 || PATH_SEPARATOR=';'
43677 ac_prog=ld
43678 if test "$GCC" = yes; then
43679 # Check if gcc -print-prog-name=ld gives a path.
43680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
43681 printf %s "checking for ld used by $CC... " >&6; }
43682 case $host in
43683 *-*-mingw*)
43684 # gcc leaves a trailing carriage return which upsets mingw
43685 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
43687 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
43688 esac
43689 case $ac_prog in
43690 # Accept absolute paths.
43691 [\\/]* | ?:[\\/]*)
43692 re_direlt='/[^/][^/]*/\.\./'
43693 # Canonicalize the pathname of ld
43694 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
43695 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
43696 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
43697 done
43698 test -z "$LD" && LD="$ac_prog"
43701 # If it fails, then pretend we aren't using GCC.
43702 ac_prog=ld
43705 # If it is relative, then search for the first ld in PATH.
43706 with_gnu_ld=unknown
43708 esac
43709 elif test "$with_gnu_ld" = yes; then
43710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
43711 printf %s "checking for GNU ld... " >&6; }
43712 else
43713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
43714 printf %s "checking for non-GNU ld... " >&6; }
43716 if test ${acl_cv_path_LD+y}
43717 then :
43718 printf %s "(cached) " >&6
43719 else case e in #(
43720 e) if test -z "$LD"; then
43721 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
43722 for ac_dir in $PATH; do
43723 IFS="$acl_save_ifs"
43724 test -z "$ac_dir" && ac_dir=.
43725 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
43726 acl_cv_path_LD="$ac_dir/$ac_prog"
43727 # Check to see if the program is GNU ld. I'd rather use --version,
43728 # but apparently some variants of GNU ld only accept -v.
43729 # Break only if it was the GNU/non-GNU ld that we prefer.
43730 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
43731 *GNU* | *'with BFD'*)
43732 test "$with_gnu_ld" != no && break
43735 test "$with_gnu_ld" != yes && break
43737 esac
43739 done
43740 IFS="$acl_save_ifs"
43741 else
43742 acl_cv_path_LD="$LD" # Let the user override the test with a path.
43743 fi ;;
43744 esac
43747 LD="$acl_cv_path_LD"
43748 if test -n "$LD"; then
43749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
43750 printf "%s\n" "$LD" >&6; }
43751 else
43752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43753 printf "%s\n" "no" >&6; }
43755 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
43756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
43757 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
43758 if test ${acl_cv_prog_gnu_ld+y}
43759 then :
43760 printf %s "(cached) " >&6
43761 else case e in #(
43762 e) # I'd rather use --version here, but apparently some GNU lds only accept -v.
43763 case `$LD -v 2>&1 </dev/null` in
43764 *GNU* | *'with BFD'*)
43765 acl_cv_prog_gnu_ld=yes
43768 acl_cv_prog_gnu_ld=no
43770 esac ;;
43771 esac
43773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
43774 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
43775 with_gnu_ld=$acl_cv_prog_gnu_ld
43781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
43782 printf %s "checking for shared library run path origin... " >&6; }
43783 if test ${acl_cv_rpath+y}
43784 then :
43785 printf %s "(cached) " >&6
43786 else case e in #(
43788 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
43789 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
43790 . ./conftest.sh
43791 rm -f ./conftest.sh
43792 acl_cv_rpath=done
43794 esac
43796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
43797 printf "%s\n" "$acl_cv_rpath" >&6; }
43798 wl="$acl_cv_wl"
43799 acl_libext="$acl_cv_libext"
43800 acl_shlibext="$acl_cv_shlibext"
43801 acl_libname_spec="$acl_cv_libname_spec"
43802 acl_library_names_spec="$acl_cv_library_names_spec"
43803 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
43804 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
43805 acl_hardcode_direct="$acl_cv_hardcode_direct"
43806 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
43807 # Check whether --enable-rpath was given.
43808 if test ${enable_rpath+y}
43809 then :
43810 enableval=$enable_rpath; :
43811 else case e in #(
43812 e) enable_rpath=yes ;;
43813 esac
43819 acl_libdirstem=lib
43820 acl_libdirstem2=
43821 case "$host_os" in
43822 solaris*)
43823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
43824 printf %s "checking for 64-bit host... " >&6; }
43825 if test ${gl_cv_solaris_64bit+y}
43826 then :
43827 printf %s "(cached) " >&6
43828 else case e in #(
43829 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43830 /* end confdefs.h. */
43832 #ifdef _LP64
43833 sixtyfour bits
43834 #endif
43836 _ACEOF
43837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43838 $EGREP_TRADITIONAL "sixtyfour bits" >/dev/null 2>&1
43839 then :
43840 gl_cv_solaris_64bit=yes
43841 else case e in #(
43842 e) gl_cv_solaris_64bit=no ;;
43843 esac
43845 rm -rf conftest*
43848 esac
43850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
43851 printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
43852 if test $gl_cv_solaris_64bit = yes; then
43853 acl_libdirstem=lib/64
43854 case "$host_cpu" in
43855 sparc*) acl_libdirstem2=lib/sparcv9 ;;
43856 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
43857 esac
43861 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
43862 if test -n "$searchpath"; then
43863 acl_save_IFS="${IFS= }"; IFS=":"
43864 for searchdir in $searchpath; do
43865 if test -d "$searchdir"; then
43866 case "$searchdir" in
43867 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
43868 */../ | */.. )
43869 # Better ignore directories of this form. They are misleading.
43871 *) searchdir=`cd "$searchdir" && pwd`
43872 case "$searchdir" in
43873 */lib64 ) acl_libdirstem=lib64 ;;
43874 esac ;;
43875 esac
43877 done
43878 IFS="$acl_save_IFS"
43881 esac
43882 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
43895 use_additional=yes
43897 acl_save_prefix="$prefix"
43898 prefix="$acl_final_prefix"
43899 acl_save_exec_prefix="$exec_prefix"
43900 exec_prefix="$acl_final_exec_prefix"
43902 eval additional_includedir=\"$includedir\"
43903 eval additional_libdir=\"$libdir\"
43905 exec_prefix="$acl_save_exec_prefix"
43906 prefix="$acl_save_prefix"
43909 # Check whether --with-libiconv-prefix was given.
43910 if test ${with_libiconv_prefix+y}
43911 then :
43912 withval=$with_libiconv_prefix;
43913 if test "X$withval" = "Xno"; then
43914 use_additional=no
43915 else
43916 if test "X$withval" = "X"; then
43918 acl_save_prefix="$prefix"
43919 prefix="$acl_final_prefix"
43920 acl_save_exec_prefix="$exec_prefix"
43921 exec_prefix="$acl_final_exec_prefix"
43923 eval additional_includedir=\"$includedir\"
43924 eval additional_libdir=\"$libdir\"
43926 exec_prefix="$acl_save_exec_prefix"
43927 prefix="$acl_save_prefix"
43929 else
43930 additional_includedir="$withval/include"
43931 additional_libdir="$withval/$acl_libdirstem"
43932 if test "$acl_libdirstem2" != "$acl_libdirstem" \
43933 && ! test -d "$withval/$acl_libdirstem"; then
43934 additional_libdir="$withval/$acl_libdirstem2"
43941 LIBICONV=
43942 LTLIBICONV=
43943 INCICONV=
43944 LIBICONV_PREFIX=
43945 HAVE_LIBICONV=
43946 rpathdirs=
43947 ltrpathdirs=
43948 names_already_handled=
43949 names_next_round='iconv '
43950 while test -n "$names_next_round"; do
43951 names_this_round="$names_next_round"
43952 names_next_round=
43953 for name in $names_this_round; do
43954 already_handled=
43955 for n in $names_already_handled; do
43956 if test "$n" = "$name"; then
43957 already_handled=yes
43958 break
43960 done
43961 if test -z "$already_handled"; then
43962 names_already_handled="$names_already_handled $name"
43963 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
43964 eval value=\"\$HAVE_LIB$uppername\"
43965 if test -n "$value"; then
43966 if test "$value" = yes; then
43967 eval value=\"\$LIB$uppername\"
43968 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
43969 eval value=\"\$LTLIB$uppername\"
43970 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
43971 else
43974 else
43975 found_dir=
43976 found_la=
43977 found_so=
43978 found_a=
43979 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
43980 if test -n "$acl_shlibext"; then
43981 shrext=".$acl_shlibext" # typically: shrext=.so
43982 else
43983 shrext=
43985 if test $use_additional = yes; then
43986 dir="$additional_libdir"
43987 if test -n "$acl_shlibext"; then
43988 if test -f "$dir/$libname$shrext"; then
43989 found_dir="$dir"
43990 found_so="$dir/$libname$shrext"
43991 else
43992 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
43993 ver=`(cd "$dir" && \
43994 for f in "$libname$shrext".*; do echo "$f"; done \
43995 | sed -e "s,^$libname$shrext\\\\.,," \
43996 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
43997 | sed 1q ) 2>/dev/null`
43998 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
43999 found_dir="$dir"
44000 found_so="$dir/$libname$shrext.$ver"
44002 else
44003 eval library_names=\"$acl_library_names_spec\"
44004 for f in $library_names; do
44005 if test -f "$dir/$f"; then
44006 found_dir="$dir"
44007 found_so="$dir/$f"
44008 break
44010 done
44014 if test "X$found_dir" = "X"; then
44015 if test -f "$dir/$libname.$acl_libext"; then
44016 found_dir="$dir"
44017 found_a="$dir/$libname.$acl_libext"
44020 if test "X$found_dir" != "X"; then
44021 if test -f "$dir/$libname.la"; then
44022 found_la="$dir/$libname.la"
44026 if test "X$found_dir" = "X"; then
44027 for x in $LDFLAGS $LTLIBICONV; do
44029 acl_save_prefix="$prefix"
44030 prefix="$acl_final_prefix"
44031 acl_save_exec_prefix="$exec_prefix"
44032 exec_prefix="$acl_final_exec_prefix"
44033 eval x=\"$x\"
44034 exec_prefix="$acl_save_exec_prefix"
44035 prefix="$acl_save_prefix"
44037 case "$x" in
44038 -L*)
44039 dir=`echo "X$x" | sed -e 's/^X-L//'`
44040 if test -n "$acl_shlibext"; then
44041 if test -f "$dir/$libname$shrext"; then
44042 found_dir="$dir"
44043 found_so="$dir/$libname$shrext"
44044 else
44045 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
44046 ver=`(cd "$dir" && \
44047 for f in "$libname$shrext".*; do echo "$f"; done \
44048 | sed -e "s,^$libname$shrext\\\\.,," \
44049 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
44050 | sed 1q ) 2>/dev/null`
44051 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
44052 found_dir="$dir"
44053 found_so="$dir/$libname$shrext.$ver"
44055 else
44056 eval library_names=\"$acl_library_names_spec\"
44057 for f in $library_names; do
44058 if test -f "$dir/$f"; then
44059 found_dir="$dir"
44060 found_so="$dir/$f"
44061 break
44063 done
44067 if test "X$found_dir" = "X"; then
44068 if test -f "$dir/$libname.$acl_libext"; then
44069 found_dir="$dir"
44070 found_a="$dir/$libname.$acl_libext"
44073 if test "X$found_dir" != "X"; then
44074 if test -f "$dir/$libname.la"; then
44075 found_la="$dir/$libname.la"
44079 esac
44080 if test "X$found_dir" != "X"; then
44081 break
44083 done
44085 if test "X$found_dir" != "X"; then
44086 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
44087 if test "X$found_so" != "X"; then
44088 if test "$enable_rpath" = no \
44089 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
44090 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
44091 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
44092 else
44093 haveit=
44094 for x in $ltrpathdirs; do
44095 if test "X$x" = "X$found_dir"; then
44096 haveit=yes
44097 break
44099 done
44100 if test -z "$haveit"; then
44101 ltrpathdirs="$ltrpathdirs $found_dir"
44103 if test "$acl_hardcode_direct" = yes; then
44104 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
44105 else
44106 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
44107 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
44108 haveit=
44109 for x in $rpathdirs; do
44110 if test "X$x" = "X$found_dir"; then
44111 haveit=yes
44112 break
44114 done
44115 if test -z "$haveit"; then
44116 rpathdirs="$rpathdirs $found_dir"
44118 else
44119 haveit=
44120 for x in $LDFLAGS $LIBICONV; do
44122 acl_save_prefix="$prefix"
44123 prefix="$acl_final_prefix"
44124 acl_save_exec_prefix="$exec_prefix"
44125 exec_prefix="$acl_final_exec_prefix"
44126 eval x=\"$x\"
44127 exec_prefix="$acl_save_exec_prefix"
44128 prefix="$acl_save_prefix"
44130 if test "X$x" = "X-L$found_dir"; then
44131 haveit=yes
44132 break
44134 done
44135 if test -z "$haveit"; then
44136 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
44138 if test "$acl_hardcode_minus_L" != no; then
44139 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
44140 else
44141 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
44146 else
44147 if test "X$found_a" != "X"; then
44148 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
44149 else
44150 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
44153 additional_includedir=
44154 case "$found_dir" in
44155 */$acl_libdirstem | */$acl_libdirstem/)
44156 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
44157 if test "$name" = 'iconv'; then
44158 LIBICONV_PREFIX="$basedir"
44160 additional_includedir="$basedir/include"
44162 */$acl_libdirstem2 | */$acl_libdirstem2/)
44163 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
44164 if test "$name" = 'iconv'; then
44165 LIBICONV_PREFIX="$basedir"
44167 additional_includedir="$basedir/include"
44169 esac
44170 if test "X$additional_includedir" != "X"; then
44171 if test "X$additional_includedir" != "X/usr/include"; then
44172 haveit=
44173 if test "X$additional_includedir" = "X/usr/local/include"; then
44174 if test -n "$GCC"; then
44175 case $host_os in
44176 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
44177 esac
44180 if test -z "$haveit"; then
44181 for x in $CPPFLAGS $INCICONV; do
44183 acl_save_prefix="$prefix"
44184 prefix="$acl_final_prefix"
44185 acl_save_exec_prefix="$exec_prefix"
44186 exec_prefix="$acl_final_exec_prefix"
44187 eval x=\"$x\"
44188 exec_prefix="$acl_save_exec_prefix"
44189 prefix="$acl_save_prefix"
44191 if test "X$x" = "X-I$additional_includedir"; then
44192 haveit=yes
44193 break
44195 done
44196 if test -z "$haveit"; then
44197 if test -d "$additional_includedir"; then
44198 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
44204 if test -n "$found_la"; then
44205 save_libdir="$libdir"
44206 case "$found_la" in
44207 */* | *\\*) . "$found_la" ;;
44208 *) . "./$found_la" ;;
44209 esac
44210 libdir="$save_libdir"
44211 for dep in $dependency_libs; do
44212 case "$dep" in
44213 -L*)
44214 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
44215 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
44216 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
44217 haveit=
44218 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
44219 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
44220 if test -n "$GCC"; then
44221 case $host_os in
44222 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
44223 esac
44226 if test -z "$haveit"; then
44227 haveit=
44228 for x in $LDFLAGS $LIBICONV; do
44230 acl_save_prefix="$prefix"
44231 prefix="$acl_final_prefix"
44232 acl_save_exec_prefix="$exec_prefix"
44233 exec_prefix="$acl_final_exec_prefix"
44234 eval x=\"$x\"
44235 exec_prefix="$acl_save_exec_prefix"
44236 prefix="$acl_save_prefix"
44238 if test "X$x" = "X-L$additional_libdir"; then
44239 haveit=yes
44240 break
44242 done
44243 if test -z "$haveit"; then
44244 if test -d "$additional_libdir"; then
44245 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
44248 haveit=
44249 for x in $LDFLAGS $LTLIBICONV; do
44251 acl_save_prefix="$prefix"
44252 prefix="$acl_final_prefix"
44253 acl_save_exec_prefix="$exec_prefix"
44254 exec_prefix="$acl_final_exec_prefix"
44255 eval x=\"$x\"
44256 exec_prefix="$acl_save_exec_prefix"
44257 prefix="$acl_save_prefix"
44259 if test "X$x" = "X-L$additional_libdir"; then
44260 haveit=yes
44261 break
44263 done
44264 if test -z "$haveit"; then
44265 if test -d "$additional_libdir"; then
44266 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
44272 -R*)
44273 dir=`echo "X$dep" | sed -e 's/^X-R//'`
44274 if test "$enable_rpath" != no; then
44275 haveit=
44276 for x in $rpathdirs; do
44277 if test "X$x" = "X$dir"; then
44278 haveit=yes
44279 break
44281 done
44282 if test -z "$haveit"; then
44283 rpathdirs="$rpathdirs $dir"
44285 haveit=
44286 for x in $ltrpathdirs; do
44287 if test "X$x" = "X$dir"; then
44288 haveit=yes
44289 break
44291 done
44292 if test -z "$haveit"; then
44293 ltrpathdirs="$ltrpathdirs $dir"
44297 -l*)
44298 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
44300 *.la)
44301 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
44304 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
44305 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
44307 esac
44308 done
44310 else
44311 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
44312 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
44316 done
44317 done
44318 if test "X$rpathdirs" != "X"; then
44319 if test -n "$acl_hardcode_libdir_separator"; then
44320 alldirs=
44321 for found_dir in $rpathdirs; do
44322 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
44323 done
44324 acl_save_libdir="$libdir"
44325 libdir="$alldirs"
44326 eval flag=\"$acl_hardcode_libdir_flag_spec\"
44327 libdir="$acl_save_libdir"
44328 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
44329 else
44330 for found_dir in $rpathdirs; do
44331 acl_save_libdir="$libdir"
44332 libdir="$found_dir"
44333 eval flag=\"$acl_hardcode_libdir_flag_spec\"
44334 libdir="$acl_save_libdir"
44335 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
44336 done
44339 if test "X$ltrpathdirs" != "X"; then
44340 for found_dir in $ltrpathdirs; do
44341 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
44342 done
44375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
44376 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
44377 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
44378 then :
44379 printf %s "(cached) " >&6
44380 else case e in #(
44381 e) gt_save_LIBS="$LIBS"
44382 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
44383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44384 /* end confdefs.h. */
44385 #include <CoreFoundation/CFPreferences.h>
44387 main (void)
44389 CFPreferencesCopyAppValue(NULL, NULL)
44391 return 0;
44393 _ACEOF
44394 if ac_fn_c_try_link "$LINENO"
44395 then :
44396 gt_cv_func_CFPreferencesCopyAppValue=yes
44397 else case e in #(
44398 e) gt_cv_func_CFPreferencesCopyAppValue=no ;;
44399 esac
44401 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44402 conftest$ac_exeext conftest.$ac_ext
44403 LIBS="$gt_save_LIBS" ;;
44404 esac
44406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
44407 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
44408 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
44410 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
44413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
44414 printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
44415 if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y}
44416 then :
44417 printf %s "(cached) " >&6
44418 else case e in #(
44419 e) gt_save_LIBS="$LIBS"
44420 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
44421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44422 /* end confdefs.h. */
44423 #include <CoreFoundation/CFLocale.h>
44425 main (void)
44427 CFLocaleCopyPreferredLanguages();
44429 return 0;
44431 _ACEOF
44432 if ac_fn_c_try_link "$LINENO"
44433 then :
44434 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
44435 else case e in #(
44436 e) gt_cv_func_CFLocaleCopyPreferredLanguages=no ;;
44437 esac
44439 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44440 conftest$ac_exeext conftest.$ac_ext
44441 LIBS="$gt_save_LIBS" ;;
44442 esac
44444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
44445 printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
44446 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
44448 printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
44451 INTL_MACOSX_LIBS=
44452 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
44453 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
44454 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
44462 LIBINTL=
44463 LTLIBINTL=
44464 POSUB=
44466 case " $gt_needs " in
44467 *" need-formatstring-macros "*) gt_api_version=3 ;;
44468 *" need-ngettext "*) gt_api_version=2 ;;
44469 *) gt_api_version=1 ;;
44470 esac
44471 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
44472 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
44474 if test "$USE_NLS" = "yes"; then
44475 gt_use_preinstalled_gnugettext=no
44478 if test $gt_api_version -ge 3; then
44479 gt_revision_test_code='
44480 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
44481 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
44482 #endif
44483 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
44485 else
44486 gt_revision_test_code=
44488 if test $gt_api_version -ge 2; then
44489 gt_expression_test_code=' + * ngettext ("", "", 0)'
44490 else
44491 gt_expression_test_code=
44494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
44495 printf %s "checking for GNU gettext in libc... " >&6; }
44496 if eval test \${$gt_func_gnugettext_libc+y}
44497 then :
44498 printf %s "(cached) " >&6
44499 else case e in #(
44500 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44501 /* end confdefs.h. */
44503 #include <libintl.h>
44504 $gt_revision_test_code
44505 extern int _nl_msg_cat_cntr;
44506 extern int *_nl_domain_bindings;
44509 main (void)
44512 bindtextdomain ("", "");
44513 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
44516 return 0;
44518 _ACEOF
44519 if ac_fn_c_try_link "$LINENO"
44520 then :
44521 eval "$gt_func_gnugettext_libc=yes"
44522 else case e in #(
44523 e) eval "$gt_func_gnugettext_libc=no" ;;
44524 esac
44526 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44527 conftest$ac_exeext conftest.$ac_ext ;;
44528 esac
44530 eval ac_res=\$$gt_func_gnugettext_libc
44531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
44532 printf "%s\n" "$ac_res" >&6; }
44534 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
44540 am_save_CPPFLAGS="$CPPFLAGS"
44542 for element in $INCICONV; do
44543 haveit=
44544 for x in $CPPFLAGS; do
44546 acl_save_prefix="$prefix"
44547 prefix="$acl_final_prefix"
44548 acl_save_exec_prefix="$exec_prefix"
44549 exec_prefix="$acl_final_exec_prefix"
44550 eval x=\"$x\"
44551 exec_prefix="$acl_save_exec_prefix"
44552 prefix="$acl_save_prefix"
44554 if test "X$x" = "X$element"; then
44555 haveit=yes
44556 break
44558 done
44559 if test -z "$haveit"; then
44560 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
44562 done
44565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
44566 printf %s "checking for iconv... " >&6; }
44567 if test ${am_cv_func_iconv+y}
44568 then :
44569 printf %s "(cached) " >&6
44570 else case e in #(
44572 am_cv_func_iconv="no, consider installing GNU libiconv"
44573 am_cv_lib_iconv=no
44574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44575 /* end confdefs.h. */
44577 #include <stdlib.h>
44578 #include <iconv.h>
44581 main (void)
44583 iconv_t cd = iconv_open("","");
44584 iconv(cd,NULL,NULL,NULL,NULL);
44585 iconv_close(cd);
44587 return 0;
44589 _ACEOF
44590 if ac_fn_c_try_link "$LINENO"
44591 then :
44592 am_cv_func_iconv=yes
44594 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44595 conftest$ac_exeext conftest.$ac_ext
44596 if test "$am_cv_func_iconv" != yes; then
44597 am_save_LIBS="$LIBS"
44598 LIBS="$LIBS $LIBICONV"
44599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44600 /* end confdefs.h. */
44602 #include <stdlib.h>
44603 #include <iconv.h>
44606 main (void)
44608 iconv_t cd = iconv_open("","");
44609 iconv(cd,NULL,NULL,NULL,NULL);
44610 iconv_close(cd);
44612 return 0;
44614 _ACEOF
44615 if ac_fn_c_try_link "$LINENO"
44616 then :
44617 am_cv_lib_iconv=yes
44618 am_cv_func_iconv=yes
44620 rm -f core conftest.err conftest.$ac_objext conftest.beam \
44621 conftest$ac_exeext conftest.$ac_ext
44622 LIBS="$am_save_LIBS"
44625 esac
44627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
44628 printf "%s\n" "$am_cv_func_iconv" >&6; }
44629 if test "$am_cv_func_iconv" = yes; then
44630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
44631 printf %s "checking for working iconv... " >&6; }
44632 if test ${am_cv_func_iconv_works+y}
44633 then :
44634 printf %s "(cached) " >&6
44635 else case e in #(
44637 am_save_LIBS="$LIBS"
44638 if test $am_cv_lib_iconv = yes; then
44639 LIBS="$LIBS $LIBICONV"
44641 if test "$cross_compiling" = yes
44642 then :
44644 case "$host_os" in
44645 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
44646 *) am_cv_func_iconv_works="guessing yes" ;;
44647 esac
44649 else case e in #(
44650 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44651 /* end confdefs.h. */
44653 #include <iconv.h>
44654 #include <string.h>
44655 int main ()
44657 int result = 0;
44658 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
44659 returns. */
44661 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
44662 if (cd_utf8_to_88591 != (iconv_t)(-1))
44664 static const char input[] = "\342\202\254"; /* EURO SIGN */
44665 char buf[10];
44666 const char *inptr = input;
44667 size_t inbytesleft = strlen (input);
44668 char *outptr = buf;
44669 size_t outbytesleft = sizeof (buf);
44670 size_t res = iconv (cd_utf8_to_88591,
44671 (char **) &inptr, &inbytesleft,
44672 &outptr, &outbytesleft);
44673 if (res == 0)
44674 result |= 1;
44675 iconv_close (cd_utf8_to_88591);
44678 /* Test against Solaris 10 bug: Failures are not distinguishable from
44679 successful returns. */
44681 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
44682 if (cd_ascii_to_88591 != (iconv_t)(-1))
44684 static const char input[] = "\263";
44685 char buf[10];
44686 const char *inptr = input;
44687 size_t inbytesleft = strlen (input);
44688 char *outptr = buf;
44689 size_t outbytesleft = sizeof (buf);
44690 size_t res = iconv (cd_ascii_to_88591,
44691 (char **) &inptr, &inbytesleft,
44692 &outptr, &outbytesleft);
44693 if (res == 0)
44694 result |= 2;
44695 iconv_close (cd_ascii_to_88591);
44698 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
44700 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
44701 if (cd_88591_to_utf8 != (iconv_t)(-1))
44703 static const char input[] = "\304";
44704 static char buf[2] = { (char)0xDE, (char)0xAD };
44705 const char *inptr = input;
44706 size_t inbytesleft = 1;
44707 char *outptr = buf;
44708 size_t outbytesleft = 1;
44709 size_t res = iconv (cd_88591_to_utf8,
44710 (char **) &inptr, &inbytesleft,
44711 &outptr, &outbytesleft);
44712 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
44713 result |= 4;
44714 iconv_close (cd_88591_to_utf8);
44717 #if 0 /* This bug could be worked around by the caller. */
44718 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
44720 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
44721 if (cd_88591_to_utf8 != (iconv_t)(-1))
44723 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
44724 char buf[50];
44725 const char *inptr = input;
44726 size_t inbytesleft = strlen (input);
44727 char *outptr = buf;
44728 size_t outbytesleft = sizeof (buf);
44729 size_t res = iconv (cd_88591_to_utf8,
44730 (char **) &inptr, &inbytesleft,
44731 &outptr, &outbytesleft);
44732 if ((int)res > 0)
44733 result |= 8;
44734 iconv_close (cd_88591_to_utf8);
44737 #endif
44738 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
44739 provided. */
44740 if (/* Try standardized names. */
44741 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
44742 /* Try IRIX, OSF/1 names. */
44743 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
44744 /* Try AIX names. */
44745 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
44746 /* Try HP-UX names. */
44747 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
44748 result |= 16;
44749 return result;
44751 _ACEOF
44752 if ac_fn_c_try_run "$LINENO"
44753 then :
44754 am_cv_func_iconv_works=yes
44755 else case e in #(
44756 e) am_cv_func_iconv_works=no ;;
44757 esac
44759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44760 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
44761 esac
44764 LIBS="$am_save_LIBS"
44766 esac
44768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
44769 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
44770 case "$am_cv_func_iconv_works" in
44771 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
44772 *) am_func_iconv=yes ;;
44773 esac
44774 else
44775 am_func_iconv=no am_cv_lib_iconv=no
44777 if test "$am_func_iconv" = yes; then
44779 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
44782 if test "$am_cv_lib_iconv" = yes; then
44783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
44784 printf %s "checking how to link with libiconv... " >&6; }
44785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
44786 printf "%s\n" "$LIBICONV" >&6; }
44787 else
44788 CPPFLAGS="$am_save_CPPFLAGS"
44789 LIBICONV=
44790 LTLIBICONV=
44803 use_additional=yes
44805 acl_save_prefix="$prefix"
44806 prefix="$acl_final_prefix"
44807 acl_save_exec_prefix="$exec_prefix"
44808 exec_prefix="$acl_final_exec_prefix"
44810 eval additional_includedir=\"$includedir\"
44811 eval additional_libdir=\"$libdir\"
44813 exec_prefix="$acl_save_exec_prefix"
44814 prefix="$acl_save_prefix"
44817 # Check whether --with-libintl-prefix was given.
44818 if test ${with_libintl_prefix+y}
44819 then :
44820 withval=$with_libintl_prefix;
44821 if test "X$withval" = "Xno"; then
44822 use_additional=no
44823 else
44824 if test "X$withval" = "X"; then
44826 acl_save_prefix="$prefix"
44827 prefix="$acl_final_prefix"
44828 acl_save_exec_prefix="$exec_prefix"
44829 exec_prefix="$acl_final_exec_prefix"
44831 eval additional_includedir=\"$includedir\"
44832 eval additional_libdir=\"$libdir\"
44834 exec_prefix="$acl_save_exec_prefix"
44835 prefix="$acl_save_prefix"
44837 else
44838 additional_includedir="$withval/include"
44839 additional_libdir="$withval/$acl_libdirstem"
44840 if test "$acl_libdirstem2" != "$acl_libdirstem" \
44841 && ! test -d "$withval/$acl_libdirstem"; then
44842 additional_libdir="$withval/$acl_libdirstem2"
44849 LIBINTL=
44850 LTLIBINTL=
44851 INCINTL=
44852 LIBINTL_PREFIX=
44853 HAVE_LIBINTL=
44854 rpathdirs=
44855 ltrpathdirs=
44856 names_already_handled=
44857 names_next_round='intl '
44858 while test -n "$names_next_round"; do
44859 names_this_round="$names_next_round"
44860 names_next_round=
44861 for name in $names_this_round; do
44862 already_handled=
44863 for n in $names_already_handled; do
44864 if test "$n" = "$name"; then
44865 already_handled=yes
44866 break
44868 done
44869 if test -z "$already_handled"; then
44870 names_already_handled="$names_already_handled $name"
44871 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
44872 eval value=\"\$HAVE_LIB$uppername\"
44873 if test -n "$value"; then
44874 if test "$value" = yes; then
44875 eval value=\"\$LIB$uppername\"
44876 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
44877 eval value=\"\$LTLIB$uppername\"
44878 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
44879 else
44882 else
44883 found_dir=
44884 found_la=
44885 found_so=
44886 found_a=
44887 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
44888 if test -n "$acl_shlibext"; then
44889 shrext=".$acl_shlibext" # typically: shrext=.so
44890 else
44891 shrext=
44893 if test $use_additional = yes; then
44894 dir="$additional_libdir"
44895 if test -n "$acl_shlibext"; then
44896 if test -f "$dir/$libname$shrext"; then
44897 found_dir="$dir"
44898 found_so="$dir/$libname$shrext"
44899 else
44900 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
44901 ver=`(cd "$dir" && \
44902 for f in "$libname$shrext".*; do echo "$f"; done \
44903 | sed -e "s,^$libname$shrext\\\\.,," \
44904 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
44905 | sed 1q ) 2>/dev/null`
44906 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
44907 found_dir="$dir"
44908 found_so="$dir/$libname$shrext.$ver"
44910 else
44911 eval library_names=\"$acl_library_names_spec\"
44912 for f in $library_names; do
44913 if test -f "$dir/$f"; then
44914 found_dir="$dir"
44915 found_so="$dir/$f"
44916 break
44918 done
44922 if test "X$found_dir" = "X"; then
44923 if test -f "$dir/$libname.$acl_libext"; then
44924 found_dir="$dir"
44925 found_a="$dir/$libname.$acl_libext"
44928 if test "X$found_dir" != "X"; then
44929 if test -f "$dir/$libname.la"; then
44930 found_la="$dir/$libname.la"
44934 if test "X$found_dir" = "X"; then
44935 for x in $LDFLAGS $LTLIBINTL; do
44937 acl_save_prefix="$prefix"
44938 prefix="$acl_final_prefix"
44939 acl_save_exec_prefix="$exec_prefix"
44940 exec_prefix="$acl_final_exec_prefix"
44941 eval x=\"$x\"
44942 exec_prefix="$acl_save_exec_prefix"
44943 prefix="$acl_save_prefix"
44945 case "$x" in
44946 -L*)
44947 dir=`echo "X$x" | sed -e 's/^X-L//'`
44948 if test -n "$acl_shlibext"; then
44949 if test -f "$dir/$libname$shrext"; then
44950 found_dir="$dir"
44951 found_so="$dir/$libname$shrext"
44952 else
44953 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
44954 ver=`(cd "$dir" && \
44955 for f in "$libname$shrext".*; do echo "$f"; done \
44956 | sed -e "s,^$libname$shrext\\\\.,," \
44957 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
44958 | sed 1q ) 2>/dev/null`
44959 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
44960 found_dir="$dir"
44961 found_so="$dir/$libname$shrext.$ver"
44963 else
44964 eval library_names=\"$acl_library_names_spec\"
44965 for f in $library_names; do
44966 if test -f "$dir/$f"; then
44967 found_dir="$dir"
44968 found_so="$dir/$f"
44969 break
44971 done
44975 if test "X$found_dir" = "X"; then
44976 if test -f "$dir/$libname.$acl_libext"; then
44977 found_dir="$dir"
44978 found_a="$dir/$libname.$acl_libext"
44981 if test "X$found_dir" != "X"; then
44982 if test -f "$dir/$libname.la"; then
44983 found_la="$dir/$libname.la"
44987 esac
44988 if test "X$found_dir" != "X"; then
44989 break
44991 done
44993 if test "X$found_dir" != "X"; then
44994 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
44995 if test "X$found_so" != "X"; then
44996 if test "$enable_rpath" = no \
44997 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
44998 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
44999 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
45000 else
45001 haveit=
45002 for x in $ltrpathdirs; do
45003 if test "X$x" = "X$found_dir"; then
45004 haveit=yes
45005 break
45007 done
45008 if test -z "$haveit"; then
45009 ltrpathdirs="$ltrpathdirs $found_dir"
45011 if test "$acl_hardcode_direct" = yes; then
45012 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
45013 else
45014 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
45015 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
45016 haveit=
45017 for x in $rpathdirs; do
45018 if test "X$x" = "X$found_dir"; then
45019 haveit=yes
45020 break
45022 done
45023 if test -z "$haveit"; then
45024 rpathdirs="$rpathdirs $found_dir"
45026 else
45027 haveit=
45028 for x in $LDFLAGS $LIBINTL; do
45030 acl_save_prefix="$prefix"
45031 prefix="$acl_final_prefix"
45032 acl_save_exec_prefix="$exec_prefix"
45033 exec_prefix="$acl_final_exec_prefix"
45034 eval x=\"$x\"
45035 exec_prefix="$acl_save_exec_prefix"
45036 prefix="$acl_save_prefix"
45038 if test "X$x" = "X-L$found_dir"; then
45039 haveit=yes
45040 break
45042 done
45043 if test -z "$haveit"; then
45044 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
45046 if test "$acl_hardcode_minus_L" != no; then
45047 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
45048 else
45049 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
45054 else
45055 if test "X$found_a" != "X"; then
45056 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
45057 else
45058 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
45061 additional_includedir=
45062 case "$found_dir" in
45063 */$acl_libdirstem | */$acl_libdirstem/)
45064 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
45065 if test "$name" = 'intl'; then
45066 LIBINTL_PREFIX="$basedir"
45068 additional_includedir="$basedir/include"
45070 */$acl_libdirstem2 | */$acl_libdirstem2/)
45071 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
45072 if test "$name" = 'intl'; then
45073 LIBINTL_PREFIX="$basedir"
45075 additional_includedir="$basedir/include"
45077 esac
45078 if test "X$additional_includedir" != "X"; then
45079 if test "X$additional_includedir" != "X/usr/include"; then
45080 haveit=
45081 if test "X$additional_includedir" = "X/usr/local/include"; then
45082 if test -n "$GCC"; then
45083 case $host_os in
45084 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
45085 esac
45088 if test -z "$haveit"; then
45089 for x in $CPPFLAGS $INCINTL; do
45091 acl_save_prefix="$prefix"
45092 prefix="$acl_final_prefix"
45093 acl_save_exec_prefix="$exec_prefix"
45094 exec_prefix="$acl_final_exec_prefix"
45095 eval x=\"$x\"
45096 exec_prefix="$acl_save_exec_prefix"
45097 prefix="$acl_save_prefix"
45099 if test "X$x" = "X-I$additional_includedir"; then
45100 haveit=yes
45101 break
45103 done
45104 if test -z "$haveit"; then
45105 if test -d "$additional_includedir"; then
45106 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
45112 if test -n "$found_la"; then
45113 save_libdir="$libdir"
45114 case "$found_la" in
45115 */* | *\\*) . "$found_la" ;;
45116 *) . "./$found_la" ;;
45117 esac
45118 libdir="$save_libdir"
45119 for dep in $dependency_libs; do
45120 case "$dep" in
45121 -L*)
45122 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
45123 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
45124 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
45125 haveit=
45126 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
45127 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
45128 if test -n "$GCC"; then
45129 case $host_os in
45130 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
45131 esac
45134 if test -z "$haveit"; then
45135 haveit=
45136 for x in $LDFLAGS $LIBINTL; do
45138 acl_save_prefix="$prefix"
45139 prefix="$acl_final_prefix"
45140 acl_save_exec_prefix="$exec_prefix"
45141 exec_prefix="$acl_final_exec_prefix"
45142 eval x=\"$x\"
45143 exec_prefix="$acl_save_exec_prefix"
45144 prefix="$acl_save_prefix"
45146 if test "X$x" = "X-L$additional_libdir"; then
45147 haveit=yes
45148 break
45150 done
45151 if test -z "$haveit"; then
45152 if test -d "$additional_libdir"; then
45153 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
45156 haveit=
45157 for x in $LDFLAGS $LTLIBINTL; do
45159 acl_save_prefix="$prefix"
45160 prefix="$acl_final_prefix"
45161 acl_save_exec_prefix="$exec_prefix"
45162 exec_prefix="$acl_final_exec_prefix"
45163 eval x=\"$x\"
45164 exec_prefix="$acl_save_exec_prefix"
45165 prefix="$acl_save_prefix"
45167 if test "X$x" = "X-L$additional_libdir"; then
45168 haveit=yes
45169 break
45171 done
45172 if test -z "$haveit"; then
45173 if test -d "$additional_libdir"; then
45174 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
45180 -R*)
45181 dir=`echo "X$dep" | sed -e 's/^X-R//'`
45182 if test "$enable_rpath" != no; then
45183 haveit=
45184 for x in $rpathdirs; do
45185 if test "X$x" = "X$dir"; then
45186 haveit=yes
45187 break
45189 done
45190 if test -z "$haveit"; then
45191 rpathdirs="$rpathdirs $dir"
45193 haveit=
45194 for x in $ltrpathdirs; do
45195 if test "X$x" = "X$dir"; then
45196 haveit=yes
45197 break
45199 done
45200 if test -z "$haveit"; then
45201 ltrpathdirs="$ltrpathdirs $dir"
45205 -l*)
45206 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
45208 *.la)
45209 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
45212 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
45213 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
45215 esac
45216 done
45218 else
45219 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
45220 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
45224 done
45225 done
45226 if test "X$rpathdirs" != "X"; then
45227 if test -n "$acl_hardcode_libdir_separator"; then
45228 alldirs=
45229 for found_dir in $rpathdirs; do
45230 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
45231 done
45232 acl_save_libdir="$libdir"
45233 libdir="$alldirs"
45234 eval flag=\"$acl_hardcode_libdir_flag_spec\"
45235 libdir="$acl_save_libdir"
45236 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
45237 else
45238 for found_dir in $rpathdirs; do
45239 acl_save_libdir="$libdir"
45240 libdir="$found_dir"
45241 eval flag=\"$acl_hardcode_libdir_flag_spec\"
45242 libdir="$acl_save_libdir"
45243 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
45244 done
45247 if test "X$ltrpathdirs" != "X"; then
45248 for found_dir in $ltrpathdirs; do
45249 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
45250 done
45258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
45259 printf %s "checking for GNU gettext in libintl... " >&6; }
45260 if eval test \${$gt_func_gnugettext_libintl+y}
45261 then :
45262 printf %s "(cached) " >&6
45263 else case e in #(
45264 e) gt_save_CPPFLAGS="$CPPFLAGS"
45265 CPPFLAGS="$CPPFLAGS $INCINTL"
45266 gt_save_LIBS="$LIBS"
45267 LIBS="$LIBS $LIBINTL"
45268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45269 /* end confdefs.h. */
45271 #include <libintl.h>
45272 $gt_revision_test_code
45273 extern int _nl_msg_cat_cntr;
45274 extern
45275 #ifdef __cplusplus
45277 #endif
45278 const char *_nl_expand_alias (const char *);
45281 main (void)
45284 bindtextdomain ("", "");
45285 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
45288 return 0;
45290 _ACEOF
45291 if ac_fn_c_try_link "$LINENO"
45292 then :
45293 eval "$gt_func_gnugettext_libintl=yes"
45294 else case e in #(
45295 e) eval "$gt_func_gnugettext_libintl=no" ;;
45296 esac
45298 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45299 conftest$ac_exeext conftest.$ac_ext
45300 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
45301 LIBS="$LIBS $LIBICONV"
45302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45303 /* end confdefs.h. */
45305 #include <libintl.h>
45306 $gt_revision_test_code
45307 extern int _nl_msg_cat_cntr;
45308 extern
45309 #ifdef __cplusplus
45311 #endif
45312 const char *_nl_expand_alias (const char *);
45315 main (void)
45318 bindtextdomain ("", "");
45319 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
45322 return 0;
45324 _ACEOF
45325 if ac_fn_c_try_link "$LINENO"
45326 then :
45327 LIBINTL="$LIBINTL $LIBICONV"
45328 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
45329 eval "$gt_func_gnugettext_libintl=yes"
45332 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45333 conftest$ac_exeext conftest.$ac_ext
45335 CPPFLAGS="$gt_save_CPPFLAGS"
45336 LIBS="$gt_save_LIBS" ;;
45337 esac
45339 eval ac_res=\$$gt_func_gnugettext_libintl
45340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
45341 printf "%s\n" "$ac_res" >&6; }
45344 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
45345 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
45346 && test "$PACKAGE" != gettext-runtime \
45347 && test "$PACKAGE" != gettext-tools; }; then
45348 gt_use_preinstalled_gnugettext=yes
45349 else
45350 LIBINTL=
45351 LTLIBINTL=
45352 INCINTL=
45357 if test -n "$INTL_MACOSX_LIBS"; then
45358 if test "$gt_use_preinstalled_gnugettext" = "yes" \
45359 || test "$nls_cv_use_gnu_gettext" = "yes"; then
45360 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
45361 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
45365 if test "$gt_use_preinstalled_gnugettext" = "yes" \
45366 || test "$nls_cv_use_gnu_gettext" = "yes"; then
45368 printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
45370 else
45371 USE_NLS=no
45375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
45376 printf %s "checking whether to use NLS... " >&6; }
45377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
45378 printf "%s\n" "$USE_NLS" >&6; }
45379 if test "$USE_NLS" = "yes"; then
45380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
45381 printf %s "checking where the gettext function comes from... " >&6; }
45382 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
45383 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
45384 gt_source="external libintl"
45385 else
45386 gt_source="libc"
45388 else
45389 gt_source="included intl directory"
45391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
45392 printf "%s\n" "$gt_source" >&6; }
45395 if test "$USE_NLS" = "yes"; then
45397 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
45398 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
45399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
45400 printf %s "checking how to link with libintl... " >&6; }
45401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
45402 printf "%s\n" "$LIBINTL" >&6; }
45404 for element in $INCINTL; do
45405 haveit=
45406 for x in $CPPFLAGS; do
45408 acl_save_prefix="$prefix"
45409 prefix="$acl_final_prefix"
45410 acl_save_exec_prefix="$exec_prefix"
45411 exec_prefix="$acl_final_exec_prefix"
45412 eval x=\"$x\"
45413 exec_prefix="$acl_save_exec_prefix"
45414 prefix="$acl_save_prefix"
45416 if test "X$x" = "X$element"; then
45417 haveit=yes
45418 break
45420 done
45421 if test -z "$haveit"; then
45422 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
45424 done
45429 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
45432 printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
45436 POSUB=po
45441 INTLLIBS="$LIBINTL"
45460 if test "$ac_cv_func_readlink" = yes; then
45461 TEST_SYMLINKS_TRUE=
45462 TEST_SYMLINKS_FALSE='#'
45463 else
45464 TEST_SYMLINKS_TRUE='#'
45465 TEST_SYMLINKS_FALSE=
45469 # Check whether --enable-i18n was given.
45470 if test ${enable_i18n+y}
45471 then :
45472 enableval=$enable_i18n;
45473 else case e in #(
45474 e) enable_i18n=yes ;;
45475 esac
45478 if test "x$enable_i18n" = xno; then
45479 ac_cv_func_wcscoll=no
45483 # Determine whether we should run UTF-8 tests by checking if cyrillic
45484 # letters are case-folded properly. The test for UTF-8 locales (both
45485 # in general and specifically for a Russian one) is a bit weak, but it
45486 # should match exactly what is done in the testsuite. In fact, sed's
45487 # logic is portable (though testing it requires care) so it is enough to
45488 # have a couple of platforms where these tests pass. Right now, only
45489 # Windows and HP/UX do not support the tests.
45490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UTF-8 case folding tests should pass" >&5
45491 printf %s "checking whether UTF-8 case folding tests should pass... " >&6; }
45492 if test "$cross_compiling" = yes
45493 then :
45494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't care (cross compiling)" >&5
45495 printf "%s\n" "don't care (cross compiling)" >&6; }; XFAIL_TESTS=
45496 else case e in #(
45497 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45498 /* end confdefs.h. */
45500 #include <locale.h>
45501 #include <string.h>
45502 #include <stdlib.h>
45503 #include <wchar.h>
45504 #ifdef HAVE_WCTYPE_H
45505 #include <wctype.h>
45506 #endif
45508 int test(void)
45510 char in[] = "\xD0\xB4";
45511 char good[] = "\xD0\x94";
45512 char out[10];
45513 wchar_t in_wc, good_wc;
45514 if (mbtowc (&in_wc, in, 3) == -1)
45515 return 0;
45516 if (mbtowc (&good_wc, good, 3) == -1)
45517 return 0;
45518 if (towupper (in_wc) != good_wc)
45519 return 0;
45520 if (wctomb (out, good_wc) != 2)
45521 return 0;
45522 if (memcmp (out, good, 2))
45523 return 0;
45524 return 1;
45527 int main()
45529 char *old;
45530 int len;
45532 /* Try hardcoding a Russian UTF-8 locale. If the name "ru_RU.UTF-8"
45533 is invalid, use setlocale again just to get the current locale. */
45534 old = setlocale (LC_CTYPE, "ru_RU.UTF-8");
45535 if (old)
45537 if (test())
45538 exit (0);
45540 else
45541 old = setlocale (LC_CTYPE, "C");
45543 /* Maybe cyrillic case folding is implemented for all UTF-8 locales.
45544 If the current locale is not UTF-8, the test will be skipped. */
45545 len = strlen (old);
45546 if ((len > 6 && !strcmp (old + len - 6, ".UTF-8"))
45547 || (len > 6 && !strcmp (old + len - 6, ".utf-8"))
45548 || (len > 5 && !strcmp (old + len - 5, ".UTF8"))
45549 || (len > 5 && !strcmp (old + len - 5, ".utf8")))
45551 /* ok */
45553 else
45554 exit (1);
45556 /* Run the test in the detected UTF-8 locale. */
45557 setlocale (LC_CTYPE, old);
45558 exit (!test ());
45561 _ACEOF
45562 if ac_fn_c_try_run "$LINENO"
45563 then :
45564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45565 printf "%s\n" "yes" >&6; }; XFAIL_TESTS=
45566 else case e in #(
45567 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
45568 printf "%s\n" "no" >&6; }; XFAIL_TESTS='testsuite/utf8-1 testsuite/utf8-2 \
45569 testsuite/utf8-3 testsuite/utf8-4' ;;
45570 esac
45572 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45573 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
45574 esac
45578 # Under MinGW, the bsd.sh test fails because of the EOF character (^Z).
45579 case $host in
45580 *mingw*) XFAIL_TESTS="$XFAIL_TESTS bsd" ;;
45581 *) ;;
45582 esac
45585 # Check whether --enable-gcc-warnings was given.
45586 if test ${enable_gcc_warnings+y}
45587 then :
45588 enableval=$enable_gcc_warnings; case $enableval in
45589 yes|no) ;;
45590 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
45591 esac
45592 gl_gcc_warnings=$enableval
45593 else case e in #(
45595 # GCC provides fine-grained control over diagnostics which
45596 # is used in gnulib for example to suppress warnings from
45597 # certain sections of code. So if this is available and
45598 # we're running from a git repo, then auto enable the warnings.
45599 gl_gcc_warnings=no
45600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45601 /* end confdefs.h. */
45603 #if (4) < __GNUC__ || ((4) == __GNUC__ && (6) <= __GNUC_MINOR__)
45604 /* ok */
45605 #else
45606 # error "your version of gcc is older than 4.6"
45607 #endif
45610 main (void)
45614 return 0;
45617 _ACEOF
45618 if ac_fn_c_try_cpp "$LINENO"
45619 then :
45620 test -d "$srcdir"/.git \
45621 && ! test -f "$srcdir"/.tarball-version \
45622 && gl_gcc_warnings=yes
45624 rm -f conftest.err conftest.i conftest.$ac_ext
45628 esac
45632 if test "$gl_gcc_warnings" = yes; then
45634 ac_ext=c
45635 ac_cpp='$CPP $CPPFLAGS'
45636 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45637 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45638 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
45642 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
45643 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
45644 then :
45645 printf %s "(cached) " >&6
45646 else case e in #(
45648 gl_save_compiler_FLAGS="$CFLAGS"
45649 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
45650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45651 /* end confdefs.h. */
45654 main (void)
45658 return 0;
45660 _ACEOF
45661 if ac_fn_c_try_link "$LINENO"
45662 then :
45663 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
45664 else case e in #(
45665 e) gl_cv_warn_c__Werror__Wunknown_warning_option=no ;;
45666 esac
45668 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45669 conftest$ac_exeext conftest.$ac_ext
45670 CFLAGS="$gl_save_compiler_FLAGS"
45672 esac
45674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
45675 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
45676 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
45677 then :
45678 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
45679 else case e in #(
45680 e) gl_unknown_warnings_are_errors= ;;
45681 esac
45684 ac_ext=c
45685 ac_cpp='$CPP $CPPFLAGS'
45686 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45687 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45688 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
45694 printf %s "checking whether C compiler handles -Werror... " >&6; }
45695 if test ${gl_cv_warn_c__Werror+y}
45696 then :
45697 printf %s "(cached) " >&6
45698 else case e in #(
45700 gl_save_compiler_FLAGS="$CFLAGS"
45701 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
45702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45703 /* end confdefs.h. */
45706 main (void)
45710 return 0;
45712 _ACEOF
45713 if ac_fn_c_try_link "$LINENO"
45714 then :
45715 gl_cv_warn_c__Werror=yes
45716 else case e in #(
45717 e) gl_cv_warn_c__Werror=no ;;
45718 esac
45720 rm -f core conftest.err conftest.$ac_objext conftest.beam \
45721 conftest$ac_exeext conftest.$ac_ext
45722 CFLAGS="$gl_save_compiler_FLAGS"
45724 esac
45726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
45727 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
45728 if test "x$gl_cv_warn_c__Werror" = xyes
45729 then :
45730 as_fn_append WERROR_CFLAGS " -Werror"
45737 # This, $nw, is the list of warnings we disable.
45738 nw="$nw -Wdeclaration-after-statement" # too useful to forbid
45739 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
45740 nw="$nw -Wsign-conversion" # Too many warnings for now
45741 nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses
45742 nw="$nw -Wswitch-default" # Too many warnings for now
45745 ac_ext=c
45746 ac_cpp='$CPP $CPPFLAGS'
45747 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45748 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45749 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45753 if test -n "$GCC"; then
45755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
45756 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
45757 if test ${gl_cv_cc_nomfi_supported+y}
45758 then :
45759 printf %s "(cached) " >&6
45760 else case e in #(
45761 e) gl_save_CFLAGS="$CFLAGS"
45762 CFLAGS="$CFLAGS -Wextra -Werror -Wno-missing-field-initializers"
45763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45764 /* end confdefs.h. */
45767 main (void)
45771 return 0;
45773 _ACEOF
45774 if ac_fn_c_try_compile "$LINENO"
45775 then :
45776 gl_cv_cc_nomfi_supported=yes
45777 else case e in #(
45778 e) gl_cv_cc_nomfi_supported=no ;;
45779 esac
45781 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45782 CFLAGS="$gl_save_CFLAGS"
45784 esac
45786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
45787 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
45789 if test "$gl_cv_cc_nomfi_supported" = yes; then
45790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
45791 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
45792 if test ${gl_cv_cc_nomfi_needed+y}
45793 then :
45794 printf %s "(cached) " >&6
45795 else case e in #(
45796 e) gl_save_CFLAGS="$CFLAGS"
45797 CFLAGS="$CFLAGS -Wextra -Werror"
45798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45799 /* end confdefs.h. */
45800 int f (void)
45802 typedef struct { int a; int b; } s_t;
45803 s_t s1 = { 0, };
45804 return s1.b;
45808 main (void)
45812 return 0;
45814 _ACEOF
45815 if ac_fn_c_try_compile "$LINENO"
45816 then :
45817 gl_cv_cc_nomfi_needed=no
45818 else case e in #(
45819 e) gl_cv_cc_nomfi_needed=yes ;;
45820 esac
45822 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45823 CFLAGS="$gl_save_CFLAGS"
45825 esac
45827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
45828 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
45831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
45832 printf %s "checking whether -Wuninitialized is supported... " >&6; }
45833 if test ${gl_cv_cc_uninitialized_supported+y}
45834 then :
45835 printf %s "(cached) " >&6
45836 else case e in #(
45837 e) gl_save_CFLAGS="$CFLAGS"
45838 CFLAGS="$CFLAGS -Werror -Wuninitialized"
45839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45840 /* end confdefs.h. */
45843 main (void)
45847 return 0;
45849 _ACEOF
45850 if ac_fn_c_try_compile "$LINENO"
45851 then :
45852 gl_cv_cc_uninitialized_supported=yes
45853 else case e in #(
45854 e) gl_cv_cc_uninitialized_supported=no ;;
45855 esac
45857 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45858 CFLAGS="$gl_save_CFLAGS"
45860 esac
45862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
45863 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
45867 # List all gcc warning categories.
45868 # To compare this list to your installed GCC's, run this Bash command:
45870 # comm -3 \
45871 # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
45872 # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
45873 # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
45876 for gl_manywarn_item in -fanalyzer -fno-common \
45877 -Wall \
45878 -Warith-conversion \
45879 -Wbad-function-cast \
45880 -Wcast-align=strict \
45881 -Wdate-time \
45882 -Wdisabled-optimization \
45883 -Wdouble-promotion \
45884 -Wduplicated-branches \
45885 -Wduplicated-cond \
45886 -Wextra \
45887 -Wformat-signedness \
45888 -Winit-self \
45889 -Winline \
45890 -Winvalid-pch \
45891 -Wlogical-op \
45892 -Wmissing-declarations \
45893 -Wmissing-include-dirs \
45894 -Wmissing-prototypes \
45895 -Wnested-externs \
45896 -Wnull-dereference \
45897 -Wold-style-definition \
45898 -Wopenmp-simd \
45899 -Woverlength-strings \
45900 -Wpacked \
45901 -Wpointer-arith \
45902 -Wshadow \
45903 -Wstack-protector \
45904 -Wstrict-overflow \
45905 -Wstrict-prototypes \
45906 -Wsuggest-attribute=cold \
45907 -Wsuggest-attribute=const \
45908 -Wsuggest-attribute=format \
45909 -Wsuggest-attribute=malloc \
45910 -Wsuggest-attribute=noreturn \
45911 -Wsuggest-attribute=pure \
45912 -Wsuggest-final-methods \
45913 -Wsuggest-final-types \
45914 -Wsync-nand \
45915 -Wsystem-headers \
45916 -Wtrampolines \
45917 -Wuninitialized \
45918 -Wunknown-pragmas \
45919 -Wunsafe-loop-optimizations \
45920 -Wunused-macros \
45921 -Wvariadic-macros \
45922 -Wvector-operation-performance \
45923 -Wvla \
45924 -Wwrite-strings \
45926 ; do
45927 as_fn_append ws " $gl_manywarn_item"
45928 done
45930 # gcc --help=warnings outputs an unusual form for these options; list
45931 # them here so that the above 'comm' command doesn't report a false match.
45932 as_fn_append ws ' -Warray-bounds=2'
45933 as_fn_append ws ' -Wattribute-alias=2'
45934 as_fn_append ws ' -Wbidi-chars=any,ucn'
45935 as_fn_append ws ' -Wformat-overflow=2'
45936 as_fn_append ws ' -Wformat=2'
45937 as_fn_append ws ' -Wformat-truncation=2'
45938 as_fn_append ws ' -Wimplicit-fallthrough=5'
45939 as_fn_append ws ' -Wshift-overflow=2'
45940 as_fn_append ws ' -Wuse-after-free=3'
45941 as_fn_append ws ' -Wunused-const-variable=2'
45942 as_fn_append ws ' -Wvla-larger-than=4031'
45944 # These are needed for older GCC versions.
45945 if test -n "$GCC"; then
45946 case `($CC --version) 2>/dev/null` in
45947 'gcc (GCC) '[0-3].* | \
45948 'gcc (GCC) '4.[0-7].*)
45949 as_fn_append ws ' -fdiagnostics-show-option'
45950 as_fn_append ws ' -funit-at-a-time'
45952 esac
45955 # Disable specific options as needed.
45956 if test "$gl_cv_cc_nomfi_needed" = yes; then
45957 as_fn_append ws ' -Wno-missing-field-initializers'
45960 if test "$gl_cv_cc_uninitialized_supported" = no; then
45961 as_fn_append ws ' -Wno-uninitialized'
45964 # This warning have too many false alarms in GCC 11.2.1.
45965 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101713
45966 as_fn_append ws ' -Wno-analyzer-malloc-leak'
45968 ac_ext=c
45969 ac_cpp='$CPP $CPPFLAGS'
45970 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45971 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45972 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45976 gl_warn_set=
45977 set x $ws; shift
45978 for gl_warn_item
45980 case " $nw " in
45981 *" $gl_warn_item "*)
45984 as_fn_append gl_warn_set " $gl_warn_item"
45986 esac
45987 done
45988 ws=$gl_warn_set
45990 for w in $ws; do
45993 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | sed "$as_sed_sh"`
45994 gl_positive="$w"
45995 case $gl_positive in
45996 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
45997 esac
45998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
45999 printf %s "checking whether C compiler handles $w... " >&6; }
46000 if eval test \${$as_gl_Warn+y}
46001 then :
46002 printf %s "(cached) " >&6
46003 else case e in #(
46005 gl_save_compiler_FLAGS="$CFLAGS"
46006 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
46007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46008 /* end confdefs.h. */
46011 main (void)
46015 return 0;
46017 _ACEOF
46018 if ac_fn_c_try_link "$LINENO"
46019 then :
46020 eval "$as_gl_Warn=yes"
46021 else case e in #(
46022 e) eval "$as_gl_Warn=no" ;;
46023 esac
46025 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46026 conftest$ac_exeext conftest.$ac_ext
46027 CFLAGS="$gl_save_compiler_FLAGS"
46029 esac
46031 eval ac_res=\$$as_gl_Warn
46032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
46033 printf "%s\n" "$ac_res" >&6; }
46034 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
46035 then :
46036 as_fn_append WARN_CFLAGS " $w"
46040 done
46043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
46044 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
46045 if test ${gl_cv_warn_c__Wno_sign_compare+y}
46046 then :
46047 printf %s "(cached) " >&6
46048 else case e in #(
46050 gl_save_compiler_FLAGS="$CFLAGS"
46051 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
46052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46053 /* end confdefs.h. */
46056 main (void)
46060 return 0;
46062 _ACEOF
46063 if ac_fn_c_try_link "$LINENO"
46064 then :
46065 gl_cv_warn_c__Wno_sign_compare=yes
46066 else case e in #(
46067 e) gl_cv_warn_c__Wno_sign_compare=no ;;
46068 esac
46070 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46071 conftest$ac_exeext conftest.$ac_ext
46072 CFLAGS="$gl_save_compiler_FLAGS"
46074 esac
46076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
46077 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
46078 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
46079 then :
46080 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
46083 # Too many warnings for now
46085 # clang is unduly picky about some things.
46086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
46087 printf %s "checking whether the compiler is clang... " >&6; }
46088 if test ${utils_cv_clang+y}
46089 then :
46090 printf %s "(cached) " >&6
46091 else case e in #(
46092 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46093 /* end confdefs.h. */
46095 #ifndef __clang__
46096 #error "not clang"
46097 #endif
46100 main (void)
46104 return 0;
46106 _ACEOF
46107 if ac_fn_c_try_compile "$LINENO"
46108 then :
46109 utils_cv_clang=yes
46110 else case e in #(
46111 e) utils_cv_clang=no ;;
46112 esac
46114 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
46115 esac
46117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $utils_cv_clang" >&5
46118 printf "%s\n" "$utils_cv_clang" >&6; }
46119 if test $utils_cv_clang = yes; then
46122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-extra-args" >&5
46123 printf %s "checking whether C compiler handles -Wno-format-extra-args... " >&6; }
46124 if test ${gl_cv_warn_c__Wno_format_extra_args+y}
46125 then :
46126 printf %s "(cached) " >&6
46127 else case e in #(
46129 gl_save_compiler_FLAGS="$CFLAGS"
46130 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-extra-args"
46131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46132 /* end confdefs.h. */
46135 main (void)
46139 return 0;
46141 _ACEOF
46142 if ac_fn_c_try_link "$LINENO"
46143 then :
46144 gl_cv_warn_c__Wno_format_extra_args=yes
46145 else case e in #(
46146 e) gl_cv_warn_c__Wno_format_extra_args=no ;;
46147 esac
46149 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46150 conftest$ac_exeext conftest.$ac_ext
46151 CFLAGS="$gl_save_compiler_FLAGS"
46153 esac
46155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_extra_args" >&5
46156 printf "%s\n" "$gl_cv_warn_c__Wno_format_extra_args" >&6; }
46157 if test "x$gl_cv_warn_c__Wno_format_extra_args" = xyes
46158 then :
46159 as_fn_append WARN_CFLAGS " -Wno-format-extra-args"
46165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
46166 printf %s "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
46167 if test ${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+y}
46168 then :
46169 printf %s "(cached) " >&6
46170 else case e in #(
46172 gl_save_compiler_FLAGS="$CFLAGS"
46173 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-constant-out-of-range-compare"
46174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46175 /* end confdefs.h. */
46178 main (void)
46182 return 0;
46184 _ACEOF
46185 if ac_fn_c_try_link "$LINENO"
46186 then :
46187 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
46188 else case e in #(
46189 e) gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no ;;
46190 esac
46192 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46193 conftest$ac_exeext conftest.$ac_ext
46194 CFLAGS="$gl_save_compiler_FLAGS"
46196 esac
46198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
46199 printf "%s\n" "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
46200 if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = xyes
46201 then :
46202 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
46210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
46211 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
46212 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
46213 then :
46214 printf %s "(cached) " >&6
46215 else case e in #(
46217 gl_save_compiler_FLAGS="$CFLAGS"
46218 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
46219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46220 /* end confdefs.h. */
46223 main (void)
46227 return 0;
46229 _ACEOF
46230 if ac_fn_c_try_link "$LINENO"
46231 then :
46232 gl_cv_warn_c__fdiagnostics_show_option=yes
46233 else case e in #(
46234 e) gl_cv_warn_c__fdiagnostics_show_option=no ;;
46235 esac
46237 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46238 conftest$ac_exeext conftest.$ac_ext
46239 CFLAGS="$gl_save_compiler_FLAGS"
46241 esac
46243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
46244 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
46245 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
46246 then :
46247 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
46253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
46254 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
46255 if test ${gl_cv_warn_c__funit_at_a_time+y}
46256 then :
46257 printf %s "(cached) " >&6
46258 else case e in #(
46260 gl_save_compiler_FLAGS="$CFLAGS"
46261 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
46262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46263 /* end confdefs.h. */
46266 main (void)
46270 return 0;
46272 _ACEOF
46273 if ac_fn_c_try_link "$LINENO"
46274 then :
46275 gl_cv_warn_c__funit_at_a_time=yes
46276 else case e in #(
46277 e) gl_cv_warn_c__funit_at_a_time=no ;;
46278 esac
46280 rm -f core conftest.err conftest.$ac_objext conftest.beam \
46281 conftest$ac_exeext conftest.$ac_ext
46282 CFLAGS="$gl_save_compiler_FLAGS"
46284 esac
46286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
46287 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
46288 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
46289 then :
46290 as_fn_append WARN_CFLAGS " -funit-at-a-time"
46298 printf "%s\n" "#define lint 1" >>confdefs.h
46302 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
46305 # For gnulib-tests, the set is slightly smaller still.
46308 gl_warn_set=
46309 set x $WARN_CFLAGS; shift
46310 for gl_warn_item
46312 case " $nw " in
46313 *" $gl_warn_item "*)
46316 as_fn_append gl_warn_set " $gl_warn_item"
46318 esac
46319 done
46320 GNULIB_TEST_WARN_CFLAGS=$gl_warn_set
46325 # Check whether --enable-bold-man-page-references was given.
46326 if test ${enable_bold_man_page_references+y}
46327 then :
46328 enableval=$enable_bold_man_page_references; gl_bold_manpages=yes ;
46329 case $enableval in
46330 no|yes) gl_bold_manpages=$enableval ;;
46331 *) as_fn_error $? "bad value $enableval for bold-man-page-references.
46332 Options are: yes, no." "$LINENO" 5 ;;
46333 esac
46334 else case e in #(
46335 e) gl_bold_manpages=yes
46337 esac
46340 if test "$gl_bold_manpages" != no; then
46341 BOLD_MAN_REFS_TRUE=
46342 BOLD_MAN_REFS_FALSE='#'
46343 else
46344 BOLD_MAN_REFS_TRUE='#'
46345 BOLD_MAN_REFS_FALSE=
46349 if test "$cross_compiling" = yes; then
46350 CROSS_COMPILING_TRUE=
46351 CROSS_COMPILING_FALSE='#'
46352 else
46353 CROSS_COMPILING_TRUE='#'
46354 CROSS_COMPILING_FALSE=
46358 # Perl is needed for help2man
46359 # Extract the first word of "perl", so it can be a program name with args.
46360 set dummy perl; ac_word=$2
46361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46362 printf %s "checking for $ac_word... " >&6; }
46363 if test ${ac_cv_path_PERL+y}
46364 then :
46365 printf %s "(cached) " >&6
46366 else case e in #(
46367 e) case $PERL in
46368 [\\/]* | ?:[\\/]*)
46369 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
46372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46373 for as_dir in $PATH
46375 IFS=$as_save_IFS
46376 case $as_dir in #(((
46377 '') as_dir=./ ;;
46378 */) ;;
46379 *) as_dir=$as_dir/ ;;
46380 esac
46381 for ac_exec_ext in '' $ac_executable_extensions; do
46382 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
46383 ac_cv_path_PERL="$as_dir$ac_word$ac_exec_ext"
46384 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
46385 break 2
46387 done
46388 done
46389 IFS=$as_save_IFS
46392 esac ;;
46393 esac
46395 PERL=$ac_cv_path_PERL
46396 if test -n "$PERL"; then
46397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
46398 printf "%s\n" "$PERL" >&6; }
46399 else
46400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
46401 printf "%s\n" "no" >&6; }
46406 # This is needed when building outside the source dir
46407 # with --disable-dependency-tracking, see https://bugs.gnu.org/25371
46408 as_dir=lib; as_fn_mkdir_p
46409 as_dir=sed; as_fn_mkdir_p
46410 as_dir=doc; as_fn_mkdir_p
46411 as_dir=testsuite; as_fn_mkdir_p
46413 ac_config_files="$ac_config_files Makefile po/Makefile.in gnulib-tests/Makefile"
46415 cat >confcache <<\_ACEOF
46416 # This file is a shell script that caches the results of configure
46417 # tests run on this system so they can be shared between configure
46418 # scripts and configure runs, see configure's option --config-cache.
46419 # It is not useful on other systems. If it contains results you don't
46420 # want to keep, you may remove or edit it.
46422 # config.status only pays attention to the cache file if you give it
46423 # the --recheck option to rerun configure.
46425 # 'ac_cv_env_foo' variables (set or unset) will be overridden when
46426 # loading this file, other *unset* 'ac_cv_foo' will be assigned the
46427 # following values.
46429 _ACEOF
46431 # The following way of writing the cache mishandles newlines in values,
46432 # but we know of no workaround that is simple, portable, and efficient.
46433 # So, we kill variables containing newlines.
46434 # Ultrix sh set writes to stderr and can't be redirected directly,
46435 # and sets the high bit in the cache file unless we assign to the vars.
46437 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
46438 eval ac_val=\$$ac_var
46439 case $ac_val in #(
46440 *${as_nl}*)
46441 case $ac_var in #(
46442 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
46443 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
46444 esac
46445 case $ac_var in #(
46446 _ | IFS | as_nl) ;; #(
46447 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
46448 *) { eval $ac_var=; unset $ac_var;} ;;
46449 esac ;;
46450 esac
46451 done
46453 (set) 2>&1 |
46454 case $as_nl`(ac_space=' '; set) 2>&1` in #(
46455 *${as_nl}ac_space=\ *)
46456 # 'set' does not quote correctly, so add quotes: double-quote
46457 # substitution turns \\\\ into \\, and sed turns \\ into \.
46458 sed -n \
46459 "s/'/'\\\\''/g;
46460 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
46461 ;; #(
46463 # 'set' quotes correctly as required by POSIX, so do not add quotes.
46464 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
46466 esac |
46467 sort
46469 sed '
46470 /^ac_cv_env_/b end
46471 t clear
46472 :clear
46473 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
46474 t end
46475 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
46476 :end' >>confcache
46477 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
46478 if test -w "$cache_file"; then
46479 if test "x$cache_file" != "x/dev/null"; then
46480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
46481 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
46482 if test ! -f "$cache_file" || test -h "$cache_file"; then
46483 cat confcache >"$cache_file"
46484 else
46485 case $cache_file in #(
46486 */* | ?:*)
46487 mv -f confcache "$cache_file"$$ &&
46488 mv -f "$cache_file"$$ "$cache_file" ;; #(
46490 mv -f confcache "$cache_file" ;;
46491 esac
46494 else
46495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
46496 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
46499 rm -f confcache
46501 test "x$prefix" = xNONE && prefix=$ac_default_prefix
46502 # Let make expand exec_prefix.
46503 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
46505 DEFS=-DHAVE_CONFIG_H
46507 ac_libobjs=
46508 ac_ltlibobjs=
46510 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
46511 # 1. Remove the extension, and $U if already installed.
46512 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
46513 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
46514 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
46515 # will be set to the directory where LIBOBJS objects are built.
46516 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
46517 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
46518 done
46519 LIBOBJS=$ac_libobjs
46521 LTLIBOBJS=$ac_ltlibobjs
46524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
46525 printf %s "checking that generated files are newer than configure... " >&6; }
46526 if test -n "$am_sleep_pid"; then
46527 # Hide warnings about reused PIDs.
46528 wait $am_sleep_pid 2>/dev/null
46530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
46531 printf "%s\n" "done" >&6; }
46532 case $enable_silent_rules in # (((
46533 yes) AM_DEFAULT_VERBOSITY=0;;
46534 no) AM_DEFAULT_VERBOSITY=1;;
46535 esac
46536 if test $am_cv_make_support_nested_variables = yes; then
46537 AM_V='$(V)'
46538 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
46539 else
46540 AM_V=$AM_DEFAULT_VERBOSITY
46541 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
46544 if test -n "$EXEEXT"; then
46545 am__EXEEXT_TRUE=
46546 am__EXEEXT_FALSE='#'
46547 else
46548 am__EXEEXT_TRUE='#'
46549 am__EXEEXT_FALSE=
46552 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
46553 as_fn_error $? "conditional \"AMDEP\" was never defined.
46554 Usually this means the macro was only invoked conditionally." "$LINENO" 5
46556 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
46557 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
46558 Usually this means the macro was only invoked conditionally." "$LINENO" 5
46560 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
46561 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
46562 Usually this means the macro was only invoked conditionally." "$LINENO" 5
46564 CONFIG_INCLUDE=config.h
46567 gl_libobjs=
46568 gl_ltlibobjs=
46569 gl_libobjdeps=
46570 if test -n "$gl_LIBOBJS"; then
46571 # Remove the extension.
46572 sed_drop_objext='s/\.o$//;s/\.obj$//'
46573 sed_dirname1='s,//*,/,g'
46574 sed_dirname2='s,\(.\)/$,\1,'
46575 sed_dirname3='s,^[^/]*$,.,'
46576 sed_dirname4='s,\(.\)/[^/]*$,\1,'
46577 sed_basename1='s,.*/,,'
46578 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
46579 gl_libobjs="$gl_libobjs lib/$i.$ac_objext"
46580 gl_ltlibobjs="$gl_ltlibobjs lib/$i.lo"
46581 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
46582 i_base=`echo "$i" | sed -e "$sed_basename1"`
46583 gl_libobjdeps="$gl_libobjdeps lib/$i_dir/\$(DEPDIR)/$i_base.Po"
46584 done
46586 gl_LIBOBJS=$gl_libobjs
46588 gl_LTLIBOBJS=$gl_ltlibobjs
46590 gl_LIBOBJDEPS=$gl_libobjdeps
46595 gltests_libobjs=
46596 gltests_ltlibobjs=
46597 gltests_libobjdeps=
46598 if test -n "$gltests_LIBOBJS"; then
46599 # Remove the extension.
46600 sed_drop_objext='s/\.o$//;s/\.obj$//'
46601 sed_dirname1='s,//*,/,g'
46602 sed_dirname2='s,\(.\)/$,\1,'
46603 sed_dirname3='s,^[^/]*$,.,'
46604 sed_dirname4='s,\(.\)/[^/]*$,\1,'
46605 sed_basename1='s,.*/,,'
46606 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
46607 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
46608 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
46609 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
46610 i_base=`echo "$i" | sed -e "$sed_basename1"`
46611 gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
46612 done
46614 gltests_LIBOBJS=$gltests_libobjs
46616 gltests_LTLIBOBJS=$gltests_ltlibobjs
46618 gltests_LIBOBJDEPS=$gltests_libobjdeps
46621 if test -z "${HAVE_PERL_TRUE}" && test -z "${HAVE_PERL_FALSE}"; then
46622 as_fn_error $? "conditional \"HAVE_PERL\" was never defined.
46623 Usually this means the macro was only invoked conditionally." "$LINENO" 5
46625 if test -z "${TEST_SYMLINKS_TRUE}" && test -z "${TEST_SYMLINKS_FALSE}"; then
46626 as_fn_error $? "conditional \"TEST_SYMLINKS\" was never defined.
46627 Usually this means the macro was only invoked conditionally." "$LINENO" 5
46629 if test -z "${BOLD_MAN_REFS_TRUE}" && test -z "${BOLD_MAN_REFS_FALSE}"; then
46630 as_fn_error $? "conditional \"BOLD_MAN_REFS\" was never defined.
46631 Usually this means the macro was only invoked conditionally." "$LINENO" 5
46633 if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then
46634 as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined.
46635 Usually this means the macro was only invoked conditionally." "$LINENO" 5
46638 : "${CONFIG_STATUS=./config.status}"
46639 ac_write_fail=0
46640 ac_clean_files_save=$ac_clean_files
46641 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
46642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
46643 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
46644 as_write_fail=0
46645 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
46646 #! $SHELL
46647 # Generated by $as_me.
46648 # Run this file to recreate the current configuration.
46649 # Compiler output produced by configure, useful for debugging
46650 # configure, is in config.log if it exists.
46652 debug=false
46653 ac_cs_recheck=false
46654 ac_cs_silent=false
46656 SHELL=\${CONFIG_SHELL-$SHELL}
46657 export SHELL
46658 _ASEOF
46659 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
46660 ## -------------------- ##
46661 ## M4sh Initialization. ##
46662 ## -------------------- ##
46664 # Be more Bourne compatible
46665 DUALCASE=1; export DUALCASE # for MKS sh
46666 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
46667 then :
46668 emulate sh
46669 NULLCMD=:
46670 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
46671 # is contrary to our usage. Disable this feature.
46672 alias -g '${1+"$@"}'='"$@"'
46673 setopt NO_GLOB_SUBST
46674 else case e in #(
46675 e) case `(set -o) 2>/dev/null` in #(
46676 *posix*) :
46677 set -o posix ;; #(
46678 *) :
46680 esac ;;
46681 esac
46686 # Reset variables that may have inherited troublesome values from
46687 # the environment.
46689 # IFS needs to be set, to space, tab, and newline, in precisely that order.
46690 # (If _AS_PATH_WALK were called with IFS unset, it would have the
46691 # side effect of setting IFS to empty, thus disabling word splitting.)
46692 # Quoting is to prevent editors from complaining about space-tab.
46693 as_nl='
46695 export as_nl
46696 IFS=" "" $as_nl"
46698 PS1='$ '
46699 PS2='> '
46700 PS4='+ '
46702 # Ensure predictable behavior from utilities with locale-dependent output.
46703 LC_ALL=C
46704 export LC_ALL
46705 LANGUAGE=C
46706 export LANGUAGE
46708 # We cannot yet rely on "unset" to work, but we need these variables
46709 # to be unset--not just set to an empty or harmless value--now, to
46710 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
46711 # also avoids known problems related to "unset" and subshell syntax
46712 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
46713 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
46714 do eval test \${$as_var+y} \
46715 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
46716 done
46718 # Ensure that fds 0, 1, and 2 are open.
46719 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
46720 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
46721 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
46723 # The user is always right.
46724 if ${PATH_SEPARATOR+false} :; then
46725 PATH_SEPARATOR=:
46726 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
46727 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
46728 PATH_SEPARATOR=';'
46733 # Find who we are. Look in the path if we contain no directory separator.
46734 as_myself=
46735 case $0 in #((
46736 *[\\/]* ) as_myself=$0 ;;
46737 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46738 for as_dir in $PATH
46740 IFS=$as_save_IFS
46741 case $as_dir in #(((
46742 '') as_dir=./ ;;
46743 */) ;;
46744 *) as_dir=$as_dir/ ;;
46745 esac
46746 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
46747 done
46748 IFS=$as_save_IFS
46751 esac
46752 # We did not find ourselves, most probably we were run as 'sh COMMAND'
46753 # in which case we are not to be found in the path.
46754 if test "x$as_myself" = x; then
46755 as_myself=$0
46757 if test ! -f "$as_myself"; then
46758 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
46759 exit 1
46764 # as_fn_error STATUS ERROR [LINENO LOG_FD]
46765 # ----------------------------------------
46766 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
46767 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
46768 # script with STATUS, using 1 if that was 0.
46769 as_fn_error ()
46771 as_status=$1; test $as_status -eq 0 && as_status=1
46772 if test "$4"; then
46773 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
46774 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
46776 printf "%s\n" "$as_me: error: $2" >&2
46777 as_fn_exit $as_status
46778 } # as_fn_error
46781 # as_fn_set_status STATUS
46782 # -----------------------
46783 # Set $? to STATUS, without forking.
46784 as_fn_set_status ()
46786 return $1
46787 } # as_fn_set_status
46789 # as_fn_exit STATUS
46790 # -----------------
46791 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
46792 as_fn_exit ()
46794 set +e
46795 as_fn_set_status $1
46796 exit $1
46797 } # as_fn_exit
46799 # as_fn_unset VAR
46800 # ---------------
46801 # Portably unset VAR.
46802 as_fn_unset ()
46804 { eval $1=; unset $1;}
46806 as_unset=as_fn_unset
46808 # as_fn_append VAR VALUE
46809 # ----------------------
46810 # Append the text in VALUE to the end of the definition contained in VAR. Take
46811 # advantage of any shell optimizations that allow amortized linear growth over
46812 # repeated appends, instead of the typical quadratic growth present in naive
46813 # implementations.
46814 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
46815 then :
46816 eval 'as_fn_append ()
46818 eval $1+=\$2
46820 else case e in #(
46821 e) as_fn_append ()
46823 eval $1=\$$1\$2
46824 } ;;
46825 esac
46826 fi # as_fn_append
46828 # as_fn_arith ARG...
46829 # ------------------
46830 # Perform arithmetic evaluation on the ARGs, and store the result in the
46831 # global $as_val. Take advantage of shells that can avoid forks. The arguments
46832 # must be portable across $(()) and expr.
46833 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
46834 then :
46835 eval 'as_fn_arith ()
46837 as_val=$(( $* ))
46839 else case e in #(
46840 e) as_fn_arith ()
46842 as_val=`expr "$@" || test $? -eq 1`
46843 } ;;
46844 esac
46845 fi # as_fn_arith
46848 if expr a : '\(a\)' >/dev/null 2>&1 &&
46849 test "X`expr 00001 : '.*\(...\)'`" = X001; then
46850 as_expr=expr
46851 else
46852 as_expr=false
46855 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
46856 as_basename=basename
46857 else
46858 as_basename=false
46861 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
46862 as_dirname=dirname
46863 else
46864 as_dirname=false
46867 as_me=`$as_basename -- "$0" ||
46868 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
46869 X"$0" : 'X\(//\)$' \| \
46870 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
46871 printf "%s\n" X/"$0" |
46872 sed '/^.*\/\([^/][^/]*\)\/*$/{
46873 s//\1/
46876 /^X\/\(\/\/\)$/{
46877 s//\1/
46880 /^X\/\(\/\).*/{
46881 s//\1/
46884 s/.*/./; q'`
46886 # Avoid depending upon Character Ranges.
46887 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
46888 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
46889 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
46890 as_cr_digits='0123456789'
46891 as_cr_alnum=$as_cr_Letters$as_cr_digits
46894 # Determine whether it's possible to make 'echo' print without a newline.
46895 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
46896 # for compatibility with existing Makefiles.
46897 ECHO_C= ECHO_N= ECHO_T=
46898 case `echo -n x` in #(((((
46899 -n*)
46900 case `echo 'xy\c'` in
46901 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
46902 xy) ECHO_C='\c';;
46903 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
46904 ECHO_T=' ';;
46905 esac;;
46907 ECHO_N='-n';;
46908 esac
46910 # For backward compatibility with old third-party macros, we provide
46911 # the shell variables $as_echo and $as_echo_n. New code should use
46912 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
46913 as_echo='printf %s\n'
46914 as_echo_n='printf %s'
46916 rm -f conf$$ conf$$.exe conf$$.file
46917 if test -d conf$$.dir; then
46918 rm -f conf$$.dir/conf$$.file
46919 else
46920 rm -f conf$$.dir
46921 mkdir conf$$.dir 2>/dev/null
46923 if (echo >conf$$.file) 2>/dev/null; then
46924 if ln -s conf$$.file conf$$ 2>/dev/null; then
46925 as_ln_s='ln -s'
46926 # ... but there are two gotchas:
46927 # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
46928 # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
46929 # In both cases, we have to default to 'cp -pR'.
46930 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
46931 as_ln_s='cp -pR'
46932 elif ln conf$$.file conf$$ 2>/dev/null; then
46933 as_ln_s=ln
46934 else
46935 as_ln_s='cp -pR'
46937 else
46938 as_ln_s='cp -pR'
46940 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
46941 rmdir conf$$.dir 2>/dev/null
46944 # as_fn_mkdir_p
46945 # -------------
46946 # Create "$as_dir" as a directory, including parents if necessary.
46947 as_fn_mkdir_p ()
46950 case $as_dir in #(
46951 -*) as_dir=./$as_dir;;
46952 esac
46953 test -d "$as_dir" || eval $as_mkdir_p || {
46954 as_dirs=
46955 while :; do
46956 case $as_dir in #(
46957 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
46958 *) as_qdir=$as_dir;;
46959 esac
46960 as_dirs="'$as_qdir' $as_dirs"
46961 as_dir=`$as_dirname -- "$as_dir" ||
46962 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
46963 X"$as_dir" : 'X\(//\)[^/]' \| \
46964 X"$as_dir" : 'X\(//\)$' \| \
46965 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
46966 printf "%s\n" X"$as_dir" |
46967 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
46968 s//\1/
46971 /^X\(\/\/\)[^/].*/{
46972 s//\1/
46975 /^X\(\/\/\)$/{
46976 s//\1/
46979 /^X\(\/\).*/{
46980 s//\1/
46983 s/.*/./; q'`
46984 test -d "$as_dir" && break
46985 done
46986 test -z "$as_dirs" || eval "mkdir $as_dirs"
46987 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
46990 } # as_fn_mkdir_p
46991 if mkdir -p . 2>/dev/null; then
46992 as_mkdir_p='mkdir -p "$as_dir"'
46993 else
46994 test -d ./-p && rmdir ./-p
46995 as_mkdir_p=false
46999 # as_fn_executable_p FILE
47000 # -----------------------
47001 # Test if FILE is an executable regular file.
47002 as_fn_executable_p ()
47004 test -f "$1" && test -x "$1"
47005 } # as_fn_executable_p
47006 as_test_x='test -x'
47007 as_executable_p=as_fn_executable_p
47009 # Sed expression to map a string onto a valid CPP name.
47010 as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
47011 as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
47013 # Sed expression to map a string onto a valid variable name.
47014 as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
47015 as_tr_sh="eval sed '$as_sed_sh'" # deprecated
47018 exec 6>&1
47019 ## ----------------------------------- ##
47020 ## Main body of $CONFIG_STATUS script. ##
47021 ## ----------------------------------- ##
47022 _ASEOF
47023 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
47025 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47026 # Save the log message, to keep $0 and so on meaningful, and to
47027 # report actual input values of CONFIG_FILES etc. instead of their
47028 # values after options handling.
47029 ac_log="
47030 This file was extended by GNU sed $as_me 4.9, which was
47031 generated by GNU Autoconf 2.72a.65-d081. Invocation command line was
47033 CONFIG_FILES = $CONFIG_FILES
47034 CONFIG_HEADERS = $CONFIG_HEADERS
47035 CONFIG_LINKS = $CONFIG_LINKS
47036 CONFIG_COMMANDS = $CONFIG_COMMANDS
47037 $ $0 $@
47039 on `(hostname || uname -n) 2>/dev/null | sed 1q`
47042 _ACEOF
47044 case $ac_config_files in *"
47045 "*) set x $ac_config_files; shift; ac_config_files=$*;;
47046 esac
47048 case $ac_config_headers in *"
47049 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
47050 esac
47053 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47054 # Files that config.status was made for.
47055 config_files="$ac_config_files"
47056 config_headers="$ac_config_headers"
47057 config_links="$ac_config_links"
47058 config_commands="$ac_config_commands"
47060 _ACEOF
47062 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47063 ac_cs_usage="\
47064 '$as_me' instantiates files and other configuration actions
47065 from templates according to the current configuration. Unless the files
47066 and actions are specified as TAGs, all are instantiated by default.
47068 Usage: $0 [OPTION]... [TAG]...
47070 -h, --help print this help, then exit
47071 -V, --version print version number and configuration settings, then exit
47072 --config print configuration, then exit
47073 -q, --quiet, --silent
47074 do not print progress messages
47075 -d, --debug don't remove temporary files
47076 --recheck update $as_me by reconfiguring in the same conditions
47077 --file=FILE[:TEMPLATE]
47078 instantiate the configuration file FILE
47079 --header=FILE[:TEMPLATE]
47080 instantiate the configuration header FILE
47082 Configuration files:
47083 $config_files
47085 Configuration headers:
47086 $config_headers
47088 Configuration links:
47089 $config_links
47091 Configuration commands:
47092 $config_commands
47094 Report bugs to <bug-sed@gnu.org>.
47095 GNU sed home page: <https://www.gnu.org/software/sed/>.
47096 General help using GNU software: <https://www.gnu.org/gethelp/>."
47098 _ACEOF
47099 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
47100 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
47101 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47102 ac_cs_config='$ac_cs_config_escaped'
47103 ac_cs_version="\\
47104 GNU sed config.status 4.9
47105 configured by $0, generated by GNU Autoconf 2.72a.65-d081,
47106 with options \\"\$ac_cs_config\\"
47108 Copyright (C) 2022 Free Software Foundation, Inc.
47109 This config.status script is free software; the Free Software Foundation
47110 gives unlimited permission to copy, distribute and modify it."
47112 ac_pwd='$ac_pwd'
47113 srcdir='$srcdir'
47114 INSTALL='$INSTALL'
47115 MKDIR_P='$MKDIR_P'
47116 AWK='$AWK'
47117 test -n "\$AWK" || AWK=awk
47118 _ACEOF
47120 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47121 # The default lists apply if the user does not specify any file.
47122 ac_need_defaults=:
47123 while test $# != 0
47125 case $1 in
47126 --*=?*)
47127 ac_option=`expr "X$1" : 'X\([^=]*\)='`
47128 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
47129 ac_shift=:
47131 --*=)
47132 ac_option=`expr "X$1" : 'X\([^=]*\)='`
47133 ac_optarg=
47134 ac_shift=:
47137 ac_option=$1
47138 ac_optarg=$2
47139 ac_shift=shift
47141 esac
47143 case $ac_option in
47144 # Handling of the options.
47145 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
47146 ac_cs_recheck=: ;;
47147 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
47148 printf "%s\n" "$ac_cs_version"; exit ;;
47149 --config | --confi | --conf | --con | --co | --c )
47150 printf "%s\n" "$ac_cs_config"; exit ;;
47151 --debug | --debu | --deb | --de | --d | -d )
47152 debug=: ;;
47153 --file | --fil | --fi | --f )
47154 $ac_shift
47155 case $ac_optarg in
47156 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
47157 '') as_fn_error $? "missing file argument" ;;
47158 esac
47159 as_fn_append CONFIG_FILES " '$ac_optarg'"
47160 ac_need_defaults=false;;
47161 --header | --heade | --head | --hea )
47162 $ac_shift
47163 case $ac_optarg in
47164 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
47165 esac
47166 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
47167 ac_need_defaults=false;;
47168 --he | --h)
47169 # Conflict between --help and --header
47170 as_fn_error $? "ambiguous option: '$1'
47171 Try '$0 --help' for more information.";;
47172 --help | --hel | -h )
47173 printf "%s\n" "$ac_cs_usage"; exit ;;
47174 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
47175 | -silent | --silent | --silen | --sile | --sil | --si | --s)
47176 ac_cs_silent=: ;;
47178 # This is an error.
47179 -*) as_fn_error $? "unrecognized option: '$1'
47180 Try '$0 --help' for more information." ;;
47182 *) as_fn_append ac_config_targets " $1"
47183 ac_need_defaults=false ;;
47185 esac
47186 shift
47187 done
47189 ac_configure_extra_args=
47191 if $ac_cs_silent; then
47192 exec 6>/dev/null
47193 ac_configure_extra_args="$ac_configure_extra_args --silent"
47196 _ACEOF
47197 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47198 if \$ac_cs_recheck; then
47199 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
47200 shift
47201 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
47202 CONFIG_SHELL='$SHELL'
47203 export CONFIG_SHELL
47204 exec "\$@"
47207 _ACEOF
47208 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47209 exec 5>>config.log
47211 echo
47212 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
47213 ## Running $as_me. ##
47214 _ASBOX
47215 printf "%s\n" "$ac_log"
47216 } >&5
47218 _ACEOF
47219 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47221 # INIT-COMMANDS
47223 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
47224 GNUmakefile=$GNUmakefile
47225 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
47226 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
47227 # from automake < 1.5.
47228 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
47229 # Capture the value of LINGUAS because we need it to compute CATALOGS.
47230 LINGUAS="${LINGUAS-%UNSET%}"
47233 _ACEOF
47235 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47237 # Handling of arguments.
47238 for ac_config_target in $ac_config_targets
47240 case $ac_config_target in
47241 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config_h.in" ;;
47242 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
47243 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
47244 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
47245 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
47246 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
47247 "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;;
47249 *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
47250 esac
47251 done
47254 # If the user did not use the arguments to specify the items to instantiate,
47255 # then the envvar interface is used. Set only those that are not.
47256 # We use the long form for the default assignment because of an extremely
47257 # bizarre bug on SunOS 4.1.3.
47258 if $ac_need_defaults; then
47259 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
47260 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
47261 test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
47262 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
47265 # Have a temporary directory for convenience. Make it in the build tree
47266 # simply because there is no reason against having it here, and in addition,
47267 # creating and moving files from /tmp can sometimes cause problems.
47268 # Hook for its removal unless debugging.
47269 # Note that there is a small window in which the directory will not be cleaned:
47270 # after its creation but before its name has been assigned to '$tmp'.
47271 $debug ||
47273 tmp= ac_tmp=
47274 trap 'exit_status=$?
47275 : "${ac_tmp:=$tmp}"
47276 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
47278 trap 'as_fn_exit 1' 1 2 13 15
47280 # Create a (secure) tmp directory for tmp files.
47283 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
47284 test -d "$tmp"
47285 } ||
47287 tmp=./conf$$-$RANDOM
47288 (umask 077 && mkdir "$tmp")
47289 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
47290 ac_tmp=$tmp
47292 # Set up the scripts for CONFIG_FILES section.
47293 # No need to generate them if there are no CONFIG_FILES.
47294 # This happens for instance with './config.status config.h'.
47295 if test -n "$CONFIG_FILES"; then
47298 ac_cr=`echo X | tr X '\015'`
47299 # On cygwin, bash can eat \r inside `` if the user requested igncr.
47300 # But we know of no other shell where ac_cr would be empty at this
47301 # point, so we can use a bashism as a fallback.
47302 if test "x$ac_cr" = x; then
47303 eval ac_cr=\$\'\\r\'
47305 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
47306 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
47307 ac_cs_awk_cr='\\r'
47308 else
47309 ac_cs_awk_cr=$ac_cr
47312 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
47313 _ACEOF
47317 echo "cat >conf$$subs.awk <<_ACEOF" &&
47318 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
47319 echo "_ACEOF"
47320 } >conf$$subs.sh ||
47321 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
47322 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
47323 ac_delim='%!_!# '
47324 for ac_last_try in false false false false false :; do
47325 . ./conf$$subs.sh ||
47326 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
47328 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
47329 if test $ac_delim_n = $ac_delim_num; then
47330 break
47331 elif $ac_last_try; then
47332 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
47333 else
47334 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
47336 done
47337 rm -f conf$$subs.sh
47339 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47340 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
47341 _ACEOF
47342 sed -n '
47344 s/^/S["/; s/!.*/"]=/
47347 s/^[^!]*!//
47348 :repl
47349 t repl
47350 s/'"$ac_delim"'$//
47351 t delim
47354 s/\(.\{148\}\)..*/\1/
47355 t more1
47356 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
47359 b repl
47360 :more1
47361 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
47364 s/.\{148\}//
47365 t nl
47366 :delim
47368 s/\(.\{148\}\)..*/\1/
47369 t more2
47370 s/["\\]/\\&/g; s/^/"/; s/$/"/
47373 :more2
47374 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
47377 s/.\{148\}//
47378 t delim
47379 ' <conf$$subs.awk | sed '
47380 /^[^""]/{
47382 s/\n//
47384 ' >>$CONFIG_STATUS || ac_write_fail=1
47385 rm -f conf$$subs.awk
47386 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47387 _ACAWK
47388 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
47389 for (key in S) S_is_set[key] = 1
47390 FS = "\a"
47394 line = $ 0
47395 nfields = split(line, field, "@")
47396 substed = 0
47397 len = length(field[1])
47398 for (i = 2; i < nfields; i++) {
47399 key = field[i]
47400 keylen = length(key)
47401 if (S_is_set[key]) {
47402 value = S[key]
47403 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
47404 len += length(value) + length(field[++i])
47405 substed = 1
47406 } else
47407 len += 1 + keylen
47410 print line
47413 _ACAWK
47414 _ACEOF
47415 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47416 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
47417 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
47418 else
47420 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
47421 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
47422 _ACEOF
47424 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
47425 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
47426 # trailing colons and then remove the whole line if VPATH becomes empty
47427 # (actually we leave an empty line to preserve line numbers).
47428 if test "x$srcdir" = x.; then
47429 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
47431 s///
47432 s/^/:/
47433 s/[ ]*$/:/
47434 s/:\$(srcdir):/:/g
47435 s/:\${srcdir}:/:/g
47436 s/:@srcdir@:/:/g
47437 s/^:*//
47438 s/:*$//
47440 s/\(=[ ]*\).*/\1/
47442 s/\n//
47443 s/^[^=]*=[ ]*$//
47447 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47448 fi # test -n "$CONFIG_FILES"
47450 # Set up the scripts for CONFIG_HEADERS section.
47451 # No need to generate them if there are no CONFIG_HEADERS.
47452 # This happens for instance with './config.status Makefile'.
47453 if test -n "$CONFIG_HEADERS"; then
47454 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
47455 BEGIN {
47456 _ACEOF
47458 # Transform confdefs.h into an awk script 'defines.awk', embedded as
47459 # here-document in config.status, that substitutes the proper values into
47460 # config.h.in to produce config.h.
47462 # Create a delimiter string that does not exist in confdefs.h, to ease
47463 # handling of long lines.
47464 ac_delim='%!_!# '
47465 for ac_last_try in false false :; do
47466 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
47467 if test -z "$ac_tt"; then
47468 break
47469 elif $ac_last_try; then
47470 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
47471 else
47472 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
47474 done
47476 # For the awk script, D is an array of macro values keyed by name,
47477 # likewise P contains macro parameters if any. Preserve backslash
47478 # newline sequences.
47480 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
47481 sed -n '
47482 s/.\{148\}/&'"$ac_delim"'/g
47483 t rset
47484 :rset
47485 s/^[ ]*#[ ]*define[ ][ ]*/ /
47486 t def
47488 :def
47489 s/\\$//
47490 t bsnl
47491 s/["\\]/\\&/g
47492 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
47493 D["\1"]=" \3"/p
47494 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
47496 :bsnl
47497 s/["\\]/\\&/g
47498 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
47499 D["\1"]=" \3\\\\\\n"\\/p
47500 t cont
47501 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
47502 t cont
47504 :cont
47506 s/.\{148\}/&'"$ac_delim"'/g
47507 t clear
47508 :clear
47509 s/\\$//
47510 t bsnlc
47511 s/["\\]/\\&/g; s/^/"/; s/$/"/p
47513 :bsnlc
47514 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
47515 b cont
47516 ' <confdefs.h | sed '
47517 s/'"$ac_delim"'/"\\\
47518 "/g' >>$CONFIG_STATUS || ac_write_fail=1
47520 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47521 for (key in D) D_is_set[key] = 1
47522 FS = "\a"
47524 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
47525 line = \$ 0
47526 split(line, arg, " ")
47527 if (arg[1] == "#") {
47528 defundef = arg[2]
47529 mac1 = arg[3]
47530 } else {
47531 defundef = substr(arg[1], 2)
47532 mac1 = arg[2]
47534 split(mac1, mac2, "(") #)
47535 macro = mac2[1]
47536 prefix = substr(line, 1, index(line, defundef) - 1)
47537 if (D_is_set[macro]) {
47538 # Preserve the white space surrounding the "#".
47539 print prefix "define", macro P[macro] D[macro]
47540 next
47541 } else {
47542 # Replace #undef with comments. This is necessary, for example,
47543 # in the case of _POSIX_SOURCE, which is predefined and required
47544 # on some systems where configure will not decide to define it.
47545 if (defundef == "undef") {
47546 print "/*", prefix defundef, macro, "*/"
47547 next
47551 { print }
47552 _ACAWK
47553 _ACEOF
47554 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47555 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
47556 fi # test -n "$CONFIG_HEADERS"
47559 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
47560 shift
47561 for ac_tag
47563 case $ac_tag in
47564 :[FHLC]) ac_mode=$ac_tag; continue;;
47565 esac
47566 case $ac_mode$ac_tag in
47567 :[FHL]*:*);;
47568 :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
47569 :[FH]-) ac_tag=-:-;;
47570 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
47571 esac
47572 ac_save_IFS=$IFS
47573 IFS=:
47574 set x $ac_tag
47575 IFS=$ac_save_IFS
47576 shift
47577 ac_file=$1
47578 shift
47580 case $ac_mode in
47581 :L) ac_source=$1;;
47582 :[FH])
47583 ac_file_inputs=
47584 for ac_f
47586 case $ac_f in
47587 -) ac_f="$ac_tmp/stdin";;
47588 *) # Look for the file first in the build tree, then in the source tree
47589 # (if the path is not absolute). The absolute path cannot be DOS-style,
47590 # because $ac_f cannot contain ':'.
47591 test -f "$ac_f" ||
47592 case $ac_f in
47593 [\\/$]*) false;;
47594 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
47595 esac ||
47596 as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
47597 esac
47598 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
47599 as_fn_append ac_file_inputs " '$ac_f'"
47600 done
47602 # Let's still pretend it is 'configure' which instantiates (i.e., don't
47603 # use $as_me), people would be surprised to read:
47604 # /* config.h. Generated by config.status. */
47605 configure_input='Generated from '`
47606 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
47607 `' by configure.'
47608 if test x"$ac_file" != x-; then
47609 configure_input="$ac_file. $configure_input"
47610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
47611 printf "%s\n" "$as_me: creating $ac_file" >&6;}
47613 # Neutralize special characters interpreted by sed in replacement strings.
47614 case $configure_input in #(
47615 *\&* | *\|* | *\\* )
47616 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
47617 sed 's/[\\\\&|]/\\\\&/g'`;; #(
47618 *) ac_sed_conf_input=$configure_input;;
47619 esac
47621 case $ac_tag in
47622 *:-:* | *:-) cat >"$ac_tmp/stdin" \
47623 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
47624 esac
47626 esac
47628 ac_dir=`$as_dirname -- "$ac_file" ||
47629 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47630 X"$ac_file" : 'X\(//\)[^/]' \| \
47631 X"$ac_file" : 'X\(//\)$' \| \
47632 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
47633 printf "%s\n" X"$ac_file" |
47634 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
47635 s//\1/
47638 /^X\(\/\/\)[^/].*/{
47639 s//\1/
47642 /^X\(\/\/\)$/{
47643 s//\1/
47646 /^X\(\/\).*/{
47647 s//\1/
47650 s/.*/./; q'`
47651 as_dir="$ac_dir"; as_fn_mkdir_p
47652 ac_builddir=.
47654 case "$ac_dir" in
47655 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
47657 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
47658 # A ".." for each directory in $ac_dir_suffix.
47659 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
47660 case $ac_top_builddir_sub in
47661 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
47662 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
47663 esac ;;
47664 esac
47665 ac_abs_top_builddir=$ac_pwd
47666 ac_abs_builddir=$ac_pwd$ac_dir_suffix
47667 # for backward compatibility:
47668 ac_top_builddir=$ac_top_build_prefix
47670 case $srcdir in
47671 .) # We are building in place.
47672 ac_srcdir=.
47673 ac_top_srcdir=$ac_top_builddir_sub
47674 ac_abs_top_srcdir=$ac_pwd ;;
47675 [\\/]* | ?:[\\/]* ) # Absolute name.
47676 ac_srcdir=$srcdir$ac_dir_suffix;
47677 ac_top_srcdir=$srcdir
47678 ac_abs_top_srcdir=$srcdir ;;
47679 *) # Relative name.
47680 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
47681 ac_top_srcdir=$ac_top_build_prefix$srcdir
47682 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
47683 esac
47684 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
47687 case $ac_mode in
47690 # CONFIG_FILE
47693 case $INSTALL in
47694 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
47695 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
47696 esac
47697 ac_MKDIR_P=$MKDIR_P
47698 case $MKDIR_P in
47699 [\\/$]* | ?:[\\/]* ) ;;
47700 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
47701 esac
47702 _ACEOF
47704 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47705 # If the template does not know about datarootdir, expand it.
47706 # FIXME: This hack should be removed a few years after 2.60.
47707 ac_datarootdir_hack=; ac_datarootdir_seen=
47708 ac_sed_dataroot='
47709 /datarootdir/ {
47713 /@datadir@/p
47714 /@docdir@/p
47715 /@infodir@/p
47716 /@localedir@/p
47717 /@mandir@/p'
47718 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
47719 *datarootdir*) ac_datarootdir_seen=yes;;
47720 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
47721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
47722 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
47723 _ACEOF
47724 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47725 ac_datarootdir_hack='
47726 s&@datadir@&$datadir&g
47727 s&@docdir@&$docdir&g
47728 s&@infodir@&$infodir&g
47729 s&@localedir@&$localedir&g
47730 s&@mandir@&$mandir&g
47731 s&\\\${datarootdir}&$datarootdir&g' ;;
47732 esac
47733 _ACEOF
47735 # Neutralize VPATH when '$srcdir' = '.'.
47736 # Shell code in configure.ac might set extrasub.
47737 # FIXME: do we really want to maintain this feature?
47738 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47739 ac_sed_extra="$ac_vpsub
47740 $extrasub
47741 _ACEOF
47742 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47744 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
47745 s|@configure_input@|$ac_sed_conf_input|;t t
47746 s&@top_builddir@&$ac_top_builddir_sub&;t t
47747 s&@top_build_prefix@&$ac_top_build_prefix&;t t
47748 s&@srcdir@&$ac_srcdir&;t t
47749 s&@abs_srcdir@&$ac_abs_srcdir&;t t
47750 s&@top_srcdir@&$ac_top_srcdir&;t t
47751 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
47752 s&@builddir@&$ac_builddir&;t t
47753 s&@abs_builddir@&$ac_abs_builddir&;t t
47754 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
47755 s&@INSTALL@&$ac_INSTALL&;t t
47756 s&@MKDIR_P@&$ac_MKDIR_P&;t t
47757 $ac_datarootdir_hack
47759 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
47760 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
47762 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
47763 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
47764 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
47765 "$ac_tmp/out"`; test -z "$ac_out"; } &&
47766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir'
47767 which seems to be undefined. Please make sure it is defined" >&5
47768 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
47769 which seems to be undefined. Please make sure it is defined" >&2;}
47771 rm -f "$ac_tmp/stdin"
47772 case $ac_file in
47773 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
47774 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
47775 esac \
47776 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
47780 # CONFIG_HEADER
47782 if test x"$ac_file" != x-; then
47784 printf "%s\n" "/* $configure_input */" >&1 \
47785 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
47786 } >"$ac_tmp/config.h" \
47787 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
47788 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
47789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
47790 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
47791 else
47792 rm -f "$ac_file"
47793 mv "$ac_tmp/config.h" "$ac_file" \
47794 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
47796 else
47797 printf "%s\n" "/* $configure_input */" >&1 \
47798 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
47799 || as_fn_error $? "could not create -" "$LINENO" 5
47801 # Compute "$ac_file"'s index in $config_headers.
47802 _am_arg="$ac_file"
47803 _am_stamp_count=1
47804 for _am_header in $config_headers :; do
47805 case $_am_header in
47806 $_am_arg | $_am_arg:* )
47807 break ;;
47809 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
47810 esac
47811 done
47812 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
47813 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47814 X"$_am_arg" : 'X\(//\)[^/]' \| \
47815 X"$_am_arg" : 'X\(//\)$' \| \
47816 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
47817 printf "%s\n" X"$_am_arg" |
47818 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
47819 s//\1/
47822 /^X\(\/\/\)[^/].*/{
47823 s//\1/
47826 /^X\(\/\/\)$/{
47827 s//\1/
47830 /^X\(\/\).*/{
47831 s//\1/
47834 s/.*/./; q'`/stamp-h$_am_stamp_count
47838 # CONFIG_LINK
47841 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
47843 else
47844 # Prefer the file from the source tree if names are identical.
47845 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
47846 ac_source=$srcdir/$ac_source
47849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
47850 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
47852 if test ! -r "$ac_source"; then
47853 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
47855 rm -f "$ac_file"
47857 # Try a relative symlink, then a hard link, then a copy.
47858 case $ac_source in
47859 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
47860 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
47861 esac
47862 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
47863 ln "$ac_source" "$ac_file" 2>/dev/null ||
47864 cp -p "$ac_source" "$ac_file" ||
47865 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
47868 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
47869 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
47871 esac
47874 case $ac_file$ac_mode in
47875 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
47876 # Older Autoconf quotes --file arguments for eval, but not when files
47877 # are listed without --file. Let's play safe and only enable the eval
47878 # if we detect the quoting.
47879 # TODO: see whether this extra hack can be removed once we start
47880 # requiring Autoconf 2.70 or later.
47881 case $CONFIG_FILES in #(
47882 *\'*) :
47883 eval set x "$CONFIG_FILES" ;; #(
47884 *) :
47885 set x $CONFIG_FILES ;; #(
47886 *) :
47888 esac
47889 shift
47890 # Used to flag and report bootstrapping failures.
47891 am_rc=0
47892 for am_mf
47894 # Strip MF so we end up with the name of the file.
47895 am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
47896 # Check whether this is an Automake generated Makefile which includes
47897 # dependency-tracking related rules and includes.
47898 # Grep'ing the whole file directly is not great: AIX grep has a line
47899 # limit of 2048, but all sed's we know have understand at least 4000.
47900 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
47901 || continue
47902 am_dirpart=`$as_dirname -- "$am_mf" ||
47903 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47904 X"$am_mf" : 'X\(//\)[^/]' \| \
47905 X"$am_mf" : 'X\(//\)$' \| \
47906 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
47907 printf "%s\n" X"$am_mf" |
47908 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
47909 s//\1/
47912 /^X\(\/\/\)[^/].*/{
47913 s//\1/
47916 /^X\(\/\/\)$/{
47917 s//\1/
47920 /^X\(\/\).*/{
47921 s//\1/
47924 s/.*/./; q'`
47925 am_filepart=`$as_basename -- "$am_mf" ||
47926 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
47927 X"$am_mf" : 'X\(//\)$' \| \
47928 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
47929 printf "%s\n" X/"$am_mf" |
47930 sed '/^.*\/\([^/][^/]*\)\/*$/{
47931 s//\1/
47934 /^X\/\(\/\/\)$/{
47935 s//\1/
47938 /^X\/\(\/\).*/{
47939 s//\1/
47942 s/.*/./; q'`
47943 { echo "$as_me:$LINENO: cd "$am_dirpart" \
47944 && sed -e '/# am--include-marker/d' "$am_filepart" \
47945 | $MAKE -f - am--depfiles" >&5
47946 (cd "$am_dirpart" \
47947 && sed -e '/# am--include-marker/d' "$am_filepart" \
47948 | $MAKE -f - am--depfiles) >&5 2>&5
47949 ac_status=$?
47950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
47951 (exit $ac_status); } || am_rc=$?
47952 done
47953 if test $am_rc -ne 0; then
47954 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
47955 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
47956 as_fn_error $? "Something went wrong bootstrapping makefile fragments
47957 for automatic dependency tracking. If GNU make was not used, consider
47958 re-running the configure script with MAKE=\"gmake\" (or whatever is
47959 necessary). You can also try re-running configure with the
47960 '--disable-dependency-tracking' option to at least be able to build
47961 the package (albeit without support for automatic dependency tracking).
47962 See 'config.log' for more details" "$LINENO" 5; }
47964 { am_dirpart=; unset am_dirpart;}
47965 { am_filepart=; unset am_filepart;}
47966 { am_mf=; unset am_mf;}
47967 { am_rc=; unset am_rc;}
47968 rm -f conftest-deps.mk
47971 "po-directories":C)
47972 for ac_file in $CONFIG_FILES; do
47973 # Support "outfile[:infile[:infile...]]"
47974 case "$ac_file" in
47975 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
47976 esac
47977 # PO directories have a Makefile.in generated from Makefile.in.in.
47978 case "$ac_file" in */Makefile.in)
47979 # Adjust a relative srcdir.
47980 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
47981 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
47982 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
47983 # In autoconf-2.13 it is called $ac_given_srcdir.
47984 # In autoconf-2.50 it is called $srcdir.
47985 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
47986 case "$ac_given_srcdir" in
47987 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
47988 /*) top_srcdir="$ac_given_srcdir" ;;
47989 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
47990 esac
47991 # Treat a directory as a PO directory if and only if it has a
47992 # POTFILES.in file. This allows packages to have multiple PO
47993 # directories under different names or in different locations.
47994 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
47995 rm -f "$ac_dir/POTFILES"
47996 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
47997 gt_tab=`printf '\t'`
47998 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"
47999 POMAKEFILEDEPS="POTFILES.in"
48000 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
48001 # on $ac_dir but don't depend on user-specified configuration
48002 # parameters.
48003 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
48004 # The LINGUAS file contains the set of available languages.
48005 if test -n "$OBSOLETE_ALL_LINGUAS"; then
48006 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
48008 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
48009 # Hide the ALL_LINGUAS assignment from automake < 1.5.
48010 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
48011 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
48012 else
48013 # The set of available languages was given in configure.in.
48014 # Hide the ALL_LINGUAS assignment from automake < 1.5.
48015 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
48017 # Compute POFILES
48018 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
48019 # Compute UPDATEPOFILES
48020 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
48021 # Compute DUMMYPOFILES
48022 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
48023 # Compute GMOFILES
48024 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
48025 case "$ac_given_srcdir" in
48026 .) srcdirpre= ;;
48027 *) srcdirpre='$(srcdir)/' ;;
48028 esac
48029 POFILES=
48030 UPDATEPOFILES=
48031 DUMMYPOFILES=
48032 GMOFILES=
48033 for lang in $ALL_LINGUAS; do
48034 POFILES="$POFILES $srcdirpre$lang.po"
48035 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
48036 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
48037 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
48038 done
48039 # CATALOGS depends on both $ac_dir and the user's LINGUAS
48040 # environment variable.
48041 INST_LINGUAS=
48042 if test -n "$ALL_LINGUAS"; then
48043 for presentlang in $ALL_LINGUAS; do
48044 useit=no
48045 if test "%UNSET%" != "$LINGUAS"; then
48046 desiredlanguages="$LINGUAS"
48047 else
48048 desiredlanguages="$ALL_LINGUAS"
48050 for desiredlang in $desiredlanguages; do
48051 # Use the presentlang catalog if desiredlang is
48052 # a. equal to presentlang, or
48053 # b. a variant of presentlang (because in this case,
48054 # presentlang can be used as a fallback for messages
48055 # which are not translated in the desiredlang catalog).
48056 case "$desiredlang" in
48057 "$presentlang"*) useit=yes;;
48058 esac
48059 done
48060 if test $useit = yes; then
48061 INST_LINGUAS="$INST_LINGUAS $presentlang"
48063 done
48065 CATALOGS=
48066 if test -n "$INST_LINGUAS"; then
48067 for lang in $INST_LINGUAS; do
48068 CATALOGS="$CATALOGS $lang.gmo"
48069 done
48071 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
48072 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"
48073 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
48074 if test -f "$f"; then
48075 case "$f" in
48076 *.orig | *.bak | *~) ;;
48077 *) cat "$f" >> "$ac_dir/Makefile" ;;
48078 esac
48080 done
48083 esac
48084 done ;;
48086 esac
48087 done # for ac_tag
48090 as_fn_exit 0
48091 _ACEOF
48092 ac_clean_files=$ac_clean_files_save
48094 test $ac_write_fail = 0 ||
48095 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
48098 # configure is writing to config.log, and then calls config.status.
48099 # config.status does its own redirection, appending to config.log.
48100 # Unfortunately, on DOS this fails, as config.log is still kept open
48101 # by configure, so config.status won't be able to write to it; its
48102 # output is simply discarded. So we exec the FD to /dev/null,
48103 # effectively closing config.log, so it can be properly (re)opened and
48104 # appended to by config.status. When coming back to configure, we
48105 # need to make the FD available again.
48106 if test "$no_create" != yes; then
48107 ac_cs_success=:
48108 ac_config_status_args=
48109 test "$silent" = yes &&
48110 ac_config_status_args="$ac_config_status_args --quiet"
48111 exec 5>/dev/null
48112 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
48113 exec 5>>config.log
48114 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
48115 # would make configure fail if this is the last instruction.
48116 $ac_cs_success || as_fn_exit 1
48118 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
48119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
48120 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}